From e413b135083364c47192bde2a0ca5ca5f7e8c507 Mon Sep 17 00:00:00 2001 From: "Egon.io Bot" Date: Mon, 10 Jun 2024 15:54:53 +0000 Subject: [PATCH] Deploy production build --- app-v2/3rdpartylicenses.txt | 1506 - ...cb575c528bd7d.woff => Roboto-Regular.woff} | Bin .../{bpmn.5d33bee45f1fb468.eot => bpmn.eot} | Bin .../{bpmn.74eea12b52b25cb2.svg => bpmn.svg} | 0 .../{bpmn.b5c9250d7d4947c4.ttf => bpmn.ttf} | Bin .../{bpmn.e9e7d07618d46ca6.woff => bpmn.woff} | Bin ...bpmn.67058807b4bcf238.woff2 => bpmn.woff2} | Bin app-v2/index.html | 22 +- app-v2/main.aa0dae131072da86.js | 1 - app-v2/main.js | 10941 + app-v2/main.js.map | 1 + ...0a08.woff => material-icons-outlined.woff} | Bin ...fe.woff2 => material-icons-outlined.woff2} | Bin ...4c591e7.woff => material-icons-round.woff} | Bin ...fbc74.woff2 => material-icons-round.woff2} | Bin ...6c604de.woff => material-icons-sharp.woff} | Bin ...46422.woff2 => material-icons-sharp.woff2} | Bin ...07a7.woff => material-icons-two-tone.woff} | Bin ...3e.woff2 => material-icons-two-tone.woff2} | Bin ...034d2c499d9b6.woff => material-icons.woff} | Bin ...316b3fd6063.woff2 => material-icons.woff2} | Bin app-v2/polyfills.17b2342ca3371da0.js | 1 - app-v2/polyfills.js | 2767 + app-v2/polyfills.js.map | 1 + app-v2/runtime.bbaa96f2272e1c52.js | 1 - app-v2/runtime.js | 163 + app-v2/runtime.js.map | 1 + app-v2/styles.70d25995ee05de30.css | 1 - app-v2/styles.css | 3814 + app-v2/styles.css.map | 1 + app-v2/vendor.js | 155448 +++++++++++++++ app-v2/vendor.js.map | 1 + 32 files changed, 173149 insertions(+), 1521 deletions(-) delete mode 100644 app-v2/3rdpartylicenses.txt rename app-v2/{Roboto-Regular.acbcb575c528bd7d.woff => Roboto-Regular.woff} (100%) rename app-v2/{bpmn.5d33bee45f1fb468.eot => bpmn.eot} (100%) rename app-v2/{bpmn.74eea12b52b25cb2.svg => bpmn.svg} (100%) rename app-v2/{bpmn.b5c9250d7d4947c4.ttf => bpmn.ttf} (100%) rename app-v2/{bpmn.e9e7d07618d46ca6.woff => bpmn.woff} (100%) rename app-v2/{bpmn.67058807b4bcf238.woff2 => bpmn.woff2} (100%) delete mode 100644 app-v2/main.aa0dae131072da86.js create mode 100644 app-v2/main.js create mode 100644 app-v2/main.js.map rename app-v2/{material-icons-outlined.78a93b2079680a08.woff => material-icons-outlined.woff} (100%) rename app-v2/{material-icons-outlined.f86cb7b0aa53f0fe.woff2 => material-icons-outlined.woff2} (100%) rename app-v2/{material-icons-round.92dc7ca2f4c591e7.woff => material-icons-round.woff} (100%) rename app-v2/{material-icons-round.b10ec9db5b7fbc74.woff2 => material-icons-round.woff2} (100%) rename app-v2/{material-icons-sharp.a71cb2bf66c604de.woff => material-icons-sharp.woff} (100%) rename app-v2/{material-icons-sharp.3885863ee4746422.woff2 => material-icons-sharp.woff2} (100%) rename app-v2/{material-icons-two-tone.588d63134de807a7.woff => material-icons-two-tone.woff} (100%) rename app-v2/{material-icons-two-tone.675bd578bd14533e.woff2 => material-icons-two-tone.woff2} (100%) rename app-v2/{material-icons.4ad034d2c499d9b6.woff => material-icons.woff} (100%) rename app-v2/{material-icons.59322316b3fd6063.woff2 => material-icons.woff2} (100%) delete mode 100644 app-v2/polyfills.17b2342ca3371da0.js create mode 100644 app-v2/polyfills.js create mode 100644 app-v2/polyfills.js.map delete mode 100644 app-v2/runtime.bbaa96f2272e1c52.js create mode 100644 app-v2/runtime.js create mode 100644 app-v2/runtime.js.map delete mode 100644 app-v2/styles.70d25995ee05de30.css create mode 100644 app-v2/styles.css create mode 100644 app-v2/styles.css.map create mode 100644 app-v2/vendor.js create mode 100644 app-v2/vendor.js.map diff --git a/app-v2/3rdpartylicenses.txt b/app-v2/3rdpartylicenses.txt deleted file mode 100644 index 0a44af5..0000000 --- a/app-v2/3rdpartylicenses.txt +++ /dev/null @@ -1,1506 +0,0 @@ -@angular/animations -MIT - -@angular/cdk -MIT -The MIT License - -Copyright (c) 2024 Google LLC. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -@angular/common -MIT - -@angular/core -MIT - -@angular/forms -MIT - -@angular/material -MIT -The MIT License - -Copyright (c) 2024 Google LLC. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -@angular/platform-browser -MIT - -@babel/runtime -MIT -MIT License - -Copyright (c) 2014-present Sebastian McKenzie and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -available-typed-arrays -MIT -MIT License - -Copyright (c) 2020 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -bpmn-js -SEE LICENSE IN LICENSE - -bpmn-moddle -MIT -The MIT License (MIT) - -Copyright (c) 2014 camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -call-bind -MIT -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -css.escape -MIT -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -define-data-property -MIT -MIT License - -Copyright (c) 2023 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -diagram-js -MIT -The MIT License (MIT) - -Copyright (c) 2014-present Camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -diagram-js-direct-editing -MIT -The MIT License (MIT) - -Copyright (c) 2014-2017 camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -didi -MIT -The MIT License - -Copyright (C) 2013 Vojta Jína. -Copyright (C) 2015-present Nico Rehwaldt. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -dot -MIT - -Copyright (c) 2011 Laura Doktorova - -Software includes portions from jQote2 Copyright (c) 2010 aefxx, -http://aefxx.com/ licensed under the MIT license. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -es-define-property -MIT -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -es-errors -MIT -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -for-each -MIT -The MIT License (MIT) - -Copyright (c) 2012 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -function-bind -MIT -Copyright (c) 2013 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - - -get-intrinsic -MIT -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -gopd -MIT -MIT License - -Copyright (c) 2022 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -hammerjs -MIT -The MIT License (MIT) - -Copyright (C) 2011-2014 by Jorik Tangelder (Eight Media) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -has-property-descriptors -MIT -MIT License - -Copyright (c) 2022 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -has-proto -MIT -MIT License - -Copyright (c) 2022 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -has-symbols -MIT -MIT License - -Copyright (c) 2016 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -has-tostringtag -MIT -MIT License - -Copyright (c) 2021 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -hasown -MIT -MIT License - -Copyright (c) Jordan Harband and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -ids -MIT -The MIT License (MIT) - -Copyright (c) 2014 camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -inherits -ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - - - -is-arguments -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -is-callable -MIT -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -is-generator-function -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -is-typed-array -MIT -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -material-icons -Apache-2.0 - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -min-dash -MIT -The MIT License (MIT) - -Copyright (c) 2017-present camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -min-dom -MIT -The MIT License (MIT) - -Copyright (c) 2014 Nico Rehwaldt -Copyright (c) 2015-present camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -moddle -MIT -The MIT License (MIT) - -Copyright (c) 2014-present Camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -moddle-xml -MIT -The MIT License (MIT) - -Copyright (c) 2014-present Camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -object-refs -MIT -The MIT License (MIT) - -Copyright (c) 2014-present camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -path-intersection -MIT -The MIT License (MIT) - -Copyright (c) 2017 camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -process -MIT -(The MIT License) - -Copyright (c) 2013 Roman Shtylman - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -rxjs -Apache-2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -saxen -MIT -The MIT License (MIT) -Copyright (c) 2012 Vopilovskii Konstantin -Copyright (c) 2017-present Nico Rehwaldt - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -set-function-length -MIT -MIT License - -Copyright (c) Jordan Harband and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -tiny-svg -MIT -The MIT License (MIT) - -Copyright (c) 2014 Nico Rehwaldt -Copyright (c) 2015-present camunda Services GmbH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -tslib -0BSD -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -util -MIT -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - - -which-typed-array -MIT -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -zone.js -MIT -The MIT License - -Copyright (c) 2010-2023 Google LLC. https://angular.io/license - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/app-v2/Roboto-Regular.acbcb575c528bd7d.woff b/app-v2/Roboto-Regular.woff similarity index 100% rename from app-v2/Roboto-Regular.acbcb575c528bd7d.woff rename to app-v2/Roboto-Regular.woff diff --git a/app-v2/bpmn.5d33bee45f1fb468.eot b/app-v2/bpmn.eot similarity index 100% rename from app-v2/bpmn.5d33bee45f1fb468.eot rename to app-v2/bpmn.eot diff --git a/app-v2/bpmn.74eea12b52b25cb2.svg b/app-v2/bpmn.svg similarity index 100% rename from app-v2/bpmn.74eea12b52b25cb2.svg rename to app-v2/bpmn.svg diff --git a/app-v2/bpmn.b5c9250d7d4947c4.ttf b/app-v2/bpmn.ttf similarity index 100% rename from app-v2/bpmn.b5c9250d7d4947c4.ttf rename to app-v2/bpmn.ttf diff --git a/app-v2/bpmn.e9e7d07618d46ca6.woff b/app-v2/bpmn.woff similarity index 100% rename from app-v2/bpmn.e9e7d07618d46ca6.woff rename to app-v2/bpmn.woff diff --git a/app-v2/bpmn.67058807b4bcf238.woff2 b/app-v2/bpmn.woff2 similarity index 100% rename from app-v2/bpmn.67058807b4bcf238.woff2 rename to app-v2/bpmn.woff2 diff --git a/app-v2/index.html b/app-v2/index.html index 4a309a2..02e6a62 100644 --- a/app-v2/index.html +++ b/app-v2/index.html @@ -1,16 +1,16 @@ - + - + egon.io - - - - - - - - + + + + + + + + - + diff --git a/app-v2/main.aa0dae131072da86.js b/app-v2/main.aa0dae131072da86.js deleted file mode 100644 index f2311b4..0000000 --- a/app-v2/main.aa0dae131072da86.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkegon=self.webpackChunkegon||[]).push([[792],{831:(Te,Y,K)=>{"use strict";var j=K(249),he=K(475),De=he(j("String.prototype.indexOf"));Te.exports=function(pe,ae){var ne=j(pe,!!ae);return"function"==typeof ne&&De(pe,".prototype.")>-1?he(ne):ne}},475:(Te,Y,K)=>{"use strict";var j=K(307),he=K(249),De=K(797),ke=K(327),pe=he("%Function.prototype.apply%"),ae=he("%Function.prototype.call%"),ne=he("%Reflect.apply%",!0)||j.call(ae,pe),H=K(688),ce=he("%Math.max%");Te.exports=function(Ne){if("function"!=typeof Ne)throw new ke("a function is required");var We=ne(j,ae,arguments);return De(We,1+ce(0,Ne.length-(arguments.length-1)),!0)};var Ee=function(){return ne(j,pe,arguments)};H?H(Te.exports,"apply",{value:Ee}):Te.exports.apply=Ee},185:function(Te){var Y;Y=typeof global<"u"?global:this,Te.exports=function(Y){if(Y.CSS&&Y.CSS.escape)return Y.CSS.escape;var K=function(j){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var pe,he=String(j),De=he.length,ke=-1,ae="",ne=he.charCodeAt(0);++ke=1&&pe<=31||127==pe||0==ke&&pe>=48&&pe<=57||1==ke&&pe>=48&&pe<=57&&45==ne?"\\"+pe.toString(16)+" ":0==ke&&1==De&&45==pe||!(pe>=128||45==pe||95==pe||pe>=48&&pe<=57||pe>=65&&pe<=90||pe>=97&&pe<=122)?"\\"+he.charAt(ke):he.charAt(ke):ae+="\ufffd";return ae};return Y.CSS||(Y.CSS={}),Y.CSS.escape=K,K}(Y)},333:(Te,Y,K)=>{"use strict";var j=K(688),he=K(144),De=K(327),ke=K(31);Te.exports=function(ae,ne,H){if(!ae||"object"!=typeof ae&&"function"!=typeof ae)throw new De("`obj` must be an object or a function`");if("string"!=typeof ne&&"symbol"!=typeof ne)throw new De("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new De("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new De("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new De("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new De("`loose`, if provided, must be a boolean");var ce=arguments.length>3?arguments[3]:null,Ee=arguments.length>4?arguments[4]:null,Le=arguments.length>5?arguments[5]:null,Ne=arguments.length>6&&arguments[6],We=!!ke&&ke(ae,ne);if(j)j(ae,ne,{configurable:null===Le&&We?We.configurable:!Le,enumerable:null===ce&&We?We.enumerable:!ce,value:H,writable:null===Ee&&We?We.writable:!Ee});else{if(!Ne&&(ce||Ee||Le))throw new he("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");ae[ne]=H}}},659:(Te,Y,K)=>{var j;!function(){"use strict";var De,he={name:"doT",version:"1.1.1",templateSettings:{evaluate:/\{\{([\s\S]+?(\}?)+)\}\}/g,interpolate:/\{\{=([\s\S]+?)\}\}/g,encode:/\{\{!([\s\S]+?)\}\}/g,use:/\{\{#([\s\S]+?)\}\}/g,useParams:/(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,define:/\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,defineParams:/^\s*([\w$]+):([\s\S]+)/,conditional:/\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,iterate:/\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,varname:"it",strip:!0,append:!0,selfcontained:!1,doNotSkipEncoded:!1},template:void 0,compile:void 0,log:!0,encodeHTMLSource:function(H){var ce={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Ee=H?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(Le){return Le?Le.toString().replace(Ee,function(Ne){return ce[Ne]||Ne}):""}}};De=function(){return this||(0,eval)("this")}(),Te.exports?Te.exports=he:void 0!==(j=function(){return he}.call(Y,K,Y,Te))&&(Te.exports=j);var ke={append:{start:"'+(",end:")+'",startencode:"'+encodeHTML("},split:{start:"';out+=(",end:");out+='",startencode:"';out+=encodeHTML("}},pe=/$^/;function ae(H,ce,Ee){return("string"==typeof ce?ce:ce.toString()).replace(H.define||pe,function(Le,Ne,We,Ke){return 0===Ne.indexOf("def.")&&(Ne=Ne.substring(4)),Ne in Ee||(":"===We?(H.defineParams&&Ke.replace(H.defineParams,function(vt,Be,Je){Ee[Ne]={arg:Be,text:Je}}),Ne in Ee||(Ee[Ne]=Ke)):new Function("def","def['"+Ne+"']="+Ke)(Ee)),""}).replace(H.use||pe,function(Le,Ne){H.useParams&&(Ne=Ne.replace(H.useParams,function(Ke,vt,Be,Je){if(Ee[Be]&&Ee[Be].arg&&Je){var He=(Be+":"+Je).replace(/'|\\/g,"_");return Ee.__exp=Ee.__exp||{},Ee.__exp[He]=Ee[Be].text.replace(new RegExp("(^|[^\\w$])"+Ee[Be].arg+"([^\\w$])","g"),"$1"+Je+"$2"),vt+"def.__exp['"+He+"']"}}));var We=new Function("def","return "+Ne)(Ee);return We&&ae(H,We,Ee)})}function ne(H){return H.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}he.template=function(H,ce,Ee){var Ne,Ke,Le=(ce=ce||he.templateSettings).append?ke.append:ke.split,We=0,vt=ce.use||ce.define?ae(ce,H,Ee||{}):H;vt=("var out='"+(ce.strip?vt.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):vt).replace(/'|\\/g,"\\$&").replace(ce.interpolate||pe,function(Be,Je){return Le.start+ne(Je)+Le.end}).replace(ce.encode||pe,function(Be,Je){return Ne=!0,Le.startencode+ne(Je)+Le.end}).replace(ce.conditional||pe,function(Be,Je,He){return Je?He?"';}else if("+ne(He)+"){out+='":"';}else{out+='":He?"';if("+ne(He)+"){out+='":"';}out+='"}).replace(ce.iterate||pe,function(Be,Je,He,rt){return Je?(We+=1,Ke=rt||"i"+We,Je=ne(Je),"';var arr"+We+"="+Je+";if(arr"+We+"){var "+He+","+Ke+"=-1,l"+We+"=arr"+We+".length-1;while("+Ke+"{"use strict";var he=K(249)("%Object.defineProperty%",!0)||!1;if(he)try{he({},"a",{value:1})}catch{he=!1}Te.exports=he},153:Te=>{"use strict";Te.exports=EvalError},939:Te=>{"use strict";Te.exports=Error},486:Te=>{"use strict";Te.exports=RangeError},654:Te=>{"use strict";Te.exports=ReferenceError},144:Te=>{"use strict";Te.exports=SyntaxError},327:Te=>{"use strict";Te.exports=TypeError},5:Te=>{"use strict";Te.exports=URIError},990:(Te,Y,K)=>{"use strict";var j=K(460),he=Object.prototype.toString,De=Object.prototype.hasOwnProperty;Te.exports=function(ce,Ee,Le){if(!j(Ee))throw new TypeError("iterator must be a function");var Ne;arguments.length>=3&&(Ne=Le),"[object Array]"===he.call(ce)?function(ce,Ee,Le){for(var Ne=0,We=ce.length;Ne{"use strict";var K=Object.prototype.toString,j=Math.max,De=function(ne,H){for(var ce=[],Ee=0;Ee{"use strict";var j=K(421);Te.exports=Function.prototype.bind||j},249:(Te,Y,K)=>{"use strict";var j,he=K(939),De=K(153),ke=K(486),pe=K(654),ae=K(144),ne=K(327),H=K(5),ce=Function,Ee=function(Pn){try{return ce('"use strict"; return ('+Pn+").constructor;")()}catch{}},Le=Object.getOwnPropertyDescriptor;if(Le)try{Le({},"")}catch{Le=null}var Ne=function(){throw new ne},We=Le?function(){try{return Ne}catch{try{return Le(arguments,"callee").get}catch{return Ne}}}():Ne,Ke=K(67)(),vt=K(908)(),Be=Object.getPrototypeOf||(vt?function(Pn){return Pn.__proto__}:null),Je={},He=typeof Uint8Array>"u"||!Be?j:Be(Uint8Array),rt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?j:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?j:ArrayBuffer,"%ArrayIteratorPrototype%":Ke&&Be?Be([][Symbol.iterator]()):j,"%AsyncFromSyncIteratorPrototype%":j,"%AsyncFunction%":Je,"%AsyncGenerator%":Je,"%AsyncGeneratorFunction%":Je,"%AsyncIteratorPrototype%":Je,"%Atomics%":typeof Atomics>"u"?j:Atomics,"%BigInt%":typeof BigInt>"u"?j:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?j:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?j:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?j:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":he,"%eval%":eval,"%EvalError%":De,"%Float32Array%":typeof Float32Array>"u"?j:Float32Array,"%Float64Array%":typeof Float64Array>"u"?j:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?j:FinalizationRegistry,"%Function%":ce,"%GeneratorFunction%":Je,"%Int8Array%":typeof Int8Array>"u"?j:Int8Array,"%Int16Array%":typeof Int16Array>"u"?j:Int16Array,"%Int32Array%":typeof Int32Array>"u"?j:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ke&&Be?Be(Be([][Symbol.iterator]())):j,"%JSON%":"object"==typeof JSON?JSON:j,"%Map%":typeof Map>"u"?j:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ke||!Be?j:Be((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?j:Promise,"%Proxy%":typeof Proxy>"u"?j:Proxy,"%RangeError%":ke,"%ReferenceError%":pe,"%Reflect%":typeof Reflect>"u"?j:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?j:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ke||!Be?j:Be((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?j:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ke&&Be?Be(""[Symbol.iterator]()):j,"%Symbol%":Ke?Symbol:j,"%SyntaxError%":ae,"%ThrowTypeError%":We,"%TypedArray%":He,"%TypeError%":ne,"%Uint8Array%":typeof Uint8Array>"u"?j:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?j:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?j:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?j:Uint32Array,"%URIError%":H,"%WeakMap%":typeof WeakMap>"u"?j:WeakMap,"%WeakRef%":typeof WeakRef>"u"?j:WeakRef,"%WeakSet%":typeof WeakSet>"u"?j:WeakSet};if(Be)try{null.error}catch(Pn){var Jn=Be(Be(Pn));rt["%Error.prototype%"]=Jn}var qn=function Pn(rn){var V;if("%AsyncFunction%"===rn)V=Ee("async function () {}");else if("%GeneratorFunction%"===rn)V=Ee("function* () {}");else if("%AsyncGeneratorFunction%"===rn)V=Ee("async function* () {}");else if("%AsyncGenerator%"===rn){var X=Pn("%AsyncGeneratorFunction%");X&&(V=X.prototype)}else if("%AsyncIteratorPrototype%"===rn){var ue=Pn("%AsyncGenerator%");ue&&Be&&(V=Be(ue.prototype))}return rt[rn]=V,V},Yi={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},wi=K(307),Nn=K(961),Ei=wi.call(Function.call,Array.prototype.concat),wn=wi.call(Function.apply,Array.prototype.splice),Oi=wi.call(Function.call,String.prototype.replace),Yn=wi.call(Function.call,String.prototype.slice),or=wi.call(Function.call,RegExp.prototype.exec),gr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ri=/\\(\\)?/g,Uo=function(rn,V){var ue,X=rn;if(Nn(Yi,X)&&(X="%"+(ue=Yi[X])[0]+"%"),Nn(rt,X)){var M=rt[X];if(M===Je&&(M=qn(X)),typeof M>"u"&&!V)throw new ne("intrinsic "+rn+" exists, but is not available. Please file an issue!");return{alias:ue,name:X,value:M}}throw new ae("intrinsic "+rn+" does not exist!")};Te.exports=function(rn,V){if("string"!=typeof rn||0===rn.length)throw new ne("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof V)throw new ne('"allowMissing" argument must be a boolean');if(null===or(/^%?[^%]*%?$/,rn))throw new ae("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var X=function(rn){var V=Yn(rn,0,1),X=Yn(rn,-1);if("%"===V&&"%"!==X)throw new ae("invalid intrinsic syntax, expected closing `%`");if("%"===X&&"%"!==V)throw new ae("invalid intrinsic syntax, expected opening `%`");var ue=[];return Oi(rn,gr,function(M,z,G,xe){ue[ue.length]=G?Oi(xe,Ri,"$1"):z||M}),ue}(rn),ue=X.length>0?X[0]:"",M=Uo("%"+ue+"%",V),z=M.name,G=M.value,xe=!1,Se=M.alias;Se&&(ue=Se[0],wn(X,Ei([0,1],Se)));for(var fe=1,ie=!0;fe=X.length){var J=Le(G,le);G=(ie=!!J)&&"get"in J&&!("originalValue"in J.get)?J.get:G[le]}else ie=Nn(G,le),G=G[le];ie&&!xe&&(rt[z]=G)}}return G}},31:(Te,Y,K)=>{"use strict";var he=K(249)("%Object.getOwnPropertyDescriptor%",!0);if(he)try{he([],"length")}catch{he=null}Te.exports=he},716:(Te,Y,K)=>{var j;!function(he,De,ke,pe){"use strict";var Be,ae=["","webkit","Moz","MS","ms","o"],ne=De.createElement("div"),H="function",ce=Math.round,Ee=Math.abs,Le=Date.now;function Ne(y,S,I){return setTimeout(Jn(y,I),S)}function We(y,S,I){return!!Array.isArray(y)&&(Ke(y,I[S],I),!0)}function Ke(y,S,I){var U;if(y)if(y.forEach)y.forEach(S,I);else if(y.length!==pe)for(U=0;U\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",Xt=he.console&&(he.console.warn||he.console.log);return Xt&&Xt.call(he.console,U,Xe),y.apply(this,arguments)}}Be="function"!=typeof Object.assign?function(S){if(S===pe||null===S)throw new TypeError("Cannot convert undefined or null to object");for(var I=Object(S),U=1;U-1}function Oi(y){return y.trim().split(/\s+/g)}function Yn(y,S,I){if(y.indexOf&&!I)return y.indexOf(S);for(var U=0;Uar[S]}):U.sort()),U}function Ri(y,S){for(var I,U,Q=S[0].toUpperCase()+S.slice(1),Xe=0;Xe1&&!I.firstMultiple?I.firstMultiple=zs(S):1===Q&&(I.firstMultiple=!1);var Xe=I.firstInput,Xt=I.firstMultiple,Pi=Xt?Xt.center:Xe.center,$i=S.center=wo(U);S.timeStamp=Le(),S.deltaTime=S.timeStamp-Xe.timeStamp,S.angle=Hs(Pi,$i),S.distance=ya(Pi,$i),function uh(y,S){var I=S.center,U=y.offsetDelta||{},Q=y.prevDelta||{},Xe=y.prevInput||{};(S.eventType===fe||Xe.eventType===le)&&(Q=y.prevDelta={x:Xe.deltaX||0,y:Xe.deltaY||0},U=y.offsetDelta={x:I.x,y:I.y}),S.deltaX=Q.x+(I.x-U.x),S.deltaY=Q.y+(I.y-U.y)}(I,S),S.offsetDirection=ed(S.deltaX,S.deltaY);var ar=rs(S.deltaTime,S.deltaX,S.deltaY);S.overallVelocityX=ar.x,S.overallVelocityY=ar.y,S.overallVelocity=Ee(ar.x)>Ee(ar.y)?ar.x:ar.y,S.scale=Xt?function td(y,S){return ya(S[0],S[1],At)/ya(y[0],y[1],At)}(Xt.pointers,U):1,S.rotation=Xt?function $s(y,S){return Hs(S[1],S[0],At)+Hs(y[1],y[0],At)}(Xt.pointers,U):0,S.maxPointers=I.prevInput?S.pointers.length>I.prevInput.maxPointers?S.pointers.length:I.prevInput.maxPointers:S.pointers.length,function hh(y,S){var Q,Xe,Xt,Pi,I=y.lastInterval||S,U=S.timeStamp-I.timeStamp;if(S.eventType!=Ae&&(U>Se||I.velocity===pe)){var $i=S.deltaX-I.deltaX,ar=S.deltaY-I.deltaY,ge=rs(U,$i,ar);Xe=ge.x,Xt=ge.y,Q=Ee(ge.x)>Ee(ge.y)?ge.x:ge.y,Pi=ed($i,ar),y.lastInterval=S}else Q=I.velocity,Xe=I.velocityX,Xt=I.velocityY,Pi=I.direction;S.velocity=Q,S.velocityX=Xe,S.velocityY=Xt,S.direction=Pi}(I,S);var ge=y.element;Ei(S.srcEvent.target,ge)&&(ge=S.srcEvent.target),S.target=ge}(y,I),y.emit("hammer.input",I),y.recognize(I),y.session.prevInput=I}function zs(y){for(var S=[],I=0;I=Ee(S)?y<0?J:_e:S<0?pt:yt}function ya(y,S,I){I||(I=Dn);var U=S[I[0]]-y[I[0]],Q=S[I[1]]-y[I[1]];return Math.sqrt(U*U+Q*Q)}function Hs(y,S,I){return I||(I=Dn),180*Math.atan2(S[I[1]]-y[I[1]],S[I[0]]-y[I[0]])/Math.PI}dn.prototype={handler:function(){},init:function(){this.evEl&&wi(this.element,this.evEl,this.domHandler),this.evTarget&&wi(this.target,this.evTarget,this.domHandler),this.evWin&&wi(Pn(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&Nn(this.element,this.evEl,this.domHandler),this.evTarget&&Nn(this.target,this.evTarget,this.domHandler),this.evWin&&Nn(Pn(this.element),this.evWin,this.domHandler)}};var xa={mousedown:fe,mousemove:2,mouseup:le},Xr="mousedown",nd="mousemove mouseup";function Wo(){this.evEl=Xr,this.evWin=nd,this.pressed=!1,dn.apply(this,arguments)}rt(Wo,dn,{handler:function(S){var I=xa[S.type];I&fe&&0===S.button&&(this.pressed=!0),2&I&&1!==S.which&&(I=le),this.pressed&&(I&le&&(this.pressed=!1),this.callback(this.manager,I,{pointers:[S],changedPointers:[S],pointerType:G,srcEvent:S}))}});var id={pointerdown:fe,pointermove:2,pointerup:le,pointercancel:Ae,pointerout:Ae},Lr={2:M,3:"pen",4:G,5:"kinect"},qo="pointerdown",rd="pointermove pointerup pointercancel";function os(){this.evEl=qo,this.evWin=rd,dn.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}he.MSPointerEvent&&!he.PointerEvent&&(qo="MSPointerDown",rd="MSPointerMove MSPointerUp MSPointerCancel"),rt(os,dn,{handler:function(S){var I=this.store,U=!1,Q=S.type.toLowerCase().replace("ms",""),Xe=id[Q],Xt=Lr[S.pointerType]||S.pointerType,Pi=Xt==M,$i=Yn(I,S.pointerId,"pointerId");Xe&fe&&(0===S.button||Pi)?$i<0&&(I.push(S),$i=I.length-1):Xe&(le|Ae)&&(U=!0),!($i<0)&&(I[$i]=S,this.callback(this.manager,Xe,{pointers:I,changedPointers:[S],pointerType:Xt,srcEvent:S}),U&&I.splice($i,1))}});var kn={touchstart:fe,touchmove:2,touchend:le,touchcancel:Ae};function Up(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,dn.apply(this,arguments)}function b0(y,S){var I=or(y.touches),U=or(y.changedTouches);return S&(le|Ae)&&(I=gr(I.concat(U),"identifier",!0)),[I,U]}rt(Up,dn,{handler:function(S){var I=kn[S.type];if(I===fe&&(this.started=!0),this.started){var U=b0.call(this,S,I);I&(le|Ae)&&U[0].length-U[1].length==0&&(this.started=!1),this.callback(this.manager,I,{pointers:U[0],changedPointers:U[1],pointerType:M,srcEvent:S})}}});var xt={touchstart:fe,touchmove:2,touchend:le,touchcancel:Ae},Gp="touchstart touchmove touchend touchcancel";function on(){this.evTarget=Gp,this.targetIds={},dn.apply(this,arguments)}function y0(y,S){var I=or(y.touches),U=this.targetIds;if(S&(2|fe)&&1===I.length)return U[I[0].identifier]=!0,[I,I];var Q,Xe,Xt=or(y.changedTouches),Pi=[],$i=this.target;if(Xe=I.filter(function(ar){return Ei(ar.target,$i)}),S===fe)for(Q=0;Q-1&&U.splice(Xe,1)},vr)}}function Wp(y){for(var S=y.srcEvent.clientX,I=y.srcEvent.clientY,U=0;U-1&&this.requireFail.splice(S,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(y){return!!this.simultaneous[y.id]},emit:function(y){var S=this,I=this.state;function U(Q){S.manager.emit(Q,y)}I<8&&U(S.options.event+ci(I)),U(S.options.event),y.additionalEvent&&U(y.additionalEvent),I>=8&&U(S.options.event+ci(I))},tryEmit:function(y){if(this.canEmit())return this.emit(y);this.state=32},canEmit:function(){for(var y=0;yS.threshold&&Q&S.direction},attrTest:function(y){return Zr.prototype.attrTest.call(this,y)&&(2&this.state||!(2&this.state)&&this.directionTest(y))},emit:function(y){this.pX=y.deltaX,this.pY=y.deltaY;var S=sd(y.direction);S&&(y.additionalEvent=this.options.event+S),this._super.emit.call(this,y)}}),rt(gt,Zr,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Us]},attrTest:function(y){return this._super.attrTest.call(this,y)&&(Math.abs(y.scale-1)>this.options.threshold||2&this.state)},emit:function(y){1!==y.scale&&(y.additionalEvent=this.options.event+(y.scale<1?"in":"out")),this._super.emit.call(this,y)}}),rt(Ys,Ko,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(y){var S=this.options,I=y.pointers.length===S.pointers,U=y.distanceS.time;if(this._input=y,!U||!I||y.eventType&(le|Ae)&&!Q)this.reset();else if(y.eventType&fe)this.reset(),this._timer=Ne(function(){this.state=8,this.tryEmit()},S.time,this);else if(y.eventType&le)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(y){8===this.state&&(y&&y.eventType&le?this.manager.emit(this.options.event+"up",y):(this._input.timeStamp=Le(),this.manager.emit(this.options.event,this._input)))}}),rt(Zi,Zr,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Us]},attrTest:function(y){return this._super.attrTest.call(this,y)&&(Math.abs(y.rotation)>this.options.threshold||2&this.state)}}),rt(Kp,Zr,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:ot|hn,pointers:1},getTouchAction:function(){return an.prototype.getTouchAction.call(this)},attrTest:function(y){var I,S=this.options.direction;return S&(ot|hn)?I=y.overallVelocity:S&ot?I=y.overallVelocityX:S&hn&&(I=y.overallVelocityY),this._super.attrTest.call(this,y)&&S&y.offsetDirection&&y.distance>this.options.threshold&&y.maxPointers==this.options.pointers&&Ee(I)>this.options.velocity&&y.eventType&le},emit:function(y){var S=sd(y.offsetDirection);S&&this.manager.emit(this.options.event+S,y),this.manager.emit(this.options.event,y)}}),rt(cd,Ko,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[qp]},process:function(y){var S=this.options,I=y.pointers.length===S.pointers,U=y.distance{"use strict";var j=K(688),he=function(){return!!j};he.hasArrayLengthDefineBug=function(){if(!j)return null;try{return 1!==j([],"length",{value:1}).length}catch{return!0}},Te.exports=he},908:Te=>{"use strict";var Y={foo:{}},K=Object;Te.exports=function(){return{__proto__:Y}.foo===Y.foo&&!({__proto__:null}instanceof K)}},67:(Te,Y,K)=>{"use strict";var j=typeof Symbol<"u"&&Symbol,he=K(401);Te.exports=function(){return"function"==typeof j&&"function"==typeof Symbol&&"symbol"==typeof j("foo")&&"symbol"==typeof Symbol("bar")&&he()}},401:Te=>{"use strict";Te.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var K={},j=Symbol("test"),he=Object(j);if("string"==typeof j||"[object Symbol]"!==Object.prototype.toString.call(j)||"[object Symbol]"!==Object.prototype.toString.call(he))return!1;for(j in K[j]=42,K)return!1;if("function"==typeof Object.keys&&0!==Object.keys(K).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(K).length)return!1;var ke=Object.getOwnPropertySymbols(K);if(1!==ke.length||ke[0]!==j||!Object.prototype.propertyIsEnumerable.call(K,j))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var pe=Object.getOwnPropertyDescriptor(K,j);if(42!==pe.value||!0!==pe.enumerable)return!1}return!0}},603:(Te,Y,K)=>{"use strict";var j=K(401);Te.exports=function(){return j()&&!!Symbol.toStringTag}},961:(Te,Y,K)=>{"use strict";var j=Function.prototype.call,he=Object.prototype.hasOwnProperty,De=K(307);Te.exports=De.call(j,he)},270:Te=>{Te.exports="function"==typeof Object.create?function(K,j){j&&(K.super_=j,K.prototype=Object.create(j.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}))}:function(K,j){if(j){K.super_=j;var he=function(){};he.prototype=j.prototype,K.prototype=new he,K.prototype.constructor=K}}},984:(Te,Y,K)=>{"use strict";var j=K(603)(),De=K(831)("Object.prototype.toString"),ke=function(H){return!(j&&H&&"object"==typeof H&&Symbol.toStringTag in H)&&"[object Arguments]"===De(H)},pe=function(H){return!!ke(H)||null!==H&&"object"==typeof H&&"number"==typeof H.length&&H.length>=0&&"[object Array]"!==De(H)&&"[object Function]"===De(H.callee)},ae=function(){return ke(arguments)}();ke.isLegacyArguments=pe,Te.exports=ae?ke:pe},460:Te=>{"use strict";var j,he,Y=Function.prototype.toString,K="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof K&&"function"==typeof Object.defineProperty)try{j=Object.defineProperty({},"length",{get:function(){throw he}}),he={},K(function(){throw 42},null,j)}catch(Je){Je!==he&&(K=null)}else K=null;var De=/^\s*class\b/,ke=function(He){try{var rt=Y.call(He);return De.test(rt)}catch{return!1}},pe=function(He){try{return!ke(He)&&(Y.call(He),!0)}catch{return!1}},ae=Object.prototype.toString,We="function"==typeof Symbol&&!!Symbol.toStringTag,Ke=!(0 in[,]),vt=function(){return!1};if("object"==typeof document){var Be=document.all;ae.call(Be)===ae.call(document.all)&&(vt=function(He){if((Ke||!He)&&(typeof He>"u"||"object"==typeof He))try{var rt=ae.call(He);return("[object HTMLAllCollection]"===rt||"[object HTML document.all class]"===rt||"[object HTMLCollection]"===rt||"[object Object]"===rt)&&null==He("")}catch{}return!1})}Te.exports=K?function(He){if(vt(He))return!0;if(!He||"function"!=typeof He&&"object"!=typeof He)return!1;try{K(He,null,j)}catch(rt){if(rt!==he)return!1}return!ke(He)&&pe(He)}:function(He){if(vt(He))return!0;if(!He||"function"!=typeof He&&"object"!=typeof He)return!1;if(We)return pe(He);if(ke(He))return!1;var rt=ae.call(He);return!("[object Function]"!==rt&&"[object GeneratorFunction]"!==rt&&!/^\[object HTML/.test(rt))&&pe(He)}},276:(Te,Y,K)=>{"use strict";var ne,j=Object.prototype.toString,he=Function.prototype.toString,De=/^\s*(?:function)?\*/,ke=K(603)(),pe=Object.getPrototypeOf;Te.exports=function(ce){if("function"!=typeof ce)return!1;if(De.test(he.call(ce)))return!0;if(!ke)return"[object GeneratorFunction]"===j.call(ce);if(!pe)return!1;if(typeof ne>"u"){var Le=function(){if(!ke)return!1;try{return Function("return function*() {}")()}catch{}}();ne=!!Le&&pe(Le)}return pe(ce)===ne}},468:(Te,Y,K)=>{"use strict";var j=K(323);Te.exports=function(De){return!!j(De)}},867:(Te,Y,K)=>{Te.exports=K(389),Te.exports.Collection=K(251)},251:Te=>{"use strict";Te.exports.extend=function Y(j,he,De,ke){var pe=De.inverse;return Object.defineProperty(j,"remove",{value:function(ae){var ne=this.indexOf(ae);return-1!==ne&&(this.splice(ne,1),he.unset(ae,pe,ke)),ae}}),Object.defineProperty(j,"contains",{value:function(ae){return-1!==this.indexOf(ae)}}),Object.defineProperty(j,"add",{value:function(ae,ne){var H=this.indexOf(ae);if(typeof ne>"u"){if(-1!==H)return;ne=this.length}-1!==H&&this.splice(H,1),this.splice(ne,0,ae),-1===H&&he.set(ae,pe,ke)}}),Object.defineProperty(j,"__refs_collection",{value:!0}),j},Te.exports.isExtended=function K(j){return!0===j.__refs_collection}},389:(Te,Y,K)=>{"use strict";var j=K(251);function De(ae,ne,H){var ce=j.extend(H[ne.name]||[],ae,ne,H);Object.defineProperty(H,ne.name,{enumerable:ne.enumerable,value:ce}),ce.length&&ce.forEach(function(Ee){ae.set(Ee,ne.inverse,H)})}function pe(ae,ne){if(!(this instanceof pe))return new pe(ae,ne);ae.inverse=ne,ne.inverse=ae,this.props={},this.props[ae.name]=ae,this.props[ne.name]=ne}pe.prototype.bind=function(ae,ne){if("string"==typeof ne){if(!this.props[ne])throw new Error("no property <"+ne+"> in ref");ne=this.props[ne]}ne.collection?De(this,ne,ae):function ke(ae,ne,H){var ce=ne.inverse,Ee=H[ne.name];Object.defineProperty(H,ne.name,{configurable:ne.configurable,enumerable:ne.enumerable,get:function(){return Ee},set:function(Le){if(Le!==Ee){var Ne=Ee;Ee=null,Ne&&ae.unset(Ne,ce,H),ae.set(Ee=Le,ce,H)}}})}(this,ne,ae)},pe.prototype.ensureRefsCollection=function(ae,ne){var H=ae[ne.name];return j.isExtended(H)||De(this,ne,ae),H},pe.prototype.ensureBound=function(ae,ne){(function he(ae,ne){return Object.prototype.hasOwnProperty.call(ae,ne.name||ne)})(ae,ne)||this.bind(ae,ne)},pe.prototype.unset=function(ae,ne,H){ae&&(this.ensureBound(ae,ne),ne.collection?this.ensureRefsCollection(ae,ne).remove(H):ae[ne.name]=void 0)},pe.prototype.set=function(ae,ne,H){ae&&(this.ensureBound(ae,ne),ne.collection?this.ensureRefsCollection(ae,ne).add(H):ae[ne.name]=H)},Te.exports=pe},305:Te=>{"use strict";var Y=/,?([a-z]),?/gi,K=parseFloat,j=Math,he=j.PI,De=j.min,ke=j.max,pe=j.pow,ae=j.abs,ne=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,H=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,ce=Array.isArray||function(V){return V instanceof Array};function Ee(V,X){return Object.prototype.hasOwnProperty.call(V,X)}function Le(V){if("function"==typeof V||Object(V)!==V)return V;var X=new V.constructor;for(var ue in V)Ee(V,ue)&&(X[ue]=Le(V[ue]));return X}function vt(V){var X=vt.ps=vt.ps||{};return X[V]?X[V].sleep=100:X[V]={sleep:100},setTimeout(function(){for(var ue in X)Ee(X,ue)&&ue!=V&&(X[ue].sleep--,!X[ue].sleep&&delete X[ue])}),X[V]}function Be(V,X,ue,M){return 1===arguments.length&&(X=V.y,ue=V.width,M=V.height,V=V.x),{x:V,y:X,width:ue,height:M,x2:V+ue,y2:X+M}}function Je(){return this.join(",").replace(Y,"$1")}function He(V){var X=Le(V);return X.toString=Je,X}function rt(V,X,ue,M,z,G,xe,Se,fe){var ie=1-fe,le=pe(ie,3),Ae=pe(ie,2),J=fe*fe*fe,pt=le*X+3*Ae*fe*M+3*ie*fe*fe*G+J*Se;return{x:wn(le*V+3*Ae*fe*ue+3*ie*fe*fe*z+J*xe),y:wn(pt)}}function Jn(V){var X=Pn.apply(null,V);return Be(X.x0,X.y0,X.x1-X.x0,X.y1-X.y0)}function qn(V,X,ue){return X>=V.x&&X<=V.x+V.width&&ue>=V.y&&ue<=V.y+V.height}function wi(V,X,ue,M,z){return V*(V*(-3*X+9*ue-9*M+3*z)+6*X-12*ue+6*M)-3*X+3*ue}function Nn(V,X,ue,M,z,G,xe,Se,fe){null==fe&&(fe=1);for(var ie=(fe=fe>1?1:fe<0?0:fe)/2,Ae=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],et=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],J=0,_e=0;_e<12;_e++){var pt=ie*Ae[_e]+ie,yt=wi(pt,V,ue,z,xe),ot=wi(pt,X,M,G,Se);J+=et[_e]*j.sqrt(yt*yt+ot*ot)}return ie*J}function Ei(V,X,ue,M,z,G,xe,Se){if(!(ke(V,ue)ke(z,xe)||ke(X,M)ke(G,Se))){var ie=(V*M-X*ue)*(G-Se)-(X-M)*(z*Se-G*xe),le=(V-ue)*(G-Se)-(X-M)*(z-xe);if(le){var Ae=wn(((V*M-X*ue)*(z-xe)-(V-ue)*(z*Se-G*xe))/le),et=wn(ie/le),J=+Ae.toFixed(2),_e=+et.toFixed(2);if(!(J<+De(V,ue).toFixed(2)||J>+ke(V,ue).toFixed(2)||J<+De(z,xe).toFixed(2)||J>+ke(z,xe).toFixed(2)||_e<+De(X,M).toFixed(2)||_e>+ke(X,M).toFixed(2)||_e<+De(G,Se).toFixed(2)||_e>+ke(G,Se).toFixed(2)))return{x:Ae,y:et}}}}function wn(V){return Math.round(1e11*V)/1e11}function Oi(V,X,ue){if(!function Yi(V,X){return V=Be(V),qn(X=Be(X),V.x,V.y)||qn(X,V.x2,V.y)||qn(X,V.x,V.y2)||qn(X,V.x2,V.y2)||qn(V,X.x,X.y)||qn(V,X.x2,X.y)||qn(V,X.x,X.y2)||qn(V,X.x2,X.y2)||(V.xX.x||X.xV.x)&&(V.yX.y||X.yV.y)}(Jn(V),Jn(X)))return ue?0:[];for(var G=Nn.apply(0,V),xe=Nn.apply(0,X),Se=gr(V)?1:~~(G/5)||1,fe=gr(X)?1:~~(xe/5)||1,ie=[],le=[],Ae={},et=ue?0:[],J=0;J=0&&gn<=1&&Go>=0&&Go<=1&&(ue?et++:et.push({x:dn.x,y:dn.y,t1:gn,t2:Go}))}}return et}function gr(V){return V[0]===V[2]&&V[1]===V[3]&&V[4]===V[6]&&V[5]===V[7]}function Ri(V,X,ue,M){return[V,X,ue,M,ue,M]}function Ki(V,X,ue,M,z,G){var xe=.3333333333333333,Se=2/3;return[xe*V+Se*ue,xe*X+Se*M,xe*z+Se*ue,xe*G+Se*M,z,G]}function Uo(V,X,ue,M,z,G,xe,Se,fe,ie){var J,le=120*he/180,Ae=he/180*(+z||0),et=[],_e=function We(V){return function X(){var ue=Array.prototype.slice.call(arguments,0),M=ue.join("\u2400"),z=X.cache=X.cache||{},G=X.count=X.count||[];return Ee(z,M)?(function Ne(V,X){for(var ue=0,M=V.length;ue=1e3&&delete z[G.shift()],G.push(M),z[M]=V.apply(0,ue),z[M])}}(function(rd,os,kn){return{x:rd*j.cos(kn)-os*j.sin(kn),y:rd*j.sin(kn)+os*j.cos(kn)}});if(ie)jn=ie[0],gn=ie[1],At=ie[2],dn=ie[3];else{X=(J=_e(V,X,-Ae)).y;var pt=((V=J.x)-(Se=(J=_e(Se,fe,-Ae)).x))/2,yt=(X-(fe=J.y))/2,ot=pt*pt/(ue*ue)+yt*yt/(M*M);ot>1&&(ue*=ot=j.sqrt(ot),M*=ot);var hn=ue*ue,re=M*M,Dn=(G==xe?-1:1)*j.sqrt(ae((hn*re-hn*yt*yt-re*pt*pt)/(hn*yt*yt+re*pt*pt))),At=Dn*ue*yt/M+(V+Se)/2,dn=Dn*-M*pt/ue+(X+fe)/2,jn=j.asin(((X-dn)/M).toFixed(9)),gn=j.asin(((fe-dn)/M).toFixed(9));(jn=Vgn&&(jn-=2*he),!xe&&gn>jn&&(gn-=2*he)}var Go=gn-jn;if(ae(Go)>le){var uh=gn,hh=Se,zs=fe;et=Uo(Se=At+ue*j.cos(gn=jn+le*(xe&&gn>jn?1:-1)),fe=dn+M*j.sin(gn),ue,M,z,0,xe,hh,zs,[gn,uh,At,dn])}Go=gn-jn;var wo=j.cos(jn),rs=j.sin(jn),ed=j.cos(gn),ya=j.sin(gn),Hs=j.tan(Go/4),$s=4/3*ue*Hs,td=4/3*M*Hs,xa=[V,X],Xr=[V+$s*rs,X-td*wo],nd=[Se+$s*ya,fe-td*ed],Wo=[Se,fe];if(Xr[0]=2*xa[0]-Xr[0],Xr[1]=2*xa[1]-Xr[1],ie)return[Xr,nd,Wo].concat(et);for(var id=[],Lr=0,qo=(et=[Xr,nd,Wo].concat(et).join().split(",")).length;Lr2&&(M.push([G].concat(Se.splice(0,2))),fe="l",G="m"==G?"l":"L");Se.length>=ue[fe]&&(M.push([G].concat(Se.splice(0,ue[fe]))),ue[fe]););}),M.toString=vt.toString,X.arr=Le(M),M}(V)),!V||!V.length)return[["M",0,0]];var fe,ue=[],M=0,z=0,G=0,xe=0,Se=0;"M"==V[0][0]&&(G=M=+V[0][1],xe=z=+V[0][2],Se++,ue[0]=["M",M,z]);for(var ie,le,Ae=Se,et=V.length;Ae7){J[_e].shift();for(var pt=J[_e];pt.length;)xe[_e]="A",J.splice(_e++,0,["C"].concat(pt.splice(0,6)));J.splice(_e,1),le=ue.length}},xe=[],Se="",fe="",ie=0,le=ue.length;ie{var K,j,Y=Te.exports={};function he(){throw new Error("setTimeout has not been defined")}function De(){throw new Error("clearTimeout has not been defined")}function ke(Ke){if(K===setTimeout)return setTimeout(Ke,0);if((K===he||!K)&&setTimeout)return K=setTimeout,setTimeout(Ke,0);try{return K(Ke,0)}catch{try{return K.call(null,Ke,0)}catch{return K.call(this,Ke,0)}}}!function(){try{K="function"==typeof setTimeout?setTimeout:he}catch{K=he}try{j="function"==typeof clearTimeout?clearTimeout:De}catch{j=De}}();var H,ae=[],ne=!1,ce=-1;function Ee(){!ne||!H||(ne=!1,H.length?ae=H.concat(ae):ce=-1,ae.length&&Le())}function Le(){if(!ne){var Ke=ke(Ee);ne=!0;for(var vt=ae.length;vt;){for(H=ae,ae=[];++ce1)for(var Be=1;Be{"use strict";var j=K(249),he=K(333),De=K(52)(),ke=K(31),pe=K(327),ae=j("%Math.floor%");Te.exports=function(H,ce){if("function"!=typeof H)throw new pe("`fn` is not a function");if("number"!=typeof ce||ce<0||ce>4294967295||ae(ce)!==ce)throw new pe("`length` must be a positive 32-bit integer");var Ee=arguments.length>2&&!!arguments[2],Le=!0,Ne=!0;if("length"in H&&ke){var We=ke(H,"length");We&&!We.configurable&&(Le=!1),We&&!We.writable&&(Ne=!1)}return(Le||Ne||!Ee)&&(De?he(H,"length",ce,!0,!0):he(H,"length",ce)),H}},739:Te=>{Te.exports=function(K){return K&&"object"==typeof K&&"function"==typeof K.copy&&"function"==typeof K.fill&&"function"==typeof K.readUInt8}},404:(Te,Y,K)=>{"use strict";var j=K(984),he=K(276),De=K(323),ke=K(468);function pe(re){return re.call.bind(re)}var ae=typeof BigInt<"u",ne=typeof Symbol<"u",H=pe(Object.prototype.toString),ce=pe(Number.prototype.valueOf),Ee=pe(String.prototype.valueOf),Le=pe(Boolean.prototype.valueOf);if(ae)var Ne=pe(BigInt.prototype.valueOf);if(ne)var We=pe(Symbol.prototype.valueOf);function Ke(re,Dn){if("object"!=typeof re)return!1;try{return Dn(re),!0}catch{return!1}}function Yn(re){return"[object Map]"===H(re)}function gr(re){return"[object Set]"===H(re)}function Ki(re){return"[object WeakMap]"===H(re)}function Pn(re){return"[object WeakSet]"===H(re)}function V(re){return"[object ArrayBuffer]"===H(re)}function X(re){return!(typeof ArrayBuffer>"u")&&(V.working?V(re):re instanceof ArrayBuffer)}function ue(re){return"[object DataView]"===H(re)}function M(re){return!(typeof DataView>"u")&&(ue.working?ue(re):re instanceof DataView)}Y.isArgumentsObject=j,Y.isGeneratorFunction=he,Y.isTypedArray=ke,Y.isPromise=function vt(re){return typeof Promise<"u"&&re instanceof Promise||null!==re&&"object"==typeof re&&"function"==typeof re.then&&"function"==typeof re.catch},Y.isArrayBufferView=function Be(re){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(re):ke(re)||M(re)},Y.isUint8Array=function Je(re){return"Uint8Array"===De(re)},Y.isUint8ClampedArray=function He(re){return"Uint8ClampedArray"===De(re)},Y.isUint16Array=function rt(re){return"Uint16Array"===De(re)},Y.isUint32Array=function Jn(re){return"Uint32Array"===De(re)},Y.isInt8Array=function qn(re){return"Int8Array"===De(re)},Y.isInt16Array=function Yi(re){return"Int16Array"===De(re)},Y.isInt32Array=function wi(re){return"Int32Array"===De(re)},Y.isFloat32Array=function Nn(re){return"Float32Array"===De(re)},Y.isFloat64Array=function Ei(re){return"Float64Array"===De(re)},Y.isBigInt64Array=function wn(re){return"BigInt64Array"===De(re)},Y.isBigUint64Array=function Oi(re){return"BigUint64Array"===De(re)},Yn.working=typeof Map<"u"&&Yn(new Map),Y.isMap=function or(re){return!(typeof Map>"u")&&(Yn.working?Yn(re):re instanceof Map)},gr.working=typeof Set<"u"&&gr(new Set),Y.isSet=function Ri(re){return!(typeof Set>"u")&&(gr.working?gr(re):re instanceof Set)},Ki.working=typeof WeakMap<"u"&&Ki(new WeakMap),Y.isWeakMap=function Uo(re){return!(typeof WeakMap>"u")&&(Ki.working?Ki(re):re instanceof WeakMap)},Pn.working=typeof WeakSet<"u"&&Pn(new WeakSet),Y.isWeakSet=function rn(re){return Pn(re)},V.working=typeof ArrayBuffer<"u"&&V(new ArrayBuffer),Y.isArrayBuffer=X,ue.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&ue(new DataView(new ArrayBuffer(1),0,1)),Y.isDataView=M;var z=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function G(re){return"[object SharedArrayBuffer]"===H(re)}function xe(re){return!(typeof z>"u")&&(typeof G.working>"u"&&(G.working=G(new z)),G.working?G(re):re instanceof z)}function et(re){return Ke(re,ce)}function J(re){return Ke(re,Ee)}function _e(re){return Ke(re,Le)}function pt(re){return ae&&Ke(re,Ne)}function yt(re){return ne&&Ke(re,We)}Y.isSharedArrayBuffer=xe,Y.isAsyncFunction=function Se(re){return"[object AsyncFunction]"===H(re)},Y.isMapIterator=function fe(re){return"[object Map Iterator]"===H(re)},Y.isSetIterator=function ie(re){return"[object Set Iterator]"===H(re)},Y.isGeneratorObject=function le(re){return"[object Generator]"===H(re)},Y.isWebAssemblyCompiledModule=function Ae(re){return"[object WebAssembly.Module]"===H(re)},Y.isNumberObject=et,Y.isStringObject=J,Y.isBooleanObject=_e,Y.isBigIntObject=pt,Y.isSymbolObject=yt,Y.isBoxedPrimitive=function ot(re){return et(re)||J(re)||_e(re)||pt(re)||yt(re)},Y.isAnyArrayBuffer=function hn(re){return typeof Uint8Array<"u"&&(X(re)||xe(re))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(re){Object.defineProperty(Y,re,{enumerable:!1,value:function(){throw new Error(re+" is not supported in userland")}})})},525:(Te,Y,K)=>{var j=K(578),he=Object.getOwnPropertyDescriptors||function(z){for(var G=Object.keys(z),xe={},Se=0;Se=Se)return le;switch(le){case"%s":return String(xe[G++]);case"%d":return Number(xe[G++]);case"%j":try{return JSON.stringify(xe[G++])}catch{return"[Circular]"}default:return le}}),ie=xe[G];G"u")return function(){return Y.deprecate(M,z).apply(this,arguments)};var G=!1;return function xe(){if(!G){if(j.throwDeprecation)throw new Error(z);j.traceDeprecation?console.trace(z):console.error(z),G=!0}return M.apply(this,arguments)}};var ke={},pe=/^$/;if(j.env.NODE_DEBUG){var ae=j.env.NODE_DEBUG;ae=ae.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),pe=new RegExp("^"+ae+"$","i")}function ne(M,z){var G={seen:[],stylize:ce};return arguments.length>=3&&(G.depth=arguments[2]),arguments.length>=4&&(G.colors=arguments[3]),He(z)?G.showHidden=z:z&&Y._extend(G,z),Nn(G.showHidden)&&(G.showHidden=!1),Nn(G.depth)&&(G.depth=2),Nn(G.colors)&&(G.colors=!1),Nn(G.customInspect)&&(G.customInspect=!0),G.colors&&(G.stylize=H),Le(G,M,G.depth)}function H(M,z){var G=ne.styles[z];return G?"\x1b["+ne.colors[G][0]+"m"+M+"\x1b["+ne.colors[G][1]+"m":M}function ce(M,z){return M}function Le(M,z,G){if(M.customInspect&&z&&or(z.inspect)&&z.inspect!==Y.inspect&&(!z.constructor||z.constructor.prototype!==z)){var xe=z.inspect(G,M);return Yi(xe)||(xe=Le(M,xe,G)),xe}var Se=function Ne(M,z){if(Nn(z))return M.stylize("undefined","undefined");if(Yi(z)){var G="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(G,"string")}return qn(z)?M.stylize(""+z,"number"):He(z)?M.stylize(""+z,"boolean"):rt(z)?M.stylize("null","null"):void 0}(M,z);if(Se)return Se;var fe=Object.keys(z),ie=function Ee(M){var z={};return M.forEach(function(G,xe){z[G]=!0}),z}(fe);if(M.showHidden&&(fe=Object.getOwnPropertyNames(z)),Yn(z)&&(fe.indexOf("message")>=0||fe.indexOf("description")>=0))return We(z);if(0===fe.length){if(or(z))return M.stylize("[Function"+(z.name?": "+z.name:"")+"]","special");if(Ei(z))return M.stylize(RegExp.prototype.toString.call(z),"regexp");if(Oi(z))return M.stylize(Date.prototype.toString.call(z),"date");if(Yn(z))return We(z)}var pt,Ae="",et=!1,J=["{","}"];return Je(z)&&(et=!0,J=["[","]"]),or(z)&&(Ae=" [Function"+(z.name?": "+z.name:"")+"]"),Ei(z)&&(Ae=" "+RegExp.prototype.toString.call(z)),Oi(z)&&(Ae=" "+Date.prototype.toUTCString.call(z)),Yn(z)&&(Ae=" "+We(z)),0!==fe.length||et&&0!=z.length?G<0?Ei(z)?M.stylize(RegExp.prototype.toString.call(z),"regexp"):M.stylize("[Object]","special"):(M.seen.push(z),pt=et?function Ke(M,z,G,xe,Se){for(var fe=[],ie=0,le=z.length;ie60?G[0]+(""===z?"":z+"\n ")+" "+M.join(",\n ")+" "+G[1]:G[0]+z+" "+M.join(", ")+" "+G[1]}(pt,Ae,J)):J[0]+Ae+J[1]}function We(M){return"["+Error.prototype.toString.call(M)+"]"}function vt(M,z,G,xe,Se,fe){var ie,le,Ae;if((Ae=Object.getOwnPropertyDescriptor(z,Se)||{value:z[Se]}).get?le=M.stylize(Ae.set?"[Getter/Setter]":"[Getter]","special"):Ae.set&&(le=M.stylize("[Setter]","special")),rn(xe,Se)||(ie="["+Se+"]"),le||(M.seen.indexOf(Ae.value)<0?(le=rt(G)?Le(M,Ae.value,null):Le(M,Ae.value,G-1)).indexOf("\n")>-1&&(le=fe?le.split("\n").map(function(et){return" "+et}).join("\n").slice(2):"\n"+le.split("\n").map(function(et){return" "+et}).join("\n")):le=M.stylize("[Circular]","special")),Nn(ie)){if(fe&&Se.match(/^\d+$/))return le;(ie=JSON.stringify(""+Se)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ie=ie.slice(1,-1),ie=M.stylize(ie,"name")):(ie=ie.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ie=M.stylize(ie,"string"))}return ie+": "+le}function Je(M){return Array.isArray(M)}function He(M){return"boolean"==typeof M}function rt(M){return null===M}function qn(M){return"number"==typeof M}function Yi(M){return"string"==typeof M}function Nn(M){return void 0===M}function Ei(M){return wn(M)&&"[object RegExp]"===Ri(M)}function wn(M){return"object"==typeof M&&null!==M}function Oi(M){return wn(M)&&"[object Date]"===Ri(M)}function Yn(M){return wn(M)&&("[object Error]"===Ri(M)||M instanceof Error)}function or(M){return"function"==typeof M}function Ri(M){return Object.prototype.toString.call(M)}function Ki(M){return M<10?"0"+M.toString(10):M.toString(10)}Y.debuglog=function(M){if(M=M.toUpperCase(),!ke[M])if(pe.test(M)){var z=j.pid;ke[M]=function(){var G=Y.format.apply(Y,arguments);console.error("%s %d: %s",M,z,G)}}else ke[M]=function(){};return ke[M]},Y.inspect=ne,ne.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ne.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Y.types=K(404),Y.isArray=Je,Y.isBoolean=He,Y.isNull=rt,Y.isNullOrUndefined=function Jn(M){return null==M},Y.isNumber=qn,Y.isString=Yi,Y.isSymbol=function wi(M){return"symbol"==typeof M},Y.isUndefined=Nn,Y.isRegExp=Ei,Y.types.isRegExp=Ei,Y.isObject=wn,Y.isDate=Oi,Y.types.isDate=Oi,Y.isError=Yn,Y.types.isNativeError=Yn,Y.isFunction=or,Y.isPrimitive=function gr(M){return null===M||"boolean"==typeof M||"number"==typeof M||"string"==typeof M||"symbol"==typeof M||typeof M>"u"},Y.isBuffer=K(739);var Uo=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rn(M,z){return Object.prototype.hasOwnProperty.call(M,z)}Y.log=function(){console.log("%s - %s",function Pn(){var M=new Date,z=[Ki(M.getHours()),Ki(M.getMinutes()),Ki(M.getSeconds())].join(":");return[M.getDate(),Uo[M.getMonth()],z].join(" ")}(),Y.format.apply(Y,arguments))},Y.inherits=K(270),Y._extend=function(M,z){if(!z||!wn(z))return M;for(var G=Object.keys(z),xe=G.length;xe--;)M[G[xe]]=z[G[xe]];return M};var V=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function X(M,z){if(!M){var G=new Error("Promise was rejected with a falsy value");G.reason=M,M=G}return z(M)}Y.promisify=function(z){if("function"!=typeof z)throw new TypeError('The "original" argument must be of type Function');if(V&&z[V]){var G;if("function"!=typeof(G=z[V]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(G,V,{value:G,enumerable:!1,writable:!1,configurable:!0}),G}function G(){for(var xe,Se,fe=new Promise(function(Ae,et){xe=Ae,Se=et}),ie=[],le=0;le{"use strict";var j=K(990),he=K(149),De=K(475),ke=K(831),pe=K(31),ae=ke("Object.prototype.toString"),ne=K(603)(),H=typeof globalThis>"u"?global:globalThis,ce=he(),Ee=ke("String.prototype.slice"),Le=Object.getPrototypeOf,Ne=ke("Array.prototype.indexOf",!0)||function(Je,He){for(var rt=0;rt-1?He:"Object"===He&&function(Je){var He=!1;return j(We,function(rt,Jn){if(!He)try{rt(Je),He=Ee(Jn,1)}catch{}}),He}(Je)}return pe?function(Je){var He=!1;return j(We,function(rt,Jn){if(!He)try{"$"+rt(Je)===Jn&&(He=Ee(Jn,1))}catch{}}),He}(Je):null}},765:(Te,Y,K)=>{"use strict";function j(e,n,t,i,r,o,a){try{var s=e[o](a),c=s.value}catch(l){return void t(l)}s.done?n(c):Promise.resolve(c).then(i,r)}function he(e){return function(){var n=this,t=arguments;return new Promise(function(i,r){var o=e.apply(n,t);function a(c){j(o,i,r,a,s,"next",c)}function s(c){j(o,i,r,a,s,"throw",c)}a(void 0)})}}let ke=null,pe=!1,ae=1;const ne=Symbol("SIGNAL");function H(e){const n=ke;return ke=e,n}const Ne={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function vt(e){if((!Ei(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==ae)){if(!e.producerMustRecompute(e)&&!qn(e))return e.dirty=!1,void(e.lastCleanEpoch=ae);e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=ae}}function He(e){e.dirty=!0,function Be(e){if(void 0===e.liveConsumerNode)return;const n=pe;pe=!0;try{for(const t of e.liveConsumerNode)t.dirty||He(t)}finally{pe=n}}(e),e.consumerMarkedDirty?.(e)}function rt(e){return e&&(e.nextProducerIndex=0),H(e)}function Jn(e,n){if(H(n),e&&void 0!==e.producerNode&&void 0!==e.producerIndexOfThis&&void 0!==e.producerLastReadVersion){if(Ei(e))for(let t=e.nextProducerIndex;te.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function qn(e){wn(e);for(let n=0;n0}function wn(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}let Pn=null;const le=()=>{},Ae={...Ne,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:e=>{null!==e.schedule&&e.schedule(e.ref)},hasRun:!1,cleanupFn:le};function J(e){return"function"==typeof e}function _e(e){const t=e(i=>{Error.call(i),i.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const pt=_e(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function yt(e,n){if(e){const t=e.indexOf(n);0<=t&&e.splice(t,1)}}class ot{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const o of t)o.remove(this);else t.remove(this);const{initialTeardown:i}=this;if(J(i))try{i()}catch(o){n=o instanceof pt?o.errors:[o]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const o of r)try{Dn(o)}catch(a){n=n??[],a instanceof pt?n=[...n,...a.errors]:n.push(a)}}if(n)throw new pt(n)}}add(n){var t;if(n&&n!==this)if(this.closed)Dn(n);else{if(n instanceof ot){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(n)}}_hasParent(n){const{_parentage:t}=this;return t===n||Array.isArray(t)&&t.includes(n)}_addParent(n){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(n),t):t?[t,n]:n}_removeParent(n){const{_parentage:t}=this;t===n?this._parentage=null:Array.isArray(t)&&yt(t,n)}remove(n){const{_finalizers:t}=this;t&&yt(t,n),n instanceof ot&&n._removeParent(this)}}ot.EMPTY=(()=>{const e=new ot;return e.closed=!0,e})();const hn=ot.EMPTY;function re(e){return e instanceof ot||e&&"closed"in e&&J(e.remove)&&J(e.add)&&J(e.unsubscribe)}function Dn(e){J(e)?e():e.unsubscribe()}const At={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},dn={setTimeout(e,n,...t){const{delegate:i}=dn;return i?.setTimeout?i.setTimeout(e,n,...t):setTimeout(e,n,...t)},clearTimeout(e){const{delegate:n}=dn;return(n?.clearTimeout||clearTimeout)(e)},delegate:void 0};function jn(e){dn.setTimeout(()=>{const{onUnhandledError:n}=At;if(!n)throw e;n(e)})}function gn(){}const Go=zs("C",void 0,void 0);function zs(e,n,t){return{kind:e,value:n,error:t}}let wo=null;function rs(e){if(At.useDeprecatedSynchronousErrorHandling){const n=!wo;if(n&&(wo={errorThrown:!1,error:null}),e(),n){const{errorThrown:t,error:i}=wo;if(wo=null,t)throw i}}else e()}class ya extends ot{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,re(n)&&n.add(this)):this.destination=id}static create(n,t,i){return new xa(n,t,i)}next(n){this.isStopped?Wo(function hh(e){return zs("N",e,void 0)}(n),this):this._next(n)}error(n){this.isStopped?Wo(function uh(e){return zs("E",void 0,e)}(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?Wo(Go,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Hs=Function.prototype.bind;function $s(e,n){return Hs.call(e,n)}class td{constructor(n){this.partialObserver=n}next(n){const{partialObserver:t}=this;if(t.next)try{t.next(n)}catch(i){Xr(i)}}error(n){const{partialObserver:t}=this;if(t.error)try{t.error(n)}catch(i){Xr(i)}else Xr(n)}complete(){const{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(t){Xr(t)}}}class xa extends ya{constructor(n,t,i){let r;if(super(),J(n)||!n)r={next:n??void 0,error:t??void 0,complete:i??void 0};else{let o;this&&At.useDeprecatedNextContext?(o=Object.create(n),o.unsubscribe=()=>this.unsubscribe(),r={next:n.next&&$s(n.next,o),error:n.error&&$s(n.error,o),complete:n.complete&&$s(n.complete,o)}):r=n}this.destination=new td(r)}}function Xr(e){At.useDeprecatedSynchronousErrorHandling?function ed(e){At.useDeprecatedSynchronousErrorHandling&&wo&&(wo.errorThrown=!0,wo.error=e)}(e):jn(e)}function Wo(e,n){const{onStoppedNotification:t}=At;t&&dn.setTimeout(()=>t(e,n))}const id={closed:!0,next:gn,error:function nd(e){throw e},complete:gn},Lr="function"==typeof Symbol&&Symbol.observable||"@@observable";function qo(e){return e}let kn=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){const i=new e;return i.source=this,i.operator=t,i}subscribe(t,i,r){const o=function Up(e){return e&&e instanceof ya||function fh(e){return e&&J(e.next)&&J(e.error)&&J(e.complete)}(e)&&re(e)}(t)?t:new xa(t,i,r);return rs(()=>{const{operator:a,source:s}=this;o.add(a?a.call(o,s):s?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(i){t.error(i)}}forEach(t,i){return new(i=od(i))((r,o)=>{const a=new xa({next:s=>{try{t(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:r});this.subscribe(a)})}_subscribe(t){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(t)}[Lr](){return this}pipe(...t){return function os(e){return 0===e.length?qo:1===e.length?e[0]:function(t){return e.reduce((i,r)=>r(i),t)}}(t)(this)}toPromise(t){return new(t=od(t))((i,r)=>{let o;this.subscribe(a=>o=a,a=>r(a),()=>i(o))})}}return e.create=n=>new e(n),e})();function od(e){var n;return null!==(n=e??At.Promise)&&void 0!==n?n:Promise}const b0=_e(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let xt=(()=>{class e extends kn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const i=new Gp(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new b0}next(t){rs(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const i of this.currentObservers)i.next(t)}})}error(t){rs(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:i}=this;for(;i.length;)i.shift().error(t)}})}complete(){rs(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:i,isStopped:r,observers:o}=this;return i||r?hn:(this.currentObservers=null,o.push(t),new ot(()=>{this.currentObservers=null,yt(o,t)}))}_checkFinalizedStatuses(t){const{hasError:i,thrownError:r,isStopped:o}=this;i?t.error(r):o&&t.complete()}asObservable(){const t=new kn;return t.source=this,t}}return e.create=(n,t)=>new Gp(n,t),e})();class Gp extends xt{constructor(n,t){super(),this.destination=n,this.source=t}next(n){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===i||i.call(t,n)}error(n){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===i||i.call(t,n)}complete(){var n,t;null===(t=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===t||t.call(n)}_subscribe(n){var t,i;return null!==(i=null===(t=this.source)||void 0===t?void 0:t.subscribe(n))&&void 0!==i?i:hn}}class on extends xt{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const t=super._subscribe(n);return!t.closed&&n.next(this._value),t}getValue(){const{hasError:n,thrownError:t,_value:i}=this;if(n)throw t;return this._throwIfClosed(),i}next(n){super.next(this._value=n)}}function vr(e){return n=>{if(function y0(e){return J(e?.lift)}(n))return n.lift(function(t){try{return e(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Xi(e,n,t,i,r){return new mh(e,n,t,i,r)}class mh extends ya{constructor(n,t,i,r,o,a){super(n),this.onFinalize=o,this.shouldUnsubscribe=a,this._next=t?function(s){try{t(s)}catch(c){n.error(c)}}:super._next,this._error=r?function(s){try{r(s)}catch(c){n.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(s){n.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}}}function wa(e,n){return vr((t,i)=>{let r=0;t.subscribe(Xi(i,o=>{i.next(e.call(n,o,r++))}))})}const Wp="https://g.co/ng/security#xss";class se extends Error{constructor(n,t){super(function as(e,n){return`NG0${Math.abs(e)}${n?": "+n:""}`}(n,t)),this.code=n}}function _r(e){return{toString:e}.toString()}const Ea="__parameters__";function Ni(e,n,t){return _r(()=>{const i=function qs(e){return function(...t){if(e){const i=e(...t);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const a=new r(...o);return s.annotation=a,s;function s(c,l,d){const u=c.hasOwnProperty(Ea)?c[Ea]:Object.defineProperty(c,Ea,{value:[]})[Ea];for(;u.length<=d;)u.push(null);return(u[d]=u[d]||[]).push(a),c}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r})}const Ut=globalThis;function Ht(e){for(let n in e)if(e[n]===Ht)return n;throw Error("Could not find renamed property on target object.")}function Ko(e,n){for(const t in n)n.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=n[t])}function ci(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(ci).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const n=e.toString();if(null==n)return""+n;const t=n.indexOf("\n");return-1===t?n:n.substring(0,t)}function sd(e,n){return null==e||""===e?null===n?"":n:null==n||""===n?e:e+" "+n}const Zr=Ht({__forward_ref__:Ht});function an(e){return e.__forward_ref__=an,e.toString=function(){return ci(this())},e}function gt(e){return Ys(e)?e():e}function Ys(e){return"function"==typeof e&&e.hasOwnProperty(Zr)&&e.__forward_ref__===an}function ge(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Vt(e){return{providers:e.providers||[],imports:e.imports||[]}}function Zp(e){return HT(e,Jp)||HT(e,$T)}function HT(e,n){return e.hasOwnProperty(n)?e[n]:null}function Qp(e){return e&&(e.hasOwnProperty(S0)||e.hasOwnProperty(CH))?e[S0]:null}const Jp=Ht({\u0275prov:Ht}),S0=Ht({\u0275inj:Ht}),$T=Ht({ngInjectableDef:Ht}),CH=Ht({ngInjectorDef:Ht});class ye{constructor(n,t){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=ge({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function M0(e){return e&&!!e.\u0275providers}const vh=Ht({\u0275cmp:Ht}),I0=Ht({\u0275dir:Ht}),O0=Ht({\u0275pipe:Ht}),GT=Ht({\u0275mod:Ht}),ss=Ht({\u0275fac:Ht}),_h=Ht({__NG_ELEMENT_ID__:Ht}),WT=Ht({__NG_ENV_ID__:Ht});function Mt(e){return"string"==typeof e?e:null==e?"":String(e)}function R0(e,n){throw new se(-201,!1)}var sn=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(sn||{});let N0;function qT(){return N0}function Br(e){const n=N0;return N0=e,n}function YT(e,n,t){const i=Zp(e);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:t&sn.Optional?null:void 0!==n?n:void R0()}const bh={},P0="__NG_DI_FLAG__",eg="ngTempTokenPath",MH=/\n/gm,KT="__source";let ld;function Xs(e){const n=ld;return ld=e,n}function RH(e,n=sn.Default){if(void 0===ld)throw new se(-203,!1);return null===ld?YT(e,void 0,n):ld.get(e,n&sn.Optional?null:void 0,n)}function F(e,n=sn.Default){return(qT()||RH)(gt(e),n)}function Ye(e,n=sn.Default){return F(e,tg(n))}function tg(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function F0(e){const n=[];for(let t=0;tArray.isArray(t)?dd(t,n):n(t))}function ZT(e,n,t){n>=e.length?e.push(t):e.splice(n,0,t)}function ng(e,n){return n>=e.length-1?e.pop():e.splice(n,1)[0]}function Qr(e,n,t){let i=ud(e,n);return i>=0?e[1|i]=t:(i=~i,function QT(e,n,t,i){let r=e.length;if(r==n)e.push(t,i);else if(1===r)e.push(i,e[0]),e[0]=t;else{for(r--,e.push(e[r-1],e[r]);r>n;)e[r]=e[r-2],r--;e[n]=t,e[n+1]=i}}(e,i,n,t)),i}function j0(e,n){const t=ud(e,n);if(t>=0)return e[1|t]}function ud(e,n){return function JT(e,n,t){let i=0,r=e.length>>t;for(;r!==i;){const o=i+(r-i>>1),a=e[o<n?r=o:i=o+1}return~(r<n){a=o-1;break}}}for(;o-1){let o;for(;++ro?"":r[d+1].toLowerCase(),2&i&&l!==u){if(Zo(i))return!1;a=!0}}}}else{if(!a&&!Zo(i)&&!Zo(c))return!1;if(a&&Zo(c))continue;a=!1,i=c|1&i}}return Zo(i)||a}function Zo(e){return!(1&e)}function GH(e,n,t,i){if(null===n)return-1;let r=0;if(i||!t){let o=!1;for(;r-1)for(t++;t0?'="'+s+'"':"")+"]"}else 8&i?r+="."+a:4&i&&(r+=" "+a);else""!==r&&!Zo(a)&&(n+=s2(o,r),r=""),i=a,o=o||!Zo(i);t++}return""!==r&&(n+=s2(o,r)),n}function Rt(e){return _r(()=>{const n=l2(e),t={...n,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===og.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Xo.Emulated,styles:e.styles||un,_:null,schemas:e.schemas||null,tView:null,id:""};d2(t);const i=e.dependencies;return t.directiveDefs=ag(i,!1),t.pipeDefs=ag(i,!0),t.id=function n9(e){let n=0;const t=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const r of t)n=Math.imul(31,n)+r.charCodeAt(0)|0;return n+=2147483648,"c"+n}(t),t})}function JH(e){return Gt(e)||Fi(e)}function e9(e){return null!==e}function $t(e){return _r(()=>({type:e.type,bootstrap:e.bootstrap||un,declarations:e.declarations||un,imports:e.imports||un,exports:e.exports||un,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function c2(e,n){if(null==e)return Da;const t={};for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];let o,a,s=Ze.None;Array.isArray(r)?(s=r[0],o=r[1],a=r[2]??o):(o=r,a=r),n?(t[o]=s!==Ze.None?[i,s]:i,n[o]=a):t[o]=i}return t}function Me(e){return _r(()=>{const n=l2(e);return d2(n),n})}function jr(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function Gt(e){return e[vh]||null}function Fi(e){return e[I0]||null}function Qi(e){return e[O0]||null}function l2(e){const n={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:n,inputTransforms:null,inputConfig:e.inputs||Da,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||un,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:c2(e.inputs,n),outputs:c2(e.outputs),debugInfo:null}}function d2(e){e.features?.forEach(n=>n(e))}function ag(e,n){if(!e)return null;const t=n?Qi:JH;return()=>("function"==typeof e?e():e).map(i=>t(i)).filter(e9)}function i9(...e){return{\u0275providers:U0(0,e),\u0275fromNgModule:!0}}function U0(e,...n){const t=[],i=new Set;let r;const o=a=>{t.push(a)};return dd(n,a=>{const s=a;cg(s,o,[],i)&&(r||=[],r.push(s))}),void 0!==r&&u2(r,o),t}function u2(e,n){for(let t=0;t{n(o,i)})}}function cg(e,n,t,i){if(!(e=gt(e)))return!1;let r=null,o=Qp(e);const a=!o&&Gt(e);if(o||a){if(a&&!a.standalone)return!1;r=e}else{const c=e.ngModule;if(o=Qp(c),!o)return!1;r=c}const s=i.has(r);if(a){if(s)return!1;if(i.add(r),a.dependencies){const c="function"==typeof a.dependencies?a.dependencies():a.dependencies;for(const l of c)cg(l,n,t,i)}}else{if(!o)return!1;{if(null!=o.imports&&!s){let l;i.add(r);try{dd(o.imports,d=>{cg(d,n,t,i)&&(l||=[],l.push(d))})}finally{}void 0!==l&&u2(l,n)}if(!s){const l=$c(r)||(()=>new r);n({provide:r,useFactory:l,deps:un},r),n({provide:z0,useValue:r,multi:!0},r),n({provide:hd,useValue:()=>F(r),multi:!0},r)}const c=o.providers;if(null!=c&&!s){const l=e;G0(c,d=>{n(d,l)})}}}return r!==e&&void 0!==e.providers}function G0(e,n){for(let t of e)M0(t)&&(t=t.\u0275providers),Array.isArray(t)?G0(t,n):n(t)}const r9=Ht({provide:String,useValue:Ht});function W0(e){return null!==e&&"object"==typeof e&&r9 in e}function Gc(e){return"function"==typeof e}const q0=new ye(""),lg={},a9={};let Y0;function dg(){return void 0===Y0&&(Y0=new rg),Y0}class ka{}class fd extends ka{get destroyed(){return this._destroyed}constructor(n,t,i,r){super(),this.parent=t,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,X0(n,a=>this.processProvider(a)),this.records.set(e2,md(void 0,this)),r.has("environment")&&this.records.set(ka,md(void 0,this));const o=this.records.get(q0);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(z0,un,sn.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const n=H(null);try{for(const i of this._ngOnDestroyHooks)i.ngOnDestroy();const t=this._onDestroyHooks;this._onDestroyHooks=[];for(const i of t)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),H(n)}}onDestroy(n){return this.assertNotDestroyed(),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){this.assertNotDestroyed();const t=Xs(this),i=Br(void 0);try{return n()}finally{Xs(t),Br(i)}}get(n,t=bh,i=sn.Default){if(this.assertNotDestroyed(),n.hasOwnProperty(WT))return n[WT](this);i=tg(i);const o=Xs(this),a=Br(void 0);try{if(!(i&sn.SkipSelf)){let c=this.records.get(n);if(void 0===c){const l=function u9(e){return"function"==typeof e||"object"==typeof e&&e instanceof ye}(n)&&Zp(n);c=l&&this.injectableDefInScope(l)?md(K0(n),lg):null,this.records.set(n,c)}if(null!=c)return this.hydrate(n,c)}return(i&sn.Self?dg():this.parent).get(n,t=i&sn.Optional&&t===bh?null:t)}catch(s){if("NullInjectorError"===s.name){if((s[eg]=s[eg]||[]).unshift(ci(n)),o)throw s;return function PH(e,n,t,i){const r=e[eg];throw n[KT]&&r.unshift(n[KT]),e.message=function FH(e,n,t,i=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let r=ci(n);if(Array.isArray(n))r=n.map(ci).join(" -> ");else if("object"==typeof n){let o=[];for(let a in n)if(n.hasOwnProperty(a)){let s=n[a];o.push(a+":"+("string"==typeof s?JSON.stringify(s):ci(s)))}r=`{${o.join(", ")}}`}return`${t}${i?"("+i+")":""}[${r}]: ${e.replace(MH,"\n ")}`}("\n"+e.message,r,t,i),e.ngTokenPath=r,e[eg]=null,e}(s,n,"R3InjectorError",this.source)}throw s}finally{Br(a),Xs(o)}}resolveInjectorInitializers(){const n=H(null),t=Xs(this),i=Br(void 0);try{const o=this.get(hd,un,sn.Self);for(const a of o)a()}finally{Xs(t),Br(i),H(n)}}toString(){const n=[],t=this.records;for(const i of t.keys())n.push(ci(i));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new se(205,!1)}processProvider(n){let t=Gc(n=gt(n))?n:gt(n&&n.provide);const i=function c9(e){return W0(e)?md(void 0,e.useValue):md(m2(e),lg)}(n);if(!Gc(n)&&!0===n.multi){let r=this.records.get(t);r||(r=md(void 0,lg,!0),r.factory=()=>F0(r.multi),this.records.set(t,r)),t=n,r.multi.push(n)}this.records.set(t,i)}hydrate(n,t){const i=H(null);try{return t.value===lg&&(t.value=a9,t.value=t.factory()),"object"==typeof t.value&&t.value&&function d9(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{H(i)}}injectableDefInScope(n){if(!n.providedIn)return!1;const t=gt(n.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(n){const t=this._onDestroyHooks.indexOf(n);-1!==t&&this._onDestroyHooks.splice(t,1)}}function K0(e){const n=Zp(e),t=null!==n?n.factory:$c(e);if(null!==t)return t;if(e instanceof ye)throw new se(204,!1);if(e instanceof Function)return function s9(e){if(e.length>0)throw new se(204,!1);const t=function EH(e){return e&&(e[Jp]||e[$T])||null}(e);return null!==t?()=>t.factory(e):()=>new e}(e);throw new se(204,!1)}function m2(e,n,t){let i;if(Gc(e)){const r=gt(e);return $c(r)||K0(r)}if(W0(e))i=()=>gt(e.useValue);else if(function f2(e){return!(!e||!e.useFactory)}(e))i=()=>e.useFactory(...F0(e.deps||[]));else if(function h2(e){return!(!e||!e.useExisting)}(e))i=()=>F(gt(e.useExisting));else{const r=gt(e&&(e.useClass||e.provide));if(!function l9(e){return!!e.deps}(e))return $c(r)||K0(r);i=()=>new r(...F0(e.deps))}return i}function md(e,n,t=!1){return{factory:e,value:n,multi:t?[]:void 0}}function X0(e,n){for(const t of e)Array.isArray(t)?X0(t,n):t&&M0(t)?X0(t.\u0275providers,n):n(t)}function g2(){return void 0!==qT()||null!=function OH(){return ld}()}const ei=0,Ie=1,dt=2,hi=3,Qo=4,cr=5,Jr=6,gd=7,zn=8,Ji=9,Jo=10,Et=11,Eh=12,_2=13,vd=14,ai=15,Ch=16,_d=17,cs=18,Sh=19,b2=20,Zs=21,fg=22,Wc=23,It=25,Q0=1,Ta=7,bd=9,fi=10;var J0=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(J0||{});function lr(e){return Array.isArray(e)&&"object"==typeof e[Q0]}function dr(e){return Array.isArray(e)&&!0===e[Q0]}function ex(e){return!!(4&e.flags)}function qc(e){return e.componentOffset>-1}function pg(e){return!(1&~e.flags)}function ea(e){return!!e.template}function tx(e){return!!(512&e[dt])}class C9{constructor(n,t,i){this.previousValue=n,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}}function E2(e,n,t,i){null!==n?n.applyValueToInputSignal(n,i):e[t]=i}function br(){return C2}function C2(e){return e.type.prototype.ngOnChanges&&(e.setInput=D9),S9}function S9(){const e=D2(this),n=e?.current;if(n){const t=e.previous;if(t===Da)e.previous=n;else for(let i in n)t[i]=n[i];e.current=null,this.ngOnChanges(n)}}function D9(e,n,t,i,r){const o=this.declaredInputs[i],a=D2(e)||function k9(e,n){return e[S2]=n}(e,{previous:Da,current:null}),s=a.current||(a.current={}),c=a.previous,l=c[o];s[o]=new C9(l&&l.currentValue,t,c===Da),E2(e,n,r,t)}br.ngInherit=!0;const S2="__ngSimpleChanges__";function D2(e){return e[S2]||null}const Aa=function(e,n,t){},k2="svg";let A2=!1;function Mn(e){for(;Array.isArray(e);)e=e[ei];return e}function kh(e,n){return Mn(n[e])}function yr(e,n){return Mn(n[e.index])}function Th(e,n){return e.data[n]}function yd(e,n){return e[n]}function eo(e,n){const t=n[e];return lr(t)?t:t[ei]}function ax(e){return!(128&~e[dt])}function Ma(e,n){return null==n?null:e[n]}function M2(e){e[_d]=0}function R9(e){1024&e[dt]||(e[dt]|=1024,ax(e)&&Ah(e))}function sx(e){return!!(9216&e[dt]||e[Wc]?.dirty)}function cx(e){e[Jo].changeDetectionScheduler?.notify(1),sx(e)?Ah(e):64&e[dt]&&(function A9(){return A2}()?(e[dt]|=1024,Ah(e)):e[Jo].changeDetectionScheduler?.notify())}function Ah(e){e[Jo].changeDetectionScheduler?.notify();let n=Yc(e);for(;null!==n&&!(8192&n[dt])&&(n[dt]|=8192,ax(n));)n=Yc(n)}function gg(e,n){if(!(256&~e[dt]))throw new se(911,!1);null===e[Zs]&&(e[Zs]=[]),e[Zs].push(n)}function Yc(e){const n=e[hi];return dr(n)?n[hi]:n}const Ct={lFrame:j2(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function R2(){return Ct.bindingsEnabled}function xd(){return null!==Ct.skipHydrationRootTNode}function oe(){return Ct.lFrame.lView}function Jt(){return Ct.lFrame.tView}function jt(e){return Ct.lFrame.contextLView=e,e[zn]}function zt(e){return Ct.lFrame.contextLView=null,e}function Tn(){let e=N2();for(;null!==e&&64===e.type;)e=e.parent;return e}function N2(){return Ct.lFrame.currentTNode}function Ia(e,n){const t=Ct.lFrame;t.currentTNode=e,t.isParent=n}function dx(){return Ct.lFrame.isParent}function ux(){Ct.lFrame.isParent=!1}function ta(){return Ct.lFrame.bindingIndex++}function ds(e){const n=Ct.lFrame,t=n.bindingIndex;return n.bindingIndex=n.bindingIndex+e,t}function U9(e,n){const t=Ct.lFrame;t.bindingIndex=t.bindingRootIndex=e,hx(n)}function hx(e){Ct.lFrame.currentDirectiveIndex=e}function fx(e){const n=Ct.lFrame.currentDirectiveIndex;return-1===n?null:e[n]}function mx(){return Ct.lFrame.currentQueryIndex}function vg(e){Ct.lFrame.currentQueryIndex=e}function W9(e){const n=e[Ie];return 2===n.type?n.declTNode:1===n.type?e[cr]:null}function B2(e,n,t){if(t&sn.SkipSelf){let r=n,o=e;for(;!(r=r.parent,null!==r||t&sn.Host||(r=W9(o),null===r||(o=o[vd],10&r.type))););if(null===r)return!1;n=r,e=o}const i=Ct.lFrame=V2();return i.currentTNode=n,i.lView=e,!0}function px(e){const n=V2(),t=e[Ie];Ct.lFrame=n,n.currentTNode=t.firstChild,n.lView=e,n.tView=t,n.contextLView=e,n.bindingIndex=t.bindingStartIndex,n.inI18n=!1}function V2(){const e=Ct.lFrame,n=null===e?null:e.child;return null===n?j2(e):n}function j2(e){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=n),n}function z2(){const e=Ct.lFrame;return Ct.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const H2=z2;function gx(){const e=z2();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function ur(){return Ct.lFrame.selectedIndex}function Kc(e){Ct.lFrame.selectedIndex=e}function Hn(){const e=Ct.lFrame;return Th(e.tView,e.selectedIndex)}function _g(){Ct.lFrame.currentNamespace=k2}let U2=!0;function Ih(){return U2}function Oa(e){U2=e}function bg(e,n){for(let t=n.directiveStart,i=n.directiveEnd;t=i)break}else n[c]<0&&(e[_d]+=65536),(s>14>16&&(3&e[dt])===n&&(e[dt]+=16384,W2(s,o)):W2(s,o)}const wd=-1;class Oh{constructor(n,t,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}}function yx(e){return e!==wd}function Rh(e){return 32767&e}function Nh(e,n){let t=function n7(e){return e>>16}(e),i=n;for(;t>0;)i=i[vd],t--;return i}let xx=!0;function wg(e){const n=xx;return xx=e,n}const q2=255,Y2=5;let i7=0;const Ra={};function Eg(e,n){const t=K2(e,n);if(-1!==t)return t;const i=n[Ie];i.firstCreatePass&&(e.injectorIndex=n.length,wx(i.data,e),wx(n,null),wx(i.blueprint,null));const r=Cg(e,n),o=e.injectorIndex;if(yx(r)){const a=Rh(r),s=Nh(r,n),c=s[Ie].data;for(let l=0;l<8;l++)n[o+l]=s[a+l]|c[a+l]}return n[o+8]=r,o}function wx(e,n){e.push(0,0,0,0,0,0,0,0,n)}function K2(e,n){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===n[e.injectorIndex+8]?-1:e.injectorIndex}function Cg(e,n){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let t=0,i=null,r=n;for(;null!==r;){if(i=nA(r),null===i)return wd;if(t++,r=r[vd],-1!==i.injectorIndex)return i.injectorIndex|t<<16}return wd}function Ex(e,n,t){!function r7(e,n,t){let i;"string"==typeof t?i=t.charCodeAt(0)||0:t.hasOwnProperty(_h)&&(i=t[_h]),null==i&&(i=t[_h]=i7++);const r=i&q2;n.data[e+(r>>Y2)]|=1<=0?n&q2:c7:n}(t);if("function"==typeof o){if(!B2(n,e,i))return i&sn.Host?X2(r,0,i):Z2(n,t,i,r);try{let a;if(a=o(i),null!=a||i&sn.Optional)return a;R0()}finally{H2()}}else if("number"==typeof o){let a=null,s=K2(e,n),c=wd,l=i&sn.Host?n[ai][cr]:null;for((-1===s||i&sn.SkipSelf)&&(c=-1===s?Cg(e,n):n[s+8],c!==wd&&tA(i,!1)?(a=n[Ie],s=Rh(c),n=Nh(c,n)):s=-1);-1!==s;){const d=n[Ie];if(eA(o,s,d.data)){const u=a7(s,n,t,a,i,l);if(u!==Ra)return u}c=n[s+8],c!==wd&&tA(i,n[Ie].data[s+8]===l)&&eA(o,s,n)?(a=d,s=Rh(c),n=Nh(c,n)):s=-1}}return r}function a7(e,n,t,i,r,o){const a=n[Ie],s=a.data[e+8],d=Sg(s,a,t,null==i?qc(s)&&xx:i!=a&&!!(3&s.type),r&sn.Host&&o===s);return null!==d?Xc(n,a,d,s):Ra}function Sg(e,n,t,i,r){const o=e.providerIndexes,a=n.data,s=1048575&o,c=e.directiveStart,d=o>>20,h=r?s+d:e.directiveEnd;for(let f=i?s:s+d;f=c&&m.type===t)return f}if(r){const f=a[c];if(f&&ea(f)&&f.type===t)return c}return null}function Xc(e,n,t,i){let r=e[t];const o=n.data;if(function Q9(e){return e instanceof Oh}(r)){const a=r;a.resolving&&function kH(e,n){throw n&&n.join(" > "),new se(-200,e)}(function vn(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():Mt(e)}(o[t]));const s=wg(a.canSeeViewProviders);a.resolving=!0;const l=a.injectImpl?Br(a.injectImpl):null;B2(e,i,sn.Default);try{r=e[t]=a.factory(void 0,o,e,i),n.firstCreatePass&&t>=i.directiveStart&&function X9(e,n,t){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const a=C2(n);(t.preOrderHooks??=[]).push(e,a),(t.preOrderCheckHooks??=[]).push(e,a)}r&&(t.preOrderHooks??=[]).push(0-e,r),o&&((t.preOrderHooks??=[]).push(e,o),(t.preOrderCheckHooks??=[]).push(e,o))}(t,o[t],n)}finally{null!==l&&Br(l),wg(s),a.resolving=!1,H2()}}return r}function eA(e,n,t){return!!(t[n+(e>>Y2)]&1<{const n=e.prototype.constructor,t=n[ss]||Cx(n),i=Object.prototype;let r=Object.getPrototypeOf(e.prototype).constructor;for(;r&&r!==i;){const o=r[ss]||Cx(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function Cx(e){return Ys(e)?()=>{const n=Cx(gt(e));return n&&n()}:$c(e)}function nA(e){const n=e[Ie],t=n.type;return 2===t?n.declTNode:1===t?e[cr]:null}function Zc(e){return function o7(e,n){if("class"===n)return e.classes;if("style"===n)return e.styles;const t=e.attrs;if(t){const i=t.length;let r=0;for(;r{class e{static#e=this.THROW_IF_NOT_FOUND=bh;static#t=this.NULL=new rg;static create(t,i){if(Array.isArray(t))return sA({name:""},i,t,"");{const r=t.name??"";return sA({name:r},t.parent,t.providers,r)}}static#n=this.\u0275prov=ge({token:e,providedIn:"any",factory:()=>F(e2)});static#i=this.__NG_ELEMENT_ID__=-1}return e})();function Dx(e){return e.ngOriginalError}class Na{constructor(){this._console=console}handleError(n){const t=this._findOriginalError(n);this._console.error("ERROR",n),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(n){let t=n&&Dx(n);for(;t&&Dx(t);)t=Dx(t);return t||null}}const dA=new ye("",{providedIn:"root",factory:()=>Ye(Na).handleError.bind(void 0)});let Sd=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=_7;static#t=this.__NG_ENV_ID__=t=>t}return e})();class v7 extends Sd{constructor(n){super(),this._lView=n}onDestroy(n){return gg(this._lView,n),()=>function lx(e,n){if(null===e[Zs])return;const t=e[Zs].indexOf(n);-1!==t&&e[Zs].splice(t,1)}(this._lView,n)}}function _7(){return new v7(oe())}function b7(){return Dd(Tn(),oe())}function Dd(e,n){return new Lt(yr(e,n))}let Lt=(()=>{class e{constructor(t){this.nativeElement=t}static#e=this.__NG_ELEMENT_ID__=b7}return e})();function hA(e){return e instanceof Lt?e.nativeElement:e}function kx(e){return n=>{setTimeout(e,void 0,n)}}const nn=class y7 extends xt{constructor(n=!1){super(),this.destroyRef=void 0,this.__isAsync=n,g2()&&(this.destroyRef=Ye(Sd,{optional:!0})??void 0)}emit(n){const t=H(null);try{super.next(n)}finally{H(t)}}subscribe(n,t,i){let r=n,o=t||(()=>null),a=i;if(n&&"object"==typeof n){const c=n;r=c.next?.bind(c),o=c.error?.bind(c),a=c.complete?.bind(c)}this.__isAsync&&(o=kx(o),r&&(r=kx(r)),a&&(a=kx(a)));const s=super.subscribe({next:r,error:o,complete:a});return n instanceof ot&&n.add(s),s}};function x7(){return this._results[Symbol.iterator]()}class kd{static#e=Symbol.iterator;get changes(){return this._changes??=new nn}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const t=kd.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=x7)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,t){return this._results.reduce(n,t)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,t){this.dirty=!1;const i=function Vr(e){return e.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function jH(e,n,t){if(e.length!==n.length)return!1;for(let i=0;i$7}),$7="ng",OA=new ye(""),Qc=new ye("",{providedIn:"platform",factory:()=>"unknown"}),er=new ye(""),Ox=new ye("",{providedIn:"root",factory:()=>function Qs(){if(void 0!==Ix)return Ix;if(typeof document<"u")return document;throw new se(210,!1)}().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let RA=()=>null;function jx(e,n,t=!1){return RA(e,n,t)}const BA=new ye("",{providedIn:"root",factory:()=>!1});class $A{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Wp})`}}function Js(e){return e instanceof $A?e.changingThisBreaksApplicationSecurity:e}const h$=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;var Id=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(Id||{});function jg(e){const n=function $h(){const e=oe();return e&&e[Jo].sanitizer}();return n?n.sanitize(Id.URL,e)||"":function zh(e,n){const t=function c$(e){return e instanceof $A&&e.getTypeName()||null}(e);if(null!=t&&t!==n){if("ResourceURL"===t&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${t} (see ${Wp})`)}return t===n}(e,"URL")?Js(e):function Wx(e){return(e=String(e)).match(h$)?e:"unsafe:"+e}(Mt(e))}var tc=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(tc||{});let Jx;function ew(e,n){return Jx(e,n)}function Rd(e,n,t,i,r){if(null!=i){let o,a=!1;dr(i)?o=i:lr(i)&&(a=!0,i=i[ei]);const s=Mn(i);0===e&&null!==t?null==r?dM(n,t,s):Jc(n,t,s,r||null,!0):1===e&&null!==t?Jc(n,t,s,r||null,!0):2===e?function Wh(e,n,t){const i=Gg(e,n);i&&function X$(e,n,t,i){e.removeChild(n,t,i)}(e,i,n,t)}(n,s,a):3===e&&n.destroyNode(s),null!=o&&function J$(e,n,t,i,r){const o=t[Ta];o!==Mn(t)&&Rd(n,e,i,o,r);for(let s=fi;s0&&(e[t-1][Qo]=i[Qo]);const o=ng(e,fi+n);!function $$(e,n){sM(e,n),n[ei]=null,n[cr]=null}(i[Ie],i);const a=o[cs];null!==a&&a.detachView(o[Ie]),i[hi]=null,i[Qo]=null,i[dt]&=-129}return i}function Ug(e,n){if(!(256&n[dt])){const t=n[Et];t.destroyNode&&qg(e,n,t,3,null,null),function G$(e){let n=e[Eh];if(!n)return iw(e[Ie],e);for(;n;){let t=null;if(lr(n))t=n[Eh];else{const i=n[fi];i&&(t=i)}if(!t){for(;n&&!n[Qo]&&n!==e;)lr(n)&&iw(n[Ie],n),n=n[hi];null===n&&(n=e),lr(n)&&iw(n[Ie],n),t=n&&n[Qo]}n=t}}(n)}}function iw(e,n){if(256&n[dt])return;const t=H(null);try{n[dt]&=-129,n[dt]|=256,n[Wc]&&Yi(n[Wc]),function K$(e,n){let t;if(null!=e&&null!=(t=e.destroyHooks))for(let i=0;i=0?i[a]():i[-a].unsubscribe(),o+=2}else t[o].call(i[t[o+1]]);null!==i&&(n[gd]=null);const r=n[Zs];if(null!==r){n[Zs]=null;for(let o=0;o-1){const{encapsulation:o}=e.data[i.directiveStart+r];if(o===Xo.None||o===Xo.Emulated)return null}return yr(i,t)}}(e,n.parent,t)}function Jc(e,n,t,i,r){e.insertBefore(n,t,i,r)}function dM(e,n,t){e.appendChild(n,t)}function uM(e,n,t,i,r){null!==i?Jc(e,n,t,i,r):dM(e,n,t)}function Gg(e,n){return e.parentNode(n)}function hM(e,n,t){return mM(e,n,t)}let ow,mM=function fM(e,n,t){return 40&e.type?yr(e,t):null};function Wg(e,n,t,i){const r=rw(e,i,n),o=n[Et],s=hM(i.parent||n[cr],i,n);if(null!=r)if(Array.isArray(t))for(let c=0;cIt&&xM(e,n,It,!1),Aa(a?2:0,r),t(i,r)}finally{Kc(o),Aa(a?3:1,r)}}function lw(e,n,t){if(ex(n)){const i=H(null);try{const o=n.directiveEnd;for(let a=n.directiveStart;anull;function kM(e,n,t,i,r){for(let o in n){if(!n.hasOwnProperty(o))continue;const a=n[o];if(void 0===a)continue;i??={};let s,c=Ze.None;Array.isArray(a)?(s=a[0],c=a[1]):s=a;let l=o;if(null!==r){if(!r.hasOwnProperty(o))continue;l=r[o]}0===e?TM(i,t,l,s,c):TM(i,t,l,s)}return i}function TM(e,n,t,i,r){let o;e.hasOwnProperty(t)?(o=e[t]).push(n,i):o=e[t]=[n,i],void 0!==r&&o.push(r)}function Hr(e,n,t,i,r,o,a,s){const c=yr(n,t);let d,l=n.inputs;!s&&null!=l&&(d=l[i])?(vw(e,t,d,i,r),qc(n)&&function hU(e,n){const t=eo(n,e);16&t[dt]||(t[dt]|=64)}(t,n.index)):3&n.type&&(i=function uU(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(i),r=null!=a?a(r,n.value||"",i):r,o.setProperty(c,i,r))}function fw(e,n,t,i){if(R2()){const r=null===i?null:{"":-1},o=function _U(e,n){const t=e.directiveRegistry;let i=null,r=null;if(t)for(let o=0;o0;){const t=e[--n];if("number"==typeof t&&t<0)return t}return 0})(a)!=s&&a.push(s),a.push(t,i,o)}}(e,n,i,qh(e,t,r.hostVars,Nt),r)}function Pa(e,n,t,i,r,o){const a=yr(e,n);!function pw(e,n,t,i,r,o,a){if(null==o)e.removeAttribute(n,r,t);else{const s=null==a?Mt(o):a(o,i||"",r);e.setAttribute(n,r,s,t)}}(n[Et],a,o,e.value,t,i,r)}function CU(e,n,t,i,r,o){const a=o[n];if(null!==a)for(let s=0;s0&&(t[r-1][Qo]=n),i{Ah(e.lView)},consumerOnSignalRead(){this.lView[Wc]=this}},VM=100;function Zg(e,n=!0,t=0){const i=e[Jo],r=i.rendererFactory;r.begin?.();try{!function RU(e,n){yw(e,n);let t=0;for(;sx(e);){if(t===VM)throw new se(103,!1);t++,yw(e,1)}}(e,t)}catch(a){throw n&&Xg(e,a),a}finally{r.end?.(),i.inlineEffectRunner?.flush()}}function NU(e,n,t,i){const r=n[dt];if(!(256&~r))return;n[Jo].inlineEffectRunner?.flush(),px(n);let a=null,s=null;(function PU(e){return 2!==e.type})(e)&&(s=function AU(e){return e[Wc]??function MU(e){const n=BM.pop()??Object.create(OU);return n.lView=e,n}(e)}(n),a=rt(s));try{M2(n),function F2(e){return Ct.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==t&&CM(e,n,t,2,i);const c=!(3&~r);if(c){const u=e.preOrderCheckHooks;null!==u&&yg(n,u,null)}else{const u=e.preOrderHooks;null!==u&&xg(n,u,0,null),_x(n,0)}if(function FU(e){for(let n=wA(e);null!==n;n=EA(n)){if(!(n[dt]&J0.HasTransplantedViews))continue;const t=n[bd];for(let i=0;i-1&&(Uh(n,i),ng(t,i))}this._attachedToViewContainer=!1}Ug(this._lView[Ie],this._lView)}onDestroy(n){gg(this._lView,n)}markForCheck(){Zh(this._cdRefInjectingView||this._lView)}detach(){this._lView[dt]&=-129}reattach(){cx(this._lView),this._lView[dt]|=128}detectChanges(){this._lView[dt]|=1024,Zg(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new se(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,sM(this._lView[Ie],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new se(902,!1);this._appRef=n,cx(this._lView)}}let Eo=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=jU}return e})();const BU=Eo,VU=class extends BU{constructor(n,t,i){super(),this._declarationLView=n,this._declarationTContainer=t,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(n,t){return this.createEmbeddedViewImpl(n,t)}createEmbeddedViewImpl(n,t,i){const r=Yh(this._declarationLView,this._declarationTContainer,n,{embeddedViewInjector:t,dehydratedView:i});return new Qh(r)}};function jU(){return Qg(Tn(),oe())}function Qg(e,n){return 4&e.type?new VU(n,e,Dd(e,n)):null}let YM=()=>null;function Fd(e,n){return YM(e,n)}class iv{}class dG{}class KM{}class hG{resolveComponentFactory(n){throw function uG(e){const n=Error(`No component factory found for ${ci(e)}.`);return n.ngComponent=e,n}(n)}}let Ld=(()=>{class e{static#e=this.NULL=new hG}return e})();class Dw{}let el=(()=>{class e{constructor(){this.destroyNode=null}static#e=this.__NG_ELEMENT_ID__=()=>function fG(){const e=oe(),t=eo(Tn().index,e);return(lr(t)?t:e)[Et]}()}return e})(),mG=(()=>{class e{static#e=this.\u0275prov=ge({token:e,providedIn:"root",factory:()=>null})}return e})();const kw={},ZM=new Set;function Fa(e){ZM.has(e)||(ZM.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}function QM(...e){}class at{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new nn(!1),this.onMicrotaskEmpty=new nn(!1),this.onStable=new nn(!1),this.onError=new nn(!1),typeof Zone>"u")throw new se(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&t,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function pG(){const e="function"==typeof Ut.requestAnimationFrame;let n=Ut[e?"requestAnimationFrame":"setTimeout"],t=Ut[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&n&&t){const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i);const r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function _G(e){const n=()=>{!function vG(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(Ut,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,Aw(e),e.isCheckStableRunning=!0,Tw(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),Aw(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,i,r,o,a,s)=>{if(function bG(e){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0].data?.__ignore_ng_zone__}(s))return t.invokeTask(r,o,a,s);try{return JM(e),t.invokeTask(r,o,a,s)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||e.shouldCoalesceRunChangeDetection)&&n(),eI(e)}},onInvoke:(t,i,r,o,a,s,c)=>{try{return JM(e),t.invoke(r,o,a,s,c)}finally{e.shouldCoalesceRunChangeDetection&&n(),eI(e)}},onHasTask:(t,i,r,o)=>{t.hasTask(r,o),i===r&&("microTask"==o.change?(e._hasPendingMicrotasks=o.microTask,Aw(e),Tw(e)):"macroTask"==o.change&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,i,r,o)=>(t.handleError(r,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!at.isInAngularZone())throw new se(909,!1)}static assertNotInAngularZone(){if(at.isInAngularZone())throw new se(909,!1)}run(n,t,i){return this._inner.run(n,t,i)}runTask(n,t,i,r){const o=this._inner,a=o.scheduleEventTask("NgZoneEvent: "+r,n,gG,QM,QM);try{return o.runTask(a,t,i)}finally{o.cancelTask(a)}}runGuarded(n,t,i){return this._inner.runGuarded(n,t,i)}runOutsideAngular(n){return this._outer.run(n)}}const gG={};function Tw(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function Aw(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function JM(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function eI(e){e._nesting--,Tw(e)}class tI{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new nn,this.onMicrotaskEmpty=new nn,this.onStable=new nn,this.onError=new nn}run(n,t,i){return n.apply(t,i)}runGuarded(n,t,i){return n.apply(t,i)}runOutsideAngular(n){return n()}runTask(n,t,i,r){return n.apply(t,i)}}let rf=(()=>{class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const t=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const i of t)i()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static#e=this.\u0275prov=ge({token:e,providedIn:"root",factory:()=>new e})}return e})();function ov(e,n,t){let i=t?e.styles:null,r=t?e.classes:null,o=0;if(null!==n)for(let a=0;a0&&bM(e,t,o.join(" "))}}(f,O,g,i),void 0!==t&&function OG(e,n,t){const i=e.projection=[];for(let r=0;r{class e{static#e=this.__NG_ELEMENT_ID__=NG}return e})();function NG(){return uI(Tn(),oe())}const PG=Co,lI=class extends PG{constructor(n,t,i){super(),this._lContainer=n,this._hostTNode=t,this._hostLView=i}get element(){return Dd(this._hostTNode,this._hostLView)}get injector(){return new Bi(this._hostTNode,this._hostLView)}get parentInjector(){const n=Cg(this._hostTNode,this._hostLView);if(yx(n)){const t=Nh(n,this._hostLView),i=Rh(n);return new Bi(t[Ie].data[i+8],t)}return new Bi(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const t=dI(this._lContainer);return null!==t&&t[n]||null}get length(){return this._lContainer.length-fi}createEmbeddedView(n,t,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const a=Fd(this._lContainer,n.ssrId),s=n.createEmbeddedViewImpl(t||{},o,a);return this.insertImpl(s,r,Pd(this._hostTNode,a)),s}createComponent(n,t,i,r,o){const a=n&&!function wh(e){return"function"==typeof e}(n);let s;if(a)s=t;else{const m=t||{};s=m.index,i=m.injector,r=m.projectableNodes,o=m.environmentInjector||m.ngModuleRef}const c=a?n:new cf(Gt(n)),l=i||this.parentInjector;if(!o&&null==c.ngModule){const g=(a?l:this.parentInjector).get(ka,null);g&&(o=g)}const d=Gt(c.componentType??{}),u=Fd(this._lContainer,d?.id??null),f=c.create(l,r,u?.firstChild??null,o);return this.insertImpl(f.hostView,s,Pd(this._hostTNode,u)),f}insert(n,t){return this.insertImpl(n,t,!0)}insertImpl(n,t,i){const r=n._lView;if(function O9(e){return dr(e[hi])}(r)){const s=this.indexOf(n);if(-1!==s)this.detach(s);else{const c=r[hi],l=new lI(c,c[cr],c[hi]);l.detach(l.indexOf(n))}}const o=this._adjustIndex(t),a=this._lContainer;return Kh(a,r,o,i),n.attachToViewContainerRef(),ZT(Rw(a),o,n),n}move(n,t){return this.insert(n,t)}indexOf(n){const t=dI(this._lContainer);return null!==t?t.indexOf(n):-1}remove(n){const t=this._adjustIndex(n,-1),i=Uh(this._lContainer,t);i&&(ng(Rw(this._lContainer),t),Ug(i[Ie],i))}detach(n){const t=this._adjustIndex(n,-1),i=Uh(this._lContainer,t);return i&&null!=ng(Rw(this._lContainer),t)?new Qh(i):null}_adjustIndex(n,t=0){return n??this.length+t}};function dI(e){return e[8]}function Rw(e){return e[8]||(e[8]=[])}function uI(e,n){let t;const i=n[e.index];return dr(i)?t=i:(t=IM(i,n,null,e),n[e.index]=t,Kg(n,t)),hI(t,n,e,i),new lI(t,e,n)}let hI=function mI(e,n,t,i){if(e[Ta])return;let r;r=8&t.type?Mn(i):function FG(e,n){const t=e[Et],i=t.createComment(""),r=yr(n,e);return Jc(t,Gg(t,r),i,function Z$(e,n){return e.nextSibling(n)}(t,r),!1),i}(n,t),e[Ta]=r},Nw=()=>!1;class Pw{constructor(n){this.queryList=n,this.matches=null}clone(){return new Pw(this.queryList)}setDirty(){this.queryList.setDirty()}}class Fw{constructor(n=[]){this.queries=n}createEmbeddedView(n){const t=n.queries;if(null!==t){const i=null!==n.contentQueries?n.contentQueries[0]:t.length,r=[];for(let o=0;on.trim())}(n):n}}class Lw{constructor(n=[]){this.queries=n}elementStart(n,t){for(let i=0;i0)i.push(a[s/2]);else{const l=o[s+1],d=n[-c];for(let u=fi;u=0;i--){const r=e[i];r.hostVars=n+=r.hostVars,r.hostAttrs=xh(r.hostAttrs,t=xh(t,r.hostAttrs))}}(i)}function nW(e,n){for(const t in n.inputs){if(!n.inputs.hasOwnProperty(t)||e.inputs.hasOwnProperty(t))continue;const i=n.inputs[t];if(void 0!==i&&(e.inputs[t]=i,e.declaredInputs[t]=n.declaredInputs[t],null!==n.inputTransforms)){const r=Array.isArray(i)?i[0]:i;if(!n.inputTransforms.hasOwnProperty(r))continue;e.inputTransforms??={},e.inputTransforms[r]=n.inputTransforms[r]}}}function lv(e){return e===Da?{}:e===un?[]:e}function rW(e,n){const t=e.viewQuery;e.viewQuery=t?(i,r)=>{n(i,r),t(i,r)}:n}function oW(e,n){const t=e.contentQueries;e.contentQueries=t?(i,r,o)=>{n(i,r,o),t(i,r,o)}:n}function aW(e,n){const t=e.hostBindings;e.hostBindings=t?(i,r)=>{n(i,r),t(i,r)}:n}function So(e){const n=e.inputConfig,t={};for(const i in n)if(n.hasOwnProperty(i)){const r=n[i];Array.isArray(r)&&r[3]&&(t[i]=r[3])}e.inputTransforms=t}class il{}class hW{}class $w extends il{constructor(n,t,i){super(),this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new sI(this);const r=function sr(e,n){const t=e[GT]||null;if(!t&&!0===n)throw new Error(`Type ${ci(e)} does not have '\u0275mod' property.`);return t}(n);this._bootstrapComponents=function to(e){return e instanceof Function?e():e}(r.bootstrap),this._r3Injector=cA(n,t,[{provide:il,useValue:this},{provide:Ld,useValue:this.componentFactoryResolver},...i],ci(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class Uw extends hW{constructor(n){super(),this.moduleType=n}create(n){return new $w(this.moduleType,n,[])}}class BI extends il{constructor(n){super(),this.componentFactoryResolver=new sI(this),this.instance=null;const t=new fd([...n.providers,{provide:il,useValue:this},{provide:Ld,useValue:this.componentFactoryResolver}],n.parent||dg(),n.debugName,new Set(["environment"]));this.injector=t,n.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}let df=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new on(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const t=this.taskId++;return this.pendingTasks.add(t),t}remove(t){this.pendingTasks.delete(t),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uv(e){return!!function Gw(e){return null!==e&&("function"==typeof e||"object"==typeof e)}(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function mi(e,n,t){return!Object.is(e[n],t)&&(e[n]=t,!0)}function ut(e,n,t,i,r,o,a,s){const c=oe(),l=Jt(),d=e+It,u=l.firstCreatePass?function yW(e,n,t,i,r,o,a,s,c){const l=n.consts,d=Nd(n,e,4,a||null,Ma(l,s));fw(n,t,d,Ma(l,c)),bg(n,d);const u=d.tView=hw(2,d,i,r,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,l,null);return null!==n.queries&&(n.queries.template(n,d),u.queries=n.queries.embeddedTView(d)),d}(d,l,c,n,t,i,r,o,a):l.data[d];Ia(u,!1);const h=jI(l,c,u,e);Ih()&&Wg(l,c,h,u),hr(h,c);const f=IM(h,c,h,u);return c[d]=f,Kg(c,f),function fI(e,n,t){return Nw(e,n,t)}(f,u,c),pg(u)&&dw(l,c,u),null!=a&&uw(c,u,s),ut}let jI=function zI(e,n,t,i){return Oa(!0),n[Et].createComment("")};function fn(e,n,t,i){const r=oe();return mi(r,ta(),n)&&(Jt(),Pa(Hn(),r,e,n,t,i)),fn}function Wd(e,n,t,i){return mi(e,ta(),t)?n+Mt(t)+i:Nt}function qd(e,n,t,i,r,o){const s=function rl(e,n,t,i){const r=mi(e,n,t);return mi(e,n+1,i)||r}(e,function ls(){return Ct.lFrame.bindingIndex}(),t,r);return ds(2),s?n+Mt(t)+i+Mt(r)+o:Nt}function _v(e,n){return e<<17|n<<2}function rc(e){return e>>17&32767}function t1(e){return 2|e}function al(e){return(131068&e)>>2}function n1(e,n){return-131069&e|n<<2}function r1(e){return 1|e}function _O(e,n,t,i){const r=e[t+1],o=null===n;let a=i?rc(r):al(r),s=!1;for(;0!==a&&(!1===s||o);){const l=e[a+1];oq(e[a],n)&&(s=!0,e[a+1]=i?r1(l):t1(l)),a=i?rc(l):al(l)}s&&(e[t+1]=i?t1(r):r1(r))}function oq(e,n){return null===e||null==n||(Array.isArray(e)?e[1]:e)===n||!(!Array.isArray(e)||"string"!=typeof n)&&ud(e,n)>=0}const Vi={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function bO(e){return e.substring(Vi.key,Vi.keyEnd)}function yO(e,n){const t=Vi.textEnd;return t===n?-1:(n=Vi.keyEnd=function lq(e,n,t){for(;n32;)n++;return n}(e,Vi.key=n,t),eu(e,n,t))}function eu(e,n,t){for(;n=0;t=yO(n,t))Qr(e,bO(n),!0)}function na(e,n,t,i){const r=oe(),o=Jt(),a=ds(2);o.firstUpdatePass&&DO(o,e,a,i),n!==Nt&&mi(r,a,n)&&TO(o,o.data[ur()],r,r[Et],e,r[a+1]=function yq(e,n){return null==e||""===e||("string"==typeof n?e+=n:"object"==typeof e&&(e=ci(Js(e)))),e}(n,t),i,a)}function SO(e,n){return n>=e.expandoStartIndex}function DO(e,n,t,i){const r=e.data;if(null===r[t+1]){const o=r[ur()],a=SO(e,t);MO(o,i)&&null===n&&!a&&(n=!1),n=function fq(e,n,t,i){const r=fx(e);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(t=vf(t=s1(null,e,n,t,i),n.attrs,i),o=null);else{const a=n.directiveStylingLast;if(-1===a||e[a]!==r)if(t=s1(r,e,n,t,i),null===o){let c=function mq(e,n,t){const i=t?n.classBindings:n.styleBindings;if(0!==al(i))return e[rc(i)]}(e,n,i);void 0!==c&&Array.isArray(c)&&(c=s1(null,e,n,c[1],i),c=vf(c,n.attrs,i),function pq(e,n,t,i){e[rc(t?n.classBindings:n.styleBindings)]=i}(e,n,i,c))}else o=function gq(e,n,t){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(l=!0)):d=t,r)if(0!==c){const h=rc(e[s+1]);e[i+1]=_v(h,s),0!==h&&(e[h+1]=n1(e[h+1],i)),e[s+1]=function tq(e,n){return 131071&e|n<<17}(e[s+1],i)}else e[i+1]=_v(s,0),0!==s&&(e[s+1]=n1(e[s+1],i)),s=i;else e[i+1]=_v(c,0),0===s?s=i:e[c+1]=n1(e[c+1],i),c=i;l&&(e[i+1]=t1(e[i+1])),_O(e,d,i,!0),_O(e,d,i,!1),function rq(e,n,t,i,r){const o=r?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof n&&ud(o,n)>=0&&(t[i+1]=r1(t[i+1]))}(n,d,e,i,o),a=_v(s,c),o?n.classBindings=a:n.styleBindings=a}(r,o,n,t,a,i)}}function s1(e,n,t,i,r){let o=null;const a=t.directiveEnd;let s=t.directiveStylingLast;for(-1===s?s=t.directiveStart:s++;s0;){const c=e[r],l=Array.isArray(c),d=l?c[1]:c,u=null===d;let h=t[r+1];h===Nt&&(h=u?un:void 0);let f=u?j0(h,i):d===i?h:void 0;if(l&&!bv(f)&&(f=j0(c,i)),bv(f)&&(s=f,a))return s;const m=e[r+1];r=a?rc(m):al(m)}if(null!==n){let c=o?n.residualClasses:n.residualStyles;null!=c&&(s=j0(c,i))}return s}function bv(e){return void 0!==e}function MO(e,n){return!!(e.flags&(n?8:16))}function di(e,n,t){Fa("NgControlFlow");const i=oe(),r=ta(),o=function d1(e,n){return e[n]}(i,It+e);if(mi(i,r,n)){const s=H(null);try{if(function bw(e,n){const t=Uh(e,n);return void 0!==t&&Ug(t[Ie],t),t}(o,0),-1!==n){const c=function u1(e,n){return Th(e,n)}(i[Ie],It+n),l=Fd(o,c.tView.ssrId);Kh(o,Yh(i,c,t,{dehydratedView:l}),0,Pd(c,l))}}finally{H(s)}}else{const s=function FM(e,n){const t=fi+n;if(t(Oa(!0),$g(i,r,function $2(){return Ct.lFrame.currentNamespace}()));function vi(){return oe()}function sl(e,n,t){const i=oe();return mi(i,ta(),n)&&Hr(Jt(),Hn(),i,e,n,i[Et],t,!0),sl}function m1(e,n,t){const i=oe();if(mi(i,ta(),n)){const o=Jt(),a=Hn();Hr(o,a,i,e,n,PM(fx(o.data),a,i),t,!0)}return m1}const cl=void 0;var Kq=["en",[["a","p"],["AM","PM"],cl],[["AM","PM"],cl,cl],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],cl,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],cl,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",cl,"{1} 'at' {0}",cl],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function Yq(e){const t=Math.floor(Math.abs(e)),i=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===i?1:5}];let tu={};function wr(e){const n=function Xq(e){return e.toLowerCase().replace(/_/g,"-")}(e);let t=BO(n);if(t)return t;const i=n.split("-")[0];if(t=BO(i),t)return t;if("en"===i)return Kq;throw new se(701,!1)}function BO(e){return e in tu||(tu[e]=Ut.ng&&Ut.ng.common&&Ut.ng.common.locales&&Ut.ng.common.locales[e]),tu[e]}var $n=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}($n||{});const nu="en-US";let VO=nu;function Pe(e,n,t,i){const r=oe(),o=Jt(),a=Tn();return _1(o,r,r[Et],a,e,n,i),Pe}function v1(e,n){const t=Tn(),i=oe(),r=Jt();return _1(r,i,PM(fx(r.data),t,i),t,e,n),v1}function _1(e,n,t,i,r,o,a){const s=pg(i),l=e.firstCreatePass&&NM(e),d=n[zn],u=RM(n);let h=!0;if(3&i.type||a){const g=yr(i,n),v=a?a(g):g,C=u.length,w=a?x=>a(Mn(x[i.index])):i.index;let E=null;if(!a&&s&&(E=function WY(e,n,t,i){const r=e.cleanup;if(null!=r)for(let o=0;oc?s[c]:null}"string"==typeof a&&(o+=2)}return null}(e,n,r,i.index)),null!==E)(E.__ngLastListenerFn__||E).__ngNextListenerFn__=o,E.__ngLastListenerFn__=o,h=!1;else{o=hR(i,n,d,o,!1);const x=t.listen(v,r,o);u.push(o,x),l&&l.push(r,w,C,C+1)}}else o=hR(i,n,d,o,!1);const f=i.outputs;let m;if(h&&null!==f&&(m=f[r])){const g=m.length;if(g)for(let v=0;v-1?eo(e.index,n):n);let c=uR(n,t,i,a),l=o.__ngNextListenerFn__;for(;l;)c=uR(n,t,l,a)&&c,l=l.__ngNextListenerFn__;return r&&!1===c&&a.preventDefault(),c}}function st(e=1){return function q9(e){return(Ct.lFrame.contextLView=function I2(e,n){for(;e>0;)n=n[vd],e--;return n}(e,Ct.lFrame.contextLView))[zn]}(e)}function qY(e,n){let t=null;const i=function WH(e){const n=e.attrs;if(null!=n){const t=n.indexOf(5);if(!(1&t))return n[t+1]}return null}(e);for(let r=0;r(Oa(!0),function tw(e,n){return e.createText(n)}(n[Et],i));function ko(e){return fs("",e,""),ko}function fs(e,n,t){const i=oe(),r=Wd(i,e,n,t);return r!==Nt&&hs(i,ur(),r),fs}function y1(e,n,t,i,r){const o=oe(),a=qd(o,e,n,t,i,r);return a!==Nt&&hs(o,ur(),a),y1}function x1(e,n,t,i,r){if(e=gt(e),Array.isArray(e))for(let o=0;o>20;if(Gc(e)||!e.multi){const f=new Oh(l,r,T),m=E1(c,n,r?d:d+h,u);-1===m?(Ex(Eg(s,a),o,c),w1(o,e,n.length),n.push(c),s.directiveStart++,s.directiveEnd++,r&&(s.providerIndexes+=1048576),t.push(f),a.push(f)):(t[m]=f,a[m]=f)}else{const f=E1(c,n,d+h,u),m=E1(c,n,d,d+h),v=m>=0&&t[m];if(r&&!v||!r&&!(f>=0&&t[f])){Ex(Eg(s,a),o,c);const C=function fK(e,n,t,i,r){const o=new Oh(e,t,T);return o.multi=[],o.index=n,o.componentProviders=0,jR(o,r,i&&!t),o}(r?hK:uK,t.length,r,i,l);!r&&v&&(t[m].providerFactory=C),w1(o,e,n.length,0),n.push(c),s.directiveStart++,s.directiveEnd++,r&&(s.providerIndexes+=1048576),t.push(C),a.push(C)}else w1(o,e,f>-1?f:m,jR(t[r?m:f],l,!r&&i));!r&&i&&v&&t[m].componentProviders++}}}function w1(e,n,t,i){const r=Gc(n),o=function o9(e){return!!e.useClass}(n);if(r||o){const c=(o?gt(n.useClass):n).prototype.ngOnDestroy;if(c){const l=e.destroyHooks||(e.destroyHooks=[]);if(!r&&n.multi){const d=l.indexOf(t);-1===d?l.push(t,[i,c]):l[d+1].push(i,c)}else l.push(t,c)}}}function jR(e,n,t){return t&&e.componentProviders++,e.multi.push(n)-1}function E1(e,n,t,i){for(let r=t;r{t.providersResolver=(i,r)=>function dK(e,n,t){const i=Jt();if(i.firstCreatePass){const r=ea(e);x1(t,i.data,i.blueprint,r,!0),x1(n,i.data,i.blueprint,r,!1)}}(i,r?r(e):e,n)}}let mK=(()=>{class e{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){const i=U0(0,t.type),r=i.length>0?function VI(e,n,t=null){return new BI({providers:e,parent:n,debugName:t,runEnvironmentInitializers:!0}).injector}([i],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}static#e=this.\u0275prov=ge({token:e,providedIn:"environment",factory:()=>new e(F(ka))})}return e})();function Kn(e){Fa("NgStandalone"),e.getStandaloneInjector=n=>n.get(mK).getOrCreateStandaloneInjector(e)}function HR(e,n,t,i,r,o){const a=n+t;return mi(e,a,r)?function La(e,n,t){return e[n]=t}(e,a+1,o?i.call(o,r):i(r)):function Cf(e,n){const t=e[n];return t===Nt?void 0:t}(e,a+1)}function Zt(e,n){const t=Jt();let i;const r=e+It;t.firstCreatePass?(i=function kK(e,n){if(n)for(let t=n.length-1;t>=0;t--){const i=n[t];if(e===i.name)return i}}(n,t.pipeRegistry),t.data[r]=i,i.onDestroy&&(t.destroyHooks??=[]).push(r,i.onDestroy)):i=t.data[r];const o=i.factory||(i.factory=$c(i.type)),s=Br(T);try{const c=wg(!1),l=o();return wg(c),function ZY(e,n,t,i){t>=e.data.length&&(e.data[t]=null,e.blueprint[t]=null),n[t]=i}(t,oe(),r,l),l}finally{Br(s)}}function Qt(e,n,t){const i=e+It,r=oe(),o=yd(r,i);return function Sf(e,n){return e[Ie].data[n].pure}(r,i)?HR(r,function xr(){const e=Ct.lFrame;let n=e.bindingRootIndex;return-1===n&&(n=e.bindingRootIndex=e.tView.bindingStartIndex),n}(),n,o.transform,t,o):o.transform(t)}function iu(e,n){return Qg(e,n)}const hN=new ye(""),kv=new ye("");let O1,M1=(()=>{class e{constructor(t,i,r){this._ngZone=t,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,O1||(function SX(e){O1=e}(r),r.addToWindow(i)),this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{at.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb()}});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(t)||(clearTimeout(i.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==o),t()},i)),this._callbacks.push({doneCb:t,timeoutId:o,updateCb:r})}whenStable(t,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(t,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,i,r){return[]}static#e=this.\u0275fac=function(i){return new(i||e)(F(at),F(I1),F(kv))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac})}return e})(),I1=(()=>{class e{constructor(){this._applications=new Map}registerApplication(t,i){this._applications.set(t,i)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,i=!0){return O1?.findTestabilityInTree(this,t,i)??null}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();function Tv(e){return!!e&&"function"==typeof e.then}function fN(e){return!!e&&"function"==typeof e.subscribe}const DX=new ye("");let R1=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,i)=>{this.resolve=t,this.reject=i}),this.appInits=Ye(DX,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const t=[];for(const r of this.appInits){const o=r();if(Tv(o))t.push(o);else if(fN(o)){const a=new Promise((s,c)=>{o.subscribe({complete:s,error:c})});t.push(a)}}const i=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),0===t.length&&i(),this.initialized=!0}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const mN=new ye("");function vN(e,n){return Array.isArray(n)?n.reduce(vN,e):{...e,...n}}let oc=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=Ye(dA),this.afterRenderEffectManager=Ye(rf),this.externalTestViews=new Set,this.beforeRender=new xt,this.afterTick=new xt,this.componentTypes=[],this.components=[],this.isStable=Ye(df).hasPendingTasks.pipe(wa(t=>!t)),this._injector=Ye(ka)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(t,i){const r=t instanceof KM;if(!this._injector.get(R1).done)throw!r&&function Uc(e){const n=Gt(e)||Fi(e)||Qi(e);return null!==n&&n.standalone}(t),new se(405,!1);let a;a=r?t:this._injector.get(Ld).resolveComponentFactory(t),this.componentTypes.push(a.componentType);const s=function kX(e){return e.isBoundToModule}(a)?void 0:this._injector.get(il),l=a.create(li.NULL,[],i||a.selector,s),d=l.location.nativeElement,u=l.injector.get(hN,null);return u?.registerApplication(d),l.onDestroy(()=>{this.detachView(l.hostView),Av(this.components,l),u?.unregisterApplication(d)}),this._loadComponent(l),l}tick(){this._tick(!0)}_tick(t){if(this._runningTick)throw new se(101,!1);const i=H(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(t)}catch(r){this.internalErrorHandler(r)}finally{this.afterTick.next(),this._runningTick=!1,H(i)}}detectChangesInAttachedViews(t){let i=0;const r=this.afterRenderEffectManager;for(;;){if(i===VM)throw new se(103,!1);if(t){const o=0===i;this.beforeRender.next(o);for(let{_lView:a,notifyErrorHandler:s}of this._views)AX(a,o,s)}if(i++,r.executeInternalCallbacks(),![...this.externalTestViews.keys(),...this._views].some(({_lView:o})=>N1(o))&&(r.execute(),![...this.externalTestViews.keys(),...this._views].some(({_lView:o})=>N1(o))))break}}attachView(t){const i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){const i=t;Av(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const i=this._injector.get(mN,[]);[...this._bootstrapListeners,...i].forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>Av(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new se(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Av(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}function AX(e,n,t){!n&&!N1(e)||function MX(e,n,t){let i;t?(i=0,e[dt]|=1024):i=64&e[dt]?0:1,Zg(e,n,i)}(e,t,n)}function N1(e){return sx(e)}let NX=(()=>{class e{constructor(){this.zone=Ye(at),this.applicationRef=Ye(oc)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function PX(){const e=Ye(at),n=Ye(Na);return t=>e.runOutsideAngular(()=>n.handleError(t))}let LX=(()=>{class e{constructor(){this.subscription=new ot,this.initialized=!1,this.zone=Ye(at),this.pendingTasks=Ye(df)}initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{at.assertNotInAngularZone(),queueMicrotask(()=>{null!==t&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{at.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const ja=new ye("",{providedIn:"root",factory:()=>Ye(ja,sn.Optional|sn.SkipSelf)||function BX(){return typeof $localize<"u"&&$localize.locale||nu}()}),P1=new ye("");let xN=(()=>{class e{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,i){const r=function yG(e="zone.js",n){return"noop"===e?new tI:"zone.js"===e?new at(n):e}(i?.ngZone,function yN(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}({eventCoalescing:i?.ngZoneEventCoalescing,runCoalescing:i?.ngZoneRunCoalescing}));return r.run(()=>{const o=function mW(e,n,t){return new $w(e,n,t)}(t.moduleType,this.injector,function bN(e){return[{provide:at,useFactory:e},{provide:hd,multi:!0,useFactory:()=>{const n=Ye(NX,{optional:!0});return()=>n.initialize()}},{provide:hd,multi:!0,useFactory:()=>{const n=Ye(LX);return()=>{n.initialize()}}},{provide:dA,useFactory:PX}]}(()=>r)),a=o.injector.get(Na,null);return r.runOutsideAngular(()=>{const s=r.onError.subscribe({next:c=>{a.handleError(c)}});o.onDestroy(()=>{Av(this._modules,o),s.unsubscribe()})}),function gN(e,n,t){try{const i=t();return Tv(i)?i.catch(r=>{throw n.runOutsideAngular(()=>e.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>e.handleError(i)),i}}(a,r,()=>{const s=o.injector.get(R1);return s.runInitializers(),s.donePromise.then(()=>(function jO(e){"string"==typeof e&&(VO=e.toLowerCase().replace(/_/g,"-"))}(o.injector.get(ja,nu)||nu),this._moduleDoBootstrap(o),o))})})}bootstrapModule(t,i=[]){const r=vN({},i);return function RX(e,n,t){const i=new Uw(t);return Promise.resolve(i)}(0,0,t).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(t){const i=t.injector.get(oc);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!t.instance.ngDoBootstrap)throw new se(-403,!1);t.instance.ngDoBootstrap(i)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new se(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const t=this._injector.get(P1,null);t&&(t.forEach(i=>i()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#e=this.\u0275fac=function(i){return new(i||e)(F(li))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})(),ac=null;const wN=new ye("");function EN(e,n,t=[]){const i=`Platform: ${n}`,r=new ye(i);return(o=[])=>{let a=F1();if(!a||a.injector.get(wN,!1)){const s=[...t,...o,{provide:r,useValue:!0}];e?e(s):function zX(e){if(ac&&!ac.get(wN,!1))throw new se(400,!1);(function pN(){!function V(e){Pn=e}(()=>{throw new se(600,!1)})})(),ac=e;const n=e.get(xN);(function SN(e){e.get(OA,null)?.forEach(t=>t())})(e)}(function CN(e=[],n){return li.create({name:n,providers:[{provide:q0,useValue:"platform"},{provide:P1,useValue:new Set([()=>ac=null])},...e]})}(s,i))}return function HX(e){const n=F1();if(!n)throw new se(401,!1);return n}()}}function F1(){return ac?.get(xN)??null}let io=(()=>{class e{static#e=this.__NG_ELEMENT_ID__=UX}return e})();function UX(e){return function GX(e,n,t){if(qc(e)&&!t){const i=eo(e.index,n);return new Qh(i,i)}return 47&e.type?new Qh(n[ai],n):null}(Tn(),oe(),!(16&~e))}class MN{constructor(){}supports(n){return uv(n)}create(n){return new XX(n)}}const KX=(e,n)=>n;class XX{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||KX}forEachItem(n){let t;for(t=this._itHead;null!==t;t=t._next)n(t)}forEachOperation(n){let t=this._itHead,i=this._removalsHead,r=0,o=null;for(;t||i;){const a=!i||t&&t.currentIndex{a=this._trackByFn(r,s),null!==t&&Object.is(t.trackById,a)?(i&&(t=this._verifyReinsertion(t,s,a,r)),Object.is(t.item,s)||this._addIdentityChange(t,s)):(t=this._mismatch(t,s,a,r),i=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,t,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._moveAfter(n,o,r)):n=this._addAfter(new ZX(t,i),o,r),n}_verifyReinsertion(n,t,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const t=n._next;this._addToRemovals(this._unlink(n)),n=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,t,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,t,i),this._addToMoves(n,i),n}_moveAfter(n,t,i){return this._unlink(n),this._insertAfter(n,t,i),this._addToMoves(n,i),n}_addAfter(n,t,i){return this._insertAfter(n,t,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,t,i){const r=null===t?this._itHead:t._next;return n._next=r,n._prev=t,null===r?this._itTail=n:r._prev=n,null===t?this._itHead=n:t._next=n,null===this._linkedRecords&&(this._linkedRecords=new IN),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const t=n._prev,i=n._next;return null===t?this._itHead=i:t._next=i,null===i?this._itTail=t:i._prev=t,n}_addToMoves(n,t){return n.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new IN),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,t){return n.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class ZX{constructor(n,t){this.item=n,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class QX{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,t){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===t||t<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const t=n._prevDup,i=n._nextDup;return null===t?this._head=i:t._nextDup=i,null===i?this._tail=t:i._prevDup=t,null===this._head}}class IN{constructor(){this.map=new Map}put(n){const t=n.trackById;let i=this.map.get(t);i||(i=new QX,this.map.set(t,i)),i.add(n)}get(n,t){const r=this.map.get(n);return r?r.get(n,t):null}remove(n){const t=n.trackById;return this.map.get(t).remove(n)&&this.map.delete(t),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function ON(e,n,t){const i=e.previousIndex;if(null===i)return i;let r=0;return t&&i{class e{static#e=this.\u0275prov=ge({token:e,providedIn:"root",factory:NN});constructor(t){this.factories=t}static create(t,i){if(null!=i){const r=i.factories.slice();t=t.concat(r)}return new e(t)}static extend(t){return{provide:e,useFactory:i=>e.create(t,i||NN()),deps:[[e,new B0,new L0]]}}find(t){const i=this.factories.find(r=>r.supports(t));if(null!=i)return i;throw new se(901,!1)}}return e})();const iZ=EN(null,"core",[]);let rZ=(()=>{class e{constructor(t){}static#e=this.\u0275fac=function(i){return new(i||e)(F(oc))};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({})}return e})();function Fn(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}function iP(e,n=NaN){return isNaN(parseFloat(e))||isNaN(Number(e))?n:Number(e)}function rP(e){const n=H(null);try{return e()}finally{H(n)}}const NZ=new ye("",{providedIn:"root",factory:()=>Ye(PZ)});let PZ=(()=>{class e{static#e=this.\u0275prov=ge({token:e,providedIn:"root",factory:()=>new FZ})}return e})();class FZ{constructor(){this.queuedEffectCount=0,this.queues=new Map,this.pendingTasks=Ye(df),this.taskId=null}scheduleEffect(n){if(this.enqueue(n),null===this.taskId){const t=this.taskId=this.pendingTasks.add();queueMicrotask(()=>{this.flush(),this.pendingTasks.remove(t),this.taskId=null})}}enqueue(n){const t=n.creationZone;this.queues.has(t)||this.queues.set(t,new Set);const i=this.queues.get(t);i.has(n)||(this.queuedEffectCount++,i.add(n))}flush(){for(;this.queuedEffectCount>0;)for(const[n,t]of this.queues)null===n?this.flushQueue(t):n.run(()=>this.flushQueue(t))}flushQueue(n){for(const t of n)n.delete(t),this.queuedEffectCount--,t.run()}}class LZ{constructor(n,t,i,r,o,a){this.scheduler=n,this.effectFn=t,this.creationZone=i,this.injector=o,this.watcher=function ie(e,n,t){const i=Object.create(Ae);t&&(i.consumerAllowSignalWrites=!0),i.fn=e,i.schedule=n;const r=c=>{i.cleanupFn=c};return i.ref={notify:()=>He(i),run:()=>{if(null===i.fn)return;if(function Ee(){return pe}())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(i.dirty=!1,i.hasRun&&!qn(i))return;i.hasRun=!0;const c=rt(i);try{i.cleanupFn(),i.cleanupFn=le,i.fn(r)}finally{Jn(i,c)}},cleanup:()=>i.cleanupFn(),destroy:()=>function a(c){(function o(c){return null===c.fn&&null===c.schedule})(c)||(Yi(c),c.cleanupFn(),c.fn=null,c.schedule=null,c.cleanupFn=le)}(i),[ne]:i},i.ref}(s=>this.runEffect(s),()=>this.schedule(),a),this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}runEffect(n){try{this.effectFn(n)}catch(t){this.injector.get(Na,null,{optional:!0})?.handleError(t)}}run(){this.watcher.run()}schedule(){this.scheduler.scheduleEffect(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}}function oP(e,n){Fa("NgSignals"),!n?.injector&&function ug(e){if(!g2())throw new se(-203,!1)}();const t=n?.injector??Ye(li),i=!0!==n?.manualCleanup?t.get(Sd):null,r=new LZ(t.get(NZ),e,typeof Zone>"u"?null:Zone.current,i,t,n?.allowSignalWrites??!1),o=t.get(io,null,{optional:!0});return o&&8&o._lView[dt]?(o._lView[fg]??=[]).push(r.watcher.notify):r.watcher.notify(),r}let aP=null;function sc(){return aP}class VZ{}const cn=new ye("");let sP=(()=>{class e{historyGo(t){throw new Error("")}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:()=>Ye(jZ),providedIn:"platform"})}return e})(),jZ=(()=>{class e extends sP{constructor(){super(),this._doc=Ye(cn),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return sc().getBaseHref(this._doc)}onPopState(t){const i=sc().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",t,!1),()=>i.removeEventListener("popstate",t)}onHashChange(t){const i=sc().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",t,!1),()=>i.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,i,r){this._history.pushState(t,i,r)}replaceState(t,i,r){this._history.replaceState(t,i,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function cP(e,n){if(0==e.length)return n;if(0==n.length)return e;let t=0;return e.endsWith("/")&&t++,n.startsWith("/")&&t++,2==t?e+n.substring(1):1==t?e+n:e+"/"+n}function lP(e){const n=e.match(/#|\?|$/),t=n&&n.index||e.length;return e.slice(0,t-("/"===e[t-1]?1:0))+e.slice(t)}function ul(e){return e&&"?"!==e[0]?"?"+e:e}let U1=(()=>{class e{historyGo(t){throw new Error("")}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:()=>Ye(HZ),providedIn:"root"})}return e})();const zZ=new ye("");let HZ=(()=>{class e extends U1{constructor(t,i){super(),this._platformLocation=t,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??Ye(cn).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return cP(this._baseHref,t)}path(t=!1){const i=this._platformLocation.pathname+ul(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${i}${r}`:i}pushState(t,i,r,o){const a=this.prepareExternalUrl(r+ul(o));this._platformLocation.pushState(t,i,a)}replaceState(t,i,r,o){const a=this.prepareExternalUrl(r+ul(o));this._platformLocation.replaceState(t,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static#e=this.\u0275fac=function(i){return new(i||e)(F(sP),F(zZ,8))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),G1=(()=>{class e{constructor(t){this._subject=new nn,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=t;const i=this._locationStrategy.getBaseHref();this._basePath=function GZ(e){if(new RegExp("^(https?:)?//").test(e)){const[,t]=e.split(/\/\/[^\/]+/);return t}return e}(lP(dP(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,i=""){return this.path()==this.normalize(t+ul(i))}normalize(t){return e.stripTrailingSlash(function UZ(e,n){if(!e||!n.startsWith(e))return n;const t=n.substring(e.length);return""===t||["/",";","?","#"].includes(t[0])?t:n}(this._basePath,dP(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,i="",r=null){this._locationStrategy.pushState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+ul(i)),r)}replaceState(t,i="",r=null){this._locationStrategy.replaceState(r,"",t,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+ul(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)}),()=>{const i=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",i){this._urlChangeListeners.forEach(r=>r(t,i))}subscribe(t,i,r){return this._subject.subscribe({next:t,error:i,complete:r})}static#e=this.normalizeQueryParams=ul;static#t=this.joinWithSlash=cP;static#n=this.stripTrailingSlash=lP;static#i=this.\u0275fac=function(i){return new(i||e)(F(U1))};static#r=this.\u0275prov=ge({token:e,factory:()=>function $Z(){return new G1(F(U1))}(),providedIn:"root"})}return e})();function dP(e){return e.replace(/\/index.html$/,"")}var Sr=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(Sr||{}),Ln=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(Ln||{}),ro=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(ro||{});const Si={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function jv(e,n){return Ao(wr(e)[$n.DateFormat],n)}function zv(e,n){return Ao(wr(e)[$n.TimeFormat],n)}function Hv(e,n){return Ao(wr(e)[$n.DateTimeFormat],n)}function To(e,n){const t=wr(e),i=t[$n.NumberSymbols][n];if(typeof i>"u"){if(n===Si.CurrencyDecimal)return t[$n.NumberSymbols][Si.Decimal];if(n===Si.CurrencyGroup)return t[$n.NumberSymbols][Si.Group]}return i}function hP(e){if(!e[$n.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[$n.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Ao(e,n){for(let t=n;t>-1;t--)if(typeof e[t]<"u")return e[t];throw new Error("Locale data API: locale data undefined")}function q1(e){const[n,t]=e.split(":");return{hours:+n,minutes:+t}}const oQ=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,$v={},aQ=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var ms=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}(ms||{}),_n=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}(_n||{}),bn=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}(bn||{});function fP(e,n,t,i){let r=function pQ(e){if(gP(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){const[r,o=1,a=1]=e.split("-").map(s=>+s);return Uv(r,o-1,a)}const t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let i;if(i=e.match(oQ))return function gQ(e){const n=new Date(0);let t=0,i=0;const r=e[8]?n.setUTCFullYear:n.setFullYear,o=e[8]?n.setUTCHours:n.setHours;e[9]&&(t=Number(e[9]+e[10]),i=Number(e[9]+e[11])),r.call(n,Number(e[1]),Number(e[2])-1,Number(e[3]));const a=Number(e[4]||0)-t,s=Number(e[5]||0)-i,c=Number(e[6]||0),l=Math.floor(1e3*parseFloat("0."+(e[7]||0)));return o.call(n,a,s,c,l),n}(i)}const n=new Date(e);if(!gP(n))throw new Error(`Unable to convert "${e}" into a date`);return n}(e);n=ps(t,n)||n;let s,a=[];for(;n;){if(s=aQ.exec(n),!s){a.push(n);break}{a=a.concat(s.slice(1));const d=a.pop();if(!d)break;n=d}}let c=r.getTimezoneOffset();i&&(c=pP(i,c),r=function mQ(e,n,t){const i=t?-1:1,r=e.getTimezoneOffset();return function fQ(e,n){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+n),e}(e,i*(pP(n,r)-r))}(r,i,!0));let l="";return a.forEach(d=>{const u=function hQ(e){if(K1[e])return K1[e];let n;switch(e){case"G":case"GG":case"GGG":n=Un(bn.Eras,Ln.Abbreviated);break;case"GGGG":n=Un(bn.Eras,Ln.Wide);break;case"GGGGG":n=Un(bn.Eras,Ln.Narrow);break;case"y":n=Di(_n.FullYear,1,0,!1,!0);break;case"yy":n=Di(_n.FullYear,2,0,!0,!0);break;case"yyy":n=Di(_n.FullYear,3,0,!1,!0);break;case"yyyy":n=Di(_n.FullYear,4,0,!1,!0);break;case"Y":n=Yv(1);break;case"YY":n=Yv(2,!0);break;case"YYY":n=Yv(3);break;case"YYYY":n=Yv(4);break;case"M":case"L":n=Di(_n.Month,1,1);break;case"MM":case"LL":n=Di(_n.Month,2,1);break;case"MMM":n=Un(bn.Months,Ln.Abbreviated);break;case"MMMM":n=Un(bn.Months,Ln.Wide);break;case"MMMMM":n=Un(bn.Months,Ln.Narrow);break;case"LLL":n=Un(bn.Months,Ln.Abbreviated,Sr.Standalone);break;case"LLLL":n=Un(bn.Months,Ln.Wide,Sr.Standalone);break;case"LLLLL":n=Un(bn.Months,Ln.Narrow,Sr.Standalone);break;case"w":n=Y1(1);break;case"ww":n=Y1(2);break;case"W":n=Y1(1,!0);break;case"d":n=Di(_n.Date,1);break;case"dd":n=Di(_n.Date,2);break;case"c":case"cc":n=Di(_n.Day,1);break;case"ccc":n=Un(bn.Days,Ln.Abbreviated,Sr.Standalone);break;case"cccc":n=Un(bn.Days,Ln.Wide,Sr.Standalone);break;case"ccccc":n=Un(bn.Days,Ln.Narrow,Sr.Standalone);break;case"cccccc":n=Un(bn.Days,Ln.Short,Sr.Standalone);break;case"E":case"EE":case"EEE":n=Un(bn.Days,Ln.Abbreviated);break;case"EEEE":n=Un(bn.Days,Ln.Wide);break;case"EEEEE":n=Un(bn.Days,Ln.Narrow);break;case"EEEEEE":n=Un(bn.Days,Ln.Short);break;case"a":case"aa":case"aaa":n=Un(bn.DayPeriods,Ln.Abbreviated);break;case"aaaa":n=Un(bn.DayPeriods,Ln.Wide);break;case"aaaaa":n=Un(bn.DayPeriods,Ln.Narrow);break;case"b":case"bb":case"bbb":n=Un(bn.DayPeriods,Ln.Abbreviated,Sr.Standalone,!0);break;case"bbbb":n=Un(bn.DayPeriods,Ln.Wide,Sr.Standalone,!0);break;case"bbbbb":n=Un(bn.DayPeriods,Ln.Narrow,Sr.Standalone,!0);break;case"B":case"BB":case"BBB":n=Un(bn.DayPeriods,Ln.Abbreviated,Sr.Format,!0);break;case"BBBB":n=Un(bn.DayPeriods,Ln.Wide,Sr.Format,!0);break;case"BBBBB":n=Un(bn.DayPeriods,Ln.Narrow,Sr.Format,!0);break;case"h":n=Di(_n.Hours,1,-12);break;case"hh":n=Di(_n.Hours,2,-12);break;case"H":n=Di(_n.Hours,1);break;case"HH":n=Di(_n.Hours,2);break;case"m":n=Di(_n.Minutes,1);break;case"mm":n=Di(_n.Minutes,2);break;case"s":n=Di(_n.Seconds,1);break;case"ss":n=Di(_n.Seconds,2);break;case"S":n=Di(_n.FractionalSeconds,1);break;case"SS":n=Di(_n.FractionalSeconds,2);break;case"SSS":n=Di(_n.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":n=Wv(ms.Short);break;case"ZZZZZ":n=Wv(ms.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=Wv(ms.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":n=Wv(ms.Long);break;default:return null}return K1[e]=n,n}(d);l+=u?u(r,t,c):"''"===d?"'":d.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function Uv(e,n,t){const i=new Date(0);return i.setFullYear(e,n,t),i.setHours(0,0,0),i}function ps(e,n){const t=function qZ(e){return wr(e)[$n.LocaleId]}(e);if($v[t]??={},$v[t][n])return $v[t][n];let i="";switch(n){case"shortDate":i=jv(e,ro.Short);break;case"mediumDate":i=jv(e,ro.Medium);break;case"longDate":i=jv(e,ro.Long);break;case"fullDate":i=jv(e,ro.Full);break;case"shortTime":i=zv(e,ro.Short);break;case"mediumTime":i=zv(e,ro.Medium);break;case"longTime":i=zv(e,ro.Long);break;case"fullTime":i=zv(e,ro.Full);break;case"short":const r=ps(e,"shortTime"),o=ps(e,"shortDate");i=Gv(Hv(e,ro.Short),[r,o]);break;case"medium":const a=ps(e,"mediumTime"),s=ps(e,"mediumDate");i=Gv(Hv(e,ro.Medium),[a,s]);break;case"long":const c=ps(e,"longTime"),l=ps(e,"longDate");i=Gv(Hv(e,ro.Long),[c,l]);break;case"full":const d=ps(e,"fullTime"),u=ps(e,"fullDate");i=Gv(Hv(e,ro.Full),[d,u])}return i&&($v[t][n]=i),i}function Gv(e,n){return n&&(e=e.replace(/\{([^}]+)}/g,function(t,i){return null!=n&&i in n?n[i]:t})),e}function ra(e,n,t="-",i,r){let o="";(e<0||r&&e<=0)&&(r?e=1-e:(e=-e,o=t));let a=String(e);for(;a.length0||s>-t)&&(s+=t),e===_n.Hours)0===s&&-12===t&&(s=12);else if(e===_n.FractionalSeconds)return function sQ(e,n){return ra(e,3).substring(0,n)}(s,n);const c=To(a,Si.MinusSign);return ra(s,n,c,i,r)}}function Un(e,n,t=Sr.Format,i=!1){return function(r,o){return function lQ(e,n,t,i,r,o){switch(t){case bn.Months:return function XZ(e,n,t){const i=wr(e),o=Ao([i[$n.MonthsFormat],i[$n.MonthsStandalone]],n);return Ao(o,t)}(n,r,i)[e.getMonth()];case bn.Days:return function KZ(e,n,t){const i=wr(e),o=Ao([i[$n.DaysFormat],i[$n.DaysStandalone]],n);return Ao(o,t)}(n,r,i)[e.getDay()];case bn.DayPeriods:const a=e.getHours(),s=e.getMinutes();if(o){const l=function eQ(e){const n=wr(e);return hP(n),(n[$n.ExtraData][2]||[]).map(i=>"string"==typeof i?q1(i):[q1(i[0]),q1(i[1])])}(n),d=function tQ(e,n,t){const i=wr(e);hP(i);const o=Ao([i[$n.ExtraData][0],i[$n.ExtraData][1]],n)||[];return Ao(o,t)||[]}(n,r,i),u=l.findIndex(h=>{if(Array.isArray(h)){const[f,m]=h,g=a>=f.hours&&s>=f.minutes,v=a0?Math.floor(r/60):Math.ceil(r/60);switch(e){case ms.Short:return(r>=0?"+":"")+ra(a,2,o)+ra(Math.abs(r%60),2,o);case ms.ShortGMT:return"GMT"+(r>=0?"+":"")+ra(a,1,o);case ms.Long:return"GMT"+(r>=0?"+":"")+ra(a,2,o)+":"+ra(Math.abs(r%60),2,o);case ms.Extended:return 0===i?"Z":(r>=0?"+":"")+ra(a,2,o)+":"+ra(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${e}"`)}}}const dQ=0,qv=4;function mP(e){const n=e.getDay(),t=0===n?-3:qv-n;return Uv(e.getFullYear(),e.getMonth(),e.getDate()+t)}function Y1(e,n=!1){return function(t,i){let r;if(n){const o=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,a=t.getDate();r=1+Math.floor((a+o)/7)}else{const o=mP(t),a=function uQ(e){const n=Uv(e,dQ,1).getDay();return Uv(e,0,1+(n<=qv?qv:qv+7)-n)}(o.getFullYear()),s=o.getTime()-a.getTime();r=1+Math.round(s/6048e5)}return ra(r,e,To(i,Si.MinusSign))}}function Yv(e,n=!1){return function(t,i){return ra(mP(t).getFullYear(),e,To(i,Si.MinusSign),n)}}const K1={};function pP(e,n){e=e.replace(/:/g,"");const t=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(t)?n:t}function gP(e){return e instanceof Date&&!isNaN(e.valueOf())}class IQ{constructor(n,t,i,r){this.$implicit=n,this.ngForOf=t,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let lu=(()=>{class e{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,i,r){this._viewContainer=t,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const i=this._viewContainer;t.forEachOperation((r,o,a)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new IQ(r.item,this._ngForOf,-1,-1),null===a?void 0:a);else if(null==a)i.remove(null===o?void 0:o);else if(null!==o){const s=i.get(o);i.move(s,a),wP(s,r)}});for(let r=0,o=i.length;r{wP(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(t,i){return!0}static#e=this.\u0275fac=function(i){return new(i||e)(T(Co),T(Eo),T(z1))};static#t=this.\u0275dir=Me({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}return e})();function wP(e,n){e.context.$implicit=n.item}let cc=(()=>{class e{constructor(t,i){this._viewContainer=t,this._context=new OQ,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){EP("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){EP("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,i){return!0}static#e=this.\u0275fac=function(i){return new(i||e)(T(Co),T(Eo))};static#t=this.\u0275dir=Me({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}return e})();class OQ{constructor(){this.$implicit=null,this.ngIf=null}}function EP(e,n){if(n&&!n.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${ci(n)}'.`)}let rE=(()=>{class e{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const r=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,i,r)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,i,r),get:(t,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static#e=this.\u0275fac=function(i){return new(i||e)(T(Co))};static#t=this.\u0275dir=Me({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[br]})}return e})();class BQ{createSubscription(n,t){return rP(()=>n.subscribe({next:t,error:i=>{throw i}}))}dispose(n){rP(()=>n.unsubscribe())}}class VQ{createSubscription(n,t){return n.then(t,i=>{throw i})}dispose(n){}}const jQ=new VQ,zQ=new BQ;let za=(()=>{class e{constructor(t){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){if(!this._obj){if(t)try{this.markForCheckOnValueUpdate=!1,this._subscribe(t)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,i=>this._updateLatestValue(t,i))}_selectStrategy(t){if(Tv(t))return jQ;if(fN(t))return zQ;throw function oa(e,n){return new se(2100,!1)}()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,i){t===this._obj&&(this._latestValue=i,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static#e=this.\u0275fac=function(i){return new(i||e)(T(io,16))};static#t=this.\u0275pipe=jr({name:"async",type:e,pure:!1,standalone:!0})}return e})(),hl=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({})}return e})();const DP="browser";function kP(e){return"server"===e}class BJ extends VZ{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class cE extends BJ{static makeCurrent(){!function BZ(e){aP??=e}(new cE)}onAndCancel(n,t,i){return n.addEventListener(t,i),()=>{n.removeEventListener(t,i)}}dispatchEvent(n,t){n.dispatchEvent(t)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,t){return(t=t||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,t){return"window"===t?window:"document"===t?n:"body"===t?n.body:null}getBaseHref(n){const t=function VJ(){return Rf=Rf||document.querySelector("base"),Rf?Rf.getAttribute("href"):null}();return null==t?null:function jJ(e){return new URL(e,document.baseURI).pathname}(t)}resetBaseElement(){Rf=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return function TQ(e,n){n=encodeURIComponent(n);for(const t of e.split(";")){const i=t.indexOf("="),[r,o]=-1==i?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}(document.cookie,n)}}let Rf=null,HJ=(()=>{class e{build(){return new XMLHttpRequest}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac})}return e})();const lE=new ye("");let FP=(()=>{class e{constructor(t,i){this._zone=i,this._eventNameToPlugin=new Map,t.forEach(r=>{r.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,i,r){return this._findPluginFor(i).addEventListener(t,i,r)}getZone(){return this._zone}_findPluginFor(t){let i=this._eventNameToPlugin.get(t);if(i)return i;if(i=this._plugins.find(o=>o.supports(t)),!i)throw new se(5101,!1);return this._eventNameToPlugin.set(t,i),i}static#e=this.\u0275fac=function(i){return new(i||e)(F(lE),F(at))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac})}return e})();class LP{constructor(n){this._doc=n}}const dE="ng-app-id";let BP=(()=>{class e{constructor(t,i,r,o={}){this.doc=t,this.appId=i,this.nonce=r,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=kP(o),this.resetHostNodes()}addStyles(t){for(const i of t)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(t){for(const i of t)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){const t=this.styleNodesInDOM;t&&(t.forEach(i=>i.remove()),t.clear());for(const i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(t){this.hostNodes.add(t);for(const i of this.getAllStyles())this.addStyleToHost(t,i)}removeHost(t){this.hostNodes.delete(t)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(t){for(const i of this.hostNodes)this.addStyleToHost(i,t)}onStyleRemoved(t){const i=this.styleRef;i.get(t)?.elements?.forEach(r=>r.remove()),i.delete(t)}collectServerRenderedStyles(){const t=this.doc.head?.querySelectorAll(`style[${dE}="${this.appId}"]`);if(t?.length){const i=new Map;return t.forEach(r=>{null!=r.textContent&&i.set(r.textContent,r)}),i}return null}changeUsageCount(t,i){const r=this.styleRef;if(r.has(t)){const o=r.get(t);return o.usage+=i,o.usage}return r.set(t,{usage:i,elements:[]}),i}getStyleElement(t,i){const r=this.styleNodesInDOM,o=r?.get(i);if(o?.parentNode===t)return r.delete(i),o.removeAttribute(dE),o;{const a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=i,this.platformIsServer&&a.setAttribute(dE,this.appId),t.appendChild(a),a}}addStyleToHost(t,i){const r=this.getStyleElement(t,i),o=this.styleRef,a=o.get(i)?.elements;a?a.push(r):o.set(i,{elements:[r],usage:1})}resetHostNodes(){const t=this.hostNodes;t.clear(),t.add(this.doc.head)}static#e=this.\u0275fac=function(i){return new(i||e)(F(cn),F(Mg),F(Ox,8),F(Qc))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac})}return e})();const uE={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},hE=/%COMP%/g,WJ=new ye("",{providedIn:"root",factory:()=>!0});function jP(e,n){return n.map(t=>t.replace(hE,e))}let fE=(()=>{class e{constructor(t,i,r,o,a,s,c,l=null){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=a,this.platformId=s,this.ngZone=c,this.nonce=l,this.rendererByCompId=new Map,this.platformIsServer=kP(s),this.defaultRenderer=new mE(t,a,c,this.platformIsServer)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===Xo.ShadowDom&&(i={...i,encapsulation:Xo.Emulated});const r=this.getOrCreateRenderer(t,i);return r instanceof HP?r.applyToHost(t):r instanceof pE&&r.applyStyles(),r}getOrCreateRenderer(t,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const a=this.doc,s=this.ngZone,c=this.eventManager,l=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,u=this.platformIsServer;switch(i.encapsulation){case Xo.Emulated:o=new HP(c,l,i,this.appId,d,a,s,u);break;case Xo.ShadowDom:return new XJ(c,l,t,i,a,s,this.nonce,u);default:o=new pE(c,l,i,d,a,s,u)}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static#e=this.\u0275fac=function(i){return new(i||e)(F(FP),F(BP),F(Mg),F(WJ),F(cn),F(Qc),F(at),F(Ox))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac})}return e})();class mE{constructor(n,t,i,r){this.eventManager=n,this.doc=t,this.ngZone=i,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,t){return t?this.doc.createElementNS(uE[t]||t,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,t){(zP(n)?n.content:n).appendChild(t)}insertBefore(n,t,i){n&&(zP(n)?n.content:n).insertBefore(t,i)}removeChild(n,t){n&&n.removeChild(t)}selectRootElement(n,t){let i="string"==typeof n?this.doc.querySelector(n):n;if(!i)throw new se(-5104,!1);return t||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,t,i,r){if(r){t=r+":"+t;const o=uE[r];o?n.setAttributeNS(o,t,i):n.setAttribute(t,i)}else n.setAttribute(t,i)}removeAttribute(n,t,i){if(i){const r=uE[i];r?n.removeAttributeNS(r,t):n.removeAttribute(`${i}:${t}`)}else n.removeAttribute(t)}addClass(n,t){n.classList.add(t)}removeClass(n,t){n.classList.remove(t)}setStyle(n,t,i,r){r&(tc.DashCase|tc.Important)?n.style.setProperty(t,i,r&tc.Important?"important":""):n.style[t]=i}removeStyle(n,t,i){i&tc.DashCase?n.style.removeProperty(t):n.style[t]=""}setProperty(n,t,i){null!=n&&(n[t]=i)}setValue(n,t){n.nodeValue=t}listen(n,t,i){if("string"==typeof n&&!(n=sc().getGlobalEventTarget(this.doc,n)))throw new Error(`Unsupported event target ${n} for event ${t}`);return this.eventManager.addEventListener(n,t,this.decoratePreventDefault(i))}decoratePreventDefault(n){return t=>{if("__ngUnwrap__"===t)return n;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>n(t)):n(t))&&t.preventDefault()}}}function zP(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class XJ extends mE{constructor(n,t,i,r,o,a,s,c){super(n,o,a,c),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const l=jP(r.id,r.styles);for(const d of l){const u=document.createElement("style");s&&u.setAttribute("nonce",s),u.textContent=d,this.shadowRoot.appendChild(u)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,t){return super.appendChild(this.nodeOrShadowRoot(n),t)}insertBefore(n,t,i){return super.insertBefore(this.nodeOrShadowRoot(n),t,i)}removeChild(n,t){return super.removeChild(this.nodeOrShadowRoot(n),t)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class pE extends mE{constructor(n,t,i,r,o,a,s,c){super(n,o,a,s),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r,this.styles=c?jP(c,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class HP extends pE{constructor(n,t,i,r,o,a,s,c){const l=r+"-"+i.id;super(n,t,i,o,a,s,c,l),this.contentAttr=function qJ(e){return"_ngcontent-%COMP%".replace(hE,e)}(l),this.hostAttr=function YJ(e){return"_nghost-%COMP%".replace(hE,e)}(l)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,t){const i=super.createElement(n,t);return super.setAttribute(i,this.contentAttr,""),i}}let ZJ=(()=>{class e extends LP{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r){return t.addEventListener(i,r,!1),()=>this.removeEventListener(t,i,r)}removeEventListener(t,i,r){return t.removeEventListener(i,r)}static#e=this.\u0275fac=function(i){return new(i||e)(F(cn))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac})}return e})();const $P=["alt","control","meta","shift"],QJ={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},JJ={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let eee=(()=>{class e extends LP{constructor(t){super(t)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,i,r){const o=e.parseEventName(i),a=e.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>sc().onAndCancel(t,o.domEventName,a))}static parseEventName(t){const i=t.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=e._normalizeKey(i.pop());let a="",s=i.indexOf("code");if(s>-1&&(i.splice(s,1),a="code."),$P.forEach(l=>{const d=i.indexOf(l);d>-1&&(i.splice(d,1),a+=l+".")}),a+=o,0!=i.length||0===o.length)return null;const c={};return c.domEventName=r,c.fullKey=a,c}static matchEventFullKeyCode(t,i){let r=QJ[t.key]||t.key,o="";return i.indexOf("code.")>-1&&(r=t.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),$P.forEach(a=>{a!==r&&(0,JJ[a])(t)&&(o+=a+".")}),o+=r,o===i)}static eventCallback(t,i,r){return o=>{e.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>i(o))}}static _normalizeKey(t){return"esc"===t?"escape":t}static#e=this.\u0275fac=function(i){return new(i||e)(F(cn))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac})}return e})();const ree=EN(iZ,"browser",[{provide:Qc,useValue:DP},{provide:OA,useValue:function tee(){cE.makeCurrent()},multi:!0},{provide:cn,useFactory:function iee(){return function H7(e){Ix=e}(document),document},deps:[]}]),oee=new ye(""),WP=[{provide:kv,useClass:class zJ{addToWindow(n){Ut.getAngularTestability=(i,r=!0)=>{const o=n.findTestabilityInTree(i,r);if(null==o)throw new se(5103,!1);return o},Ut.getAllAngularTestabilities=()=>n.getAllTestabilities(),Ut.getAllAngularRootElements=()=>n.getAllRootElements(),Ut.frameworkStabilizers||(Ut.frameworkStabilizers=[]),Ut.frameworkStabilizers.push(i=>{const r=Ut.getAllAngularTestabilities();let o=r.length;const a=function(){o--,0==o&&i()};r.forEach(s=>{s.whenStable(a)})})}findTestabilityInTree(n,t,i){return null==t?null:n.getTestability(t)??(i?sc().isShadowRoot(t)?this.findTestabilityInTree(n,t.host,!0):this.findTestabilityInTree(n,t.parentElement,!0):null)}},deps:[]},{provide:hN,useClass:M1,deps:[at,I1,kv]},{provide:M1,useClass:M1,deps:[at,I1,kv]}],qP=[{provide:q0,useValue:"root"},{provide:Na,useFactory:function nee(){return new Na},deps:[]},{provide:lE,useClass:ZJ,multi:!0,deps:[cn,at,Qc]},{provide:lE,useClass:eee,multi:!0,deps:[cn]},fE,BP,FP,{provide:Dw,useExisting:fE},{provide:class dJ{},useClass:HJ,deps:[]},[]];let YP=(()=>{class e{constructor(t){}static withServerTransition(t){return{ngModule:e,providers:[{provide:Mg,useValue:t.appId}]}}static#e=this.\u0275fac=function(i){return new(i||e)(F(oee,12))};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({providers:[...qP,...WP],imports:[hl,rZ]})}return e})();function lc(e){return this instanceof lc?(this.v=e,this):new lc(e)}function tF(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function bE(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(o){t[o]=e[o]&&function(a){return new Promise(function(s,c){!function r(o,a,s,c){Promise.resolve(c).then(function(l){o({value:l,done:s})},a)}(s,c,(a=e[o](a)).done,a.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const yE=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function nF(e){return J(e?.then)}function iF(e){return J(e[Lr])}function rF(e){return Symbol.asyncIterator&&J(e?.[Symbol.asyncIterator])}function oF(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const aF=function Mee(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function sF(e){return J(e?.[aF])}function cF(e){return function eF(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=t.apply(e,n||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(h){i[h]&&(r[h]=function(f){return new Promise(function(m,g){o.push([h,f,m,g])>1||s(h,f)})})}function s(h,f){try{!function c(h){h.value instanceof lc?Promise.resolve(h.value.v).then(l,d):u(o[0][2],h)}(i[h](f))}catch(m){u(o[0][3],m)}}function l(h){s("next",h)}function d(h){s("throw",h)}function u(h,f){h(f),o.shift(),o.length&&s(o[0][0],o[0][1])}}(this,arguments,function*(){const t=e.getReader();try{for(;;){const{value:i,done:r}=yield lc(t.read());if(r)return yield lc(void 0);yield yield lc(i)}}finally{t.releaseLock()}})}function lF(e){return J(e?.getReader)}function oo(e){if(e instanceof kn)return e;if(null!=e){if(iF(e))return function Iee(e){return new kn(n=>{const t=e[Lr]();if(J(t.subscribe))return t.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(yE(e))return function Oee(e){return new kn(n=>{for(let t=0;t{e.then(t=>{n.closed||(n.next(t),n.complete())},t=>n.error(t)).then(null,jn)})}(e);if(rF(e))return dF(e);if(sF(e))return function Nee(e){return new kn(n=>{for(const t of e)if(n.next(t),n.closed)return;n.complete()})}(e);if(lF(e))return function Pee(e){return dF(cF(e))}(e)}throw oF(e)}function dF(e){return new kn(n=>{(function Fee(e,n){var t,i,r,o;return function QP(e,n,t,i){return new(t||(t=Promise))(function(o,a){function s(d){try{l(i.next(d))}catch(u){a(u)}}function c(d){try{l(i.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):function r(o){return o instanceof t?o:new t(function(a){a(o)})}(d.value).then(s,c)}l((i=i.apply(e,n||[])).next())})}(this,void 0,void 0,function*(){try{for(t=tF(e);!(i=yield t.next()).done;)if(n.next(i.value),n.closed)return}catch(a){r={error:a}}finally{try{i&&!i.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}n.complete()})})(e,n).catch(t=>n.error(t))})}function gs(e,n,t,i=0,r=!1){const o=n.schedule(function(){t(),r?e.add(this.schedule(null,i)):this.unsubscribe()},i);if(e.add(o),!r)return o}function uF(e,n=0){return vr((t,i)=>{t.subscribe(Xi(i,r=>gs(i,e,()=>i.next(r),n),()=>gs(i,e,()=>i.complete(),n),r=>gs(i,e,()=>i.error(r),n)))})}function hF(e,n=0){return vr((t,i)=>{i.add(e.schedule(()=>t.subscribe(i),n))})}function fF(e,n){if(!e)throw new Error("Iterable cannot be null");return new kn(t=>{gs(t,n,()=>{const i=e[Symbol.asyncIterator]();gs(t,n,()=>{i.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function du(e,n){return n?function Hee(e,n){if(null!=e){if(iF(e))return function Lee(e,n){return oo(e).pipe(hF(n),uF(n))}(e,n);if(yE(e))return function Vee(e,n){return new kn(t=>{let i=0;return n.schedule(function(){i===e.length?t.complete():(t.next(e[i++]),t.closed||this.schedule())})})}(e,n);if(nF(e))return function Bee(e,n){return oo(e).pipe(hF(n),uF(n))}(e,n);if(rF(e))return fF(e,n);if(sF(e))return function jee(e,n){return new kn(t=>{let i;return gs(t,n,()=>{i=e[aF](),gs(t,n,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(a){return void t.error(a)}o?t.complete():t.next(r)},0,!0)}),()=>J(i?.return)&&i.return()})}(e,n);if(lF(e))return function zee(e,n){return fF(cF(e),n)}(e,n)}throw oF(e)}(e,n):oo(e)}const{isArray:$ee}=Array,{getPrototypeOf:Uee,prototype:Gee,keys:Wee}=Object;function mF(e){if(1===e.length){const n=e[0];if($ee(n))return{args:n,keys:null};if(function qee(e){return e&&"object"==typeof e&&Uee(e)===Gee}(n)){const t=Wee(n);return{args:t.map(i=>n[i]),keys:t}}}return{args:e,keys:null}}function pF(e){return e&&J(e.schedule)}function xE(e){return e[e.length-1]}function gF(e){return J(xE(e))?e.pop():void 0}function Pf(e){return pF(xE(e))?e.pop():void 0}const{isArray:Kee}=Array;function wE(e){return wa(n=>function Xee(e,n){return Kee(n)?e(...n):e(n)}(e,n))}function vF(e,n){return e.reduce((t,i,r)=>(t[i]=n[r],t),{})}let _F=(()=>{class e{constructor(t,i){this._renderer=t,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static#e=this.\u0275fac=function(i){return new(i||e)(T(el),T(Lt))};static#t=this.\u0275dir=Me({type:e})}return e})(),fl=(()=>{class e extends _F{static#e=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=ti(e)))(r||e)}})();static#t=this.\u0275dir=Me({type:e,features:[kt]})}return e})();const ao=new ye(""),Qee={provide:ao,useExisting:an(()=>EE),multi:!0};let EE=(()=>{class e extends fl{writeValue(t){this.setProperty("checked",t)}static#e=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=ti(e)))(r||e)}})();static#t=this.\u0275dir=Me({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){1&i&&Pe("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},features:[en([Qee]),kt]})}return e})();const Jee={provide:ao,useExisting:an(()=>Ff),multi:!0},tte=new ye("");let Ff=(()=>{class e extends _F{constructor(t,i,r){super(t,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function ete(){const e=sc()?sc().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static#e=this.\u0275fac=function(i){return new(i||e)(T(el),T(Lt),T(tte,8))};static#t=this.\u0275dir=Me({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){1&i&&Pe("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},features:[en([Jee]),kt]})}return e})();function dc(e){return null==e||("string"==typeof e||Array.isArray(e))&&0===e.length}function bF(e){return null!=e&&"number"==typeof e.length}const Ui=new ye(""),uc=new ye(""),nte=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class ite{static min(n){return function yF(e){return n=>{if(dc(n.value)||dc(e))return null;const t=parseFloat(n.value);return!isNaN(t)&&t{if(dc(n.value)||dc(e))return null;const t=parseFloat(n.value);return!isNaN(t)&&t>e?{max:{max:e,actual:n.value}}:null}}(n)}static required(n){return function wF(e){return dc(e.value)?{required:!0}:null}(n)}static requiredTrue(n){return function EF(e){return!0===e.value?null:{required:!0}}(n)}static email(n){return function CF(e){return dc(e.value)||nte.test(e.value)?null:{email:!0}}(n)}static minLength(n){return function SF(e){return n=>dc(n.value)||!bF(n.value)?null:n.value.length{if(dc(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return RF(n)}static composeAsync(n){return NF(n)}}function DF(e){return n=>bF(n.value)&&n.value.length>e?{maxlength:{requiredLength:e,actualLength:n.value.length}}:null}function Jv(e){return null}function TF(e){return null!=e}function AF(e){return Tv(e)?du(e):e}function MF(e){let n={};return e.forEach(t=>{n=null!=t?{...n,...t}:n}),0===Object.keys(n).length?null:n}function IF(e,n){return n.map(t=>t(e))}function OF(e){return e.map(n=>function rte(e){return!e.validate}(n)?n:t=>n.validate(t))}function RF(e){if(!e)return null;const n=e.filter(TF);return 0==n.length?null:function(t){return MF(IF(t,n))}}function CE(e){return null!=e?RF(OF(e)):null}function NF(e){if(!e)return null;const n=e.filter(TF);return 0==n.length?null:function(t){return function Zee(...e){const n=gF(e),{args:t,keys:i}=mF(e),r=new kn(o=>{const{length:a}=t;if(!a)return void o.complete();const s=new Array(a);let c=a,l=a;for(let d=0;d{u||(u=!0,l--),s[d]=h},()=>c--,void 0,()=>{(!c||!u)&&(l||o.next(i?vF(i,s):s),o.complete())}))}});return n?r.pipe(wE(n)):r}(IF(t,n).map(AF)).pipe(wa(MF))}}function SE(e){return null!=e?NF(OF(e)):null}function PF(e,n){return null===e?[n]:Array.isArray(e)?[...e,n]:[e,n]}function FF(e){return e._rawValidators}function LF(e){return e._rawAsyncValidators}function DE(e){return e?Array.isArray(e)?e:[e]:[]}function e_(e,n){return Array.isArray(e)?e.includes(n):e===n}function BF(e,n){const t=DE(n);return DE(e).forEach(r=>{e_(t,r)||t.push(r)}),t}function VF(e,n){return DE(n).filter(t=>!e_(e,t))}class jF{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=CE(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=SE(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,t){return!!this.control&&this.control.hasError(n,t)}getError(n,t){return this.control?this.control.getError(n,t):null}}class Dr extends jF{get formDirective(){return null}get path(){return null}}class vs extends jF{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class zF{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let kE=(()=>{class e extends zF{constructor(t){super(t)}static#e=this.\u0275fac=function(i){return new(i||e)(T(vs,2))};static#t=this.\u0275dir=Me({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){2&i&&wt("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[kt]})}return e})(),t_=(()=>{class e extends zF{constructor(t){super(t)}static#e=this.\u0275fac=function(i){return new(i||e)(T(Dr,10))};static#t=this.\u0275dir=Me({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){2&i&&wt("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[kt]})}return e})();const Lf="VALID",i_="INVALID",uu="PENDING",Bf="DISABLED";function ME(e){return(r_(e)?e.validators:e)||null}function IE(e,n){return(r_(n)?n.asyncValidators:e)||null}function r_(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function $F(e,n,t){const i=e.controls;if(!(n?Object.keys(i):i).length)throw new se(1e3,"");if(!i[t])throw new se(1001,"")}function UF(e,n,t){e._forEachChild((i,r)=>{if(void 0===t[r])throw new se(1002,"")})}class o_{constructor(n,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===Lf}get invalid(){return this.status===i_}get pending(){return this.status==uu}get disabled(){return this.status===Bf}get enabled(){return this.status!==Bf}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(BF(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(BF(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(VF(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(VF(n,this._rawAsyncValidators))}hasValidator(n){return e_(this._rawValidators,n)}hasAsyncValidator(n){return e_(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=uu,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=Bf,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=Lf,this._forEachChild(i=>{i.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:t}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Lf||this.status===uu)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Bf:Lf}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=uu,this._hasOwnPendingAsyncValidator=!0;const t=AF(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,t={}){this.errors=n,this._updateControlsErrors(!1!==t.emitEvent)}get(n){let t=n;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(n,t){const i=t?this.get(t):this;return i&&i.errors?i.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new nn,this.statusChanges=new nn}_calculateStatus(){return this._allControlsDisabled()?Bf:this.errors?i_:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(uu)?uu:this._anyControlsHaveStatus(i_)?i_:Lf}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){r_(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function cte(e){return Array.isArray(e)?CE(e):e||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function lte(e){return Array.isArray(e)?SE(e):e||null}(this._rawAsyncValidators)}}class Vf extends o_{constructor(n,t,i){super(ME(t),IE(i,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,t){return this.controls[n]?this.controls[n]:(this.controls[n]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(n,t,i={}){this.registerControl(n,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(n,t,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],t&&this.registerControl(n,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,t={}){UF(this,0,n),Object.keys(n).forEach(i=>{$F(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(Object.keys(n).forEach(i=>{const r=this.controls[i];r&&r.patchValue(n[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n={},t={}){this._forEachChild((i,r)=>{i.reset(n?n[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(n,t,i)=>(n[i]=t.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(t,i)=>!!i._syncPendingControls()||t);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(t=>{const i=this.controls[t];i&&n(i,t)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[t,i]of Object.entries(this.controls))if(this.contains(t)&&n(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,i,r)=>((i.enabled||this.disabled)&&(t[r]=i.value),t))}_reduceChildren(n,t){let i=n;return this._forEachChild((r,o)=>{i=t(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class GF extends Vf{}const ml=new ye("CallSetDisabledState",{providedIn:"root",factory:()=>jf}),jf="always";function zf(e,n,t=jf){OE(e,n),n.valueAccessor.writeValue(e.value),(e.disabled||"always"===t)&&n.valueAccessor.setDisabledState?.(e.disabled),function ute(e,n){n.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&WF(e,n)})}(e,n),function fte(e,n){const t=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};e.registerOnChange(t),n._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,n),function hte(e,n){n.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&WF(e,n),"submit"!==e.updateOn&&e.markAsTouched()})}(e,n),function dte(e,n){if(n.valueAccessor.setDisabledState){const t=i=>{n.valueAccessor.setDisabledState(i)};e.registerOnDisabledChange(t),n._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,n)}function s_(e,n,t=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),l_(e,n),e&&(n._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function c_(e,n){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function OE(e,n){const t=FF(e);null!==n.validator?e.setValidators(PF(t,n.validator)):"function"==typeof t&&e.setValidators([t]);const i=LF(e);null!==n.asyncValidator?e.setAsyncValidators(PF(i,n.asyncValidator)):"function"==typeof i&&e.setAsyncValidators([i]);const r=()=>e.updateValueAndValidity();c_(n._rawValidators,r),c_(n._rawAsyncValidators,r)}function l_(e,n){let t=!1;if(null!==e){if(null!==n.validator){const r=FF(e);if(Array.isArray(r)&&r.length>0){const o=r.filter(a=>a!==n.validator);o.length!==r.length&&(t=!0,e.setValidators(o))}}if(null!==n.asyncValidator){const r=LF(e);if(Array.isArray(r)&&r.length>0){const o=r.filter(a=>a!==n.asyncValidator);o.length!==r.length&&(t=!0,e.setAsyncValidators(o))}}}const i=()=>{};return c_(n._rawValidators,i),c_(n._rawAsyncValidators,i),t}function WF(e,n){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function qF(e,n){OE(e,n)}function YF(e,n){e._syncPendingControls(),n.forEach(t=>{const i=t.control;"submit"===i.updateOn&&i._pendingChange&&(t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}const _te={provide:Dr,useExisting:an(()=>$f)},Hf=Promise.resolve();let $f=(()=>{class e extends Dr{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new nn,this.form=new Vf({},CE(t),SE(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Hf.then(()=>{const i=this._findContainer(t.path);t.control=i.registerControl(t.name,t.control),zf(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Hf.then(()=>{const i=this._findContainer(t.path);i&&i.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){Hf.then(()=>{const i=this._findContainer(t.path),r=new Vf({});qF(r,t),i.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Hf.then(()=>{const i=this._findContainer(t.path);i&&i.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,i){Hf.then(()=>{this.form.get(t.path).setValue(i)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,YF(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static#e=this.\u0275fac=function(i){return new(i||e)(T(Ui,10),T(uc,10),T(ml,8))};static#t=this.\u0275dir=Me({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){1&i&&Pe("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[Ze.None,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[en([_te]),kt]})}return e})();function KF(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}function XF(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}const Uf=class extends o_{constructor(n=null,t,i){super(ME(t),IE(i,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),r_(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=XF(n)?n.value:n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){KF(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){KF(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){XF(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};Promise.resolve();let d_=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}return e})();const wte={provide:ao,useExisting:an(()=>FE),multi:!0};let FE=(()=>{class e extends fl{writeValue(t){this.setProperty("value",t??"")}registerOnChange(t){this.onChange=i=>{t(""==i?null:parseFloat(i))}}static#e=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=ti(e)))(r||e)}})();static#t=this.\u0275dir=Me({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){1&i&&Pe("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},features:[en([wte]),kt]})}return e})();const LE=new ye(""),kte={provide:Dr,useExisting:an(()=>hu)};let hu=(()=>{class e extends Dr{constructor(t,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new nn,this._setValidators(t),this._setAsyncValidators(i)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(l_(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const i=this.form.get(t.path);return zf(i,t,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),i}getControl(t){return this.form.get(t.path)}removeControl(t){s_(t.control||null,t,!1),function vte(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,i){this.form.get(t.path).setValue(i)}onSubmit(t){return this.submitted=!0,YF(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const i=t.control,r=this.form.get(t.path);i!==r&&(s_(i||null,t),(e=>e instanceof Uf)(r)&&(zf(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const i=this.form.get(t.path);qF(i,t),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const i=this.form.get(t.path);i&&function mte(e,n){return l_(e,n)}(i,t)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){OE(this.form,this),this._oldForm&&l_(this._oldForm,this)}_checkFormPresent(){}static#e=this.\u0275fac=function(i){return new(i||e)(T(Ui,10),T(uc,10),T(ml,8))};static#t=this.\u0275dir=Me({type:e,selectors:[["","formGroup",""]],hostBindings:function(i,r){1&i&&Pe("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[Ze.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[en([kte]),kt,br]})}return e})();const Mte={provide:vs,useExisting:an(()=>u_)};let u_=(()=>{class e extends vs{set isDisabled(t){}static#e=this._ngModelWarningSentOnce=!1;constructor(t,i,r,o,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new nn,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function PE(e,n){if(!n)return null;let t,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===Ff?t=o:function gte(e){return Object.getPrototypeOf(e.constructor)===fl}(o)?i=o:r=o}),r||i||t||null}(0,o)}ngOnChanges(t){this._added||this._setUpControl(),function NE(e,n){if(!e.hasOwnProperty("model"))return!1;const t=e.model;return!!t.isFirstChange()||!Object.is(n,t.currentValue)}(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return function a_(e,n){return[...n.path,e]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static#t=this.\u0275fac=function(i){return new(i||e)(T(Dr,13),T(Ui,10),T(uc,10),T(ao,10),T(LE,8))};static#n=this.\u0275dir=Me({type:e,selectors:[["","formControlName",""]],inputs:{name:[Ze.None,"formControlName","name"],isDisabled:[Ze.None,"disabled","isDisabled"],model:[Ze.None,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[en([Mte]),kt,br]})}return e})();let pl=(()=>{class e{constructor(){this._validator=Jv}ngOnChanges(t){if(this.inputName in t){const i=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Jv,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,features:[br]})}return e})();const $te={provide:Ui,useExisting:an(()=>UE),multi:!0};let UE=(()=>{class e extends pl{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=t=>function sL(e){return"number"==typeof e?e:parseInt(e,10)}(t),this.createValidator=t=>DF(t)}static#e=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=ti(e)))(r||e)}})();static#t=this.\u0275dir=Me({type:e,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){2&i&&fn("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},features:[en([$te]),kt]})}return e})(),mL=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({})}return e})();class pL extends o_{constructor(n,t,i){super(ME(t),IE(i,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,t={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(n,t,i={}){this.controls.splice(n,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,t={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(n,t,i={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,t={}){UF(this,0,n),n.forEach((i,r)=>{$F(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n=[],t={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((t,i)=>!!i._syncPendingControls()||t,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((t,i)=>{n(t,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(t=>t.enabled&&n(t))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function gL(e){return!!e&&(void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn)}let WE,Gte=(()=>{class e{constructor(){this.useNonNullable=!1}get nonNullable(){const t=new e;return t.useNonNullable=!0,t}group(t,i=null){const r=this._reduceControls(t);let o={};return gL(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Vf(r,o)}record(t,i=null){const r=this._reduceControls(t);return new GF(r,i)}control(t,i,r){let o={};return this.useNonNullable?(gL(i)?o=i:(o.validators=i,o.asyncValidators=r),new Uf(t,{...o,nonNullable:!0})):new Uf(t,i,r)}array(t,i,r){const o=t.map(a=>this._createControl(a));return new pL(o,i,r)}_reduceControls(t){const i={};return Object.keys(t).forEach(r=>{i[r]=this._createControl(t[r])}),i}_createControl(t){return t instanceof Uf||t instanceof o_?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),GE=(()=>{class e extends Gte{group(t,i=null){return super.group(t,i)}control(t,i,r){return super.control(t,i,r)}array(t,i,r){return super.array(t,i,r)}static#e=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=ti(e)))(r||e)}})();static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),vL=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:ml,useValue:t.callSetDisabledState??jf}]}}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[mL]})}return e})(),Wte=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:LE,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:ml,useValue:t.callSetDisabledState??jf}]}}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[mL]})}return e})();try{WE=typeof Intl<"u"&&Intl.v8BreakIterator}catch{WE=!1}let fu,ni=(()=>{class e{constructor(t){this._platformId=t,this.isBrowser=this._platformId?function cJ(e){return e===DP}(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!WE)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static#e=this.\u0275fac=function(i){return new(i||e)(F(Qc))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const _L=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function bL(){if(fu)return fu;if("object"!=typeof document||!document)return fu=new Set(_L),fu;let e=document.createElement("input");return fu=new Set(_L.filter(n=>(e.setAttribute("type",n),e.type===n))),fu}let Gf,gl,qE;function Wf(e){return function qte(){if(null==Gf&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Gf=!0}))}finally{Gf=Gf||!1}return Gf}()?e:!!e.capture}function Yte(){if(null==gl){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return gl=!1,gl;if("scrollBehavior"in document.documentElement.style)gl=!0;else{const e=Element.prototype.scrollTo;gl=!!e&&!/\{\s*\[native code\]\s*\}/.test(e.toString())}}return gl}function f_(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){const n=e.shadowRoot.activeElement;if(n===e)break;e=n}return e}function hc(e){return e.composedPath?e.composedPath()[0]:e.target}function YE(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function m_(...e){return du(e,Pf(e))}function Yf(e,...n){return n.length?n.some(t=>e[t]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}class pne extends ot{constructor(n,t){super()}schedule(n,t=0){return this}}const p_={setInterval(e,n,...t){const{delegate:i}=p_;return i?.setInterval?i.setInterval(e,n,...t):setInterval(e,n,...t)},clearInterval(e){const{delegate:n}=p_;return(n?.clearInterval||clearInterval)(e)},delegate:void 0};class KE extends pne{constructor(n,t){super(n,t),this.scheduler=n,this.work=t,this.pending=!1}schedule(n,t=0){var i;if(this.closed)return this;this.state=n;const r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,t)),this.pending=!0,this.delay=t,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(o,this.id,t),this}requestAsyncId(n,t,i=0){return p_.setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,t,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return t;null!=t&&p_.clearInterval(t)}execute(n,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,t);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,t){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:n,scheduler:t}=this,{actions:i}=t;this.work=this.state=this.scheduler=null,this.pending=!1,yt(i,this),null!=n&&(this.id=this.recycleAsyncId(t,n,null)),this.delay=null,super.unsubscribe()}}}const XE={now:()=>(XE.delegate||Date).now(),delegate:void 0};class Kf{constructor(n,t=Kf.now){this.schedulerActionCtor=n,this.now=t}schedule(n,t=0,i){return new this.schedulerActionCtor(this,n).schedule(i,t)}}Kf.now=XE.now;class ZE extends Kf{constructor(n,t=Kf.now){super(n,t),this.actions=[],this._active=!1}flush(n){const{actions:t}=this;if(this._active)return void t.push(n);let i;this._active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=t.shift());if(this._active=!1,i){for(;n=t.shift();)n.unsubscribe();throw i}}}const QE=new ZE(KE),gne=QE;function JE(e,n=QE){return vr((t,i)=>{let r=null,o=null,a=null;const s=()=>{if(r){r.unsubscribe(),r=null;const l=o;o=null,i.next(l)}};function c(){const l=a+e,d=n.now();if(d{o=l,a=n.now(),r||(r=n.schedule(c,e),i.add(r))},()=>{s(),i.complete()},void 0,()=>{o=r=null}))})}function so(e,n){return vr((t,i)=>{let r=0;t.subscribe(Xi(i,o=>e.call(n,o,r++)&&i.next(o)))})}const Xf=new kn(e=>e.complete());function vl(e){return e<=0?()=>Xf:vr((n,t)=>{let i=0;n.subscribe(Xi(t,r=>{++i<=e&&(t.next(r),e<=i&&t.complete())}))})}function CL(e){return so((n,t)=>e<=t)}function bne(e,n){return e===n}function aa(e){return vr((n,t)=>{oo(e).subscribe(Xi(t,()=>t.complete(),gn)),!t.closed&&n.subscribe(t)})}function co(e){return null!=e&&"false"!=`${e}`}function _s(e,n=0){return function yne(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}(e)?Number(e):n}function g_(e){return Array.isArray(e)?e:[e]}function ki(e){return null==e?"":"string"==typeof e?e:`${e}px`}function bs(e){return e instanceof Lt?e.nativeElement:e}let SL=(()=>{class e{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),xne=(()=>{class e{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,i)=>this._cleanupObserver(i))}observe(t){const i=bs(t);return new kn(r=>{const a=this._observeElement(i).subscribe(r);return()=>{a.unsubscribe(),this._unobserveElement(i)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const i=new xt,r=this._mutationObserverFactory.create(o=>i.next(o));r&&r.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:r,stream:i,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:i,stream:r}=this._observedElements.get(t);i&&i.disconnect(),r.complete(),this._observedElements.delete(t)}}static#e=this.\u0275fac=function(i){return new(i||e)(F(SL))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),DL=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=_s(t),this._subscribe()}constructor(t,i,r){this._contentObserver=t,this._elementRef=i,this._ngZone=r,this.event=new nn,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?t.pipe(JE(this.debounce)):t).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}static#e=this.\u0275fac=function(i){return new(i||e)(T(xne),T(Lt),T(at))};static#t=this.\u0275dir=Me({type:e,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[Ze.HasDecoratorInputTransform,"cdkObserveContentDisabled","disabled",Fn],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"],standalone:!0,features:[So]})}return e})(),eC=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({providers:[SL]})}return e})();function kL(...e){const n=Pf(e),t=gF(e),{args:i,keys:r}=mF(e);if(0===i.length)return du([],n);const o=new kn(function wne(e,n,t=qo){return i=>{TL(n,()=>{const{length:r}=e,o=new Array(r);let a=r,s=r;for(let c=0;c{const l=du(e[c],n);let d=!1;l.subscribe(Xi(i,u=>{o[c]=u,d||(d=!0,s--),s||i.next(t(o.slice()))},()=>{--a||i.complete()}))},i)},i)}}(i,n,r?a=>vF(r,a):qo));return t?o.pipe(wE(t)):o}function TL(e,n,t){e?gs(t,e,n):n()}function tC(e,n,t=1/0){return J(n)?tC((i,r)=>wa((o,a)=>n(i,o,r,a))(oo(e(i,r))),t):("number"==typeof n&&(t=n),vr((i,r)=>function Ene(e,n,t,i,r,o,a,s){const c=[];let l=0,d=0,u=!1;const h=()=>{u&&!c.length&&!l&&n.complete()},f=g=>l{o&&n.next(g),l++;let v=!1;oo(t(g,d++)).subscribe(Xi(n,C=>{r?.(C),o?f(C):n.next(C)},()=>{v=!0},void 0,()=>{if(v)try{for(l--;c.length&&lm(C)):m(C)}h()}catch(C){n.error(C)}}))};return e.subscribe(Xi(n,f,()=>{u=!0,h()})),()=>{s?.()}}(i,r,e,t)))}function AL(e=1/0){return tC(qo,e)}function nC(...e){return function Cne(){return AL(1)}()(du(e,Pf(e)))}function Zf(...e){const n=Pf(e);return vr((t,i)=>{(n?nC(e,t,n):nC(e,t)).subscribe(i)})}const ML=new Set;let _l,Sne=(()=>{class e{constructor(t,i){this._platform=t,this._nonce=i,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):kne}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&function Dne(e,n){if(!ML.has(e))try{_l||(_l=document.createElement("style"),n&&_l.setAttribute("nonce",n),_l.setAttribute("type","text/css"),document.head.appendChild(_l)),_l.sheet&&(_l.sheet.insertRule(`@media ${e} {body{ }}`,0),ML.add(e))}catch(t){console.error(t)}}(t,this._nonce),this._matchMedia(t)}static#e=this.\u0275fac=function(i){return new(i||e)(F(ni),F(Ox,8))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function kne(e){return{matches:"all"===e||""===e,media:e,addListener:()=>{},removeListener:()=>{}}}let IL=(()=>{class e{constructor(t,i){this._mediaMatcher=t,this._zone=i,this._queries=new Map,this._destroySubject=new xt}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return OL(g_(t)).some(r=>this._registerQuery(r).mql.matches)}observe(t){let o=kL(OL(g_(t)).map(a=>this._registerQuery(a).observable));return o=nC(o.pipe(vl(1)),o.pipe(CL(1),JE(0))),o.pipe(wa(a=>{const s={matches:!1,breakpoints:{}};return a.forEach(({matches:c,query:l})=>{s.matches=s.matches||c,s.breakpoints[l]=c}),s}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const i=this._mediaMatcher.matchMedia(t),o={observable:new kn(a=>{const s=c=>this._zone.run(()=>a.next(c));return i.addListener(s),()=>{i.removeListener(s)}}).pipe(Zf(i),wa(({matches:a})=>({query:t,matches:a})),aa(this._destroySubject)),mql:i};return this._queries.set(t,o),o}static#e=this.\u0275fac=function(i){return new(i||e)(F(Sne),F(at))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function OL(e){return e.map(n=>n.split(",")).reduce((n,t)=>n.concat(t)).map(n=>n.trim())}class Ine{constructor(n,t){this._items=n,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new xt,this._typeaheadSubscription=ot.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=i=>i.disabled,this._pressedLetters=[],this.tabOut=new xt,this.change=new xt,n instanceof kd?this._itemChangesSubscription=n.changes.subscribe(i=>this._itemsChanged(i.toArray())):sv(n)&&(this._effectRef=oP(()=>this._itemsChanged(n()),{injector:t}))}skipPredicate(n){return this._skipPredicateFn=n,this}withWrap(n=!0){return this._wrap=n,this}withVerticalOrientation(n=!0){return this._vertical=n,this}withHorizontalOrientation(n){return this._horizontal=n,this}withAllowedModifierKeys(n){return this._allowedModifierKeys=n,this}withTypeAhead(n=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(function mne(e,n,t){const i=J(e)||n||t?{next:e,error:n,complete:t}:e;return i?vr((r,o)=>{var a;null===(a=i.subscribe)||void 0===a||a.call(i);let s=!0;r.subscribe(Xi(o,c=>{var l;null===(l=i.next)||void 0===l||l.call(i,c),o.next(c)},()=>{var c;s=!1,null===(c=i.complete)||void 0===c||c.call(i),o.complete()},c=>{var l;s=!1,null===(l=i.error)||void 0===l||l.call(i,c),o.error(c)},()=>{var c,l;s&&(null===(c=i.unsubscribe)||void 0===c||c.call(i)),null===(l=i.finalize)||void 0===l||l.call(i)}))}):qo}(t=>this._pressedLetters.push(t)),JE(n),so(()=>this._pressedLetters.length>0),wa(()=>this._pressedLetters.join(""))).subscribe(t=>{const i=this._getItemsArray();for(let r=1;r!n[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex+this._pageUpAndDown.delta,a=this._getItemsArray().length;this._setActiveItemByIndex(o=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],n.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(n){const t=this._getItemsArray(),i="number"==typeof n?n:t.indexOf(n);this._activeItem=t[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(n){this._wrap?this._setActiveInWrapMode(n):this._setActiveInDefaultMode(n)}_setActiveInWrapMode(n){const t=this._getItemsArray();for(let i=1;i<=t.length;i++){const r=(this._activeItemIndex+n*i+t.length)%t.length;if(!this._skipPredicateFn(t[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(n){this._setActiveItemByIndex(this._activeItemIndex+n,n)}_setActiveItemByIndex(n,t){const i=this._getItemsArray();if(i[n]){for(;this._skipPredicateFn(i[n]);)if(!i[n+=t])return;this.setActiveItem(n)}}_getItemsArray(){return sv(this._items)?this._items():this._items instanceof kd?this._items.toArray():this._items}_itemsChanged(n){if(this._activeItem){const t=n.indexOf(this._activeItem);t>-1&&t!==this._activeItemIndex&&(this._activeItemIndex=t)}}}class PL extends Ine{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(n){return this._origin=n,this}setActiveItem(n){super.setActiveItem(n),this.activeItem&&this.activeItem.focus(this._origin)}}let iC=(()=>{class e{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function Rne(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const i=function One(e){try{return e.frameElement}catch{return null}}(function zne(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}(t));if(i&&(-1===LL(i)||!this.isVisible(i)))return!1;let r=t.nodeName.toLowerCase(),o=LL(t);return t.hasAttribute("contenteditable")?-1!==o:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function Vne(e){let n=e.nodeName.toLowerCase(),t="input"===n&&e.type;return"text"===t||"password"===t||"select"===n||"textarea"===n}(t))&&("audio"===r?!!t.hasAttribute("controls")&&-1!==o:"video"===r?-1!==o&&(null!==o||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,i){return function jne(e){return!function Pne(e){return function Lne(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function Nne(e){let n=e.nodeName.toLowerCase();return"input"===n||"select"===n||"button"===n||"textarea"===n}(e)||function Fne(e){return function Bne(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||FL(e))}(t)&&!this.isDisabled(t)&&(i?.ignoreVisibility||this.isVisible(t))}static#e=this.\u0275fac=function(i){return new(i||e)(F(ni))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function FL(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;let n=e.getAttribute("tabindex");return!(!n||isNaN(parseInt(n,10)))}function LL(e){if(!FL(e))return null;const n=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(n)?-1:n}class BL{get enabled(){return this._enabled}set enabled(n){this._enabled=n,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}constructor(n,t,i,r,o=!1){this._element=n,this._checker=t,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){const n=this._startAnchor,t=this._endAnchor;n&&(n.removeEventListener("focus",this.startAnchorListener),n.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(n)))})}focusFirstTabbableElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(n)))})}focusLastTabbableElementWhenReady(n){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(n)))})}_getRegionBoundary(n){const t=this._element.querySelectorAll(`[cdk-focus-region-${n}], [cdkFocusRegion${n}], [cdk-focus-${n}]`);return"start"==n?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(n){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){const i=this._getFirstTabbableElement(t);return i?.focus(n),!!i}return t.focus(n),!0}return this.focusFirstTabbableElement(n)}focusFirstTabbableElement(n){const t=this._getRegionBoundary("start");return t&&t.focus(n),!!t}focusLastTabbableElement(n){const t=this._getRegionBoundary("end");return t&&t.focus(n),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(n){if(this._checker.isFocusable(n)&&this._checker.isTabbable(n))return n;const t=n.children;for(let i=0;i=0;i--){const r=t[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[i]):null;if(r)return r}return null}_createAnchor(){const n=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,n),n.classList.add("cdk-visually-hidden"),n.classList.add("cdk-focus-trap-anchor"),n.setAttribute("aria-hidden","true"),n}_toggleAnchorTabIndex(n,t){n?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(n){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(n,this._startAnchor),this._toggleAnchorTabIndex(n,this._endAnchor))}_executeOnStable(n){this._ngZone.isStable?n():this._ngZone.onStable.pipe(vl(1)).subscribe(n)}}let VL=(()=>{class e{constructor(t,i,r){this._checker=t,this._ngZone=i,this._document=r}create(t,i=!1){return new BL(t,this._checker,this._ngZone,this._document,i)}static#e=this.\u0275fac=function(i){return new(i||e)(F(iC),F(at),F(cn))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function jL(e){return 0===e.buttons||0===e.detail}function zL(e){const n=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!(!n||-1!==n.identifier||null!=n.radiusX&&1!==n.radiusX||null!=n.radiusY&&1!==n.radiusY)}const Hne=new ye("cdk-input-modality-detector-options"),$ne={ignoreKeys:[18,17,224,91,16]},mu=Wf({passive:!0,capture:!0});let Une=(()=>{class e{get mostRecentModality(){return this._modality.value}constructor(t,i,r,o){this._platform=t,this._mostRecentTarget=null,this._modality=new on(null),this._lastTouchMs=0,this._onKeydown=a=>{this._options?.ignoreKeys?.some(s=>s===a.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=hc(a))},this._onMousedown=a=>{Date.now()-this._lastTouchMs<650||(this._modality.next(jL(a)?"keyboard":"mouse"),this._mostRecentTarget=hc(a))},this._onTouchstart=a=>{zL(a)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=hc(a))},this._options={...$ne,...o},this.modalityDetected=this._modality.pipe(CL(1)),this.modalityChanged=this.modalityDetected.pipe(function _ne(e,n=qo){return e=e??bne,vr((t,i)=>{let r,o=!0;t.subscribe(Xi(i,a=>{const s=n(a);(o||!e(r,s))&&(o=!1,r=s,i.next(a))}))})}()),t.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,mu),r.addEventListener("mousedown",this._onMousedown,mu),r.addEventListener("touchstart",this._onTouchstart,mu)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,mu),document.removeEventListener("mousedown",this._onMousedown,mu),document.removeEventListener("touchstart",this._onTouchstart,mu))}static#e=this.\u0275fac=function(i){return new(i||e)(F(ni),F(at),F(cn),F(Hne,8))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Gne=new ye("liveAnnouncerElement",{providedIn:"root",factory:function Wne(){return null}}),qne=new ye("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let Yne=0,Kne=(()=>{class e{constructor(t,i,r,o){this._ngZone=i,this._defaultOptions=o,this._document=r,this._liveElement=t||this._createLiveElement()}announce(t,...i){const r=this._defaultOptions;let o,a;return 1===i.length&&"number"==typeof i[0]?a=i[0]:[o,a]=i,this.clear(),clearTimeout(this._previousTimeout),o||(o=r&&r.politeness?r.politeness:"polite"),null==a&&r&&(a=r.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(s=>this._currentResolve=s)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,"number"==typeof a&&(this._previousTimeout=setTimeout(()=>this.clear(),a)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const t="cdk-live-announcer-element",i=this._document.getElementsByClassName(t),r=this._document.createElement("div");for(let o=0;o .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class e{constructor(t,i,r,o,a){this._ngZone=t,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new xt,this._rootNodeFocusAndBlurListener=s=>{for(let l=hc(s);l;l=l.parentElement)"focus"===s.type?this._onFocus(s,l):this._onBlur(s,l)},this._document=o,this._detectionMode=a?.detectionMode||v_.IMMEDIATE}monitor(t,i=!1){const r=bs(t);if(!this._platform.isBrowser||1!==r.nodeType)return m_();const o=function Xte(e){if(function Kte(){if(null==qE){const e=typeof document<"u"?document.head:null;qE=!(!e||!e.createShadowRoot&&!e.attachShadow)}return qE}()){const n=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&n instanceof ShadowRoot)return n}return null}(r)||this._getDocument(),a=this._elementInfo.get(r);if(a)return i&&(a.checkChildren=!0),a.subject;const s={checkChildren:i,subject:new xt,rootNode:o};return this._elementInfo.set(r,s),this._registerGlobalListeners(s),s.subject}stopMonitoring(t){const i=bs(t),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(t,i,r){const o=bs(t);o===this._getDocument().activeElement?this._getClosestElementsInfo(o).forEach(([s,c])=>this._originChanged(s,i,c)):(this._setOrigin(i),"function"==typeof o.focus&&o.focus(r))}ngOnDestroy(){this._elementInfo.forEach((t,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===v_.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,i){t.classList.toggle("cdk-focused",!!i),t.classList.toggle("cdk-touch-focused","touch"===i),t.classList.toggle("cdk-keyboard-focused","keyboard"===i),t.classList.toggle("cdk-mouse-focused","mouse"===i),t.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(t,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&i,this._detectionMode===v_.IMMEDIATE&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,i){const r=this._elementInfo.get(i),o=hc(t);!r||!r.checkChildren&&i!==o||this._originChanged(i,this._getFocusOrigin(o),r)}_onBlur(t,i){const r=this._elementInfo.get(i);!r||r.checkChildren&&t.relatedTarget instanceof Node&&i.contains(t.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(t,i){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(i))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const i=t.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,__),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,__)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(aa(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(t){const i=t.rootNode;if(this._rootNodeFocusListenerCount.has(i)){const r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,__),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,__),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,i,r){this._setClasses(t,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(t){const i=[];return this._elementInfo.forEach((r,o)=>{(o===t||r.checkChildren&&o.contains(t))&&i.push([o,r])}),i}_isLastInteractionFromInputLabel(t){const{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!i||i===t||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName||t.disabled)return!1;const o=t.labels;if(o)for(let a=0;a{class e{constructor(t,i){this._platform=t,this._document=i,this._breakpointSubscription=Ye(IL).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return bl.NONE;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(t):null,o=(r&&r.backgroundColor||"").replace(/ /g,"");switch(t.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return bl.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return bl.BLACK_ON_WHITE}return bl.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(rC,$L,UL),this._hasCheckedHighContrastMode=!0;const i=this.getHighContrastMode();i===bl.BLACK_ON_WHITE?t.add(rC,$L):i===bl.WHITE_ON_BLACK&&t.add(rC,UL)}}static#e=this.\u0275fac=function(i){return new(i||e)(F(ni),F(cn))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Zne=(()=>{class e{constructor(t){t._applyBodyHighContrastModeCssClasses()}static#e=this.\u0275fac=function(i){return new(i||e)(F(GL))};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[eC]})}return e})();const Qne=new ye("cdk-dir-doc",{providedIn:"root",factory:function Jne(){return Ye(cn)}}),eie=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Jf=(()=>{class e{constructor(t){this.value="ltr",this.change=new nn,t&&(this.value=function tie(e){const n=e?.toLowerCase()||"";return"auto"===n&&typeof navigator<"u"&&navigator?.language?eie.test(navigator.language)?"rtl":"ltr":"rtl"===n?"rtl":"ltr"}((t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}static#e=this.\u0275fac=function(i){return new(i||e)(F(Qne,8))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),em=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({})}return e})();const nie=["mat-internal-form-field",""],iie=["*"],oie=new ye("mat-sanity-checks",{providedIn:"root",factory:function rie(){return!0}});let An=(()=>{class e{constructor(t,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,t._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!YE()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}static#e=this.\u0275fac=function(i){return new(i||e)(F(GL),F(oie,8),F(cn))};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[em,em]})}return e})();class YL{constructor(n,t,i,r,o){this._defaultMatcher=n,this.ngControl=t,this._parentFormGroup=i,this._parentForm=r,this._stateChanges=o,this.errorState=!1}updateErrorState(){const n=this.errorState,t=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,o=i?.isErrorState(r,t)??!1;o!==n&&(this.errorState=o,this._stateChanges.next())}}let uie=(()=>{class e{isErrorState(t,i){return!!(t&&t.invalid&&(t.touched||i&&i.submitted))}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),KL=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An,An]})}return e})();var Mo=function(e){return e[e.FADING_IN=0]="FADING_IN",e[e.VISIBLE=1]="VISIBLE",e[e.FADING_OUT=2]="FADING_OUT",e[e.HIDDEN=3]="HIDDEN",e}(Mo||{});class hie{constructor(n,t,i,r=!1){this._renderer=n,this.element=t,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=Mo.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}}const XL=Wf({passive:!0,capture:!0});class fie{constructor(){this._events=new Map,this._delegateEventHandler=n=>{const t=hc(n);t&&this._events.get(n.type)?.forEach((i,r)=>{(r===t||r.contains(t))&&i.forEach(o=>o.handleEvent(n))})}}addHandler(n,t,i,r){const o=this._events.get(t);if(o){const a=o.get(i);a?a.add(r):o.set(i,new Set([r]))}else this._events.set(t,new Map([[i,new Set([r])]])),n.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,XL)})}removeHandler(n,t,i){const r=this._events.get(n);if(!r)return;const o=r.get(t);o&&(o.delete(i),0===o.size&&r.delete(t),0===r.size&&(this._events.delete(n),document.removeEventListener(n,this._delegateEventHandler,XL)))}}const ZL={enterDuration:225,exitDuration:150},QL=Wf({passive:!0,capture:!0}),JL=["mousedown","touchstart"],e4=["mouseup","mouseleave","touchend","touchcancel"];class nm{static#e=this._eventManager=new fie;constructor(n,t,i,r){this._target=n,this._ngZone=t,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=bs(i))}fadeInRipple(n,t,i={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o={...ZL,...i.animation};i.centered&&(n=r.left+r.width/2,t=r.top+r.height/2);const a=i.radius||function pie(e,n,t){const i=Math.max(Math.abs(e-t.left),Math.abs(e-t.right)),r=Math.max(Math.abs(n-t.top),Math.abs(n-t.bottom));return Math.sqrt(i*i+r*r)}(n,t,r),s=n-r.left,c=t-r.top,l=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=s-a+"px",d.style.top=c-a+"px",d.style.height=2*a+"px",d.style.width=2*a+"px",null!=i.color&&(d.style.backgroundColor=i.color),d.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(d);const u=window.getComputedStyle(d),f=u.transitionDuration,m="none"===u.transitionProperty||"0s"===f||"0s, 0s"===f||0===r.width&&0===r.height,g=new hie(this,d,i,m);d.style.transform="scale3d(1, 1, 1)",g.state=Mo.FADING_IN,i.persistent||(this._mostRecentTransientRipple=g);let v=null;return!m&&(l||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const C=()=>this._finishRippleTransition(g),w=()=>this._destroyRipple(g);d.addEventListener("transitionend",C),d.addEventListener("transitioncancel",w),v={onTransitionEnd:C,onTransitionCancel:w}}),this._activeRipples.set(g,v),(m||!l)&&this._finishRippleTransition(g),g}fadeOutRipple(n){if(n.state===Mo.FADING_OUT||n.state===Mo.HIDDEN)return;const t=n.element,i={...ZL,...n.config.animation};t.style.transitionDuration=`${i.exitDuration}ms`,t.style.opacity="0",n.state=Mo.FADING_OUT,(n._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(n)}fadeOutAll(){this._getActiveRipples().forEach(n=>n.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(n=>{n.config.persistent||n.fadeOut()})}setupTriggerEvents(n){const t=bs(n);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,JL.forEach(i=>{nm._eventManager.addHandler(this._ngZone,i,t,this)}))}handleEvent(n){"mousedown"===n.type?this._onMousedown(n):"touchstart"===n.type?this._onTouchStart(n):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{e4.forEach(t=>{this._triggerElement.addEventListener(t,this,QL)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(n){n.state===Mo.FADING_IN?this._startFadeOutTransition(n):n.state===Mo.FADING_OUT&&this._destroyRipple(n)}_startFadeOutTransition(n){const t=n===this._mostRecentTransientRipple,{persistent:i}=n.config;n.state=Mo.VISIBLE,!i&&(!t||!this._isPointerDown)&&n.fadeOut()}_destroyRipple(n){const t=this._activeRipples.get(n)??null;this._activeRipples.delete(n),this._activeRipples.size||(this._containerRect=null),n===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),n.state=Mo.HIDDEN,null!==t&&(n.element.removeEventListener("transitionend",t.onTransitionEnd),n.element.removeEventListener("transitioncancel",t.onTransitionCancel)),n.element.remove()}_onMousedown(n){const t=jL(n),i=this._lastTouchStartEvent&&Date.now(){!n.config.persistent&&(n.state===Mo.VISIBLE||n.config.terminateOnPointerUp&&n.state===Mo.FADING_IN)&&n.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const n=this._triggerElement;n&&(JL.forEach(t=>nm._eventManager.removeHandler(t,n,this)),this._pointerUpEventsRegistered&&e4.forEach(t=>n.removeEventListener(t,this,QL)))}}const im=new ye("mat-ripple-global-options");let b_=(()=>{class e{get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}constructor(t,i,r,o,a){this._elementRef=t,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=o||{},this._rippleRenderer=new nm(this,i,t,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,i=0,r){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,i,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...t})}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(at),T(ni),T(im,8),T(er,8))};static#t=this.\u0275dir=Me({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(i,r){2&i&&wt("mat-ripple-unbounded",r.unbounded)},inputs:{color:[Ze.None,"matRippleColor","color"],unbounded:[Ze.None,"matRippleUnbounded","unbounded"],centered:[Ze.None,"matRippleCentered","centered"],radius:[Ze.None,"matRippleRadius","radius"],animation:[Ze.None,"matRippleAnimation","animation"],disabled:[Ze.None,"matRippleDisabled","disabled"],trigger:[Ze.None,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0})}return e})(),oC=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An,An]})}return e})(),gie=(()=>{class e{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1,this.appearance="full"}static#e=this.\u0275fac=function(i){return new(i||e)(T(er,8))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(i,r){2&i&&wt("mat-pseudo-checkbox-indeterminate","indeterminate"===r.state)("mat-pseudo-checkbox-checked","checked"===r.state)("mat-pseudo-checkbox-disabled",r.disabled)("mat-pseudo-checkbox-minimal","minimal"===r.appearance)("mat-pseudo-checkbox-full","full"===r.appearance)("_mat-animation-noopable","NoopAnimations"===r._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[Kn],decls:0,vars:0,template:function(i,r){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color);border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color);border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0})}return e})(),vie=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An]})}return e})();const t4={capture:!0},n4=["focus","click","mouseenter","touchstart"],aC="mat-ripple-loader-uninitialized",sC="mat-ripple-loader-class-name",i4="mat-ripple-loader-centered",y_="mat-ripple-loader-disabled";let _ie=(()=>{class e{constructor(){this._document=Ye(cn,{optional:!0}),this._animationMode=Ye(er,{optional:!0}),this._globalRippleOptions=Ye(im,{optional:!0}),this._platform=Ye(ni),this._ngZone=Ye(at),this._hosts=new Map,this._onInteraction=t=>{if(!(t.target instanceof HTMLElement))return;const r=t.target.closest(`[${aC}]`);r&&this._createRipple(r)},this._ngZone.runOutsideAngular(()=>{for(const t of n4)this._document?.addEventListener(t,this._onInteraction,t4)})}ngOnDestroy(){const t=this._hosts.keys();for(const i of t)this.destroyRipple(i);for(const i of n4)this._document?.removeEventListener(i,this._onInteraction,t4)}configureRipple(t,i){t.setAttribute(aC,""),(i.className||!t.hasAttribute(sC))&&t.setAttribute(sC,i.className||""),i.centered&&t.setAttribute(i4,""),i.disabled&&t.setAttribute(y_,"")}getRipple(t){return this._hosts.get(t)||this._createRipple(t)}setDisabled(t,i){const r=this._hosts.get(t);r?r.disabled=i:i?t.setAttribute(y_,""):t.removeAttribute(y_)}_createRipple(t){if(!this._document)return;const i=this._hosts.get(t);if(i)return i;t.querySelector(".mat-ripple")?.remove();const r=this._document.createElement("span");r.classList.add("mat-ripple",t.getAttribute(sC)),t.append(r);const o=new b_(new Lt(r),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return o._isInitialized=!0,o.trigger=t,o.centered=t.hasAttribute(i4),o.disabled=t.hasAttribute(y_),this.attachRipple(t,o),o}attachRipple(t,i){t.removeAttribute(aC),this._hosts.set(t,i)}destroyRipple(t){const i=this._hosts.get(t);i&&(i.ngOnDestroy(),this._hosts.delete(t))}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),bie=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275cmp=Rt({type:e,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(i,r){2&i&&wt("mdc-form-field--align-end","before"===r.labelPosition)},inputs:{labelPosition:"labelPosition"},standalone:!0,features:[Kn],attrs:nie,ngContentSelectors:iie,decls:1,vars:0,template:function(i,r){1&i&&(Ci(),St(0))},styles:[".mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-form-field{font-family:var(--mdc-form-field-label-text-font);line-height:var(--mdc-form-field-label-text-line-height);font-size:var(--mdc-form-field-label-text-size);font-weight:var(--mdc-form-field-label-text-weight);letter-spacing:var(--mdc-form-field-label-text-tracking);color:var(--mdc-form-field-label-text-color)}.mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}"],encapsulation:2,changeDetection:0})}return e})();const yie=["input"],xie=["label"],wie=["*"],r4=new ye("mat-checkbox-default-options",{providedIn:"root",factory:o4});function o4(){return{color:"accent",clickAction:"check-indeterminate"}}var fr=function(e){return e[e.Init=0]="Init",e[e.Checked=1]="Checked",e[e.Unchecked=2]="Unchecked",e[e.Indeterminate=3]="Indeterminate",e}(fr||{});const Eie={provide:ao,useExisting:an(()=>s4),multi:!0};class Cie{}let Sie=0;const a4=o4();let s4=(()=>{class e{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(t){const i=new Cie;return i.source=this,i.checked=t,i}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,i,r,o,a,s){this._elementRef=t,this._changeDetectorRef=i,this._ngZone=r,this._animationMode=a,this._options=s,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new nn,this.indeterminateChange=new nn,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=fr.Init,this._controlValueAccessorChangeFn=()=>{},this._validatorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||a4,this.color=this._options.color||a4.color,this.tabIndex=parseInt(o)||0,this.id=this._uniqueId="mat-mdc-checkbox-"+ ++Sie}ngOnChanges(t){t.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){t!==this.disabled&&(this._disabled=t,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(t){const i=t!=this._indeterminate;this._indeterminate=t,i&&(this._transitionCheckState(this._indeterminate?fr.Indeterminate:this.checked?fr.Checked:fr.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}validate(t){return this.required&&!0!==t.value?{required:!0}:null}registerOnValidatorChange(t){this._validatorChangeFn=t}_transitionCheckState(t){let i=this._currentCheckState,r=this._getAnimationTargetElement();if(i!==t&&r&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(i,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);const o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(o)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){const t=this._options?.clickAction;this.disabled||"noop"===t?!this.disabled&&"noop"===t&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==t&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?fr.Checked:fr.Unchecked),this._emitChangeEvent())}_onInteractionEvent(t){t.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(t,i){if("NoopAnimations"===this._animationMode)return"";switch(t){case fr.Init:if(i===fr.Checked)return this._animationClasses.uncheckedToChecked;if(i==fr.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case fr.Unchecked:return i===fr.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case fr.Checked:return i===fr.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case fr.Indeterminate:return i===fr.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(t){const i=this._inputElement;i&&(i.nativeElement.indeterminate=t)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(t){t.target&&this._labelElement.nativeElement.contains(t.target)&&t.stopPropagation()}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(io),T(at),Zc("tabindex"),T(er,8),T(r4,8))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-checkbox"]],viewQuery:function(i,r){if(1&i&&(ji(yie,5),ji(xie,5),ji(b_,5)),2&i){let o;Wt(o=qt())&&(r._inputElement=o.first),Wt(o=qt())&&(r._labelElement=o.first),Wt(o=qt())&&(r.ripple=o.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:14,hostBindings:function(i,r){2&i&&(sl("id",r.id),fn("tabindex",null)("aria-label",null)("aria-labelledby",null),gf(r.color?"mat-"+r.color:"mat-accent"),wt("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mdc-checkbox--disabled",r.disabled)("mat-mdc-checkbox-disabled",r.disabled)("mat-mdc-checkbox-checked",r.checked))},inputs:{ariaLabel:[Ze.None,"aria-label","ariaLabel"],ariaLabelledby:[Ze.None,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[Ze.None,"aria-describedby","ariaDescribedby"],id:"id",required:[Ze.HasDecoratorInputTransform,"required","required",Fn],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[Ze.HasDecoratorInputTransform,"disableRipple","disableRipple",Fn],tabIndex:[Ze.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?void 0:iP(t)],color:"color",checked:[Ze.HasDecoratorInputTransform,"checked","checked",Fn],disabled:[Ze.HasDecoratorInputTransform,"disabled","disabled",Fn],indeterminate:[Ze.HasDecoratorInputTransform,"indeterminate","indeterminate",Fn]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],standalone:!0,features:[en([Eie,{provide:Ui,useExisting:e,multi:!0}]),So,br,Kn],ngContentSelectors:wie,decls:15,vars:19,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(i,r){if(1&i){const o=vi();Ci(),B(0,"div",3),Pe("click",function(s){return jt(o),zt(r._preventBubblingFromLabel(s))}),B(1,"div",4,0)(3,"div",5),Pe("click",function(){return jt(o),zt(r._onTouchTargetClick())}),W(),B(4,"input",6,1),Pe("blur",function(){return jt(o),zt(r._onBlur())})("click",function(){return jt(o),zt(r._onInputClick())})("change",function(s){return jt(o),zt(r._onInteractionEvent(s))}),W(),ct(6,"div",7),B(7,"div",8),_g(),B(8,"svg",9),ct(9,"path",10),W(),function vx(){!function K9(){Ct.lFrame.currentNamespace=null}()}(),ct(10,"div",11),W(),ct(11,"div",12),W(),B(12,"label",13,2),St(14),W()()}if(2&i){const o=Er(2);$e("labelPosition",r.labelPosition),be(4),wt("mdc-checkbox--selected",r.checked),$e("checked",r.checked)("indeterminate",r.indeterminate)("disabled",r.disabled)("id",r.inputId)("required",r.required)("tabIndex",r.disabled?-1:r.tabIndex),fn("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-checked",r.indeterminate?"mixed":null)("name",r.name)("value",r.value),be(7),$e("matRippleTrigger",o)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),be(),$e("for",r.inputId)}},dependencies:[b_,bie],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}@keyframes mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}}@keyframes mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}}.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:focus:not(:checked):not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color);background-color:var(--mdc-checkbox-selected-focus-icon-color)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color)}.mat-mdc-checkbox label:empty{display:none}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}return e})(),c4=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[s4,An,An]})}return e})();var Dt=function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e}(Dt||{});const ys="*";function rm(e,n){return{type:Dt.Trigger,name:e,definitions:n,options:{}}}function yl(e,n=null){return{type:Dt.Animate,styles:n,timings:e}}function kr(e){return{type:Dt.Style,styles:e,offset:null}}function xs(e,n,t){return{type:Dt.State,name:e,styles:n,options:t}}function xl(e,n,t=null){return{type:Dt.Transition,expr:e,animation:n,options:t}}class om{constructor(n=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const t="start"==n?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}class h4{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let t=0,i=0,r=0;const o=this.players.length;0==o?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++i==o&&this._onDestroy()}),a.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,s)=>Math.max(a,s.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const t=n*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(r)})}getPosition(){const n=this.players.reduce((t,i)=>null===t||i.totalTime>t.totalTime?i:t,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const t="start"==n?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}}function f4(e){return new se(3e3,!1)}function fc(e){switch(e.length){case 0:return new om;case 1:return e[0];default:return new h4(e)}}function m4(e,n,t=new Map,i=new Map){const r=[],o=[];let a=-1,s=null;if(n.forEach(c=>{const l=c.get("offset"),d=l==a,u=d&&s||new Map;c.forEach((h,f)=>{let m=f,g=h;if("offset"!==f)switch(m=e.normalizePropertyName(m,r),g){case"!":g=t.get(f);break;case ys:g=i.get(f);break;default:g=e.normalizeStyleValue(f,m,g,r)}u.set(m,g)}),d||o.push(u),s=u,a=l}),r.length)throw function tre(e){return new se(3502,!1)}();return o}function lC(e,n,t,i){switch(n){case"start":e.onStart(()=>i(t&&dC(t,"start",e)));break;case"done":e.onDone(()=>i(t&&dC(t,"done",e)));break;case"destroy":e.onDestroy(()=>i(t&&dC(t,"destroy",e)))}}function dC(e,n,t){const o=uC(e.element,e.triggerName,e.fromState,e.toState,n||e.phaseName,t.totalTime??e.totalTime,!!t.disabled),a=e._data;return null!=a&&(o._data=a),o}function uC(e,n,t,i,r="",o=0,a){return{element:e,triggerName:n,fromState:t,toState:i,phaseName:r,totalTime:o,disabled:!!a}}function lo(e,n,t){let i=e.get(n);return i||e.set(n,i=t),i}function p4(e){const n=e.indexOf(":");return[e.substring(1,n),e.slice(n+1)]}const fre=typeof document>"u"?null:document.documentElement;function hC(e){const n=e.parentNode||e.host||null;return n===fre?null:n}let wl=null,g4=!1;function v4(e,n){for(;n;){if(n===e)return!0;n=hC(n)}return!1}function _4(e,n,t){if(t)return Array.from(e.querySelectorAll(n));const i=e.querySelector(n);return i?[i]:[]}let fC=(()=>{class e{validateStyleProperty(t){return function pre(e){wl||(wl=function gre(){return typeof document<"u"?document.body:null}()||{},g4=!!wl.style&&"WebkitAppearance"in wl.style);let n=!0;return wl.style&&!function mre(e){return"ebkit"==e.substring(1,6)}(e)&&(n=e in wl.style,!n&&g4&&(n="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in wl.style)),n}(t)}matchesElement(t,i){return!1}containsElement(t,i){return v4(t,i)}getParentElement(t){return hC(t)}query(t,i,r){return _4(t,i,r)}computeStyle(t,i,r){return r||""}animate(t,i,r,o,a,s=[],c){return new om(r,o)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac})}return e})();class mC{static#e=this.NOOP=new fC}class pC{}const _re=1e3,gC="ng-enter",x_="ng-leave",w_="ng-trigger",E_=".ng-trigger",y4="ng-animating",vC=".ng-animating";function ws(e){if("number"==typeof e)return e;const n=e.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:_C(parseFloat(n[1]),n[2])}function _C(e,n){return"s"===n?e*_re:e}function C_(e,n,t){return e.hasOwnProperty("duration")?e:function yre(e,n,t){let r,o=0,a="";if("string"==typeof e){const s=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===s)return n.push(f4()),{duration:0,delay:0,easing:""};r=_C(parseFloat(s[1]),s[2]);const c=s[3];null!=c&&(o=_C(parseFloat(c),s[4]));const l=s[5];l&&(a=l)}else r=e;if(!t){let s=!1,c=n.length;r<0&&(n.push(function Rie(){return new se(3100,!1)}()),s=!0),o<0&&(n.push(function Nie(){return new se(3101,!1)}()),s=!0),s&&n.splice(c,0,f4())}return{duration:r,delay:o,easing:a}}(e,n,t)}function Ha(e,n,t){n.forEach((i,r)=>{const o=yC(r);t&&!t.has(r)&&t.set(r,e.style[o]),e.style[o]=i})}function El(e,n){n.forEach((t,i)=>{const r=yC(i);e.style[r]=""})}function am(e){return Array.isArray(e)?1==e.length?e[0]:function Tie(e,n=null){return{type:Dt.Sequence,steps:e,options:n}}(e):e}const bC=new RegExp("{{\\s*(.+?)\\s*}}","g");function w4(e){let n=[];if("string"==typeof e){let t;for(;t=bC.exec(e);)n.push(t[1]);bC.lastIndex=0}return n}function sm(e,n,t){const i=`${e}`,r=i.replace(bC,(o,a)=>{let s=n[a];return null==s&&(t.push(function Fie(e){return new se(3003,!1)}()),s=""),s.toString()});return r==i?e:r}const Ere=/-+([a-z0-9])/g;function yC(e){return e.replace(Ere,(...n)=>n[1].toUpperCase())}function uo(e,n,t){switch(n.type){case Dt.Trigger:return e.visitTrigger(n,t);case Dt.State:return e.visitState(n,t);case Dt.Transition:return e.visitTransition(n,t);case Dt.Sequence:return e.visitSequence(n,t);case Dt.Group:return e.visitGroup(n,t);case Dt.Animate:return e.visitAnimate(n,t);case Dt.Keyframes:return e.visitKeyframes(n,t);case Dt.Style:return e.visitStyle(n,t);case Dt.Reference:return e.visitReference(n,t);case Dt.AnimateChild:return e.visitAnimateChild(n,t);case Dt.AnimateRef:return e.visitAnimateRef(n,t);case Dt.Query:return e.visitQuery(n,t);case Dt.Stagger:return e.visitStagger(n,t);default:throw function Lie(e){return new se(3004,!1)}()}}const Dre=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class E4 extends pC{normalizePropertyName(n,t){return yC(n)}normalizeStyleValue(n,t,i,r){let o="";const a=i.toString().trim();if(Dre.has(t)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const s=i.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&0==s[1].length&&r.push(function Bie(e,n){return new se(3005,!1)}())}return a+o}}const S_="*";const D_=new Set(["true","1"]),k_=new Set(["false","0"]);function C4(e,n){const t=D_.has(e)||k_.has(e),i=D_.has(n)||k_.has(n);return(r,o)=>{let a=e==S_||e==r,s=n==S_||n==o;return!a&&t&&"boolean"==typeof r&&(a=r?D_.has(e):k_.has(e)),!s&&i&&"boolean"==typeof o&&(s=o?D_.has(n):k_.has(n)),a&&s}}const Mre=new RegExp("s*:selfs*,?","g");function wC(e,n,t,i){return new Ire(e).build(n,t,i)}class Ire{constructor(n){this._driver=n}build(n,t,i){const r=new Nre(t);return this._resetContextStyleTimingState(r),uo(this,am(n),r)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,t){let i=t.queryCount=0,r=t.depCount=0;const o=[],a=[];return"@"==n.name.charAt(0)&&t.errors.push(function Vie(){return new se(3006,!1)}()),n.definitions.forEach(s=>{if(this._resetContextStyleTimingState(t),s.type==Dt.State){const c=s,l=c.name;l.toString().split(/\s*,\s*/).forEach(d=>{c.name=d,o.push(this.visitState(c,t))}),c.name=l}else if(s.type==Dt.Transition){const c=this.visitTransition(s,t);i+=c.queryCount,r+=c.depCount,a.push(c)}else t.errors.push(function jie(){return new se(3007,!1)}())}),{type:Dt.Trigger,name:n.name,states:o,transitions:a,queryCount:i,depCount:r,options:null}}visitState(n,t){const i=this.visitStyle(n.styles,t),r=n.options&&n.options.params||null;if(i.containsDynamicStyles){const o=new Set,a=r||{};i.styles.forEach(s=>{s instanceof Map&&s.forEach(c=>{w4(c).forEach(l=>{a.hasOwnProperty(l)||o.add(l)})})}),o.size&&t.errors.push(function zie(e,n){return new se(3008,!1)}(0,o.values()))}return{type:Dt.State,name:n.name,style:i,options:r?{params:r}:null}}visitTransition(n,t){t.queryCount=0,t.depCount=0;const i=uo(this,am(n.animation),t),r=function kre(e,n){const t=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(i=>function Tre(e,n,t){if(":"==e[0]){const c=function Are(e,n){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i) *"}}(e,t);if("function"==typeof c)return void n.push(c);e=c}const i=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return t.push(function Xie(e){return new se(3015,!1)}()),n;const r=i[1],o=i[2],a=i[3];n.push(C4(r,a)),"<"==o[0]&&(r!=S_||a!=S_)&&n.push(C4(a,r))}(i,t,n)):t.push(e),t}(n.expr,t.errors);return{type:Dt.Transition,matchers:r,animation:i,queryCount:t.queryCount,depCount:t.depCount,options:Cl(n.options)}}visitSequence(n,t){return{type:Dt.Sequence,steps:n.steps.map(i=>uo(this,i,t)),options:Cl(n.options)}}visitGroup(n,t){const i=t.currentTime;let r=0;const o=n.steps.map(a=>{t.currentTime=i;const s=uo(this,a,t);return r=Math.max(r,t.currentTime),s});return t.currentTime=r,{type:Dt.Group,steps:o,options:Cl(n.options)}}visitAnimate(n,t){const i=function Fre(e,n){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e)return EC(C_(e,n).duration,0,"");const t=e;if(t.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=EC(0,0,"");return o.dynamic=!0,o.strValue=t,o}const r=C_(t,n);return EC(r.duration,r.delay,r.easing)}(n.timings,t.errors);t.currentAnimateTimings=i;let r,o=n.styles?n.styles:kr({});if(o.type==Dt.Keyframes)r=this.visitKeyframes(o,t);else{let a=n.styles,s=!1;if(!a){s=!0;const l={};i.easing&&(l.easing=i.easing),a=kr(l)}t.currentTime+=i.duration+i.delay;const c=this.visitStyle(a,t);c.isEmptyStep=s,r=c}return t.currentAnimateTimings=null,{type:Dt.Animate,timings:i,style:r,options:null}}visitStyle(n,t){const i=this._makeStyleAst(n,t);return this._validateStyleAst(i,t),i}_makeStyleAst(n,t){const i=[],r=Array.isArray(n.styles)?n.styles:[n.styles];for(let s of r)"string"==typeof s?s===ys?i.push(s):t.errors.push(new se(3002,!1)):i.push(new Map(Object.entries(s)));let o=!1,a=null;return i.forEach(s=>{if(s instanceof Map&&(s.has("easing")&&(a=s.get("easing"),s.delete("easing")),!o))for(let c of s.values())if(c.toString().indexOf("{{")>=0){o=!0;break}}),{type:Dt.Style,styles:i,easing:a,offset:n.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(n,t){const i=t.currentAnimateTimings;let r=t.currentTime,o=t.currentTime;i&&o>0&&(o-=i.duration+i.delay),n.styles.forEach(a=>{"string"!=typeof a&&a.forEach((s,c)=>{const l=t.collectedStyles.get(t.currentQuerySelector),d=l.get(c);let u=!0;d&&(o!=r&&o>=d.startTime&&r<=d.endTime&&(t.errors.push(function $ie(e,n,t,i,r){return new se(3010,!1)}()),u=!1),o=d.startTime),u&&l.set(c,{startTime:o,endTime:r}),t.options&&function wre(e,n,t){const i=n.params||{},r=w4(e);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||t.push(function Pie(e){return new se(3001,!1)}())})}(s,t.options,t.errors)})})}visitKeyframes(n,t){const i={type:Dt.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function Uie(){return new se(3011,!1)}()),i;let o=0;const a=[];let s=!1,c=!1,l=0;const d=n.steps.map(C=>{const w=this._makeStyleAst(C,t);let E=null!=w.offset?w.offset:function Pre(e){if("string"==typeof e)return null;let n=null;if(Array.isArray(e))e.forEach(t=>{if(t instanceof Map&&t.has("offset")){const i=t;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(e instanceof Map&&e.has("offset")){const t=e;n=parseFloat(t.get("offset")),t.delete("offset")}return n}(w.styles),x=0;return null!=E&&(o++,x=w.offset=E),c=c||x<0||x>1,s=s||x0&&o{const E=h>0?w==f?1:h*w:a[w],x=E*v;t.currentTime=m+g.delay+x,g.duration=x,this._validateStyleAst(C,t),C.offset=E,i.styles.push(C)}),i}visitReference(n,t){return{type:Dt.Reference,animation:uo(this,am(n.animation),t),options:Cl(n.options)}}visitAnimateChild(n,t){return t.depCount++,{type:Dt.AnimateChild,options:Cl(n.options)}}visitAnimateRef(n,t){return{type:Dt.AnimateRef,animation:this.visitReference(n.animation,t),options:Cl(n.options)}}visitQuery(n,t){const i=t.currentQuerySelector,r=n.options||{};t.queryCount++,t.currentQuery=n;const[o,a]=function Ore(e){const n=!!e.split(/\s*,\s*/).find(t=>":self"==t);return n&&(e=e.replace(Mre,"")),e=e.replace(/@\*/g,E_).replace(/@\w+/g,t=>E_+"-"+t.slice(1)).replace(/:animating/g,vC),[e,n]}(n.selector);t.currentQuerySelector=i.length?i+" "+o:o,lo(t.collectedStyles,t.currentQuerySelector,new Map);const s=uo(this,am(n.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:Dt.Query,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:a,animation:s,originalSelector:n.selector,options:Cl(n.options)}}visitStagger(n,t){t.currentQuery||t.errors.push(function Yie(){return new se(3013,!1)}());const i="full"===n.timings?{duration:0,delay:0,easing:"full"}:C_(n.timings,t.errors,!0);return{type:Dt.Stagger,animation:uo(this,am(n.animation),t),timings:i,options:null}}}class Nre{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Cl(e){return e?(e={...e}).params&&(e.params=function Rre(e){return e?{...e}:null}(e.params)):e={},e}function EC(e,n,t){return{duration:e,delay:n,easing:t}}function CC(e,n,t,i,r,o,a=null,s=!1){return{type:1,element:e,keyframes:n,preStyleProps:t,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:a,subTimeline:s}}class T_{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,t){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...t)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const Vre=new RegExp(":enter","g"),zre=new RegExp(":leave","g");function SC(e,n,t,i,r,o=new Map,a=new Map,s,c,l=[]){return(new Hre).buildKeyframes(e,n,t,i,r,o,a,s,c,l)}class Hre{buildKeyframes(n,t,i,r,o,a,s,c,l,d=[]){l=l||new T_;const u=new DC(n,t,l,r,o,d,[]);u.options=c;const h=c.delay?ws(c.delay):0;u.currentTimeline.delayNextStep(h),u.currentTimeline.setStyles([a],null,u.errors,c),uo(this,i,u);const f=u.timelines.filter(m=>m.containsAnimation());if(f.length&&s.size){let m;for(let g=f.length-1;g>=0;g--){const v=f[g];if(v.element===t){m=v;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([s],null,u.errors,c)}return f.length?f.map(m=>m.buildKeyframes()):[CC(t,[],[],[],0,h,"",!1)]}visitTrigger(n,t){}visitState(n,t){}visitTransition(n,t){}visitAnimateChild(n,t){const i=t.subInstructions.get(t.element);if(i){const r=t.createSubContext(n.options),o=t.currentTimeline.currentTime,a=this._visitSubInstructions(i,r,r.options);o!=a&&t.transformIntoNewTimeline(a)}t.previousNode=n}visitAnimateRef(n,t){const i=t.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],t,i),this.visitReference(n.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=n}_applyAnimationRefDelays(n,t,i){for(const r of n){const o=r?.delay;if(o){const a="number"==typeof o?o:ws(sm(o,r?.params??{},t.errors));i.delayNextStep(a)}}}_visitSubInstructions(n,t,i){let o=t.currentTimeline.currentTime;const a=null!=i.duration?ws(i.duration):null,s=null!=i.delay?ws(i.delay):null;return 0!==a&&n.forEach(c=>{const l=t.appendInstructionToTimeline(c,a,s);o=Math.max(o,l.duration+l.delay)}),o}visitReference(n,t){t.updateOptions(n.options,!0),uo(this,n.animation,t),t.previousNode=n}visitSequence(n,t){const i=t.subContextCount;let r=t;const o=n.options;if(o&&(o.params||o.delay)&&(r=t.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){r.previousNode.type==Dt.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=A_);const a=ws(o.delay);r.delayNextStep(a)}n.steps.length&&(n.steps.forEach(a=>uo(this,a,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),t.previousNode=n}visitGroup(n,t){const i=[];let r=t.currentTimeline.currentTime;const o=n.options&&n.options.delay?ws(n.options.delay):0;n.steps.forEach(a=>{const s=t.createSubContext(n.options);o&&s.delayNextStep(o),uo(this,a,s),r=Math.max(r,s.currentTimeline.currentTime),i.push(s.currentTimeline)}),i.forEach(a=>t.currentTimeline.mergeTimelineCollectedStyles(a)),t.transformIntoNewTimeline(r),t.previousNode=n}_visitTiming(n,t){if(n.dynamic){const i=n.strValue;return C_(t.params?sm(i,t.params,t.errors):i,t.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,t){const i=t.currentAnimateTimings=this._visitTiming(n.timings,t),r=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),r.snapshotCurrentStyles());const o=n.style;o.type==Dt.Keyframes?this.visitKeyframes(o,t):(t.incrementTime(i.duration),this.visitStyle(o,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=n}visitStyle(n,t){const i=t.currentTimeline,r=t.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(o):i.setStyles(n.styles,o,t.errors,t.options),t.previousNode=n}visitKeyframes(n,t){const i=t.currentAnimateTimings,r=t.currentTimeline.duration,o=i.duration,s=t.createSubContext().currentTimeline;s.easing=i.easing,n.styles.forEach(c=>{s.forwardTime((c.offset||0)*o),s.setStyles(c.styles,c.easing,t.errors,t.options),s.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(s),t.transformIntoNewTimeline(r+o),t.previousNode=n}visitQuery(n,t){const i=t.currentTimeline.currentTime,r=n.options||{},o=r.delay?ws(r.delay):0;o&&(t.previousNode.type===Dt.Style||0==i&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=A_);let a=i;const s=t.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=s.length;let c=null;s.forEach((l,d)=>{t.currentQueryIndex=d;const u=t.createSubContext(n.options,l);o&&u.delayNextStep(o),l===t.element&&(c=u.currentTimeline),uo(this,n.animation,u),u.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,u.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),c&&(t.currentTimeline.mergeTimelineCollectedStyles(c),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=n}visitStagger(n,t){const i=t.parentContext,r=t.currentTimeline,o=n.timings,a=Math.abs(o.duration),s=a*(t.currentQueryTotal-1);let c=a*t.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=s-c;break;case"full":c=i.currentStaggerTime}const d=t.currentTimeline;c&&d.delayNextStep(c);const u=d.currentTime;uo(this,n.animation,t),t.previousNode=n,i.currentStaggerTime=r.currentTime-u+(r.startTime-i.currentTimeline.startTime)}}const A_={};class DC{constructor(n,t,i,r,o,a,s,c){this._driver=n,this.element=t,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=a,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=A_,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new M_(this._driver,t,0),s.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,t){if(!n)return;const i=n;let r=this.options;null!=i.duration&&(r.duration=ws(i.duration)),null!=i.delay&&(r.delay=ws(i.delay));const o=i.params;if(o){let a=r.params;a||(a=this.options.params={}),Object.keys(o).forEach(s=>{(!t||!a.hasOwnProperty(s))&&(a[s]=sm(o[s],a,this.errors))})}}_copyOptions(){const n={};if(this.options){const t=this.options.params;if(t){const i=n.params={};Object.keys(t).forEach(r=>{i[r]=t[r]})}}return n}createSubContext(n=null,t,i){const r=t||this.element,o=new DC(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(n),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(n){return this.previousNode=A_,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,t,i){const r={duration:t??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},o=new $re(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,t,i,r,o,a){let s=[];if(r&&s.push(this.element),n.length>0){n=(n=n.replace(Vre,"."+this._enterClassName)).replace(zre,"."+this._leaveClassName);let l=this._driver.query(this.element,n,1!=i);0!==i&&(l=i<0?l.slice(l.length+i,l.length):l.slice(0,i)),s.push(...l)}return!o&&0==s.length&&a.push(function Kie(e){return new se(3014,!1)}()),s}}class M_{constructor(n,t,i,r){this._driver=n,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+n),t&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,t){return this.applyStylesToKeyframe(),new M_(this._driver,n,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,t){this._localTimelineStyles.set(n,t),this._globalTimelineStyles.set(n,t),this._styleSummary.set(n,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||ys),this._currentKeyframe.set(t,ys);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,t,i,r){t&&this._previousKeyframe.set("easing",t);const o=r&&r.params||{},a=function Ure(e,n){const t=new Map;let i;return e.forEach(r=>{if("*"===r){i??=n.keys();for(let o of i)t.set(o,ys)}else for(let[o,a]of r)t.set(o,a)}),t}(n,this._globalTimelineStyles);for(let[s,c]of a){const l=sm(c,o,i);this._pendingStyles.set(s,l),this._localTimelineStyles.has(s)||this._backFill.set(s,this._globalTimelineStyles.get(s)??ys),this._updateStyle(s,l)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,t)=>{this._currentKeyframe.set(t,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,n)}))}snapshotCurrentStyles(){for(let[n,t]of this._localTimelineStyles)this._pendingStyles.set(n,t),this._updateStyle(n,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let t in this._currentKeyframe)n.push(t);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((t,i)=>{const r=this._styleSummary.get(i);(!r||t.time>r.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,t=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((s,c)=>{const l=new Map([...this._backFill,...s]);l.forEach((d,u)=>{"!"===d?n.add(u):d===ys&&t.add(u)}),i||l.set("offset",c/this.duration),r.push(l)});const o=[...n.values()],a=[...t.values()];if(i){const s=r[0],c=new Map(s);s.set("offset",0),c.set("offset",1),r=[s,c]}return CC(this.element,r,o,a,this.duration,this.startTime,this.easing,!1)}}class $re extends M_{constructor(n,t,i,r,o,a,s=!1){super(n,t,a.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=s,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:t,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const o=[],a=i+t,s=t/a,c=new Map(n[0]);c.set("offset",0),o.push(c);const l=new Map(n[0]);l.set("offset",k4(s)),o.push(l);const d=n.length-1;for(let u=1;u<=d;u++){let h=new Map(n[u]);const f=h.get("offset");h.set("offset",k4((t+f*i)/a)),o.push(h)}i=a,t=0,r="",n=o}return CC(this.element,n,this.preStyleProps,this.postStyleProps,i,t,r,!0)}}function k4(e,n=3){const t=Math.pow(10,n-1);return Math.round(e*t)/t}function T4(e,n,t,i,r,o,a,s,c,l,d,u,h){return{type:0,element:e,triggerName:n,isRemovalTransition:r,fromState:t,fromStyles:o,toState:i,toStyles:a,timelines:s,queriedElements:c,preStyleProps:l,postStyleProps:d,totalTime:u,errors:h}}const kC={};class A4{constructor(n,t,i){this._triggerName=n,this.ast=t,this._stateStyles=i}match(n,t,i,r){return function Gre(e,n,t,i,r){return e.some(o=>o(n,t,i,r))}(this.ast.matchers,n,t,i,r)}buildStyles(n,t,i){let r=this._stateStyles.get("*");return void 0!==n&&(r=this._stateStyles.get(n?.toString())||r),r?r.buildStyles(t,i):new Map}build(n,t,i,r,o,a,s,c,l,d){const u=[],h=this.ast.options&&this.ast.options.params||kC,m=this.buildStyles(i,s&&s.params||kC,u),g=c&&c.params||kC,v=this.buildStyles(r,g,u),C=new Set,w=new Map,E=new Map,x="void"===r,k={params:M4(g,h),delay:this.ast.options?.delay},O=d?[]:SC(n,t,this.ast.animation,o,a,m,v,k,l,u);let L=0;return O.forEach(R=>{L=Math.max(R.duration+R.delay,L)}),u.length?T4(t,this._triggerName,i,r,x,m,v,[],[],w,E,L,u):(O.forEach(R=>{const te=R.element,we=lo(w,te,new Set);R.preStyleProps.forEach(de=>we.add(de));const Ge=lo(E,te,new Set);R.postStyleProps.forEach(de=>Ge.add(de)),te!==t&&C.add(te)}),T4(t,this._triggerName,i,r,x,m,v,O,[...C.values()],w,E,L))}}function M4(e,n){const t={...n};return Object.entries(e).forEach(([i,r])=>{null!=r&&(t[i]=r)}),t}class Wre{constructor(n,t,i){this.styles=n,this.defaultParams=t,this.normalizer=i}buildStyles(n,t){const i=new Map,r=M4(n,this.defaultParams);return this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((a,s)=>{a&&(a=sm(a,r,t));const c=this.normalizer.normalizePropertyName(s,t);a=this.normalizer.normalizeStyleValue(s,c,a,t),i.set(s,a)})}),i}}class Yre{constructor(n,t,i){this.name=n,this.ast=t,this._normalizer=i,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{this.states.set(r.name,new Wre(r.style,r.options&&r.options.params||{},i))}),I4(this.states,"true","1"),I4(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new A4(n,r,this.states))}),this.fallbackTransition=function Kre(e,n,t){return new A4(e,{type:Dt.Transition,animation:{type:Dt.Sequence,steps:[],options:null},matchers:[(a,s)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,t,i,r){return this.transitionFactories.find(a=>a.match(n,t,i,r))||null}matchStyles(n,t,i){return this.fallbackTransition.buildStyles(n,t,i)}}function I4(e,n,t){e.has(n)?e.has(t)||e.set(t,e.get(n)):e.has(t)&&e.set(n,e.get(t))}const Xre=new T_;class Zre{constructor(n,t,i){this.bodyNode=n,this._driver=t,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,t){const i=[],o=wC(this._driver,t,i,[]);if(i.length)throw function nre(e){return new se(3503,!1)}();this._animations.set(n,o)}_buildPlayer(n,t,i){const r=n.element,o=m4(this._normalizer,n.keyframes,t,i);return this._driver.animate(r,o,n.duration,n.delay,n.easing,[],!0)}create(n,t,i={}){const r=[],o=this._animations.get(n);let a;const s=new Map;if(o?(a=SC(this._driver,t,o,gC,x_,new Map,new Map,i,Xre,r),a.forEach(d=>{const u=lo(s,d.element,new Map);d.postStyleProps.forEach(h=>u.set(h,null))})):(r.push(function ire(){return new se(3300,!1)}()),a=[]),r.length)throw function rre(e){return new se(3504,!1)}();s.forEach((d,u)=>{d.forEach((h,f)=>{d.set(f,this._driver.computeStyle(u,f,ys))})});const l=fc(a.map(d=>{const u=s.get(d.element);return this._buildPlayer(d,new Map,u)}));return this._playersById.set(n,l),l.onDestroy(()=>this.destroy(n)),this.players.push(l),l}destroy(n){const t=this._getPlayer(n);t.destroy(),this._playersById.delete(n);const i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(n){const t=this._playersById.get(n);if(!t)throw function ore(e){return new se(3301,!1)}();return t}listen(n,t,i,r){const o=uC(t,"","","");return lC(this._getPlayer(n),i,o,r),()=>{}}command(n,t,i,r){if("register"==i)return void this.register(n,r[0]);if("create"==i)return void this.create(n,t,r[0]||{});const o=this._getPlayer(n);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}}}const O4="ng-animate-queued",TC="ng-animate-disabled",noe=[],R4={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ioe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},sa="__ng_removed";class AC{get params(){return this.options.params}constructor(n,t=""){this.namespaceId=t;const i=n&&n.hasOwnProperty("value");if(this.value=function soe(e){return e??null}(i?n.value:n),i){const{value:o,...a}=n;this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const t=n.params;if(t){const i=this.options.params;Object.keys(t).forEach(r=>{null==i[r]&&(i[r]=t[r])})}}}const cm="void",MC=new AC(cm);class roe{constructor(n,t,i){this.id=n,this.hostElement=t,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,Io(t,this._hostClassName)}listen(n,t,i,r){if(!this._triggers.has(t))throw function are(e,n){return new se(3302,!1)}();if(null==i||0==i.length)throw function sre(e){return new se(3303,!1)}();if(!function coe(e){return"start"==e||"done"==e}(i))throw function cre(e,n){return new se(3400,!1)}();const o=lo(this._elementListeners,n,[]),a={name:t,phase:i,callback:r};o.push(a);const s=lo(this._engine.statesByElement,n,new Map);return s.has(t)||(Io(n,w_),Io(n,w_+"-"+t),s.set(t,MC)),()=>{this._engine.afterFlush(()=>{const c=o.indexOf(a);c>=0&&o.splice(c,1),this._triggers.has(t)||s.delete(t)})}}register(n,t){return!this._triggers.has(n)&&(this._triggers.set(n,t),!0)}_getTrigger(n){const t=this._triggers.get(n);if(!t)throw function lre(e){return new se(3401,!1)}();return t}trigger(n,t,i,r=!0){const o=this._getTrigger(t),a=new IC(this.id,t,n);let s=this._engine.statesByElement.get(n);s||(Io(n,w_),Io(n,w_+"-"+t),this._engine.statesByElement.set(n,s=new Map));let c=s.get(t);const l=new AC(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&c&&l.absorbOptions(c.options),s.set(t,l),c||(c=MC),l.value!==cm&&c.value===l.value){if(!function uoe(e,n){const t=Object.keys(e),i=Object.keys(n);if(t.length!=i.length)return!1;for(let r=0;r{El(n,v),Ha(n,C)})}return}const h=lo(this._engine.playersByElement,n,[]);h.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let f=o.matchTransition(c.value,l.value,n,l.params),m=!1;if(!f){if(!r)return;f=o.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:t,transition:f,fromState:c,toState:l,player:a,isFallbackTransition:m}),m||(Io(n,O4),a.onStart(()=>{pu(n,O4)})),a.onDone(()=>{let g=this.players.indexOf(a);g>=0&&this.players.splice(g,1);const v=this._engine.playersByElement.get(n);if(v){let C=v.indexOf(a);C>=0&&v.splice(C,1)}}),this.players.push(a),h.push(a),a}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(t=>t.delete(n)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(r=>r.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const t=this._engine.playersByElement.get(n);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,t){const i=this._engine.driver.query(n,E_,!0);i.forEach(r=>{if(r[sa])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(a=>a.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(n,t,i,r){const o=this._engine.statesByElement.get(n),a=new Map;if(o){const s=[];if(o.forEach((c,l)=>{if(a.set(l,c.value),this._triggers.has(l)){const d=this.trigger(n,l,cm,r);d&&s.push(d)}}),s.length)return this._engine.markElementAsRemoved(this.id,n,!0,t,a),i&&fc(s).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const t=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(t&&i){const r=new Set;t.forEach(o=>{const a=o.name;if(r.has(a))return;r.add(a);const c=this._triggers.get(a).fallbackTransition,l=i.get(a)||MC,d=new AC(cm),u=new IC(this.id,a,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:a,transition:c,fromState:l,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(n,t){const i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,t),this.triggerLeaveAnimation(n,t,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(n):[];if(o&&o.length)r=!0;else{let a=n;for(;a=a.parentNode;)if(i.statesByElement.get(a)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(n),r)i.markElementAsRemoved(this.id,n,!1,t);else{const o=n[sa];(!o||o===R4)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,t))}}insertNode(n,t){Io(n,this._hostClassName)}drainQueuedTransitions(n){const t=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,a=this._elementListeners.get(o);a&&a.forEach(s=>{if(s.name==i.triggerName){const c=uC(o,i.triggerName,i.fromState.value,i.toState.value);c._data=n,lC(i.player,s.phase,c,s.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(i)}),this._queue=[],t.sort((i,r)=>{const o=i.transition.ast.depCount,a=r.transition.ast.depCount;return 0==o||0==a?o-a:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(n){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}}class ooe{_onRemovalComplete(n,t){this.onRemovalComplete(n,t)}constructor(n,t,i,r){this.bodyNode=n,this.driver=t,this._normalizer=i,this.scheduler=r,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(o,a)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,t){const i=new roe(n,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,t){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let a=!1,s=this.driver.getParentElement(t);for(;s;){const c=r.get(s);if(c){const l=i.indexOf(c);i.splice(l+1,0,n),a=!0;break}s=this.driver.getParentElement(s)}a||i.unshift(n)}else i.push(n);return r.set(t,n),n}register(n,t){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,t)),i}registerTrigger(n,t,i){let r=this._namespaceLookup[n];r&&r.register(t,i)&&this.totalAnimations++}destroy(n,t){n&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const i=this._fetchNamespace(n);this.namespacesByHostElement.delete(i.hostElement);const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1),i.destroy(t),delete this._namespaceLookup[n]}))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const t=new Set,i=this.statesByElement.get(n);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&t.add(o)}return t}trigger(n,t,i,r){if(I_(t)){const o=this._fetchNamespace(n);if(o)return o.trigger(t,i,r),!0}return!1}insertNode(n,t,i,r){if(!I_(t))return;const o=t[sa];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const a=this.collectedLeaveElements.indexOf(t);a>=0&&this.collectedLeaveElements.splice(a,1)}if(n){const a=this._fetchNamespace(n);a&&a.insertNode(t,i)}r&&this.collectEnterElement(t)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,t){t?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Io(n,TC)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),pu(n,TC))}removeNode(n,t,i){if(I_(t)){this.scheduler?.notify();const r=n?this._fetchNamespace(n):null;r?r.removeNode(t,i):this.markElementAsRemoved(n,t,!1,i);const o=this.namespacesByHostElement.get(t);o&&o.id!==n&&o.removeNode(t,i)}else this._onRemovalComplete(t,i)}markElementAsRemoved(n,t,i,r,o){this.collectedLeaveElements.push(t),t[sa]={namespaceId:n,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(n,t,i,r,o){return I_(t)?this._fetchNamespace(n).listen(t,i,r,o):()=>{}}_buildInstruction(n,t,i,r,o){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,r,n.fromState.options,n.toState.options,t,o)}destroyInnerAnimations(n){let t=this.driver.query(n,E_,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(n,vC,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){const t=this.playersByElement.get(n);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){const t=this.playersByQueriedElement.get(n);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return fc(this.players).onDone(()=>n());n()})}processLeaveNode(n){const t=n[sa];if(t&&t.setForRemoval){if(n[sa]=R4,t.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,t.setForRemoval)}n.classList?.contains(TC)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],t.length?fc(t).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(n){throw function dre(e){return new se(3402,!1)}()}_flushAnimations(n,t){const i=new T_,r=[],o=new Map,a=[],s=new Map,c=new Map,l=new Map,d=new Set;this.disabledNodes.forEach(me=>{d.add(me);const N=this.driver.query(me,".ng-animate-queued",!0);for(let _=0;_{const _=gC+g++;m.set(N,_),me.forEach(p=>Io(p,_))});const v=[],C=new Set,w=new Set;for(let me=0;meC.add(p)):w.add(N))}const E=new Map,x=F4(h,Array.from(C));x.forEach((me,N)=>{const _=x_+g++;E.set(N,_),me.forEach(p=>Io(p,_))}),n.push(()=>{f.forEach((me,N)=>{const _=m.get(N);me.forEach(p=>pu(p,_))}),x.forEach((me,N)=>{const _=E.get(N);me.forEach(p=>pu(p,_))}),v.forEach(me=>{this.processLeaveNode(me)})});const k=[],O=[];for(let me=this._namespaceList.length-1;me>=0;me--)this._namespaceList[me].drainQueuedTransitions(t).forEach(_=>{const p=_.player,D=_.element;if(k.push(p),this.collectedEnterElements.length){const Tt=D[sa];if(Tt&&Tt.setForMove){if(Tt.previousTriggersValues&&Tt.previousTriggersValues.has(_.triggerName)){const En=Tt.previousTriggersValues.get(_.triggerName),Cn=this.statesByElement.get(_.element);if(Cn&&Cn.has(_.triggerName)){const Vn=Cn.get(_.triggerName);Vn.value=En,Cn.set(_.triggerName,Vn)}}return void p.destroy()}}const A=!u||!this.driver.containsElement(u,D),ee=E.get(D),P=m.get(D),q=this._buildInstruction(_,i,P,ee,A);if(q.errors&&q.errors.length)return void O.push(q);if(A)return p.onStart(()=>El(D,q.fromStyles)),p.onDestroy(()=>Ha(D,q.toStyles)),void r.push(p);if(_.isFallbackTransition)return p.onStart(()=>El(D,q.fromStyles)),p.onDestroy(()=>Ha(D,q.toStyles)),void r.push(p);const Re=[];q.timelines.forEach(Tt=>{Tt.stretchStartingKeyframe=!0,this.disabledNodes.has(Tt.element)||Re.push(Tt)}),q.timelines=Re,i.append(D,q.timelines),a.push({instruction:q,player:p,element:D}),q.queriedElements.forEach(Tt=>lo(s,Tt,[]).push(p)),q.preStyleProps.forEach((Tt,En)=>{if(Tt.size){let Cn=c.get(En);Cn||c.set(En,Cn=new Set),Tt.forEach((Vn,Fr)=>Cn.add(Fr))}}),q.postStyleProps.forEach((Tt,En)=>{let Cn=l.get(En);Cn||l.set(En,Cn=new Set),Tt.forEach((Vn,Fr)=>Cn.add(Fr))})});if(O.length){const me=[];O.forEach(N=>{me.push(function ure(e,n){return new se(3505,!1)}())}),k.forEach(N=>N.destroy()),this.reportError(me)}const L=new Map,R=new Map;a.forEach(me=>{const N=me.element;i.has(N)&&(R.set(N,N),this._beforeAnimationBuild(me.player.namespaceId,me.instruction,L))}),r.forEach(me=>{const N=me.element;this._getPreviousPlayers(N,!1,me.namespaceId,me.triggerName,null).forEach(p=>{lo(L,N,[]).push(p),p.destroy()})});const te=v.filter(me=>B4(me,c,l)),we=new Map;P4(we,this.driver,w,l,ys).forEach(me=>{B4(me,c,l)&&te.push(me)});const de=new Map;f.forEach((me,N)=>{P4(de,this.driver,new Set(me),c,"!")}),te.forEach(me=>{const N=we.get(me),_=de.get(me);we.set(me,new Map([...N?.entries()??[],..._?.entries()??[]]))});const Ce=[],ze=[],Kt={};a.forEach(me=>{const{element:N,player:_,instruction:p}=me;if(i.has(N)){if(d.has(N))return _.onDestroy(()=>Ha(N,p.toStyles)),_.disabled=!0,_.overrideTotalTime(p.totalTime),void r.push(_);let D=Kt;if(R.size>1){let ee=N;const P=[];for(;ee=ee.parentNode;){const q=R.get(ee);if(q){D=q;break}P.push(ee)}P.forEach(q=>R.set(q,D))}const A=this._buildAnimation(_.namespaceId,p,L,o,de,we);if(_.setRealPlayer(A),D===Kt)Ce.push(_);else{const ee=this.playersByElement.get(D);ee&&ee.length&&(_.parentPlayer=fc(ee)),r.push(_)}}else El(N,p.fromStyles),_.onDestroy(()=>Ha(N,p.toStyles)),ze.push(_),d.has(N)&&r.push(_)}),ze.forEach(me=>{const N=o.get(me.element);if(N&&N.length){const _=fc(N);me.setRealPlayer(_)}}),r.forEach(me=>{me.parentPlayer?me.syncPlayerEvents(me.parentPlayer):me.destroy()});for(let me=0;me!A.destroyed);D.length?loe(this,N,D):this.processLeaveNode(N)}return v.length=0,Ce.forEach(me=>{this.players.push(me),me.onDone(()=>{me.destroy();const N=this.players.indexOf(me);this.players.splice(N,1)}),me.play()}),Ce}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,t,i,r,o){let a=[];if(t){const s=this.playersByQueriedElement.get(n);s&&(a=s)}else{const s=this.playersByElement.get(n);if(s){const c=!o||o==cm;s.forEach(l=>{l.queued||!c&&l.triggerName!=r||a.push(l)})}}return(i||r)&&(a=a.filter(s=>!(i&&i!=s.namespaceId||r&&r!=s.triggerName))),a}_beforeAnimationBuild(n,t,i){const o=t.element,a=t.isRemovalTransition?void 0:n,s=t.isRemovalTransition?void 0:t.triggerName;for(const c of t.timelines){const l=c.element,d=l!==o,u=lo(i,l,[]);this._getPreviousPlayers(l,d,a,s,t.toState).forEach(f=>{const m=f.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),f.destroy(),u.push(f)})}El(o,t.fromStyles)}_buildAnimation(n,t,i,r,o,a){const s=t.triggerName,c=t.element,l=[],d=new Set,u=new Set,h=t.timelines.map(m=>{const g=m.element;d.add(g);const v=g[sa];if(v&&v.removedBeforeQueried)return new om(m.duration,m.delay);const C=g!==c,w=function doe(e){const n=[];return L4(e,n),n}((i.get(g)||noe).map(L=>L.getRealPlayer())).filter(L=>!!L.element&&L.element===g),E=o.get(g),x=a.get(g),k=m4(this._normalizer,m.keyframes,E,x),O=this._buildPlayer(m,k,w);if(m.subTimeline&&r&&u.add(g),C){const L=new IC(n,s,g);L.setRealPlayer(O),l.push(L)}return O});l.forEach(m=>{lo(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>function aoe(e,n,t){let i=e.get(n);if(i){if(i.length){const r=i.indexOf(t);i.splice(r,1)}0==i.length&&e.delete(n)}return i}(this.playersByQueriedElement,m.element,m))}),d.forEach(m=>Io(m,y4));const f=fc(h);return f.onDestroy(()=>{d.forEach(m=>pu(m,y4)),Ha(c,t.toStyles)}),u.forEach(m=>{lo(r,m,[]).push(f)}),f}_buildPlayer(n,t,i){return t.length>0?this.driver.animate(n.element,t,n.duration,n.delay,n.easing,i):new om(n.duration,n.delay)}}class IC{constructor(n,t,i){this.namespaceId=n,this.triggerName=t,this.element=i,this._player=new om,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((t,i)=>{t.forEach(r=>lC(n,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const t=this._player;t.triggerCallback&&n.onStart(()=>t.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,t){lo(this._queuedCallbacks,n,[]).push(t)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const t=this._player;t.triggerCallback&&t.triggerCallback(n)}}function I_(e){return e&&1===e.nodeType}function N4(e,n){const t=e.style.display;return e.style.display=n??"none",t}function P4(e,n,t,i,r){const o=[];t.forEach(c=>o.push(N4(c)));const a=[];i.forEach((c,l)=>{const d=new Map;c.forEach(u=>{const h=n.computeStyle(l,u,r);d.set(u,h),(!h||0==h.length)&&(l[sa]=ioe,a.push(l))}),e.set(l,d)});let s=0;return t.forEach(c=>N4(c,o[s++])),a}function F4(e,n){const t=new Map;if(e.forEach(s=>t.set(s,[])),0==n.length)return t;const r=new Set(n),o=new Map;function a(s){if(!s)return 1;let c=o.get(s);if(c)return c;const l=s.parentNode;return c=t.has(l)?l:r.has(l)?1:a(l),o.set(s,c),c}return n.forEach(s=>{const c=a(s);1!==c&&t.get(c).push(s)}),t}function Io(e,n){e.classList?.add(n)}function pu(e,n){e.classList?.remove(n)}function loe(e,n,t){fc(t).onDone(()=>e.processLeaveNode(n))}function L4(e,n){for(let t=0;tr.add(o)):n.set(e,i),t.delete(e),!0}class lm{constructor(n,t,i,r){this._driver=t,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(o,a)=>{},this._transitionEngine=new ooe(n.body,t,i,r),this._timelineEngine=new Zre(n.body,t,i),this._transitionEngine.onRemovalComplete=(o,a)=>this.onRemovalComplete(o,a)}registerTrigger(n,t,i,r,o){const a=n+"-"+r;let s=this._triggerCache[a];if(!s){const c=[],d=wC(this._driver,o,c,[]);if(c.length)throw function ere(e,n){return new se(3404,!1)}();s=function qre(e,n,t){return new Yre(e,n,t)}(r,d,this._normalizer),this._triggerCache[a]=s}this._transitionEngine.registerTrigger(t,r,s)}register(n,t){this._transitionEngine.register(n,t)}destroy(n,t){this._transitionEngine.destroy(n,t)}onInsert(n,t,i,r){this._transitionEngine.insertNode(n,t,i,r)}onRemove(n,t,i){this._transitionEngine.removeNode(n,t,i)}disableAnimations(n,t){this._transitionEngine.markElementAsDisabled(n,t)}process(n,t,i,r){if("@"==i.charAt(0)){const[o,a]=p4(i);this._timelineEngine.command(o,t,a,r)}else this._transitionEngine.trigger(n,t,i,r)}listen(n,t,i,r,o){if("@"==i.charAt(0)){const[a,s]=p4(i);return this._timelineEngine.listen(a,t,s,o)}return this._transitionEngine.listen(n,t,i,r,o)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(n){this._transitionEngine.afterFlushAnimationsDone(n)}}class dm{static#e=this.initialStylesByElement=new WeakMap;constructor(n,t,i){this._element=n,this._startStyles=t,this._endStyles=i,this._state=0;let r=dm.initialStylesByElement.get(n);r||dm.initialStylesByElement.set(n,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Ha(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Ha(this._element,this._initialStyles),this._endStyles&&(Ha(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(dm.initialStylesByElement.delete(this._element),this._startStyles&&(El(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(El(this._element,this._endStyles),this._endStyles=null),Ha(this._element,this._initialStyles),this._state=3)}}const z4="@.disabled";class H4{constructor(n,t,i,r){this.namespaceId=n,this.delegate=t,this.engine=i,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(n){this.delegate.destroyNode?.(n)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(n,t){return this.delegate.createElement(n,t)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,t){this.delegate.appendChild(n,t),this.engine.onInsert(this.namespaceId,t,n,!1)}insertBefore(n,t,i,r=!0){this.delegate.insertBefore(n,t,i),this.engine.onInsert(this.namespaceId,t,n,r)}removeChild(n,t,i){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(n,t){return this.delegate.selectRootElement(n,t)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,t,i,r){this.delegate.setAttribute(n,t,i,r)}removeAttribute(n,t,i){this.delegate.removeAttribute(n,t,i)}addClass(n,t){this.delegate.addClass(n,t)}removeClass(n,t){this.delegate.removeClass(n,t)}setStyle(n,t,i,r){this.delegate.setStyle(n,t,i,r)}removeStyle(n,t,i){this.delegate.removeStyle(n,t,i)}setProperty(n,t,i){"@"==t.charAt(0)&&t==z4?this.disableAnimations(n,!!i):this.delegate.setProperty(n,t,i)}setValue(n,t){this.delegate.setValue(n,t)}listen(n,t,i){return this.delegate.listen(n,t,i)}disableAnimations(n,t){this.engine.disableAnimations(n,t)}}class moe extends H4{constructor(n,t,i,r,o){super(t,i,r,o),this.factory=n,this.namespaceId=t}setProperty(n,t,i){"@"==t.charAt(0)?"."==t.charAt(1)&&t==z4?this.disableAnimations(n,i=void 0===i||!!i):this.engine.process(this.namespaceId,n,t.slice(1),i):this.delegate.setProperty(n,t,i)}listen(n,t,i){if("@"==t.charAt(0)){const r=function poe(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(n);let o=t.slice(1),a="";return"@"!=o.charAt(0)&&([o,a]=function goe(e){const n=e.indexOf(".");return[e.substring(0,n),e.slice(n+1)]}(o)),this.engine.listen(this.namespaceId,r,o,a,s=>{this.factory.scheduleListenerCallback(s._data||-1,i,s)})}return this.delegate.listen(n,t,i)}}class voe{constructor(n,t,i){this.delegate=n,this.engine=t,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(r,o)=>{const a=o?.parentNode(r);a&&o.removeChild(a,r)}}createRenderer(n,t){const r=this.delegate.createRenderer(n,t);if(!n||!t?.data?.animation){const l=this._rendererCache;let d=l.get(r);return d||(d=new H4("",r,this.engine,()=>l.delete(r)),l.set(r,d)),d}const o=t.id,a=t.id+"-"+this._currentId;this._currentId++,this.engine.register(a,n);const s=l=>{Array.isArray(l)?l.forEach(s):this.engine.registerTrigger(o,a,n,l.name,l)};return t.data.animation.forEach(s),new moe(this,a,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(n,t,i){if(n>=0&&nt(i));const r=this._animationCallbacksBuffer;0==r.length&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(o=>{const[a,s]=o;a(s)}),this._animationCallbacksBuffer=[]})}),r.push([t,i])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}const U4=[{provide:mC,useClass:fC},{provide:er,useValue:"NoopAnimations"},...[{provide:pC,useFactory:function boe(){return new E4}},{provide:lm,useClass:(()=>{class e extends lm{constructor(t,i,r){super(t,i,r,Ye(iv,{optional:!0}))}ngOnDestroy(){this.flush()}static#e=this.\u0275fac=function(i){return new(i||e)(F(cn),F(mC),F(pC))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac})}return e})()},{provide:Dw,useFactory:function yoe(e,n,t){return new voe(e,n,t)},deps:[fE,lm,at]}]];let woe=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({providers:U4,imports:[YP]})}return e})();const Eoe=["addListener","removeListener"],Coe=["addEventListener","removeEventListener"],Soe=["on","off"];function R_(e,n,t,i){if(J(t)&&(i=t,t=void 0),i)return R_(e,n,t).pipe(wE(i));const[r,o]=function Toe(e){return J(e.addEventListener)&&J(e.removeEventListener)}(e)?Coe.map(a=>s=>e[a](n,s,t)):function Doe(e){return J(e.addListener)&&J(e.removeListener)}(e)?Eoe.map(G4(e,n)):function koe(e){return J(e.on)&&J(e.off)}(e)?Soe.map(G4(e,n)):[];if(!r&&yE(e))return tC(a=>R_(a,n,t))(oo(e));if(!r)throw new TypeError("Invalid event target");return new kn(a=>{const s=(...c)=>a.next(1o(s)})}function G4(e,n){return t=>i=>e[t](n,i)}const um={schedule(e){let n=requestAnimationFrame,t=cancelAnimationFrame;const{delegate:i}=um;i&&(n=i.requestAnimationFrame,t=i.cancelAnimationFrame);const r=n(o=>{t=void 0,e(o)});return new ot(()=>t?.(r))},requestAnimationFrame(...e){const{delegate:n}=um;return(n?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){const{delegate:n}=um;return(n?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0};new class Moe extends ZE{flush(n){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;n=n||i.shift();do{if(r=n.execute(n.state,n.delay))break}while((n=i[0])&&n.id===t&&i.shift());if(this._active=!1,r){for(;(n=i[0])&&n.id===t&&i.shift();)n.unsubscribe();throw r}}}(class Aoe extends KE{constructor(n,t){super(n,t),this.scheduler=n,this.work=t}requestAsyncId(n,t,i=0){return null!==i&&i>0?super.requestAsyncId(n,t,i):(n.actions.push(this),n._scheduled||(n._scheduled=um.requestAnimationFrame(()=>n.flush(void 0))))}recycleAsyncId(n,t,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(n,t,i);const{actions:o}=n;null!=t&&(null===(r=o[o.length-1])||void 0===r?void 0:r.id)!==t&&(um.cancelAnimationFrame(t),n._scheduled=void 0)}});let RC,Ooe=1;const N_={};function W4(e){return e in N_&&(delete N_[e],!0)}const Roe={setImmediate(e){const n=Ooe++;return N_[n]=!0,RC||(RC=Promise.resolve()),RC.then(()=>W4(n)&&e()),n},clearImmediate(e){W4(e)}},{setImmediate:Noe,clearImmediate:Poe}=Roe,P_={setImmediate(...e){const{delegate:n}=P_;return(n?.setImmediate||Noe)(...e)},clearImmediate(e){const{delegate:n}=P_;return(n?.clearImmediate||Poe)(e)},delegate:void 0};new class Loe extends ZE{flush(n){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:i}=this;let r;n=n||i.shift();do{if(r=n.execute(n.state,n.delay))break}while((n=i[0])&&n.id===t&&i.shift());if(this._active=!1,r){for(;(n=i[0])&&n.id===t&&i.shift();)n.unsubscribe();throw r}}}(class Foe extends KE{constructor(n,t){super(n,t),this.scheduler=n,this.work=t}requestAsyncId(n,t,i=0){return null!==i&&i>0?super.requestAsyncId(n,t,i):(n.actions.push(this),n._scheduled||(n._scheduled=P_.setImmediate(n.flush.bind(n,void 0))))}recycleAsyncId(n,t,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(n,t,i);const{actions:o}=n;null!=t&&(null===(r=o[o.length-1])||void 0===r?void 0:r.id)!==t&&(P_.clearImmediate(t),n._scheduled===t&&(n._scheduled=void 0))}});function NC(e,n=QE){return function Voe(e){return vr((n,t)=>{let i=!1,r=null,o=null,a=!1;const s=()=>{if(o?.unsubscribe(),o=null,i){i=!1;const l=r;r=null,t.next(l)}a&&t.complete()},c=()=>{o=null,a&&t.complete()};n.subscribe(Xi(t,l=>{i=!0,r=l,o||oo(e(l)).subscribe(o=Xi(t,s,c))},()=>{a=!0,(!i||!o||o.closed)&&t.complete()}))})}(()=>function zoe(e=0,n,t=gne){let i=-1;return null!=n&&(pF(n)?t=n:i=n),new kn(r=>{let o=function joe(e){return e instanceof Date&&!isNaN(e)}(e)?+e-t.now():e;o<0&&(o=0);let a=0;return t.schedule(function(){r.closed||(r.next(a++),0<=i?this.schedule(void 0,i):r.complete())},o)})}(e,n))}let $oe=(()=>{class e{constructor(t,i,r){this._ngZone=t,this._platform=i,this._scrolled=new xt,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const i=this.scrollContainers.get(t);i&&(i.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new kn(i=>{this._globalSubscription||this._addGlobalListener();const r=t>0?this._scrolled.pipe(NC(t)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):m_()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(t,i){const r=this.getAncestorScrollContainers(t);return this.scrolled(i).pipe(so(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(t){const i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,t)&&i.push(o)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,i){let r=bs(i),o=t.getElementRef().nativeElement;do{if(r==o)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>R_(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static#e=this.\u0275fac=function(i){return new(i||e)(F(at),F(ni),F(cn,8))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),q4=(()=>{class e{constructor(t,i,r){this._platform=t,this._change=new xt,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(t.isBrowser){const o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,i=this._getWindow(),r=t.documentElement,o=r.getBoundingClientRect();return{top:-o.top||t.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||t.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(NC(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static#e=this.\u0275fac=function(i){return new(i||e)(F(ni),F(at),F(cn,8))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Y4=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({})}return e})(),K4=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[em,Y4,em,Y4]})}return e})();class PC{attach(n){return this._attachedHost=n,n.attach(this)}detach(){let n=this._attachedHost;null!=n&&(this._attachedHost=null,n.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(n){this._attachedHost=n}}class hm extends PC{constructor(n,t,i,r,o){super(),this.component=n,this.viewContainerRef=t,this.injector=i,this.componentFactoryResolver=r,this.projectableNodes=o}}class F_ extends PC{constructor(n,t,i,r){super(),this.templateRef=n,this.viewContainerRef=t,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(n,t=this.context){return this.context=t,super.attach(n)}detach(){return this.context=void 0,super.detach()}}class Goe extends PC{constructor(n){super(),this.element=n instanceof Lt?n.nativeElement:n}}class L_{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(n){return n instanceof hm?(this._attachedPortal=n,this.attachComponentPortal(n)):n instanceof F_?(this._attachedPortal=n,this.attachTemplatePortal(n)):this.attachDomPortal&&n instanceof Goe?(this._attachedPortal=n,this.attachDomPortal(n)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(n){this._disposeFn=n}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Woe extends L_{constructor(n,t,i,r,o){super(),this.outletElement=n,this._componentFactoryResolver=t,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=a=>{const s=a.element,c=this._document.createComment("dom-portal");s.parentNode.insertBefore(c,s),this.outletElement.appendChild(s),this._attachedPortal=a,super.setDisposeFn(()=>{c.parentNode&&c.parentNode.replaceChild(s,c)})},this._document=o}attachComponentPortal(n){const i=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let r;return n.viewContainerRef?(r=n.viewContainerRef.createComponent(i,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector,n.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=i.create(n.injector||this._defaultInjector||li.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=n,r}attachTemplatePortal(n){let t=n.viewContainerRef,i=t.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(i);-1!==r&&t.remove(r)}),this._attachedPortal=n,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}let gu=(()=>{class e extends L_{constructor(t,i,r){super(),this._componentFactoryResolver=t,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new nn,this.attachDomPortal=o=>{const a=o.element,s=this._document.createComment("dom-portal");o.setAttachedHost(this),a.parentNode.insertBefore(s,a),this._getRootNode().appendChild(a),this._attachedPortal=o,super.setDisposeFn(()=>{s.parentNode&&s.parentNode.replaceChild(a,s)})},this._document=r}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(t){t.setAttachedHost(this);const i=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,o=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),a=i.createComponent(o,i.length,t.injector||i.injector,t.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),super.setDisposeFn(()=>a.destroy()),this._attachedPortal=t,this._attachedRef=a,this.attached.emit(a),a}attachTemplatePortal(t){t.setAttachedHost(this);const i=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}static#e=this.\u0275fac=function(i){return new(i||e)(T(Ld),T(Co),T(cn))};static#t=this.\u0275dir=Me({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[Ze.None,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[kt]})}return e})(),vu=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({})}return e})();function fm(...e){const n=Pf(e),t=function Yee(e,n){return"number"==typeof xE(e)?e.pop():n}(e,1/0),i=e;return i.length?1===i.length?oo(i[0]):AL(t)(du(i,n)):Xf}const X4=Yte();class qoe{constructor(n,t){this._viewportRuler=n,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){const n=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=n.style.left||"",this._previousHTMLStyles.top=n.style.top||"",n.style.left=ki(-this._previousScrollPosition.left),n.style.top=ki(-this._previousScrollPosition.top),n.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const n=this._document.documentElement,i=n.style,r=this._document.body.style,o=i.scrollBehavior||"",a=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,n.classList.remove("cdk-global-scrollblock"),X4&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),X4&&(i.scrollBehavior=o,r.scrollBehavior=a)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,i=this._viewportRuler.getViewportSize();return t.scrollHeight>i.height||t.scrollWidth>i.width}}class Yoe{constructor(n,t,i,r){this._scrollDispatcher=n,this._ngZone=t,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(n){this._overlayRef=n}enable(){if(this._scrollSubscription)return;const n=this._scrollDispatcher.scrolled(0).pipe(so(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=n.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=n.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class Z4{enable(){}disable(){}attach(){}}function FC(e,n){return n.some(t=>e.bottomt.bottom||e.rightt.right)}function Q4(e,n){return n.some(t=>e.topt.bottom||e.leftt.right)}class Koe{constructor(n,t,i,r){this._scrollDispatcher=n,this._viewportRuler=t,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(n){this._overlayRef=n}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();FC(t,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let Xoe=(()=>{class e{constructor(t,i,r,o){this._scrollDispatcher=t,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new Z4,this.close=a=>new Yoe(this._scrollDispatcher,this._ngZone,this._viewportRuler,a),this.block=()=>new qoe(this._viewportRuler,this._document),this.reposition=a=>new Koe(this._scrollDispatcher,this._viewportRuler,this._ngZone,a),this._document=o}static#e=this.\u0275fac=function(i){return new(i||e)(F($oe),F(q4),F(at),F(cn))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class LC{constructor(n){if(this.scrollStrategy=new Z4,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,n){const t=Object.keys(n);for(const i of t)void 0!==n[i]&&(this[i]=n[i])}}}class Zoe{constructor(n,t){this.connectionPair=n,this.scrollableViewProperties=t}}let J4=(()=>{class e{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const i=this._attachedOverlays.indexOf(t);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}static#e=this.\u0275fac=function(i){return new(i||e)(F(cn))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Qoe=(()=>{class e extends J4{constructor(t,i){super(t),this._ngZone=i,this._keydownListener=r=>{const o=this._attachedOverlays;for(let a=o.length-1;a>-1;a--)if(o[a]._keydownEvents.observers.length>0){const s=o[a]._keydownEvents;this._ngZone?this._ngZone.run(()=>s.next(r)):s.next(r);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static#e=this.\u0275fac=function(i){return new(i||e)(F(cn),F(at,8))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Joe=(()=>{class e extends J4{constructor(t,i,r){super(t),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=o=>{this._pointerDownEventTarget=hc(o)},this._clickListener=o=>{const a=hc(o),s="click"===o.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:a;this._pointerDownEventTarget=null;const c=this._attachedOverlays.slice();for(let l=c.length-1;l>-1;l--){const d=c[l];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(a)||d.overlayElement.contains(s))break;const u=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(o)):u.next(o)}}}add(t){if(super.add(t),!this._isAttached){const i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}static#e=this.\u0275fac=function(i){return new(i||e)(F(cn),F(ni),F(at,8))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),B_=(()=>{class e{constructor(t,i){this._platform=i,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||YE()){const r=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let o=0;othis._backdropClick.next(u),this._backdropTransitionendHandler=u=>{this._disposeBackdrop(u.target)},this._keydownEvents=new xt,this._outsidePointerEvents=new xt,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(n){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const t=this._portalOutlet.attach(n);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(vl(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof t?.onDestroy&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const n=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),n}dispose(){const n=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,n&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(n){n!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=n,this.hasAttached()&&(n.attach(this),this.updatePosition()))}updateSize(n){this._config={...this._config,...n},this._updateElementSize()}setDirection(n){this._config={...this._config,direction:n},this._updateElementDirection()}addPanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!0)}removePanelClass(n){this._pane&&this._toggleClasses(this._pane,n,!1)}getDirection(){const n=this._config.direction;return n?"string"==typeof n?n:n.value:"ltr"}updateScrollStrategy(n){n!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=n,this.hasAttached()&&(n.attach(this),n.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const n=this._pane.style;n.width=ki(this._config.width),n.height=ki(this._config.height),n.minWidth=ki(this._config.minWidth),n.minHeight=ki(this._config.minHeight),n.maxWidth=ki(this._config.maxWidth),n.maxHeight=ki(this._config.maxHeight)}_togglePointerEvents(n){this._pane.style.pointerEvents=n?"":"none"}_attachBackdrop(){const n="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(n)})}):this._backdropElement.classList.add(n)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const n=this._backdropElement;if(n){if(this._animationsDisabled)return void this._disposeBackdrop(n);n.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{n.addEventListener("transitionend",this._backdropTransitionendHandler)}),n.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(n)},500))}}_toggleClasses(n,t,i){const r=g_(t||[]).filter(o=>!!o);r.length&&(i?n.classList.add(...r):n.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const n=this._ngZone.onStable.pipe(aa(fm(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),n.unsubscribe())})})}_disposeScrollStrategy(){const n=this._scrollStrategy;n&&(n.disable(),n.detach&&n.detach())}_disposeBackdrop(n){n&&(n.removeEventListener("click",this._backdropClickHandler),n.removeEventListener("transitionend",this._backdropTransitionendHandler),n.remove(),this._backdropElement===n&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const e3="cdk-overlay-connected-position-bounding-box",eae=/([A-Za-z%]+)$/;class tae{get positions(){return this._preferredPositions}constructor(n,t,i,r,o){this._viewportRuler=t,this._document=i,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new xt,this._resizeSubscription=ot.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(n)}attach(n){this._validatePositions(),n.hostElement.classList.add(e3),this._overlayRef=n,this._boundingBox=n.hostElement,this._pane=n.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const n=this._originRect,t=this._overlayRect,i=this._viewportRect,r=this._containerRect,o=[];let a;for(let s of this._preferredPositions){let c=this._getOriginPoint(n,r,s),l=this._getOverlayPoint(c,t,s),d=this._getOverlayFit(l,t,i,s);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(s,c);this._canFitWithFlexibleDimensions(d,l,i)?o.push({position:s,origin:c,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(c,s)}):(!a||a.overlayFit.visibleAreac&&(c=d,s=l)}return this._isPushed=!1,void this._applyPosition(s.position,s.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(a.position,a.originPoint);this._applyPosition(a.position,a.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Sl(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(e3),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const n=this._lastPosition;if(n){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._getOriginPoint(this._originRect,this._containerRect,n);this._applyPosition(n,t)}else this.apply()}withScrollableContainers(n){return this._scrollables=n,this}withPositions(n){return this._preferredPositions=n,-1===n.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(n){return this._viewportMargin=n,this}withFlexibleDimensions(n=!0){return this._hasFlexibleDimensions=n,this}withGrowAfterOpen(n=!0){return this._growAfterOpen=n,this}withPush(n=!0){return this._canPush=n,this}withLockedPosition(n=!0){return this._positionLocked=n,this}setOrigin(n){return this._origin=n,this}withDefaultOffsetX(n){return this._offsetX=n,this}withDefaultOffsetY(n){return this._offsetY=n,this}withTransformOriginOn(n){return this._transformOriginSelector=n,this}_getOriginPoint(n,t,i){let r,o;if("center"==i.originX)r=n.left+n.width/2;else{const a=this._isRtl()?n.right:n.left,s=this._isRtl()?n.left:n.right;r="start"==i.originX?a:s}return t.left<0&&(r-=t.left),o="center"==i.originY?n.top+n.height/2:"top"==i.originY?n.top:n.bottom,t.top<0&&(o-=t.top),{x:r,y:o}}_getOverlayPoint(n,t,i){let r,o;return r="center"==i.overlayX?-t.width/2:"start"===i.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,o="center"==i.overlayY?-t.height/2:"top"==i.overlayY?0:-t.height,{x:n.x+r,y:n.y+o}}_getOverlayFit(n,t,i,r){const o=n3(t);let{x:a,y:s}=n,c=this._getOffset(r,"x"),l=this._getOffset(r,"y");c&&(a+=c),l&&(s+=l);let h=0-s,f=s+o.height-i.height,m=this._subtractOverflows(o.width,0-a,a+o.width-i.width),g=this._subtractOverflows(o.height,h,f),v=m*g;return{visibleArea:v,isCompletelyWithinViewport:o.width*o.height===v,fitsInViewportVertically:g===o.height,fitsInViewportHorizontally:m==o.width}}_canFitWithFlexibleDimensions(n,t,i){if(this._hasFlexibleDimensions){const r=i.bottom-t.y,o=i.right-t.x,a=t3(this._overlayRef.getConfig().minHeight),s=t3(this._overlayRef.getConfig().minWidth);return(n.fitsInViewportVertically||null!=a&&a<=r)&&(n.fitsInViewportHorizontally||null!=s&&s<=o)}return!1}_pushOverlayOnScreen(n,t,i){if(this._previousPushAmount&&this._positionLocked)return{x:n.x+this._previousPushAmount.x,y:n.y+this._previousPushAmount.y};const r=n3(t),o=this._viewportRect,a=Math.max(n.x+r.width-o.width,0),s=Math.max(n.y+r.height-o.height,0),c=Math.max(o.top-i.top-n.y,0),l=Math.max(o.left-i.left-n.x,0);let d=0,u=0;return d=r.width<=o.width?l||-a:n.xm&&!this._isInitialRender&&!this._growAfterOpen&&(a=n.y-m/2)}if("end"===t.overlayX&&!r||"start"===t.overlayX&&r)h=i.width-n.x+2*this._viewportMargin,d=n.x-this._viewportMargin;else if("start"===t.overlayX&&!r||"end"===t.overlayX&&r)u=n.x,d=i.right-n.x;else{const f=Math.min(i.right-n.x+i.left,n.x),m=this._lastBoundingBoxSize.width;d=2*f,u=n.x-f,d>m&&!this._isInitialRender&&!this._growAfterOpen&&(u=n.x-m/2)}return{top:a,left:u,bottom:s,right:h,width:d,height:o}}_setBoundingBoxStyles(n,t){const i=this._calculateBoundingBoxRect(n,t);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const o=this._overlayRef.getConfig().maxHeight,a=this._overlayRef.getConfig().maxWidth;r.height=ki(i.height),r.top=ki(i.top),r.bottom=ki(i.bottom),r.width=ki(i.width),r.left=ki(i.left),r.right=ki(i.right),r.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",r.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",o&&(r.maxHeight=ki(o)),a&&(r.maxWidth=ki(a))}this._lastBoundingBoxSize=i,Sl(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Sl(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Sl(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(n,t){const i={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,a=this._overlayRef.getConfig();if(r){const d=this._viewportRuler.getViewportScrollPosition();Sl(i,this._getExactOverlayY(t,n,d)),Sl(i,this._getExactOverlayX(t,n,d))}else i.position="static";let s="",c=this._getOffset(t,"x"),l=this._getOffset(t,"y");c&&(s+=`translateX(${c}px) `),l&&(s+=`translateY(${l}px)`),i.transform=s.trim(),a.maxHeight&&(r?i.maxHeight=ki(a.maxHeight):o&&(i.maxHeight="")),a.maxWidth&&(r?i.maxWidth=ki(a.maxWidth):o&&(i.maxWidth="")),Sl(this._pane.style,i)}_getExactOverlayY(n,t,i){let r={top:"",bottom:""},o=this._getOverlayPoint(t,this._overlayRect,n);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),"bottom"===n.overlayY?r.bottom=this._document.documentElement.clientHeight-(o.y+this._overlayRect.height)+"px":r.top=ki(o.y),r}_getExactOverlayX(n,t,i){let a,r={left:"",right:""},o=this._getOverlayPoint(t,this._overlayRect,n);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),a=this._isRtl()?"end"===n.overlayX?"left":"right":"end"===n.overlayX?"right":"left","right"===a?r.right=this._document.documentElement.clientWidth-(o.x+this._overlayRect.width)+"px":r.left=ki(o.x),r}_getScrollVisibility(){const n=this._getOriginRect(),t=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Q4(n,i),isOriginOutsideView:FC(n,i),isOverlayClipped:Q4(t,i),isOverlayOutsideView:FC(t,i)}}_subtractOverflows(n,...t){return t.reduce((i,r)=>i-Math.max(r,0),n)}_getNarrowedViewportRect(){const n=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+n-this._viewportMargin,bottom:i.top+t-this._viewportMargin,width:n-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(n,t){return"x"===t?null==n.offsetX?this._offsetX:n.offsetX:null==n.offsetY?this._offsetY:n.offsetY}_validatePositions(){}_addPanelClasses(n){this._pane&&g_(n).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(n=>{this._pane.classList.remove(n)}),this._appliedPanelClasses=[])}_getOriginRect(){const n=this._origin;if(n instanceof Lt)return n.nativeElement.getBoundingClientRect();if(n instanceof Element)return n.getBoundingClientRect();const t=n.width||0,i=n.height||0;return{top:n.y,bottom:n.y+i,left:n.x,right:n.x+t,height:i,width:t}}}function Sl(e,n){for(let t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function t3(e){if("number"!=typeof e&&null!=e){const[n,t]=e.split(eae);return t&&"px"!==t?null:parseFloat(n)}return e||null}function n3(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}const i3="cdk-global-overlay-wrapper";class iae{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(n){const t=n.getConfig();this._overlayRef=n,this._width&&!t.width&&n.updateSize({width:this._width}),this._height&&!t.height&&n.updateSize({height:this._height}),n.hostElement.classList.add(i3),this._isDisposed=!1}top(n=""){return this._bottomOffset="",this._topOffset=n,this._alignItems="flex-start",this}left(n=""){return this._xOffset=n,this._xPosition="left",this}bottom(n=""){return this._topOffset="",this._bottomOffset=n,this._alignItems="flex-end",this}right(n=""){return this._xOffset=n,this._xPosition="right",this}start(n=""){return this._xOffset=n,this._xPosition="start",this}end(n=""){return this._xOffset=n,this._xPosition="end",this}width(n=""){return this._overlayRef?this._overlayRef.updateSize({width:n}):this._width=n,this}height(n=""){return this._overlayRef?this._overlayRef.updateSize({height:n}):this._height=n,this}centerHorizontally(n=""){return this.left(n),this._xPosition="center",this}centerVertically(n=""){return this.top(n),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const n=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:a,maxHeight:s}=i,c=!("100%"!==r&&"100vw"!==r||a&&"100%"!==a&&"100vw"!==a),l=!("100%"!==o&&"100vh"!==o||s&&"100%"!==s&&"100vh"!==s),d=this._xPosition,u=this._xOffset,h="rtl"===this._overlayRef.getConfig().direction;let f="",m="",g="";c?g="flex-start":"center"===d?(g="center",h?m=u:f=u):h?"left"===d||"end"===d?(g="flex-end",f=u):("right"===d||"start"===d)&&(g="flex-start",m=u):"left"===d||"start"===d?(g="flex-start",f=u):("right"===d||"end"===d)&&(g="flex-end",m=u),n.position=this._cssPosition,n.marginLeft=c?"0":f,n.marginTop=l?"0":this._topOffset,n.marginBottom=this._bottomOffset,n.marginRight=c?"0":m,t.justifyContent=g,t.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const n=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,i=t.style;t.classList.remove(i3),i.justifyContent=i.alignItems=n.marginTop=n.marginBottom=n.marginLeft=n.marginRight=n.position="",this._overlayRef=null,this._isDisposed=!0}}let rae=(()=>{class e{constructor(t,i,r,o){this._viewportRuler=t,this._document=i,this._platform=r,this._overlayContainer=o}global(){return new iae}flexibleConnectedTo(t){return new tae(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static#e=this.\u0275fac=function(i){return new(i||e)(F(q4),F(cn),F(ni),F(B_))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),oae=0,$a=(()=>{class e{constructor(t,i,r,o,a,s,c,l,d,u,h,f){this.scrollStrategies=t,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=o,this._keyboardDispatcher=a,this._injector=s,this._ngZone=c,this._document=l,this._directionality=d,this._location=u,this._outsideClickDispatcher=h,this._animationsModuleType=f}create(t){const i=this._createHostElement(),r=this._createPaneElement(i),o=this._createPortalOutlet(r),a=new LC(t);return a.direction=a.direction||this._directionality.value,new V_(o,i,r,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(t){const i=this._document.createElement("div");return i.id="cdk-overlay-"+oae++,i.classList.add("cdk-overlay-pane"),t.appendChild(i),i}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(oc)),new Woe(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static#e=this.\u0275fac=function(i){return new(i||e)(F(Xoe),F(B_),F(Ld),F(rae),F(Qoe),F(li),F(at),F(cn),F(Jf),F(G1),F(Joe),F(er,8))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const cae={provide:new ye("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{const e=Ye($a);return()=>e.scrollStrategies.reposition()}}),deps:[$a],useFactory:function sae(e){return()=>e.scrollStrategies.reposition()}};let BC=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({providers:[$a,cae],imports:[em,vu,K4,K4]})}return e})();function r3(e){return new kn(n=>{oo(e()).subscribe(n)})}function lae(e,n){}class j_{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}}let o3=(()=>{class e extends L_{constructor(t,i,r,o,a,s,c,l){super(),this._elementRef=t,this._focusTrapFactory=i,this._config=o,this._interactivityChecker=a,this._ngZone=s,this._overlayRef=c,this._focusMonitor=l,this._platform=Ye(ni),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=Ye(io),this.attachDomPortal=d=>{this._portalOutlet.hasAttached();const u=this._portalOutlet.attachDomPortal(d);return this._contentAttached(),u},this._document=r,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){const i=this._ariaLabelledByQueue.indexOf(t);i>-1&&(this._ariaLabelledByQueue.splice(i,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),i}attachTemplatePortal(t){this._portalOutlet.hasAttached();const i=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,i){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{t.removeEventListener("blur",r),t.removeEventListener("mousedown",r),t.removeAttribute("tabindex")};t.addEventListener("blur",r),t.addEventListener("mousedown",r)})),t.focus(i)}_focusByCssSelector(t,i){let r=this._elementRef.nativeElement.querySelector(t);r&&this._forceFocus(r,i)}_trapFocus(){const t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElementWhenReady().then(i=>{i||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const t=this._config.restoreFocus;let i=null;if("string"==typeof t?i=this._document.querySelector(t):"boolean"==typeof t?i=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(i=t),this._config.restoreFocus&&i&&"function"==typeof i.focus){const r=f_(),o=this._elementRef.nativeElement;(!r||r===this._document.body||r===o||o.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,i=f_();return t===i||t.contains(i)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=f_()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(VL),T(cn,8),T(j_),T(iC),T(at),T(V_),T(Qf))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(i,r){if(1&i&&ji(gu,7),2&i){let o;Wt(o=qt())&&(r._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(i,r){2&i&&fn("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},standalone:!0,features:[kt,Kn],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,r){1&i&&ut(0,lae,0,0,"ng-template",0)},dependencies:[gu],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}return e})();class VC{constructor(n,t){this.overlayRef=n,this.config=t,this.closed=new xt,this.disableClose=t.disableClose,this.backdropClick=n.backdropClick(),this.keydownEvents=n.keydownEvents(),this.outsidePointerEvents=n.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(i=>{27===i.keyCode&&!this.disableClose&&!Yf(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=n.detachments().subscribe(()=>{!1!==t.closeOnOverlayDetachments&&this.close()})}close(n,t){if(this.containerInstance){const i=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(n),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(n="",t=""){return this.overlayRef.updateSize({width:n,height:t}),this}addPanelClass(n){return this.overlayRef.addPanelClass(n),this}removePanelClass(n){return this.overlayRef.removePanelClass(n),this}}const a3=new ye("DialogScrollStrategy",{providedIn:"root",factory:()=>{const e=Ye($a);return()=>e.scrollStrategies.block()}}),dae=new ye("DialogData"),uae=new ye("DefaultDialogConfig");let fae=0,s3=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,i,r,o,a,s){this._overlay=t,this._injector=i,this._defaultOptions=r,this._parentDialog=o,this._overlayContainer=a,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new xt,this._afterOpenedAtThisLevel=new xt,this._ariaHiddenElements=new Map,this.afterAllClosed=r3(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Zf(void 0))),this._scrollStrategy=s}open(t,i){(i={...this._defaultOptions||new j_,...i}).id=i.id||"cdk-dialog-"+fae++,i.id&&this.getDialogById(i.id);const o=this._getOverlayConfig(i),a=this._overlay.create(o),s=new VC(a,i),c=this._attachContainer(a,s,i);return s.containerInstance=c,this._attachDialogContent(t,s,c,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(s),s.closed.subscribe(()=>this._removeOpenDialog(s,!0)),this.afterOpened.next(s),s}closeAll(){jC(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(i=>i.id===t)}ngOnDestroy(){jC(this._openDialogsAtThisLevel,t=>{!1===t.config.closeOnDestroy&&this._removeOpenDialog(t,!1)}),jC(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){const i=new LC({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(i.backdropClass=t.backdropClass),i}_attachContainer(t,i,r){const o=r.injector||r.viewContainerRef?.injector,a=[{provide:j_,useValue:r},{provide:VC,useValue:i},{provide:V_,useValue:t}];let s;r.container?"function"==typeof r.container?s=r.container:(s=r.container.type,a.push(...r.container.providers(r))):s=o3;const c=new hm(s,r.viewContainerRef,li.create({parent:o||this._injector,providers:a}),r.componentFactoryResolver);return t.attach(c).instance}_attachDialogContent(t,i,r,o){if(t instanceof Eo){const a=this._createInjector(o,i,r,void 0);let s={$implicit:o.data,dialogRef:i};o.templateContext&&(s={...s,..."function"==typeof o.templateContext?o.templateContext():o.templateContext}),r.attachTemplatePortal(new F_(t,null,s,a))}else{const a=this._createInjector(o,i,r,this._injector),s=r.attachComponentPortal(new hm(t,o.viewContainerRef,a,o.componentFactoryResolver));i.componentRef=s,i.componentInstance=s.instance}}_createInjector(t,i,r,o){const a=t.injector||t.viewContainerRef?.injector,s=[{provide:dae,useValue:t.data},{provide:VC,useValue:i}];return t.providers&&("function"==typeof t.providers?s.push(...t.providers(i,t,r)):s.push(...t.providers)),t.direction&&(!a||!a.get(Jf,null,{optional:!0}))&&s.push({provide:Jf,useValue:{value:t.direction,change:m_()}}),li.create({parent:a||o,providers:s})}_removeOpenDialog(t,i){const r=this.openDialogs.indexOf(t);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,a)=>{o?a.setAttribute("aria-hidden",o):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const i=t.parentElement.children;for(let r=i.length-1;r>-1;r--){const o=i[r];o!==t&&"SCRIPT"!==o.nodeName&&"STYLE"!==o.nodeName&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}static#e=this.\u0275fac=function(i){return new(i||e)(F($a),F(li),F(uae,8),F(e,12),F(B_),F(a3))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function jC(e,n){let t=e.length;for(;t--;)n(e[t])}let mae=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({providers:[s3],imports:[BC,vu,Zne,vu]})}return e})();function pae(e,n){}class ca{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}}const zC="mdc-dialog--open",c3="mdc-dialog--opening",l3="mdc-dialog--closing";let d3=(()=>{class e extends o3{constructor(t,i,r,o,a,s,c,l,d){super(t,i,r,o,a,s,c,d),this._animationMode=l,this._animationStateChanged=new nn,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?h3(this._config.enterAnimationDuration)??150:0,this._exitAnimationDuration=this._animationsEnabled?h3(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(u3,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(c3,zC)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(zC),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(zC),this._animationsEnabled?(this._hostElement.style.setProperty(u3,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(l3)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(t){this._actionSectionCount+=t,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(c3,l3)}_waitForAnimationToComplete(t,i){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}attachComponentPortal(t){const i=super.attachComponentPortal(t);return i.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),i}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(VL),T(cn,8),T(ca),T(iC),T(at),T(V_),T(er,8),T(Qf))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(i,r){2&i&&(sl("id",r._config.id),fn("aria-modal",r._config.ariaModal)("role",r._config.role)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null),wt("_mat-animation-noopable",!r._animationsEnabled)("mat-mdc-dialog-container-with-actions",r._actionSectionCount>0))},standalone:!0,features:[kt,Kn],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(i,r){1&i&&(B(0,"div",0)(1,"div",1),ut(2,pae,0,0,"ng-template",2),W()())},dependencies:[gu],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto;outline:0;transform:scale(0.8)}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--closing .mdc-dialog__surface{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{opacity:1}.mdc-dialog--open .mdc-dialog__surface{transform:none}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__container .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{width:100%;height:100%}.mat-mdc-dialog-component-host{display:contents}.mat-mdc-dialog-container{--mdc-dialog-container-elevation: var(--mdc-dialog-container-elevation-shadow);outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, 4px)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87))}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6))}.mat-mdc-dialog-container .mdc-dialog__container{transition:opacity linear var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container .mdc-dialog__surface{transition:transform var(--mat-dialog-transition-duration, 0ms) 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container,.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__surface{transition:none}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-title{padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2})}return e})();const u3="--mat-dialog-transition-duration";function h3(e){return null==e?null:"number"==typeof e?e:e.endsWith("ms")?_s(e.substring(0,e.length-2)):e.endsWith("s")?1e3*_s(e.substring(0,e.length-1)):"0"===e?0:null}var z_=function(e){return e[e.OPEN=0]="OPEN",e[e.CLOSING=1]="CLOSING",e[e.CLOSED=2]="CLOSED",e}(z_||{});class mc{constructor(n,t,i){this._ref=n,this._containerInstance=i,this._afterOpened=new xt,this._beforeClosed=new xt,this._state=z_.OPEN,this.disableClose=t.disableClose,this.id=n.id,n.addPanelClass("mat-mdc-dialog-panel"),i._animationStateChanged.pipe(so(r=>"opened"===r.state),vl(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(so(r=>"closed"===r.state),vl(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),n.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),fm(this.backdropClick(),this.keydownEvents().pipe(so(r=>27===r.keyCode&&!this.disableClose&&!Yf(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),function f3(e,n,t){return e._closeInteractionType=n,e.close(t)}(this,"keydown"===r.type?"keyboard":"mouse"))})}close(n){this._result=n,this._containerInstance._animationStateChanged.pipe(so(t=>"closing"===t.state),vl(1)).subscribe(t=>{this._beforeClosed.next(n),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=z_.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(n){let t=this._ref.config.positionStrategy;return n&&(n.left||n.right)?n.left?t.left(n.left):t.right(n.right):t.centerHorizontally(),n&&(n.top||n.bottom)?n.top?t.top(n.top):t.bottom(n.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(n="",t=""){return this._ref.updateSize(n,t),this}addPanelClass(n){return this._ref.addPanelClass(n),this}removePanelClass(n){return this._ref.removePanelClass(n),this}getState(){return this._state}_finishDialogClose(){this._state=z_.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}const H_=new ye("MatMdcDialogData"),_ae=new ye("mat-mdc-dialog-default-options"),m3=new ye("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{const e=Ye($a);return()=>e.scrollStrategies.block()}});let yae=0,$_=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,i,r,o,a,s,c,l){this._overlay=t,this._defaultOptions=o,this._scrollStrategy=a,this._parentDialog=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new xt,this._afterOpenedAtThisLevel=new xt,this.dialogConfigClass=ca,this.afterAllClosed=r3(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Zf(void 0))),this._dialog=i.get(s3),this._dialogRefConstructor=mc,this._dialogContainerType=d3,this._dialogDataToken=H_}open(t,i){let r;(i={...this._defaultOptions||new ca,...i}).id=i.id||"mat-mdc-dialog-"+yae++,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();const o=this._dialog.open(t,{...i,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:j_,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(a,s,c)=>(r=new this._dialogRefConstructor(a,i,c),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:c},{provide:this._dialogDataToken,useValue:s.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentRef=o.componentRef,r.componentInstance=o.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const a=this.openDialogs.indexOf(r);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(i=>i.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let i=t.length;for(;i--;)t[i].close()}static#e=this.\u0275fac=function(i){return new(i||e)(F($a),F(li),F(G1,8),F(_ae,8),F(m3),F(e,12),F(B_),F(er,8))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),p3=(()=>{class e{constructor(t,i,r){this._dialogRef=t,this._elementRef=i,this._dialog=r}ngOnInit(){this._dialogRef||(this._dialogRef=function g3(e,n){let t=e.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?n.find(i=>i.id===t.id):null}(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static#e=this.\u0275fac=function(i){return new(i||e)(T(mc,8),T(Lt),T($_))};static#t=this.\u0275dir=Me({type:e,standalone:!0})}return e})(),Dl=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0})}return e})(),_u=(()=>{class e extends p3{_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static#e=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=ti(e)))(r||e)}})();static#t=this.\u0275dir=Me({type:e,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(i,r){2&i&&wt("mat-mdc-dialog-actions-align-start","start"===r.align)("mat-mdc-dialog-actions-align-center","center"===r.align)("mat-mdc-dialog-actions-align-end","end"===r.align)},inputs:{align:"align"},standalone:!0,features:[kt]})}return e})();let v3=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({providers:[$_],imports:[mae,BC,vu,An,An]})}return e})();class U_{constructor(n,t,i,r=!1,o){this.title=n,this.infoText=t,this.isInfo=i,this.isLink=r,this.linkText=o}}function Cae(e,n){if(1&e&&(B(0,"span",5),Oe(1),W()),2&e){const t=st();be(),fs("",t.infoText," ")}}function Sae(e,n){if(1&e&&(B(0,"a",6),Oe(1),W()),2&e){const t=st();ll("href",t.linkText,jg),be(),ko(t.linkText)}}function Dae(e,n){if(1&e){const t=vi();B(0,"mat-dialog-actions")(1,"button",7),Pe("click",function(){return jt(t),zt(st().close())}),Oe(2,"Close"),W()()}}let G_=(()=>{class e{constructor(t,i){this.dialogRef=t,this.title=i.title,this.infoText=i.infoText,this.showConfirmButton=!i.isInfo,this.hasLink=i.isLink,this.linkText=i.linkText||""}ngAfterViewInit(){const t=document.getElementsByClassName("readOnlyText")[0];t.style.height=t.scrollHeight+"px"}close(){this.dialogRef.close()}static#e=this.\u0275fac=function(i){return new(i||e)(T(mc),T(H_))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-info-dialog"]],decls:6,vars:4,consts:[[1,"content"],["id","info-dialog-title"],["class","readOnlyText",4,"ngIf"],[3,"href",4,"ngIf"],[4,"ngIf"],[1,"readOnlyText"],[3,"href"],[1,"mat-raised-button",3,"click"]],template:function(i,r){1&i&&(B(0,"mat-dialog-content",0)(1,"h2",1),Oe(2),W(),ut(3,Cae,2,1,"span",2)(4,Sae,2,2,"a",3),W(),ut(5,Dae,3,0,"mat-dialog-actions",4)),2&i&&(be(2),ko(r.title),be(),$e("ngIf",""!=r.infoText),be(),$e("ngIf",r.hasLink),be(),$e("ngIf",r.showConfirmButton))},dependencies:[cc,_u,Dl],styles:[".readOnlyText[_ngcontent-%COMP%]{display:block;border:none;resize:none;width:100%;overflow:hidden;white-space:pre-wrap}.content[_ngcontent-%COMP%]{height:-moz-fit-content;height:fit-content;width:30vw;overflow:hidden}"]})}return e})();let HC=(()=>{class e{constructor(){this.showSettings=new on(!1),this.showSettings$=this.showSettings.asObservable()}close(){this.showSettings.next(!1)}open(){this.showSettings.next(!0)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),mm=(()=>{class e{constructor(t){this.matDialog=t}openDialog(t,i){this.matDialog.open(t,i)}static#e=this.\u0275fac=function(i){return new(i||e)(F($_))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const kl="< title >",bu="default",b3="domainConfigurationTag",ho=2e3,$C="snackbar_success",y3="snackbar_error",pc="snackbar_info";let UC=(()=>{class e{constructor(){}setCommandStack(t){this.commandStack=t}execute(t,i){this.commandStack.execute(t,i)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),fo=(()=>{class e{constructor(t){this.commandStackService=t,this.titleSubject=new on(kl),this.descriptionSubject=new on(""),this.iconSetNameSubject=new on(bu),this.showDescriptionSubject=new on(!0),this.title$=this.titleSubject.asObservable(),this.description$=this.descriptionSubject.asObservable(),this.showDescription$=this.showDescriptionSubject.asObservable(),this.iconSetName$=this.iconSetNameSubject.asObservable()}updateTitleAndDescription(t,i,r){r?this.fireTitleAndDescriptionUpdate(t,i):(this.updateTitle(t),this.updateDescription(i))}reset(){this.updateTitleAndDescription(kl,"",!1)}updateTitle(t){const i=t&&0!==t.trim().length?t:kl;this.titleSubject.next(i),document.title=i===kl?"egon.io":i}updateDescription(t){this.descriptionSubject.next(t??this.descriptionSubject.value)}setShowDescription(t){this.showDescriptionSubject.next(t)}setIconSetName(t){this.iconSetNameSubject.next(t)}getTitle(){return this.titleSubject.value}getDescription(){return this.descriptionSubject.value}getIconSetName(){return this.iconSetNameSubject.value}getVersion(){return"2.0.0-beta6"}hasTitleOrDescription(){return this.getTitle().trim().length>0&&this.getTitle()!==kl||this.getDescription().trim().length>0&&""!==this.getDescription()}fireTitleAndDescriptionUpdate(t,i){this.commandStackService.execute("story.updateHeadlineAndDescription",{newTitle:t,newDescription:i})}static#e=this.\u0275fac=function(i){return new(i||e)(F(UC))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function gm(e){const n={"/":"","\\":"",":":"","*":"","?":"",'"':"","<":"",">":"","|":""};return e?e.replace(/[/\\:*?"<>|]/gi,i=>n[i]):""}function yu(e){const n={"/":"","\\":"",":":"","*":"","?":"",'"':"","<":"",">":"","|":"","(":"",")":""," ":"-",".":"_"};return e?e.replace(/[/\\:*?"<>|() .]/gi,i=>n[i]):""}function x3(e,n){let t;const a=".dst",s=".svg";let c=e.replace(n?/_\d+-\d+-\d+( ?_?-?\(\d+\))?(-?\d)?(.dst|.egn).svg/:/_\d+-\d+-\d+( ?_?-?\(\d+\))?(-?\d)?(.dst|.egn)/,"");return c.includes(n?s:a)&&(c=c.replace(s,"").replace(a,"").replace(".egn","")),t=c,t}class Iae{constructor(n,t){this.domain=n,this.dst=t}}JSON.parse('{"name":"","actors":{"Person":"","Group":"","System":""},"workObjects":{"Document":"","Folder":"","Call":"","Email":"","Conversation":"","Info":""}}');class ln{constructor(){this.entries=[]}get length(){return this.entries.length}all(){return this.entries}size(){return this.entries.length}isEmpty(){return this.entries.length<=0}has(n){return this.entries.some(t=>t.key===n)}set(n,t){this.has(n)||this.entries.push(new w3(t,n))}add(n,t){this.set(t,n)}putEntry(n){this.has(n.key)||this.entries.push(new w3(n.value,n.key))}keysArray(){return this.entries.map(n=>n.key)}addEach(n){Object.keys(n).forEach(t=>{this.set(t,n[t])})}appendDict(n){n.entries.forEach(t=>this.putEntry(t))}clear(){this.entries=[]}delete(n){this.entries=this.entries.filter(t=>t.key!==n)}get(n){const t=this.entries.filter(i=>i.key===n);return t[0]?t[0].value:null}sort(n){this.entries.sort(n)}sortByName(){this.entries.sort((n,t)=>n.key.includes("_custom")==t.key.includes("_custom")?n.key',Group:'',Pet:'',Conversation:'',World:'',Store:'',Theater:'',Business:'',Water:'',Hotel:'',Dining:'',"Gas-station":'',"Meeting-room":'',Courthouse:'',Flag:'',Place:'',Car:'',Bus:'',Train:'',Truck:'',Taxi:'',Bike:'',Boat:'',Motorcycle:'',Plane:'',"Flight-takeoff":'',"Flight-landing":'',Shuttle:'',Walking:'',Traffic:'',Commute:'',System:'',Printer:'',Document:'',Folder:'',Call:'',Email:'',Copyright:'',DNS:'',Settings:'',Cellphone:'',Update:'',Briefcase:'',Microphone:'',Signal:'',Key:'',Pencil:'',Sum:'',Headset:'',Keyboard:'',Mouse:'',Router:'',Scanner:'',Security:'',Desktop:'',"Speaker-phone":'',Tablet:'',Label:'',Receipt:'',Calendar:'',Cloud:'',Assessment:'',Dashboard:'',"Pie-chart":'',Problem:'',"Picture-as-PDF":'',Grid:'',Watch:'',Euro:'',Dollar:'',Info:'',Alarm:'',Wrench:'',"Circle-Arrows":'',"Credit-Card":'',Favorite:'',Gavel:'',Blind:'',Hourglass:'',Time:'',Search:'',Shopping:'',"Thumb-up":'',"Thumb-down":'',"Thumb-up-down":'',Couch:'',Attach:'',Ruler:'',Education:'',"How-To-Reg":'',"View-List":''};function E3(e){Tl=e}class Rae{constructor(n,t){this.actors=n,this.workObjects=t}}class Nae{constructor(n){this.domainName=bu,this.allIconDictionary=n}getDefaultConf(){return vm}updateAllIconRegistry(n){this.allIconDictionary=n}appendSRCFile(n,t,i,r){const o={};n.forEach(s=>{this.allIconDictionary.has(s)||(o[s]=t.get(s))}),i.forEach(s=>{this.allIconDictionary.has(s)||(o[s]=r.get(s))});const a=new ln;Object.keys(o).forEach(s=>{a.set(s,o[s])}),E3(a)}createCustomConf(n){this.domainName=n.name;let t=n.actors,i=n.workObjects;return this.appendSRCFile(t.keysArray(),t,i.keysArray(),i),new Rae(t.keysArray(),i.keysArray())}}const vm={actors:["Person","Group","System"],workObjects:["Document","Folder","Call","Email","Conversation","Info"]};function Al(e){return e.includes($.ACTOR)?e.replace($.ACTOR,""):e.includes($.WORKOBJECT)?e.replace($.WORKOBJECT,""):""}const Y_="icon-domain-story-";let Es=(()=>{class e{constructor(){this.actorIconDictionary=new ln,this.workObjectDictionary=new ln,this.allIconDictionary=new ln,this.iconDictionaryForBPMN=new ln,this.allIconDictionary.addEach(q_),this.iconConfig=new Nae(this.allIconDictionary)}initTypeDictionaries(t,i){(!t||0==t.length)&&(t=vm.actors),(!i||0==i.length)&&(i=vm.workObjects);const r=new ln;r.addEach(q_),r.appendDict(this.getAppendedIconDictionary()),this.initDictionary(t,r,this.actorIconDictionary,$.ACTOR),this.initDictionary(i,r,this.workObjectDictionary,$.WORKOBJECT)}initDictionary(t,i,r,o){r.clear();for(const a of t)r.add(i.get(a),a);r.keysArray().forEach(a=>{this.registerIconForBPMN(a,Y_+yu(a.toLowerCase()),o)})}getCurrentIconConfigurationForBPMN(){return this.customConfiguration?this.iconConfig.createCustomConf(this.customConfiguration):this.iconConfig.getDefaultConf()}allInTypeDictionary(t,i){let r;t===$.ACTOR?r=this.actorIconDictionary:t===$.WORKOBJECT&&(r=this.workObjectDictionary);let o=!0;return!!i&&(i.forEach(a=>{r.has(Al(a.type))||(o=!1)}),o)}addIconsFromIconSetConfiguration(t,i){let r;t===$.ACTOR?r=this.actorIconDictionary:t===$.WORKOBJECT&&(r=this.workObjectDictionary);const o=new ln;o.addEach(q_),o.appendDict(Tl),i.forEach(a=>{if(!r.has(a)){const s=o.get(a);s&&(this.registerIconForType(t,a,s),this.registerIconForBPMN(a,yu(Y_+a.toLowerCase()),t))}})}registerIconForBPMN(t,i,r){if(t.includes(r))throw new Error("Should not include elementType");this.iconDictionaryForBPMN.set(`${r}${t}`,i)}addIconsToTypeDictionary(t,i){this.allInTypeDictionary($.ACTOR,t)||this.addIconsFromIconSetConfiguration($.ACTOR,t.map(r=>Al(r.type))),this.allInTypeDictionary($.WORKOBJECT,i)||this.addIconsFromIconSetConfiguration($.WORKOBJECT,i.map(r=>Al(r.type)))}registerIconForType(t,i,r){if(i.includes(t))throw new Error("Name should not include type!");let o=new ln;t===$.ACTOR?o=this.actorIconDictionary:t===$.WORKOBJECT&&(o=this.workObjectDictionary),o.add(r,i)}unregisterIconForType(t,i){if(i.includes(t))throw new Error("Name should not include type!");let r=new ln;t===$.ACTOR?r=this.actorIconDictionary:t===$.WORKOBJECT&&(r=this.workObjectDictionary),r.delete(i)}updateIconRegistries(t,i,r){const o=[];t.forEach(l=>o.push(l)),i.forEach(l=>o.push(l));const a=new ln,s=new ln,c=new ln;r.actors.keysArray().forEach(l=>{s.set(l,r.actors.get(l))}),r.workObjects.keysArray().forEach(l=>{c.set(l,r.workObjects.get(l))}),this.extractCustomIconsFromDictionary(s,a),this.extractCustomIconsFromDictionary(c,a),o.forEach(l=>{const d=yu(l.type.replace($.ACTOR,"").replace($.WORKOBJECT,""));if((l.type.includes($.ACTOR)||l.type.includes($.WORKOBJECT))&&!this.getFullDictionary().has(d)){let u;u=l.type.includes($.ACTOR)?$.ACTOR:$.WORKOBJECT,this.registerIconForBPMN(Y_+d.toLowerCase(),Al(l.type),u)}}),this.addNewIconsToDictionary(a),this.addIconsToTypeDictionary(t,i)}extractCustomIconsFromDictionary(t,i){t.keysArray().forEach(r=>{const o=yu(r);this.getFullDictionary().has(o)||i.add(t.get(r),o)})}addNewIconsToDictionary(t){t.keysArray().forEach(i=>{const r=t.get(i);this.addIMGToIconDictionary(r.src,i)}),this.addIconsToCss(t)}addIMGToIconDictionary(t,i){Tl.set(i,t)}addIconsToCss(t){const i=document.getElementById("iconsCss");t.keysArray().forEach(r=>{const o=t.get(r),a="."+Y_+yu(r.toLowerCase())+'::before{ content: url("data:image/svg+xml;utf8,'+this.wrapSRCInSVG(o)+'"); margin: 3px;}';i?.sheet?.insertRule(a,i.sheet.cssRules.length)})}wrapSRCInSVG(t){return""}getFullDictionary(){const t=new ln;return t.appendDict(this.allIconDictionary),t.appendDict(this.getAppendedIconDictionary()),t}getAppendedIconDictionary(){const t=new ln;return Tl.keysArray().forEach(i=>{this.allIconDictionary.has(i)||t.set(i,Tl.get(i))}),t}getTypeDictionary(t){return t===$.ACTOR?this.actorIconDictionary:t===$.WORKOBJECT?this.workObjectDictionary:new ln}getTypeDictionaryKeys(t){return this.getTypeDictionary(t).keysArray()}getTypeIconSRC(t,i){return t===$.ACTOR?this.actorIconDictionary.get(i):t===$.WORKOBJECT?this.workObjectDictionary.get(i):null}getIconForBPMN(t,i){return this.iconDictionaryForBPMN.get(`${t}${i}`)}getIconSource(t){return this.allIconDictionary.has(t)?this.allIconDictionary.get(t):Tl.has(t)?Tl.get(t):null}getElementsOfType(t,i){const r=[];return t.forEach(o=>{o.type.includes(i)&&r.push(o)}),r}getAllIconDictionary(){return this.allIconDictionary}getActorsDictionary(){return this.actorIconDictionary}getWorkObjectsDictionary(){return this.workObjectDictionary}getIconConfiguration(){return this.iconConfig}setCustomConfiguration(t){this.customConfiguration=t}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),la=(()=>{class e{constructor(){this.fullyInitialized=!1}correctInitialize(){this.fullyInitialized||this.registry.__implicitroot&&(this.registry=this.registry.__implicitroot.element.children,this.fullyInitialized=!0)}setElementRegistry(t){this.registry=t._elements}clear(){this.registry=null,this.fullyInitialized=!1}createObjectListForDSTDownload(){if(this.registry){const t=this.getAllCanvasObjects(),i=this.getAllGroups(),r=[];return this.fillListOfCanvasObjects(t,r,i),r}return[]}fillListOfCanvasObjects(t,i,r){t.forEach(o=>{o.type===$.ACTIVITY?i.push(o):(o.type===$.TEXTANNOTATION&&(o.businessObject.width=o.width,o.businessObject.height=o.height),i.includes(o)||i.unshift(o))}),r.forEach(o=>{i.push(o)})}getAllActivities(){const t=[];return this.getAllCanvasObjects().forEach(i=>{i.type.includes($.ACTIVITY)&&t.push(i)}),t}getAllConnections(){const t=[];return this.getAllCanvasObjects().forEach(i=>{i.type===$.CONNECTION&&t.push(i)}),t}getAllCanvasObjects(){const t=[],i=[];this.checkChildForGroup(i,t);let r=i.length-1;for(;i.length>=1;)i.pop().children.forEach(a=>{a.type.includes($.GROUP)&&i.push(a)}),r=i.length-1;return t}getAllGroups(){const t=[];this.checkChildForGroup(t,[]);for(const r of t)r.children?.forEach(o=>{o.type.includes($.GROUP)&&t.push(o)});return t}checkChildForGroup(t,i){const r=Object.keys(this.registry);for(let o of r){const a=this.registry[o].element;if(a.businessObject){const s=a.type;s&&s.includes($.GROUP)?t.push(a):s&&i.push(a)}}}getActivitiesFromActors(){const t=[];return this.getAllActivities().forEach(r=>{r.source?.type.includes($.ACTOR)&&t.push(r)}),t}getUsedIcons(){const t=this.getAllActors(),i=this.getAllWorkobjects();return{actors:t.map(r=>r.type.replace($.ACTOR,"")),workobjects:i.map(r=>r.type.replace($.WORKOBJECT,""))}}getAllActors(){return this.getAllCanvasObjects().filter(t=>t.type.includes($.ACTOR))}getAllWorkobjects(){return this.getAllCanvasObjects().filter(t=>t.type.includes($.WORKOBJECT))}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ml=(()=>{class e{constructor(t,i,r){this.iconDictionaryService=t,this.elementRegistryService=i,this.titleService=r}setIconSetName(t){this.titleService.setIconSetName(t||bu)}exportConfiguration(){const t=this.getCurrentConfigurationForExport();if(!t)return;const i=JSON.stringify(t,null,2),r=this.titleService.getIconSetName(),o=document.createElement("a");o.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(i)),o.setAttribute("download",r+".iconset"),o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o)}loadConfiguration(t,i=!0){let r=new ln,o=new ln;t.actors.keysArray()?(r=t.actors,o=t.workObjects):(r.addEach(t.actors),o.addEach(t.workObjects));const a=r.keysArray(),s=o.keysArray();this.iconDictionaryService.updateIconRegistries([],[],t),this.iconDictionaryService.getIconConfiguration().appendSRCFile(a,r,s,o),this.iconDictionaryService.addIconsFromIconSetConfiguration($.ACTOR,a.map(c=>$.ACTOR+c)),this.iconDictionaryService.addIconsFromIconSetConfiguration($.WORKOBJECT,s.map(c=>$.WORKOBJECT+c)),i&&this.setIconSetName(t.name)}getCurrentConfiguration(){const t=this.iconDictionaryService.getActorsDictionary(),i=this.iconDictionaryService.getWorkObjectsDictionary();let r;return t.size()>0&&i.size()>0&&(r=this.createConfigFromDictionaries(t,i)),r}getCurrentConfigurationForExport(){const t=this.getCurrentConfiguration();if(t){const i={},r={};return t.actors.all().forEach(o=>{i[o.key]=o.value}),t.workObjects.all().forEach(o=>{r[o.key]=o.value}),{name:t.name,actors:i,workObjects:r}}}getCurrentConfigurationNamesWithoutPrefix(){return{name:this.titleService.getIconSetName()||bu,actors:this.iconDictionaryService.getActorsDictionary().keysArray().map(t=>t.replace($.ACTOR,"")),workObjects:this.iconDictionaryService.getWorkObjectsDictionary().keysArray().map(t=>t.replace($.WORKOBJECT,""))}}createMinimalConfigurationWithDefaultIcons(){const t=this.createConfigFromCanvas();return vm.actors.forEach(i=>{t.actors.add(this.iconDictionaryService.getIconSource(i),i)}),vm.workObjects.forEach(i=>{t.workObjects.add(this.iconDictionaryService.getIconSource(i),i)}),t}createConfigFromDictionaries(t,i){const r=t.keysArray(),o=i.keysArray(),a=new ln,s=new ln;return r.forEach(c=>{a.add(t.get(c),c.replace($.ACTOR,""))}),o.forEach(c=>{s.add(i.get(c),c.replace($.WORKOBJECT,""))}),{name:this.titleService.getIconSetName(),actors:a,workObjects:s}}createConfigFromCanvas(){const t={name:bu,actors:new ln,workObjects:new ln};return this.elementRegistryService.getAllCanvasObjects().map(r=>r.businessObject).forEach(r=>{const o=r.type.replace($.ACTOR,"").replace($.WORKOBJECT,"");if(r.type.includes($.ACTOR)){let a=this.iconDictionaryService.getIconSource(o)||"";t.actors.add(a,o)}else if(r.type.includes($.WORKOBJECT)){let a=this.iconDictionaryService.getIconSource(o)||"";t.workObjects.add(a,o)}}),t}static#e=this.\u0275fac=function(i){return new(i||e)(F(Es),F(la),F(fo))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),K_=(()=>{class e{constructor(){this.isDirtySubject=new on(!1),this.dirty$=this.isDirtySubject.asObservable()}makeDirty(){this.isDirtySubject.next(!0)}makeClean(){this.isDirtySubject.next(!1)}get dirty(){return this.isDirtySubject.value}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const C3="http://www.w3.org/2000/svg",S3="8";let xu=0;function D3(e,n,t,i,r){let o=function Lae(e,n){let i=document.createElement("canvas").getContext("2d");return i.font="30px Arial",k3(e,n,i,10,30,30)}(e=e.replace("<","").replace(">",""),r),a=function Bae(e,n){let t="",i=e.split("
"),o=document.createElement("canvas").getContext("2d");o.font="12px Arial";for(let a=0;a'+o+a+"",extraHeight:xu}}function k3(e,n,t,i,r,o){let a="",s=e.split(" "),c='',l=document.createElementNS(C3,"tspan"),d=document.createTextNode(s[0]);l.setAttribute("x",S3),l.setAttribute("y",i+xu),l.setAttribute("font-size",o),l.appendChild(d);for(let u=1;un-16&&(xu+=r,l.firstChild.data=l.firstChild.data.slice(0,h),a+=c+l.outerHTML+"",l=document.createElementNS(C3,"tspan"),d=document.createTextNode(s[u]),l.setAttribute("x",S3),l.setAttribute("y",i+xu),l.appendChild(d))}return xu+=r,a+=c+l.outerHTML+"",a}let Vae=(()=>{class e{constructor(){this.width=0,this.height=0}browserSpecs(){const t=navigator.userAgent;let i,r=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(r[1])?(i=/\brv[ :]+(\d+)/g.exec(t)||[],{name:"IE",version:i[1]||""}):"Chrome"===r[1]&&(i=t.match(/\b(OPR|Edge)\/(\d+)/),null!=i)?{name:i[1].replace("OPR","Opera"),version:i[2]}:(r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(i=t.match(/version\/(\d+)/i))&&r.splice(1,1,i[1]),{name:r[0],version:r[1]})}URIHashtagFix(t){let i=!1;const r=this.browserSpecs(),o=r.name,a=parseInt(r.version);if(o.includes("Chrome")?a>=72&&(i=!0):o.includes("Firefox")&&(i=!0),i)for(;t.includes("#");)t=t.replace("#","%23");return t}findMostOuterElements(t){let i=0,r=0,o=0,a=0;const s=t.getElementsByClassName("djs-group");for(let c=0;cr&&(r=h),fa&&(a=m)}return o-=75,{xLeft:i,xRight:r,yUp:o,yDown:a}}prepareSVG(t,i,r,o,a){const s=this.findMostOuterElements(i);let c=t.indexOf('width="');this.calculateWidthAndHeight(s);const{insertText:l,extraHeight:d}=D3(o,r,s.xLeft+10,s.yUp+20,this.width);a&&(this.height+=d);const u=this.createBounds(s,d),h=t.substring(0,c);c=t.indexOf('style="');const f=t.substring(c);f.substring(c);const m=(t=h+u+f).indexOf('')+20;return a&&(t=[t.slice(0,m),l,t.slice(m)].join("")),this.URIHashtagFix(t)}createBounds(t,i){return'width="'+this.width+'" height="'+this.height+'" viewBox=" '+t.xLeft+" "+(t.yUp-i)+" "+this.width+" "+this.height+'" '}calculateWidthAndHeight(t){return this.width=t.xLeft<0?t.xRight<0?Math.abs(t.xLeft-t.xRight):Math.abs(t.xLeft)+t.xRight:t.xRight-t.xLeft,this.height=t.yUp<0?t.yDown<0?Math.abs(t.yUp-t.yDown):Math.abs(t.yUp)+t.yDown:t.yDown-t.yUp,this.height<300&&(this.height+=300,t.yUp-=150,t.yDown+=150),this.width<300&&(this.width+=300,t.xLeft-=150,t.xRight+=150),[this.height,this.width]}extractSVG(t,i){const r=t.getElementsByClassName("layer-resizers"),o=t.getElementsByClassName("layer-overlays"),a=t.getAttribute("transform"),s=t.getAttribute("translate");r[0]&&r[0].parentNode.removeChild(r[0]),o[0]&&o[0].parentNode.removeChild(o[0]),a&&t.removeAttribute("transform"),s&&t.removeAttribute("translate");const c=(new XMLSerializer).serializeToString(i);return a&&t.setAttribute("transform",a),s&&t.setAttribute("translate",s),c}getWidth(){return this.width}getHeight(){return this.height}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const _m=Object.prototype.toString,jae=Object.prototype.hasOwnProperty;function X_(e){return"[object Array]"===_m.call(e)}function $ae(e,n){return jae.call(e,n)}function Tr(e,n){let t,i;if(function bm(e){return void 0===e}(e))return;const r=X_(e)?Yae:qae;for(let o in e)if($ae(e,o)&&(t=e[o],i=n(t,r(o)),!1===i))return t}function M3(e,n,t){return Tr(e,function(i,r){t=n(t,i,r)}),t}function qae(e){return e}function Yae(e){return Number(e)}function it(e,...n){return Object.assign(e,...n)}function O3(e,n){let t={},i=Object(e);return Tr(n,function(r){r in i&&(t[r]=e[r])}),t}var Zae=K(270),tt=K.n(Zae),Jae=function Qae(e,n){return e(n={exports:{}},n.exports),n.exports}(function(e){var n=e.exports=function(t,i){if(i||(i=16),void 0===t&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(i),o=2;r===1/0;o*=2)r=Math.log(Math.pow(2,t/o))/Math.log(i)*o;var a=r-Math.floor(r),s="";for(o=0;o=Math.pow(2,t)?n(t,i):s};n.rack=function(t,i,r){var o=function(s){var c=0;do{if(c++>10){if(!r)throw new Error("too many ID collisions, use more bits");t+=r}var l=n(t,i)}while(Object.hasOwnProperty.call(a,l));return a[l]=s,l},a=o.hats={};return o.get=function(s){return o.hats[s]},o.set=function(s,c){return o.hats[s]=c,o},o.bits=t||128,o.base=i||16,o}});function Cs(e){if(!(this instanceof Cs))return new Cs(e);this._seed=(e=e||[128,36,1]).length?Jae.rack(e[0],e[1],e[2]):e}Cs.prototype.next=function(e){return this._seed(e||!0)},Cs.prototype.nextPrefixed=function(e,n){var t;do{t=e+this.next(!0)}while(this.assigned(t));return this.claim(t,n),t},Cs.prototype.claim=function(e,n){this._seed.set(e,n||!0)},Cs.prototype.assigned=function(e){return this._seed.get(e)||!1},Cs.prototype.unclaim=function(e){delete this._seed.hats[e]},Cs.prototype.clear=function(){var n,e=this._seed.hats;for(n in e)this.unclaim(n)};const qC=Cs;var ym=Object.prototype.toString,ese=Object.prototype.hasOwnProperty;function Il(e){return void 0===e}function da(e){return"[object Array]"===ym.call(e)}function Ss(e){return"[object Object]"===ym.call(e)}function P3(e){return"[object Number]"===ym.call(e)}function YC(e){var n=ym.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function gc(e,n){return ese.call(e,n)}function mo(e,n){var t;return n=JC(n),ht(e,function(i,r){if(n(i,r))return t=i,!1}),t}function Bn(e,n){var t=[];return ht(e,function(i,r){n(i,r)&&t.push(i)}),t}function ht(e,n){var t;if(!Il(e)){var r=da(e)?ase:ose;for(var o in e)if(gc(e,o)&&!1===n(t=e[o],r(o)))return t}}function Ol(e,n,t){return ht(e,function(i,r){t=n(t,i,r)}),t}function KC(e,n){return!!Ol(e,function(t,i,r){return t&&n(i,r)},!0)}function wu(e,n){return!!mo(e,n)}function Eu(e,n){var t=[];return ht(e,function(i,r){t.push(n(i,r))}),t}function J_(e){return e&&Object.keys(e)||[]}function XC(e,n){n=function QC(e){return YC(e)?e:function(n){return n[e]}}(n);var t=[];return ht(e,function(i,r){for(var o=n(i,r),a={d:o,v:i},s=0;s1?n-1:0),i=1;i
a',H3=!ib.getElementsByTagName("link").length,ib=void 0);var Ai={legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],_default:H3?[1,"X
","
"]:[0,"",""]};function Xn(e,n){return(n=n||document).querySelector(e)}function iS(e,n){return(n=n||document).querySelectorAll(e)}function Ua(e){e.parentNode&&e.parentNode.removeChild(e)}function $3(e,n){return n.appendChild(function rS(e,n){if(e.ownerDocument!==n.ownerDocument)try{return n.ownerDocument.importNode(e,!0)}catch{}return e}(e,n))}function nt(e,n){return $3(n,e),e}Ai.td=Ai.th=[3,"","
"],Ai.option=Ai.optgroup=[1,'"],Ai.thead=Ai.tbody=Ai.colgroup=Ai.caption=Ai.tfoot=[1,"","
"],Ai.polyline=Ai.ellipse=Ai.polygon=Ai.circle=Ai.text=Ai.line=Ai.path=Ai.rect=Ai.g=[1,'',""];var oS=2,U3={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":oS,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":oS,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function G3(e,n,t){var i=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=U3[i];r?(r===oS&&"number"==typeof t&&(t=String(t)+"px"),e.style[i]=t):e.setAttributeNS(null,n,t)}function ve(e,n,t){if("string"==typeof n){if(void 0===t)return function Sse(e,n){return U3[n]?e.style[n]:e.getAttributeNS(null,n)}(e,n);G3(e,n,t)}else!function Dse(e,n){var i,r,t=Object.keys(n);for(i=0;r=t[i];i++)G3(e,r,n[r])}(e,n);return e}function aS(e,n){if(e.indexOf)return e.indexOf(n);for(var t=0;t"+e+"",n=!0);var t=function Ase(e){var n;return(n=new DOMParser).async=!1,n.parseFromString(e,"text/xml")}(e);if(!n)return t;for(var i=document.createDocumentFragment(),r=t.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function Qe(e,n){var t;return"<"===e.charAt(0)?(t=Y3(e).firstChild,t=document.importNode(t,!0)):t=document.createElementNS(lS.svg,e),n&&ve(t,n),t}var dS=null;function rb(){return null===dS&&(dS=Qe("svg")),dS}function uS(e,n){var t,i,r=Object.keys(n);for(t=0;i=r[t];t++)e[i]=n[i];return e}function xm(e){return e?rb().createSVGTransformFromMatrix(e):rb().createSVGTransform()}var K3=/([&<>]{1})/g,Ise=/([\n\r"]{1})/g,Ose={"&":"&","<":"<",">":">",'"':"'"};function hS(e,n){return e.replace(n,function t(i,r){return Ose[r]||r})}function X3(e,n){var t,i,r,o,a;switch(e.nodeType){case 3:n.push(hS(e.textContent,K3));break;case 1:if(n.push("<",e.tagName),e.hasAttributes())for(t=0,i=(r=e.attributes).length;t"),t=0,i=(a=e.childNodes).length;t")}else n.push("/>");break;case 8:n.push("\x3c!--",hS(e.nodeValue,K3),"--\x3e");break;case 4:n.push("");break;default:throw new Error("unable to handle node "+e.nodeType)}return n}function Z3(e,n){if(void 0!==n){try{!function Rse(e,n){var t=Y3(n);if(cS(e),n){(function Pse(e){return"#document-fragment"===e.nodeName})(t)||(t=t.documentElement);for(var i=function Fse(e){return Array.prototype.slice.call(e)}(t.childNodes),r=0;r ");return t.length=0,new Error(g?m+" (Resolving: "+g+")":m)},s=function(m,g){if(!i[m]&&-1!==m.indexOf(".")){for(var v=m.split("."),C=s(v.shift());v.length;)C=C[v.shift()];return C}if(mS(r,m))return r[m];if(mS(i,m)){if(-1!==t.indexOf(m))throw t.push(m),a("Cannot resolve circular dependency!");return t.push(m),r[m]=i[m][0](i[m][1]),t.pop(),r[m]}return n.get(m,g)},c=function(m,g){if(typeof g>"u"&&(g={}),"function"!=typeof m){if(!fS(m))throw new Error('Cannot invoke "'+m+'". Expected a function!');m=ob(m.slice())}return{fn:m,dependencies:(m.$inject||Gse(m)).map(function(w){return mS(g,w)?g[w]:s(w)})}},l=function(m){var g=c(m);return new(Function.prototype.bind.apply(g.fn,[null].concat(g.dependencies)))},d=function(m,g,v){var C=c(m,v);return C.fn.apply(g,C.dependencies)},u=function(m){return ob(function(g){return m.get(g)})},f={factory:d,type:l,value:function(m){return m}};e.forEach(function(m){function g(E,x){return"value"!==E&&fS(x)&&(x=ob(x.slice())),x}if(m instanceof Wse)m.forEach(function(E){var k=E[1];i[E[0]]=[f[k],g(k,E[2]),k]});else if("object"==typeof m)if(m.__exports__){var v=Object.keys(m).reduce(function(E,x){return"__"!==x.substring(0,2)&&(E[x]=m[x]),E},Object.create(null)),C=new pS((m.__modules__||[]).concat([v]),o),w=ob(function(E){return C.get(E)});m.__exports__.forEach(function(E){i[E]=[w,E,"private",C]})}else Object.keys(m).forEach(function(E){if("private"!==m[E][2]){var x=m[E][0];i[E]=[f[x],g(x,m[E][1]),x]}else i[E]=m[E]})}),this.get=s,this.invoke=d,this.instantiate=l,this.createChild=function(m,g){if(g&&g.length){var k,O,L,R,v=Object.create(null),C=Object.create(null),w=[],E=[],x=[];for(var te in i)k=i[te],-1!==g.indexOf(te)&&("private"===k[2]?-1===(O=w.indexOf(k[3]))?(L=k[3].createChild([],g),R=u(L),w.push(k[3]),E.push(L),x.push(R),v[te]=[R,te,"private",L]):v[te]=[x[O],te,"private",E[O]]:v[te]=[k[2],k[1]],C[te]=!0),("factory"===k[2]||"type"===k[2])&&k[1].$scope&&g.forEach(function(we){-1!==k[1].$scope.indexOf(we)&&(v[te]=[k[2],k[1]],C[we]=!0)});g.forEach(function(we){if(!C[we])throw new Error('No provider for "'+we+'". Cannot use provider from the parent!')}),m.unshift(v)}return new pS(m,o)}}var qse=1e3;function ua(e,n){var t=this;e.on(["render.shape","render.connection"],n=n||qse,function(i,r){var o=i.type,a=r.element,s=r.gfx,c=r.attrs;if(t.canRender(a))return"render.shape"===o?t.drawShape(s,a,c):t.drawConnection(s,a,c)}),e.on(["render.getShapePath","render.getConnectionPath"],n,function(i,r){if(t.canRender(r))return"render.getShapePath"===i.type?t.getShapePath(r):t.getConnectionPath(r)})}function Ga(e){return e.join(",").replace(/,?([A-z]),?/g,"$1")}function Q3(e){for(var i,n="",t=0;i=e[t];t++)n+=i.x+","+i.y+" ";return n}function Em(e,n){var t=Qe("polyline");return ve(t,{points:Q3(e)}),n&&ve(t,n),t}function ab(e){return Array.prototype.concat.apply([],e)}ua.prototype.canRender=function(){},ua.prototype.drawShape=function(){},ua.prototype.drawConnection=function(){},ua.prototype.getShapePath=function(){},ua.prototype.getConnectionPath=function(){};var Cm=Object.prototype.toString,Kse=Object.prototype.hasOwnProperty;function Su(e){return void 0===e}function Wa(e){return void 0!==e}function sb(e){return null==e}function mn(e){return"[object Array]"===Cm.call(e)}function vo(e){return"[object Object]"===Cm.call(e)}function Ot(e){return"[object Number]"===Cm.call(e)}function Ar(e){var n=Cm.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function Sm(e){return"[object String]"===Cm.call(e)}function Zse(e,n){return Kse.call(e,n)}function Gi(e,n){var t;return n=_S(n),Z(e,function(i,r){if(n(i,r))return t=i,!1}),t}function Mr(e,n){var t=[];return Z(e,function(i,r){n(i,r)&&t.push(i)}),t}function Z(e,n){var t;if(!Su(e)){var r=mn(e)?ice:nce;for(var o in e)if(Zse(e,o)&&!1===n(t=e[o],r(o)))return t}}function Nl(e,n,t){return Z(e,function(i,r){t=n(t,i,r)}),t}function cb(e,n){return!!Nl(e,function(t,i,r){return t&&n(i,r)},!0)}function Ir(e,n){var t=[];return Z(e,function(i,r){t.push(n(i,r))}),t}function Dm(e){return function ece(e){return e&&Object.keys(e)||[]}(e).length}function gS(e){return Ir(e,function(n){return n})}function Du(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n=vS(n),Z(e,function(i){var r=n(i)||"_",o=t[r];o||(o=t[r]=[]),o.push(i)}),t}function J3(e){e=vS(e);for(var n={},t=arguments.length,i=new Array(t>1?t-1:0),r=1;r0)return s(f);e.apply(r,i),c()}function s(u){t=setTimeout(a,u)}function c(){t&&clearTimeout(t),t=o=i=r=void 0}function d(){o=Date.now();for(var u=arguments.length,h=new Array(u),f=0;f1?n-1:0),i=1;ir||void 0===r)&&(r=c+u),(l+d>o||void 0===o)&&(o=l+d)}),{x:t,y:i,height:o-i,width:r-t}}function a5(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function s5(e){return!(!e||!e.isFrame)}function Am(e,n){return je({},e||{},n||{})}function xc(e,n){ua.call(this,e,1),this.CONNECTION_STYLE=n.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=n.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=n.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}tt()(xc,ua),xc.prototype.canRender=function(){return!0},xc.prototype.drawShape=function(n,t,i){var r=Qe("rect");return ve(r,{x:0,y:0,width:t.width||0,height:t.height||0}),s5(t)?ve(r,je({},this.FRAME_STYLE,i||{})):ve(r,je({},this.SHAPE_STYLE,i||{})),nt(n,r),r},xc.prototype.drawConnection=function(n,t,i){var r=Em(t.waypoints,je({},this.CONNECTION_STYLE,i||{}));return nt(n,r),r},xc.prototype.getShapePath=function(n){var r=n.width;return Ga([["M",n.x,n.y],["l",r,0],["l",0,n.height],["l",-r,0],["z"]])},xc.prototype.getConnectionPath=function(n){var i,r,t=n.waypoints,o=[];for(i=0;r=t[i];i++)o.push([0===i?"M":"L",(r=r.original||r).x,r.y]);return Ga(o)},xc.$inject=["eventBus","styles"];const lce={__init__:["defaultRenderer"],defaultRenderer:["type",xc],styles:["type",function cce(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},n=this;this.cls=function(t,i,r){return je(this.style(i,r),{class:t})},this.style=function(t,i){!mn(t)&&!i&&(i=t,t=[]);var r=Nl(t,function(o,a){return je(o,e[a]||{})},{});return i?je(r,i):r},this.computeStyle=function(t,i,r){return mn(i)||(r=i,i=[]),n.style(i||[],je({},r,t||{}))}}]};function ii(e,n){if(!e||!n)return-1;var t=e.indexOf(n);return-1!==t&&e.splice(t,1),t}function ri(e,n,t){if(e&&n){"number"!=typeof t&&(t=-1);var i=e.indexOf(n);if(-1!==i){if(i===t)return;if(-1===t)return;e.splice(i,1)}-1!==t?e.splice(t,0,n):e.push(n)}}function yS(e,n){return e&&n?e.indexOf(n):-1}function Mm(e,n){return e&&n?Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)):-1}function xS(e,n,t,i){if(typeof i>"u"&&(i=5),!e||!n||!t)return!1;var r=(n.x-e.x)*(t.y-e.y)-(n.y-e.y)*(t.x-e.x),o=Mm(e,n);return Math.abs(r/o)<=i}var c5=2;function Ds(e,n){var t;return function dce(e,n){var t,i=(t=mn(e)?e:[e,n]).slice().shift();return cb(t,function(r){return Math.abs(i.y-r.y)<=c5})}(t=mn(e)?e:[e,n])?"h":!!function uce(e,n){var t,i=(t=mn(e)?e:[e,n]).slice().shift();return cb(t,function(r){return Math.abs(i.x-r.x)<=c5})}(t)&&"v"}function l5(e,n,t){return e.x>n.x-(t=t||0)&&e.y>n.y-t&&e.x=r.bottom?"bottom":null,d=i.right+t.x<=r.left?"left":i.left-t.x>=r.right?"right":null;return d&&l?l+"-"+d:d||l||"intersect"}function CS(e,n,t){var i=function fce(e,n){return d5()(e,n)}(e,n);return 1===i.length||2===i.length&&Mm(i[0],i[1])<1?wc(i[0]):i.length>1?wc((i=bc(i,function(r){var o=Math.floor(100*r.t2)||1;return r.segment2+"#"+((o=100-o)<10?"0":"")+o}))[t?0:i.length-1]):null}function ub(e,n){return Math.round(e*n)/n}function h5(e){return Ot(e)?e+"px":e}function f5(e,n,t){var i=Qe("g");return Bt(i).add(n),e.insertBefore(i,e.childNodes[void 0!==t?t:e.childNodes.length-1]||null),i}var hb="base",SS="djs-element-hidden",_ce={shape:["x","y","width","height"],connection:["waypoints"]};function Ft(e,n,t,i){this._eventBus=n,this._elementRegistry=i,this._graphicsFactory=t,this._init(e||{})}function p5(e,n){e.setAttribute("transform","matrix("+n.a+","+n.b+","+n.c+","+n.d+","+n.e+","+n.f+")")}Ft.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],Ft.prototype._init=function(e){var n=this._eventBus,t=this._container=function gce(e){var n=(e=je({},{width:"100%",height:"100%"},e)).container||document.body,t=document.createElement("div");return t.setAttribute("class","djs-container"),je(t.style,{position:"relative",overflow:"hidden",width:h5(e.width),height:h5(e.height)}),n.appendChild(t),t}(e),i=this._svg=Qe("svg");ve(i,{width:"100%",height:"100%"}),nt(t,i);var r=this._viewport=f5(i,"viewport");this._layers={},this._planes={},!1!==e.deferUpdate&&(this._viewboxChanged=e5(km(this._viewboxChanged,this),300)),n.on("diagram.init",function(){n.fire("canvas.init",{svg:i,viewport:r})},this),n.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","plane.set"],function(){delete this._cachedViewbox},this),n.on("diagram.destroy",500,this._destroy,this),n.on("diagram.clear",500,this._clear,this)},Ft.prototype._destroy=function(e){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});var n=this._container.parentNode;n&&n.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._activePlane,delete this._viewport},Ft.prototype._clear=function(){var e=this;this._elementRegistry.getAll().forEach(function(t){var i=a5(t);"root"===i?e.setRootElementForPlane(null,e.findPlane(t),!0):e._removeElement(t,i)}),this._activePlane=null,this._planes={},delete this._cachedViewbox},Ft.prototype.getDefaultLayer=function(){return this.getLayer(hb,0)},Ft.prototype.getLayer=function(e,n){if(!e)throw new Error("must specify a name");var t=this._layers[e];if(t||(t=this._layers[e]=this._createLayer(e,n)),typeof n<"u"&&t.index!==n)throw new Error("layer <"+e+"> already created at index <"+n+">");return t.group},Ft.prototype._createLayer=function(e,n){typeof n>"u"&&(n=1);var t=Nl(this._layers,function(i,r){return n>=r.index&&i++,i},0);return{group:f5(this._viewport,"layer-"+e,t),index:n}},Ft.prototype.getPlane=function(e){if(!e)throw new Error("must specify a name");return this._planes[e]},Ft.prototype.createPlane=function(e,n){if(!e)throw new Error("must specify a name");if(this._planes[e])throw new Error("plane "+e+" already exists");n||(n={id:"__implicitroot"+e,children:[],isImplicit:!0});var t=this.getLayer(e,0);Bt(t).add(SS);var i=this._planes[e]={layer:t,name:e,rootElement:null};return this.setRootElementForPlane(n,i),i},Ft.prototype.setActivePlane=function(e){if(!e)throw new Error("must specify a plane");return"string"==typeof e&&(e=this.getPlane(e)),this._activePlane&&Bt(this._activePlane.layer).add(SS),this._activePlane=e,Bt(e.layer).remove(SS),e.rootElement&&this._elementRegistry.updateGraphics(e.rootElement,this._svg,!0),this._eventBus.fire("plane.set",{plane:e}),e},Ft.prototype.getActiveLayer=function(){return this.getActivePlane().layer},Ft.prototype.getActivePlane=function(){var e=this._activePlane;return e||(e=this.createPlane(hb),this.setActivePlane(hb)),e},Ft.prototype.findPlane=function(e){"string"==typeof e&&(e=this._elementRegistry.get(e));var n=function pce(e){for(;e.parent;)e=e.parent;return e}(e);return Gi(this._planes,function(t){return t.rootElement===n})},Ft.prototype.getContainer=function(){return this._container},Ft.prototype._updateMarker=function(e,n,t){var i;e.id||(e=this._elementRegistry.get(e)),(i=this._elementRegistry._elements[e.id])&&(Z([i.gfx,i.secondaryGfx],function(r){r&&(t?Bt(r).add(n):Bt(r).remove(n))}),this._eventBus.fire("element.marker.update",{element:e,gfx:i.gfx,marker:n,add:!!t}))},Ft.prototype.addMarker=function(e,n){this._updateMarker(e,n,!0)},Ft.prototype.removeMarker=function(e,n){this._updateMarker(e,n,!1)},Ft.prototype.hasMarker=function(e,n){return e.id||(e=this._elementRegistry.get(e)),Bt(this.getGraphics(e)).has(n)},Ft.prototype.toggleMarker=function(e,n){this.hasMarker(e,n)?this.removeMarker(e,n):this.addMarker(e,n)},Ft.prototype.getRootElement=function(){return this.getActivePlane().rootElement},Ft.prototype.setRootElement=function(e,n){var t=this._activePlane;if(t)return this.setRootElementForPlane(e,t,n);var i=this.createPlane(hb,e);return this.setActivePlane(i),i.rootElement},Ft.prototype.setRootElementForPlane=function(e,n,t){"string"==typeof n&&(n=this.getPlane(n)),e&&this._ensureValid("root",e);var i=n.rootElement,r=this._elementRegistry,o=this._eventBus;if(i){if(!t)throw new Error("rootElement already set, need to specify override");o.fire("root.remove",{element:i}),o.fire("root.removed",{element:i}),r.remove(i)}if(e){var a=n.layer;o.fire("root.add",{element:e}),r.add(e,a),o.fire("root.added",{element:e,gfx:a}),n===this._activePlane&&this._elementRegistry.updateGraphics(e,this._svg,!0)}return n.rootElement=e,e},Ft.prototype._ensureValid=function(e,n){if(!n.id)throw new Error("element must have an id");if(this._elementRegistry.get(n.id))throw new Error("element with id "+n.id+" already exists");var t=_ce[e];if(!cb(t,function(r){return typeof n[r]<"u"}))throw new Error("must supply { "+t.join(", ")+" } with "+e)},Ft.prototype._setParent=function(e,n,t){ri(n.children,e,t),e.parent=n},Ft.prototype._addElement=function(e,n,t,i){t=t||this.getRootElement();var r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,n),r.fire(e+".add",{element:n,parent:t}),this._setParent(n,t,i);var a=o.create(e,n,i);return this._elementRegistry.add(n,a),o.update(e,n,a),r.fire(e+".added",{element:n,gfx:a}),n},Ft.prototype.addShape=function(e,n,t){return this._addElement("shape",e,n,t)},Ft.prototype.addConnection=function(e,n,t){return this._addElement("connection",e,n,t)},Ft.prototype._removeElement=function(e,n){var t=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=t.get(e.id||e))return r.fire(n+".remove",{element:e}),i.remove(e),ii(e.parent&&e.parent.children,e),e.parent=null,r.fire(n+".removed",{element:e}),t.remove(e),e},Ft.prototype.removeShape=function(e){return this._removeElement(e,"shape")},Ft.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},Ft.prototype.getGraphics=function(e,n){return this._elementRegistry.getGraphics(e,n)},Ft.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},Ft.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},Ft.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;var t,r,o,a,s,c,n=this._viewport,i=this.getSize();return e?(this._changeViewbox(function(){a=Math.min(i.width/e.width,i.height/e.height);var l=this._svg.createSVGMatrix().scale(a).translate(-e.x,-e.y);wm(n,l)}),e):(t=this._activePlane&&this._activePlane.layer.getBBox()||{},r=(o=wm(n))?o.matrix:function Mse(e,n,t,i,r,o){var a=rb().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return uS(a,e);case 6:return uS(a,{a:e,b:n,c:t,d:i,e:r,f:o})}}(),a=ub(r.a,1e3),s=ub(-r.e||0,1e3),c=ub(-r.f||0,1e3),e=this._cachedViewbox={x:s?s/a:0,y:c?c/a:0,width:i.width/a,height:i.height/a,scale:a,inner:{width:t.width||0,height:t.height||0,x:t.x||0,y:t.y||0},outer:i})},Ft.prototype.scroll=function(e){var n=this._viewport,t=n.getCTM();return e&&this._changeViewbox(function(){e=je({dx:0,dy:0},e||{}),t=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(t),p5(n,t)}),{x:t.e,y:t.f}},Ft.prototype.scrollToElement=function(e,n){var t=100;"string"==typeof e&&(e=this._elementRegistry.get(e));var i=this.findPlane(e);i!==this._activePlane&&this.setActivePlane(i),n||(n={}),"number"==typeof n&&(t=n),n={top:n.top||t,right:n.right||t,bottom:n.bottom||t,left:n.left||t};var c,l,r=tr(e),o=lt(r),a=this.viewbox(),s=this.zoom();a.y+=n.top/s,a.x+=n.left/s,a.width-=(n.right+n.left)/s,a.height-=(n.bottom+n.top)/s;var d=lt(a);if(r.width=0&&i.y>=0&&i.x+i.width<=t.width&&i.y+i.height<=t.height&&!e?o={x:0,y:0,width:Math.max(i.width+i.x,t.width),height:Math.max(i.height+i.y,t.height)}:(r=Math.min(1,t.width/i.width,t.height/i.height),o={x:i.x+(e?i.width/2-t.width/r/2:0),y:i.y+(e?i.height/2-t.height/r/2:0),width:t.width/r,height:t.height/r}),this.viewbox(o),this.viewbox(!1).scale},Ft.prototype._setZoom=function(e,n){var s,c,l,d,t=this._svg,i=this._viewport,r=t.createSVGMatrix(),o=t.createSVGPoint(),u=(c=i.getCTM()).a;return n?(s=je(o,n).matrixTransform(c.inverse()),l=r.translate(s.x,s.y).scale(1/u*e).translate(-s.x,-s.y),d=c.multiply(l)):d=r.scale(e),p5(this._viewport,d),d},Ft.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},Ft.prototype.getAbsoluteBBox=function(e){var t,n=this.viewbox();return{x:(t=e.waypoints?this.getGraphics(e).getBBox():e).x*n.scale-n.x*n.scale,y:t.y*n.scale-n.y*n.scale,width:t.width*n.scale,height:t.height*n.scale}},Ft.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Tu="data-element-id";function _o(e){this._elements={},this._eventBus=e}_o.$inject=["eventBus"],_o.prototype.add=function(e,n,t){var i=e.id;this._validateId(i),ve(n,Tu,i),t&&ve(t,Tu,i),this._elements[i]={element:e,gfx:n,secondaryGfx:t}},_o.prototype.remove=function(e){var n=this._elements,t=e.id||e,i=t&&n[t];i&&(ve(i.gfx,Tu,""),i.secondaryGfx&&ve(i.secondaryGfx,Tu,""),delete n[t])},_o.prototype.updateId=function(e,n){this._validateId(n),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:n});var t=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=n,this.add(e,t,i)},_o.prototype.updateGraphics=function(e,n,t){var i=e.id||e,r=this._elements[i];return t?r.secondaryGfx=n:r.gfx=n,ve(n,Tu,i),n},_o.prototype.get=function(e){var n;n="string"==typeof e?e:e&&ve(e,Tu);var t=this._elements[n];return t&&t.element},_o.prototype.filter=function(e){var n=[];return this.forEach(function(t,i){e(t,i)&&n.push(t)}),n},_o.prototype.find=function(e){for(var n=this._elements,t=Object.keys(n),i=0;i");return je(new t,n)}(e,n)};var mb="__fn",wce=Array.prototype.slice;function Ur(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function Om(){}function pb(e){return e.childNodes[0]}function DS(e,n,t,i,r){var o=xm();o.setTranslate(n,t);var a=xm();a.setRotate(i||0,0,0);var s=xm();s.setScale(r||1,r||1),wm(e,[o,a,s])}function Or(e,n,t){var i=xm();i.setTranslate(n,t),wm(e,i)}function C5(e,n){var t=xm();t.setRotate(n,0,0),wm(e,t)}function bo(e,n){this._eventBus=e,this._elementRegistry=n}function S5(e,n,t){var i=t||n.firstChild;e!==i&&n.insertBefore(e,i)}Ur.prototype.on=function(e,n,t,i){if(e=mn(e)?e:[e],Ar(n)&&(i=t,t=n,n=1e3),!Ot(n))throw new Error("priority must be a number");var r=t;i&&((r=km(t,i))[mb]=t[mb]||t);var o=this;e.forEach(function(a){o._addListener(a,{priority:n,callback:r,next:null})})},Ur.prototype.once=function(e,n,t,i){var r=this;if(Ar(n)&&(i=t,t=n,n=1e3),!Ot(n))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var a=t.apply(i,arguments);return r.off(e,o),a}o[mb]=t,this.on(e,n,o)},Ur.prototype.off=function(e,n){e=mn(e)?e:[e];var t=this;e.forEach(function(i){t._removeListener(i,n)})},Ur.prototype.createEvent=function(e){var n=new Om;return n.init(e),n},Ur.prototype.fire=function(e,n){var t,i,r,o;if(o=wce.call(arguments),"object"==typeof e&&(e=(n=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){t=n instanceof Om?n:this.createEvent(n),o[0]=t;var a=t.type;e!==a&&(t.type=e);try{r=this._invokeListeners(t,o,i)}finally{e!==a&&(t.type=a)}return void 0===r&&t.defaultPrevented&&(r=!1),r}},Ur.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},Ur.prototype._destroy=function(){this._listeners={}},Ur.prototype._invokeListeners=function(e,n,t){for(var i;t&&!e.cancelBubble;)i=this._invokeListener(e,n,t),t=t.next;return i},Ur.prototype._invokeListener=function(e,n,t){var i;if(t.callback.__isTomb)return i;try{i=function Ece(e,n){return e.apply(null,n)}(t.callback,n),void 0!==i&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(r){if(!this.handleError(r))throw console.error("unhandled error in event listener",r),r}return i},Ur.prototype._addListener=function(e,n){var i,t=this._getListeners(e);if(t){for(;t;){if(t.priority=0}e.forEach(function o(s){i(s)||((s.__depends__||[]).forEach(o),!i(s)&&(function r(s){n.push(s)}(s),(s.__init__||[]).forEach(function(c){t.push(c)})))});var a=new pS(n);return t.forEach(function(s){try{a["string"==typeof s?"get":"invoke"](s)}catch(c){throw console.error("Failed to instantiate component"),console.error(c.stack),c}}),a}([{config:["value",e=e||{}]},Sce].concat(e.modules||[]))}(e),this.get=n.get,this.invoke=n.invoke,this.get("eventBus").fire("diagram.init")}Iu.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Iu.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};var Rm=Object.prototype.toString;function OS(){return OS=Object.assign||function(e){for(var n=1;n1?n-1:0),i=1;i1?n-1:0),i=1;i or , got "+e);i=t[1],r=t[0]}return{name:e=(r?r+":":"")+i,prefix:r,localName:i}}function Oo(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function Ec(e,n){this.packageMap={},this.typeMap={},this.packages=[],this.properties=n,oi(e,Ou(this.registerPackage,this))}function P5(e,n,t){var i=n[t];if(i in e)throw new Error("package with "+t+" <"+i+"> already defined")}function Ru(e){this.model=e}function F5(e,n,t){Object.defineProperty(e,n.name,{enumerable:!n.isReference,writable:!0,value:t,configurable:!0})}function Ro(e){this.properties=new Ru(this),this.factory=new O5(this,this.properties),this.registry=new Ec(e,this.properties),this.typeCache={}}Oo.prototype.build=function(){return function Qce(e,n){var t={},i=Object(e);return oi(n,function(r){r in i&&(t[r]=e[r])}),t}(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},Oo.prototype.addProperty=function(e,n,t){"boolean"==typeof n&&(t=n,n=void 0),this.addNamedProperty(e,!1!==t);var i=this.properties;void 0!==n?i.splice(n,0,e):i.push(e)},Oo.prototype.replaceProperty=function(e,n,t){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==n.name;if(e.isId){if(!n.isId)throw new Error("property <"+n.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(n,!1)}if(e.isBody){if(!n.isBody)throw new Error("property <"+n.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(n,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(n,t?void 0:s,a),o[i.name]=o[i.localName]=n},Oo.prototype.redefineProperty=function(e,n,t){var i=e.ns.prefix,r=n.split("#"),o=Rr(r[0],i),a=Rr(r[1],o.prefix).name,s=this.propertiesByName[a];if(!s)throw new Error("refined property <"+a+"> not found");this.replaceProperty(s,e,t),delete e.redefines},Oo.prototype.addNamedProperty=function(e,n){var t=e.ns,i=this.propertiesByName;n&&(this.assertNotDefined(e,t.name),this.assertNotDefined(e,t.localName)),i[t.name]=i[t.localName]=e},Oo.prototype.removeNamedProperty=function(e){var n=e.ns,t=this.propertiesByName;delete t[n.name],delete t[n.localName]},Oo.prototype.setBodyProperty=function(e,n){if(n&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},Oo.prototype.setIdProperty=function(e,n){if(n&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},Oo.prototype.assertNotDefined=function(e,n){var t=e.name,i=this.propertiesByName[t];if(i)throw new Error("property <"+t+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},Oo.prototype.hasProperty=function(e){return this.propertiesByName[e]},Oo.prototype.addTrait=function(e,n){var t=this.allTypesByName,i=this.allTypes,r=e.name;r in t||(oi(e.properties,Ou(function(o){o=Fl({},o,{name:o.ns.localName,inherited:n}),Object.defineProperty(o,"definedBy",{value:e});var a=o.replaces,s=o.redefines;a||s?this.redefineProperty(o,a||s,a):(o.isBody&&this.setBodyProperty(o),o.isId&&this.setIdProperty(o),this.addProperty(o))},this)),i.push(e),t[r]=e)},Ec.prototype.getPackage=function(e){return this.packageMap[e]},Ec.prototype.getPackages=function(){return this.packages},Ec.prototype.registerPackage=function(e){e=Fl({},e);var n=this.packageMap;P5(n,e,"prefix"),P5(n,e,"uri"),oi(e.types,Ou(function(t){this.registerType(t,e)},this)),n[e.uri]=n[e.prefix]=e,this.packages.push(e)},Ec.prototype.registerType=function(e,n){var t=Rr((e=Fl({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:Fl(e.meta||{})})).name,n.prefix),i=t.name,r={};oi(e.properties,Ou(function(o){var a=Rr(o.name,t.prefix),s=a.name;jS(o.type)||(o.type=Rr(o.type,a.prefix).name),Fl(o,{ns:a,name:s}),r[s]=o},this)),Fl(e,{ns:t,name:i,propertiesByName:r}),oi(e.extends,Ou(function(o){var a=this.typeMap[o];a.traits=a.traits||[],a.traits.push(i)},this)),this.definePackage(e,n),this.typeMap[i]=e},Ec.prototype.mapTypes=function(e,n,t){var i=jS(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function o(s){return a(s,!0)}function a(s,c){var l=Rr(s,jS(s)?"":e.prefix);r.mapTypes(l,n,c)}if(!i)throw new Error("unknown type <"+e.name+">");oi(i.superClass,t?o:a),n(i,!t),oi(i.traits,o)},Ec.prototype.getEffectiveDescriptor=function(e){var n=Rr(e),t=new Oo(n);this.mapTypes(n,function(r,o){t.addTrait(r,o)});var i=t.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},Ec.prototype.definePackage=function(e,n){this.properties.define(e,"$pkg",{value:n})},Ru.prototype.set=function(e,n,t){if(!I5(n)||!n.length)throw new TypeError("property name must be a non-empty string");var i=this.model.getPropertyDescriptor(e,n),r=i&&i.name;!function tle(e){return typeof e>"u"}(t)?i?r in e?e[r]=t:F5(e,i,t):e.$attrs[n]=t:i?delete e[r]:delete e.$attrs[n]},Ru.prototype.get=function(e,n){var t=this.model.getPropertyDescriptor(e,n);if(!t)return e.$attrs[n];var i=t.name;return!e[i]&&t.isMany&&F5(e,t,[]),e[i]},Ru.prototype.define=function(e,n,t){if(!t.writable){var i=t.value;delete(t=Fl({},t,{get:function(){return i}})).value}Object.defineProperty(e,n,t)},Ru.prototype.defineDescriptor=function(e,n){this.define(e,"$descriptor",{value:n})},Ru.prototype.defineModel=function(e,n){this.define(e,"$model",{value:n})},Ro.prototype.create=function(e,n){var t=this.getType(e);if(!t)throw new Error("unknown type <"+e+">");return new t(n)},Ro.prototype.getType=function(e){var n=this.typeCache,t=I5(e)?e:e.ns.name,i=n[t];return i||(e=this.registry.getEffectiveDescriptor(t),i=n[t]=this.factory.createType(e)),i},Ro.prototype.createAny=function(e,n,t){var i=Rr(e),r={$type:e,$instanceOf:function(a){return a===this.$type}};return this.properties.defineDescriptor(r,{name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:n}}),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0}),this.properties.define(r,"$instanceOf",{enumerable:!1,writable:!0}),oi(t,function(a,s){!function vb(e){return"[object Object]"===Pm.call(e)}(a)||void 0===a.value?r[s]=a:r[a.name]=a.value}),r},Ro.prototype.getPackage=function(e){return this.registry.getPackage(e)},Ro.prototype.getPackages=function(){return this.registry.getPackages()},Ro.prototype.getElementDescriptor=function(e){return e.$descriptor},Ro.prototype.hasType=function(e,n){return void 0===n&&(n=e,e=this),n in e.$model.getElementDescriptor(e).allTypesByName},Ro.prototype.getPropertyDescriptor=function(e,n){return this.getElementDescriptor(e).propertiesByName[n]},Ro.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var Lm=Object.prototype.toString,nle=Object.prototype.hasOwnProperty;function zS(e){return"[object Array]"===Lm.call(e)}function bb(e){return"[object String]"===Lm.call(e)}function V5(e,n){return nle.call(e,n)}function $S(e,n){var t;return n=qS(n),On(e,function(i,r){if(n(i,r))return t=i,!1}),t}function US(e,n){var t=[];return On(e,function(i,r){n(i,r)&&t.push(i)}),t}function On(e,n){var t;if(!function Bm(e){return void 0===e}(e)){var r=zS(e)?ule:dle;for(var o in e)if(V5(e,o)&&!1===n(t=e[o],r(o)))return t}}function qS(e){return function B5(e){var n=Lm.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}(e)?e:function(n){return n===e}}function dle(e){return e}function ule(e){return Number(e)}function YS(){return YS=Object.assign||function(e){for(var n=1;n1?n-1:0),i=1;i",lt:"<",quot:'"'};function ple(e,n,t,i){return i?fle.call(Vm,i)?Vm[i]:"&"+i+";":j5(n||parseInt(t,16))}function Ll(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(mle,ple):e}Object.keys(Vm).forEach(function(e){Vm[e.toUpperCase()]=Vm[e]});var z5="xsi:type",H5="non-whitespace outside of root node";function Nu(e){return new Error(e)}function $5(e){return"missing namespace for prefix <"+e+">"}function xb(e){return{get:e,enumerable:!0}}function _le(e){var t,n={};for(t in e)n[t]=e[t];return n}function KS(e){return e+"$uri"}function U5(){return{line:0,column:0}}function yle(e){throw e}function G5(e){if(!this)return new G5(e);var t,i,r,o,s,c,l,d,v,n=e&&e.proxy,a=yle,u=U5,h=!1,f=!1,m=null,g=!1;function C(x){x instanceof Error||(x=Nu(x)),m=x,a(x,u)}function w(x){s&&(x instanceof Error||(x=Nu(x)),s(x,u))}this.on=function(x,k){if("function"!=typeof k)throw Nu("required args ");switch(x){case"openTag":i=k;break;case"text":t=k;break;case"closeTag":r=k;break;case"error":a=k;break;case"warn":s=k;break;case"cdata":o=k;break;case"attention":d=k;break;case"question":l=k;break;case"comment":c=k;break;default:throw Nu("unsupported event: "+x)}return this},this.ns=function(x){if(typeof x>"u"&&(x={}),"object"!=typeof x)throw Nu("required args ");var O,k={};for(O in x)k[O]=x[O];return k["http://www.w3.org/2001/XMLSchema-instance"]="xsi",f=!0,v=k,this},this.parse=function(x){if("string"!=typeof x)throw Nu("required args ");return m=null,function E(x){var L,ze,Kt,me,N,_,p,D,A,ee,Re,k=f?[]:null,O=f?function ble(e){var t,i,n={};for(t in e)n[i=e[t]]=i,n[KS(i)]=t;return n}(v):null,R=[],te=0,we=!1,Ge=!1,de=0,Ce=0,P="",q=0;function bt(){if(null!==Re)return Re;var En,Cn,Vn,_0,jc,xi,is,Sn,ba,mt,xn,Fr=f&&O.xmlns,$o=f&&h?[]:null,Wn=q,Hi=P,js=Hi.length,dh={},wH={};e:for(;Wn8)){for((mt<65||mt>122||mt>90&&mt<97)&&95!==mt&&58!==mt&&(w("illegal first char attribute name"),ba=!0),xn=Wn+1;xn96&&mt<123||mt>64&&mt<91||mt>47&&mt<59||46===mt||45===mt||95===mt)){if(32===mt||mt<14&&mt>8){w("missing attribute value"),Wn=xn;continue e}if(61===mt)break;w("illegal attribute name char"),ba=!0}if("xmlns:xmlns"===(Sn=Hi.substring(Wn,xn))&&(w("illegal declaration of xmlns"),ba=!0),34===(mt=Hi.charCodeAt(xn+1)))-1===(xn=Hi.indexOf('"',Wn=xn+2))&&-1!==(xn=Hi.indexOf("'",Wn))&&(w("attribute value quote missmatch"),ba=!0);else if(39===mt)-1===(xn=Hi.indexOf("'",Wn=xn+2))&&-1!==(xn=Hi.indexOf('"',Wn))&&(w("attribute value quote missmatch"),ba=!0);else for(w("missing attribute value quotes"),ba=!0,xn+=1;xn8);xn++);for(-1===xn&&(w("missing closing quotes"),xn=js,ba=!0),ba||(xi=Hi.substring(Wn,xn)),Wn=xn;xn+18);xn++)Wn===xn&&(w("illegal character after attribute end"),ba=!0);if(Wn=xn+1,ba)continue e;if(Sn in wH){w("attribute <"+Sn+"> already defined");continue}if(wH[Sn]=!0,!f){dh[Sn]=xi;continue}if(h){if(null!==(jc="xmlns"===Sn?"xmlns":120===Sn.charCodeAt(0)&&"xmlns:"===Sn.substr(0,6)?Sn.substr(6):null)){if(En=Ll(xi),Cn=KS(jc),!(is=v[En])){if("xmlns"===jc||Cn in O&&O[Cn]!==En)do{is="ns"+te++}while(typeof O[is]<"u");else is=jc;v[En]=is}O[jc]!==is&&(_0||(O=_le(O),_0=!0),O[jc]=is,"xmlns"===jc&&(O[KS(is)]=En,Fr=is),O[Cn]=En),dh[Sn]=xi;continue}$o.push(Sn,xi);continue}if(-1===(mt=Sn.indexOf(":"))){dh[Sn]=xi;continue}if(!(Vn=O[Sn.substring(0,mt)])){w($5(Sn.substring(0,mt)));continue}(Sn=Fr===Vn?Sn.substr(mt+1):Vn+Sn.substr(mt))===z5&&(-1!==(mt=xi.indexOf(":"))?(Vn=xi.substring(0,mt),xi=(Vn=O[Vn]||Vn)+xi.substring(mt)):xi=Fr+":"+xi),dh[Sn]=xi}if(h)for(Wn=0,js=$o.length;Wn=Fr&&(Wn=En.exec(x))&&!(($o=Wn[0].length+Wn.index)>de);)Cn+=1,Fr=$o;return-1==de?(Vn=$o,Hi=x.substring(Ce)):0===Ce?Hi=x.substring(Ce,de):(Vn=de-Fr,Hi=-1==Ce?x.substring(de):x.substring(de,Ce+1)),{data:Hi,line:Cn,column:Vn}},n&&(ee=Object.create({},{name:xb(function(){return D}),originalName:xb(function(){return A}),attrs:xb(bt),ns:xb(function(){return O})}));-1!==Ce;){if(-1===(de=60===x.charCodeAt(Ce)?Ce:x.indexOf("<",Ce)))return R.length?C("unexpected end of file"):0===Ce?C("missing start tag"):void(Ce",de)))return C("unclosed cdata");if(o&&(o(x.substring(de+9,Ce),u),g))return;Ce+=3;continue}if(45===me&&45===x.charCodeAt(de+3)){if(-1===(Ce=x.indexOf("--\x3e",de)))return C("unclosed comment");if(c&&(c(x.substring(de+4,Ce),Ll,u),g))return;Ce+=3;continue}}if(63!==N){for(ze=de+1;;ze++){if(_=x.charCodeAt(ze),isNaN(_))return Ce=-1,C("unclosed tag");if(34===_)ze=-1!==(me=x.indexOf('"',ze+1))?me:ze;else if(39===_)ze=-1!==(me=x.indexOf("'",ze+1))?me:ze;else if(62===_){Ce=ze;break}}if(33!==N){if(Re={},47===N){if(we=!1,Ge=!0,!R.length)return C("missing open tag");if(ze=D=R.pop(),x.substring(de+2,me=de+2+ze.length)!==ze)return C("closing tag mismatch");for(;me8&&N<14))return C("close tag")}else{if(47===x.charCodeAt(Ce-1)?(ze=D=x.substring(de+1,Ce-1),we=!0,Ge=!0):(ze=D=x.substring(de+1,Ce),we=!0,Ge=!1),!(N>96&&N<123||N>64&&N<91||95===N||58===N))return C("illegal first char nodeName");for(me=1,Kt=ze.length;me96&&N<123||N>64&&N<91||N>47&&N<59||45===N||95===N||46==N)){if(32===N||N<14&&N>8){D=ze.substring(0,me),Re=null;break}return C("invalid nodeName")}Ge||R.push(D)}if(f){if(L=O,we&&(Ge||k.push(L),null===Re&&(h=-1!==ze.indexOf("xmlns",me))&&(q=me,P=ze,bt(),h=!1)),A=D,-1!==(N=D.indexOf(":"))){if(!(p=O[D.substring(0,N)]))return C("missing namespace on <"+A+">");D=D.substr(N+1)}else p=O.xmlns;p&&(D=p+":"+D)}if(we&&(q=me,P=ze,i&&(n?i(ee,Ll,Ge,u):i(D,bt,Ll,Ge,u),g)))return;if(Ge){if(r&&(r(n?ee:D,Ll,we,u),g))return;f&&(O=we?L:k.pop())}Ce+=1}else{if(d&&(d(x.substring(de,Ce+1),Ll,u),g))return;Ce+=1}}else{if(-1===(Ce=x.indexOf("?>",de)))return C("unclosed question");if(l&&(l(x.substring(de,Ce+2),u),g))return;Ce+=2}}}(x),u=U5,g=!1,m},this.stop=function(){g=!0}}function W5(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var xle={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},wb="xsi:type";function q5(e){return e.xml&&e.xml.serialize}function Y5(e){return q5(e)===wb}function K5(e,n){return W5(n)?e.prefix+":"+function Ele(e){return e.charAt(0).toUpperCase()+e.slice(1)}(e.localName):e.name}function Cc(e){return new Error(e)}function Ts(e){return e.$descriptor}function Dle(e){ha(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(n){this.references.push(n)},this.addElement=function(n){if(!n)throw Cc("expected element");var o,t=this.elementsById,r=Ts(n).idProperty;if(r&&(o=n.get(r.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(o))throw new Error("illegal ID <"+o+">");if(t[o])throw Cc("duplicate ID <"+o+">");t[o]=n}},this.addWarning=function(n){this.warnings.push(n)}}function jm(){}function XS(){}function Pu(){}function zm(e,n){this.property=e,this.context=n}function ZS(e,n){this.element=n,this.propertyDesc=e}function Eb(){}function mr(e,n,t){this.model=e,this.type=e.getType(n),this.context=t}function QS(e,n,t){mr.call(this,e,n,t)}function Fu(e,n,t){this.model=e,this.context=t}function JS(e){e instanceof Ro&&(e={model:e}),ha(this,{lax:!1},e)}jm.prototype.handleEnd=function(){},jm.prototype.handleText=function(){},jm.prototype.handleNode=function(){},(XS.prototype=Object.create(jm.prototype)).handleNode=function(){return this},(Pu.prototype=Object.create(jm.prototype)).handleText=function(e){this.body=(this.body||"")+e},(zm.prototype=Object.create(Pu.prototype)).handleNode=function(e){if(this.element)throw Cc("expected no sub nodes");return this.element=this.createReference(e),this},zm.prototype.handleEnd=function(){this.element.id=this.body},zm.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},(ZS.prototype=Object.create(Pu.prototype)).handleEnd=function(){var e=this.body||"",n=this.element,t=this.propertyDesc;e=VS(t.type,e),t.isMany?n.get(t.name).push(e):n.set(t.name,e)},(Eb.prototype=Object.create(Pu.prototype)).handleNode=function(e){var n=this,t=this.element;return t?n=this.handleChild(e):(t=this.element=this.createElement(e),this.context.addElement(t)),n},(mr.prototype=Object.create(Eb.prototype)).addReference=function(e){this.context.addReference(e)},mr.prototype.handleText=function(e){if(!Ts(this.element).bodyProperty)throw Cc("unexpected body text <"+e+">");Pu.prototype.handleText.call(this,e)},mr.prototype.handleEnd=function(){var e=this.body,n=this.element,i=Ts(n).bodyProperty;i&&void 0!==e&&(e=VS(i.type,e),n.set(i.name,e))},mr.prototype.createElement=function(e){var s,n=e.attributes,t=this.type,i=Ts(t),r=this.context,o=new t({}),a=this.model;return On(n,function(c,l){var d=i.propertiesByName[l];d&&d.isReference?d.isMany?On(c.split(" "),function(h){r.addReference({element:o,property:d.ns.name,id:h})}):r.addReference({element:o,property:d.ns.name,id:c}):(d?c=VS(d.type,c):"xmlns"!==l&&(s=Rr(l,i.ns.prefix),a.getPackage(s.prefix)&&r.addWarning({message:"unknown attribute <"+l+">",element:o,property:l,value:c})),o.set(l,c))}),o},mr.prototype.getPropertyForNode=function(e){var c,l,t=Rr(e.name),r=this.model,o=Ts(this.type),s=o.propertiesByName[t.name];if(s&&!s.isAttr)return Y5(s)&&(c=e.attributes[wb])?(c=function Sle(e,n){var t=Rr(e);return function Cle(e,n){var t=e.name,i=e.localName,r=n.xml&&n.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):t}(t,n.getPackage(t.prefix))}(c,r),ha({},s,{effectiveType:Ts(l=r.getType(c)).name})):s;var d=r.getPackage(t.prefix);if(d){if(c=K5(t,d),l=r.getType(c),s=$S(o.properties,function(u){return!u.isVirtual&&!u.isReference&&!u.isAttribute&&l.hasType(u.type)}))return ha({},s,{effectiveType:Ts(l).name})}else if(s=$S(o.properties,function(u){return!u.isReference&&!u.isAttribute&&"Element"===u.type}))return s;throw Cc("unrecognized element <"+t.name+">")},mr.prototype.toString=function(){return"ElementDescriptor["+Ts(this.type).name+"]"},mr.prototype.valueHandler=function(e,n){return new ZS(e,n)},mr.prototype.referenceHandler=function(e){return new zm(e,this.context)},mr.prototype.handler=function(e){return"Element"===e?new Fu(this.model,e,this.context):new mr(this.model,e,this.context)},mr.prototype.handleChild=function(e){var n,t,i,r;if(n=this.getPropertyForNode(e),i=this.element,N5(t=n.effectiveType||n.type))return this.valueHandler(n,i);var o=(r=n.isReference?this.referenceHandler(n).handleNode(e):this.handler(t).handleNode(e)).element;return void 0!==o&&(n.isMany?i.get(n.name).push(o):i.set(n.name,o),n.isReference?(ha(o,{element:i}),this.context.addReference(o)):o.$parent=i),r},(QS.prototype=Object.create(mr.prototype)).createElement=function(e){var n=e.name,t=Rr(n),r=this.type,o=this.model.getPackage(t.prefix),a=o&&K5(t,o)||n;if(!r.hasType(a))throw Cc("unexpected element <"+e.originalName+">");return mr.prototype.createElement.call(this,e)},(Fu.prototype=Object.create(Eb.prototype)).createElement=function(e){var n=e.name,t=Rr(n);return this.model.createAny(n,e.ns[t.prefix+"$uri"],e.attributes)},Fu.prototype.handleChild=function(e){var n=new Fu(this.model,"Element",this.context).handleNode(e),t=this.element,i=n.element;return void 0!==i&&((t.$children=t.$children||[]).push(i),i.$parent=t),n},Fu.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},JS.prototype.fromXML=function(e,n,t){var i=n.rootHandler;n instanceof mr?(i=n,n={}):"string"==typeof n?(i=this.handler(n),n={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,o=this.lax,a=new Dle(ha({},n,{rootHandler:i})),s=new G5({proxy:!0}),c=function kle(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function l(k,O,L){var R=O(),te=R.line,we=R.column,Ge=R.data;"<"===Ge.charAt(0)&&-1!==Ge.indexOf(" ")&&(Ge=Ge.slice(0,Ge.indexOf(" "))+">");var de="unparsable content "+(Ge?Ge+" ":"")+"detected\n\tline: "+te+"\n\tcolumn: "+we+"\n\tnested error: "+k.message;if(L)return a.addWarning({message:de,error:k}),!0;throw Cc(de)}function d(k,O){return l(k,O,!0)}i.context=a,c.push(i);var f=/^<\?xml /i,m=/ encoding="([^"]+)"/i,g=/^utf-8$/i;function w(k,O){try{c.peek().handleText(k)}catch(L){d(L,O)}}var x=r.getPackages().reduce(function(k,O){return k[O.uri]=O.prefix,k},{"http://www.w3.org/XML/1998/namespace":"xml"});return s.ns(x).on("openTag",function(k,O,L,R){var te=k.attrs||{},we=Object.keys(te).reduce(function(de,Ce){var ze=O(te[Ce]);return de[Ce]=ze,de},{});!function C(k,O){var L=c.peek();try{c.push(L.handleNode(k))}catch(R){l(R,O,o)&&c.push(new XS)}}({name:k.name,originalName:k.originalName,attributes:we,ns:k.ns},R)}).on("question",function v(k){if(f.test(k)){var O=m.exec(k),L=O&&O[1];!L||g.test(L)||a.addWarning({message:"unsupported document encoding <"+L+">, falling back to UTF-8"})}}).on("closeTag",function h(){c.pop().handleEnd()}).on("cdata",w).on("text",function(k,O,L){!function E(k,O){k.trim()&&w(k,O)}(O(k),L)}).on("error",l).on("warn",d),new Promise(function(k,O){var L;try{s.parse(e),function u(){var L,R,k=a.elementsById,O=a.references;for(L=0;R=O[L];L++){var te=R.element,we=k[R.id],Ge=Ts(te).propertiesByName[R.property];if(we||a.addWarning({message:"unresolved reference <"+R.id+">",element:R.element,property:R.property,value:R.id}),Ge.isMany){var de=te.get(Ge.name),Ce=de.indexOf(R);-1===Ce&&(Ce=de.length),we?de[Ce]=we:de.splice(Ce,1)}else te.set(Ge.name,we)}}()}catch(de){L=de}var R=i.element;!L&&!R&&(L=Cc("failed to parse document as <"+i.type.$descriptor.name+">"));var te=a.warnings,we=a.references,Ge=a.elementsById;return L?(L.warnings=te,O(L)):k({rootElement:R,elementsById:Ge,references:we,warnings:te})})},JS.prototype.handler=function(e){return new QS(this.model,e)};var Ale=/<|>|'|"|&|\n\r|\n/g,X5=/<|>|&/g;function Mle(e){var n={},t={},i={},r=[],o=[];this.byUri=function(a){return t[a]||e&&e.byUri(a)},this.add=function(a,s){t[a.uri]=a,s?r.push(a):o.push(a),this.mapPrefix(a.prefix,a.uri)},this.uriByPrefix=function(a){return n[a||"xmlns"]},this.mapPrefix=function(a,s){n[a||"xmlns"]=s},this.getNSKey=function(a){return void 0!==a.prefix?a.uri+"|"+a.prefix:a.uri},this.logUsed=function(a){var s=a.uri,c=this.getNSKey(a);i[c]=this.byUri(s),e&&e.logUsed(a)},this.getUsed=function(a){var c=this;return[].concat(r,o).filter(function s(d){var u=c.getNSKey(d);return i[u]})}}function Ole(e,n){return W5(n)?function Ile(e){return e.charAt(0).toLowerCase()+e.slice(1)}(e):e}function Z5(e,n){e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function Q5(e){return bb(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var Lle={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ble={"<":"lt",">":"gt","&":"amp"};function J5(e,n,t){return(e=bb(e)?e:""+e).replace(n,function(i){return"&"+t[i]+";"})}function eD(e){this.tagName=e}function Bl(){}function tD(e){this.tagName=e}function Zn(e,n){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=n}function Cb(e,n){Zn.call(this,e,n)}function $le(){this.value="",this.write=function(e){this.value+=e}}function Ule(e,n){var t=[""];this.append=function(i){return e.write(i),this},this.appendNewLine=function(){return n&&e.write("\n"),this},this.appendIndent=function(){return n&&e.write(t.join(" ")),this},this.indent=function(){return t.push(""),this},this.unindent=function(){return t.pop(),this}}function Gle(e){return e=ha({format:!1,preamble:!0},e||{}),{toXML:function n(t,i){var r=i||new $le,o=new Ule(r,e.format);if(e.preamble&&o.append('\n'),(new Zn).build(t).serializeTo(o),!i)return r.value}}}function Sb(e,n){Ro.call(this,e,n)}eD.prototype.build=function(e){return this.element=e,this},eD.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"").appendNewLine()},Bl.prototype.serializeValue=Bl.prototype.serializeTo=function(e){e.append(this.escape?function jle(e){return J5(e,X5,Ble)}(this.value):this.value)},Bl.prototype.build=function(e,n){return this.value=n,"String"===e.type&&-1!==n.search(X5)&&(this.escape=!0),this},Z5(tD,Bl),tD.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("").appendNewLine()},Zn.prototype.build=function(e){this.element=e;var i,r,n=e.$descriptor,t=this.propertyDescriptor,o=n.isGeneric;return i=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=t?this.nsPropertyTagName(t):this.nsTagName(n),this.tagName=this.addTagName(this.ns),o||(r=function Fle(e){return US(e.$descriptor.properties,function(t){var i=t.name;if(t.isVirtual||!V5(e,i))return!1;var r=e[i];return r!==t.default&&null!==r&&(!t.isMany||r.length)})}(e),this.parseAttributes(function zle(e){return US(e,function(n){return n.isAttr})}(r)),this.parseContainments(function Hle(e){return US(e,function(n){return!n.isAttr})}(r))),this.parseGenericAttributes(e,i),this},Zn.prototype.nsTagName=function(e){return function Nle(e,n){return ha(n.isGeneric?{localName:n.ns.localName}:{localName:Ole(n.ns.localName,n.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},Zn.prototype.nsPropertyTagName=function(e){return function Ple(e,n){return ha({localName:n.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},Zn.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},Zn.prototype.nsAttributeName=function(e){var n;if(n=bb(e)?Rr(e):e.ns,e.inherited)return{localName:n.localName};var t=this.logNamespaceUsed(n);return this.getNamespaces().logUsed(t),this.isLocalNs(t)?{localName:n.localName}:ha({localName:n.localName},t)},Zn.prototype.parseGeneric=function(e){var n=this,t=this.body,i=[];return On(e,function(r,o){"$body"===o?t.push((new Bl).build({type:"String"},r)):"$children"===o?On(r,function(s){t.push(new Zn(n).build(s))}):0!==o.indexOf("$")&&n.parseNsAttribute(e,o,r)&&i.push({name:o,value:r})}),i},Zn.prototype.parseNsAttribute=function(e,n,t){var o,i=e.$model,r=Rr(n);if("xmlns"===r.prefix&&(o={prefix:r.localName,uri:t}),!r.prefix&&"xmlns"===r.localName&&(o={uri:t}),!o)return{name:n,value:t};if(i&&i.getPackage(t))this.logNamespace(o,!0,!0);else{var a=this.logNamespaceUsed(o,!0);this.getNamespaces().logUsed(a)}},Zn.prototype.parseNsAttributes=function(e,n){var t=this,r=[];return On(e.$attrs,function(o,a){var s=t.parseNsAttribute(e,a,o);s&&r.push(s)}),r},Zn.prototype.parseGenericAttributes=function(e,n){var t=this;On(n,function(i){if(i.name!==wb)try{t.addAttribute(t.nsAttributeName(i.name),i.value)}catch(r){console.warn("missing namespace information for ",i.name,"=",i.value,"on",e,r)}})},Zn.prototype.parseContainments=function(e){var n=this,t=this.body,i=this.element;On(e,function(r){var o=i.get(r.name),a=r.isReference;if(r.isMany||(o=[o]),r.isBody)t.push((new Bl).build(r,o[0]));else if(N5(r.type))On(o,function(d){t.push(new tD(n.addTagName(n.nsPropertyTagName(r))).build(r,d))});else if(a)On(o,function(d){t.push(new eD(n.addTagName(n.nsPropertyTagName(r))).build(d))});else{var c=Y5(r),l=function wle(e){return"property"===q5(e)}(r);On(o,function(d){var u;u=c?new Cb(n,r):l?new Zn(n,r):new Zn(n),t.push(u.build(d))})}})},Zn.prototype.getNamespaces=function(e){var i,n=this.namespaces,t=this.parent;return n||(i=t&&t.getNamespaces(),e||!i?this.namespaces=n=new Mle(i):n=i),n},Zn.prototype.logNamespace=function(e,n,t){var i=this.getNamespaces(t),r=e.uri,o=e.prefix;return(!i.byUri(r)||t)&&i.add(e,n),i.mapPrefix(o,r),e},Zn.prototype.logNamespaceUsed=function(e,n){var s,c,l,i=this.element.$model,r=this.getNamespaces(n),o=e.prefix,a=e.uri;if(!o&&!a)return{localName:e.localName};if(l=xle[o]||i&&(i.getPackage(o)||{}).uri,!(a=a||l||r.uriByPrefix(o)))throw new Error("no namespace uri given for prefix <"+o+">");if(!(e=r.byUri(a))){for(s=o,c=1;r.uriByPrefix(s);)s=o+"_"+c++;e=this.logNamespace({prefix:s,uri:a},l===a)}return o&&r.mapPrefix(o,a),e},Zn.prototype.parseAttributes=function(e){var n=this,t=this.element;On(e,function(i){var r=t.get(i.name);if(i.isReference)if(i.isMany){var o=[];On(r,function(a){o.push(a.id)}),r=o.join(" ")}else r=r.id;n.addAttribute(n.nsAttributeName(i),r)})},Zn.prototype.addTagName=function(e){var n=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(n),Q5(e)},Zn.prototype.addAttribute=function(e,n){var t=this.attrs;bb(n)&&(n=function Vle(e){return J5(e,Ale,Lle)}(n));var i=function ole(e,n){n=qS(n);var t=zS(e)?-1:void 0;return On(e,function(i,r){if(n(i,r))return t=r,!1}),t}(t,function(o){return o.name.localName===e.localName&&o.name.uri===e.uri&&o.name.prefix===e.prefix}),r={name:e,value:n};-1!==i?t.splice(i,1,r):t.push(r)},Zn.prototype.serializeAttributes=function(e){var n=this.attrs,t=this.namespaces;t&&(n=function Rle(e){return e.getUsed().filter(function(n){return"xml"!==n.prefix}).map(function(n){return{name:"xmlns"+(n.prefix?":"+n.prefix:""),value:n.uri}})}(t).concat(n)),On(n,function(i){e.append(" ").append(Q5(i.name)).append('="').append(i.value).append('"')})},Zn.prototype.serializeTo=function(e){var n=this.body[0],t=n&&n.constructor!==Bl;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(n?">":" />"),n&&(t&&e.appendNewLine().indent(),On(this.body,function(i){i.serializeTo(e)}),t&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()},Z5(Cb,Zn),Cb.prototype.parseNsAttributes=function(e){var n=Zn.prototype.parseNsAttributes.call(this,e),t=e.$descriptor;if(t.name===this.propertyDescriptor.type)return n;var i=this.typeNs=this.nsTagName(t);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(wb),(i.prefix?i.prefix+":":"")+o+t.ns.localName),n},Cb.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},(Sb.prototype=Object.create(Ro.prototype)).fromXML=function(e,n,t){(function Mce(e){return"[object String]"===Rm.call(e)})(n)||(t=n,n="bpmn:Definitions");var i=new JS(T5({model:this,lax:!0},t)),r=i.handler(n);return i.fromXML(e,r)},Sb.prototype.toXML=function(e,n){var t=new Gle(n);return new Promise(function(i,r){try{return i({xml:t.toXML(e)})}catch(a){return r(a)}})};var Nde={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]},color:{name:"BPMN in Color",uri:"http://www.omg.org/spec/BPMN/non-normative/color/1.0",prefix:"color",types:[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};function Pde(e,n){return new Sb(T5({},Nde,e),n)}function ir(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':""}var Fde=new(Au())({name:"bpmnElement",enumerable:!0},{name:"di",configurable:!0});function Wr(e,n){return e.$instanceOf(n)}function Bde(e,n){var t={},i=[];function r(P,q){return function(Re){P(Re,q)}}function o(P){t[P.id]=P}function l(P,q){try{var Re=P.di&&function s(P,q){if(P.gfx)throw new Error(n("already rendered {element}",{element:ir(P)}));return e.element(P,q)}(P,q);return o(P),Re}catch(bt){d(bt.message,{element:P,error:bt}),console.error(n("failed to import {element}",{element:ir(P)})),console.error(bt)}}function d(P,q){e.error(P,q)}function u(P){var q=P.bpmnElement;q?q.di?d(n("multiple DI elements defined for {element}",{element:ir(q)}),{element:q}):(Fde.bind(q,"di"),q.di=P):d(n("no bpmnElement referenced in {element}",{element:ir(P)}),{element:P})}function m(P){u(P)}function v(){for(;i.length;)i.shift()()}function C(P,q){_(P,q),we(P.ioSpecification,q),te(P.artifacts,q),o(P)}function E(P,q){l(P,q)}function k(P,q){l(P,q)}function O(P,q){l(P,q)}function L(P,q){l(P,q)}function R(P,q){l(P,q)}function te(P,q){ht(P,function(Re){Wr(Re,"bpmn:Association")?i.push(function(){R(Re,q)}):R(Re,q)})}function we(P,q){P&&(ht(P.dataInputs,r(O,q)),ht(P.dataOutputs,r(L,q)))}function Ge(P,q){_(P,q),te(P.artifacts,q)}function de(P,q){var Re=l(P,q);Wr(P,"bpmn:SubProcess")&&Ge(P,Re||q),Wr(P,"bpmn:Activity")&&we(P.ioSpecification,q),i.push(function(){ht(P.dataInputAssociations,r(k,q)),ht(P.dataOutputAssociations,r(k,q))})}function Kt(P,q){i.push(function(){var Re=l(P,q);P.childLaneSet&&me(P.childLaneSet,Re||q),function ee(P){ht(P.flowNodeRef,function(q){var Re=q.get("lanes");Re&&Re.push(P)})}(P)})}function me(P,q){ht(P.lanes,r(Kt,q))}function _(P,q){(function p(P,q){ht(P,function(Re){Wr(Re,"bpmn:SequenceFlow")?i.push(function(){!function Ce(P,q){l(P,q)}(Re,q)}):Wr(Re,"bpmn:BoundaryEvent")?i.unshift(function(){de(Re,q)}):Wr(Re,"bpmn:FlowNode")?de(Re,q):Wr(Re,"bpmn:DataObject")||(Wr(Re,"bpmn:DataStoreReference")||Wr(Re,"bpmn:DataObjectReference")?function ze(P,q){l(P,q)}(Re,q):d(n("unrecognized flowElement {element} in context {context}",{element:ir(Re),context:q?ir(q.businessObject):"null"}),{element:Re,context:q}))})})(P.flowElements,q),P.laneSets&&function N(P,q){ht(P,r(me,q))}(P.laneSets,q)}function D(P,q){var Re=l(P,q),bt=P.processRef;bt&&C(bt,Re||q)}return{handleDeferred:v,handleDefinitions:function g(P,q){var Re=P.diagrams;if(q&&-1===Re.indexOf(q))throw new Error(n("diagram not part of bpmn:Definitions"));if(!q&&Re&&Re.length&&(q=Re[0]),!q)throw new Error(n("no diagram to display"));!function h(P){!function f(P){u(P),ht(P.planeElement,m)}(P.plane)}(q);var bt=q.plane;if(!bt)throw new Error(n("no plane for {element}",{element:ir(q)}));var Tt=bt.bpmnElement;if(!Tt){if(Tt=function Lde(e){return mo(e.rootElements,function(n){return Wr(n,"bpmn:Process")||Wr(n,"bpmn:Collaboration")})}(P),!Tt)throw new Error(n("no process or collaboration to display"));d(n("correcting missing bpmnElement on {plane} to {rootElement}",{plane:ir(bt),rootElement:ir(Tt)})),bt.bpmnElement=Tt,u(bt)}var En=function c(P,q){return e.root(P,q)}(Tt,bt);if(Wr(Tt,"bpmn:Process"))C(Tt,En);else{if(!Wr(Tt,"bpmn:Collaboration"))throw new Error(n("unsupported bpmnElement for {plane}: {rootElement}",{plane:ir(bt),rootElement:ir(Tt)}));(function A(P){ht(P.participants,r(D)),te(P.artifacts),i.push(function(){!function x(P,q){ht(P,r(E,q))}(P.messageFlows)})})(Tt),function w(P,q){var Re=Bn(P,function(bt){return!function a(P){return t[P.id]}(bt)&&Wr(bt,"bpmn:Process")&&bt.laneSets});Re.forEach(r(C,q))}(P.rootElements,En)}v()},handleSubProcess:Ge,registerDi:u}}function Lu(e){return function(){if(!window.Promise)throw new Error("Promises is not supported in this environment. Please polyfill Promise.");var n=arguments.length;if(!(n>=1&&YC(arguments[n-1])))return e.apply(this,arguments);var t=arguments[n-1];console.warn(new Error("Passing callbacks to "+e.name+" is deprecated and will be removed in a future major release. Please switch to promises: https://bpmn.io/l/moving-to-promises.html"));var i=Array.prototype.slice.call(arguments,0,-1);e.apply(this,i).then(function(r){var o=Object.keys(r)[0];return t(null,r[o])},function(r){return t(r,r.warnings)})}}var eB='';function Db(e){return e.join(";")}var Hm,tB=Db(["color: #404040"]),Ude='
'+eB+'Web-based tooling for BPMN, DMN and CMMN diagrams powered by bpmn.io.
';function Qn(e){e=qe({},qde,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),function Kde(e){var i=In(''+eB+"");e.appendChild(i),ft.bind(i,"click",function(r){(function Gde(){Hm||(Hm=In(Ude),go.bind(Hm,".backdrop","click",function(e){document.body.removeChild(Hm)})),document.body.appendChild(Hm)})(),r.preventDefault()})}(this._container),this._init(this._container,this._moddle,e)}function kb(e,n){return e.warnings=n,e}tt()(Qn,Iu),Qn.prototype.importXML=Lu(function(n,t){var i=this;return new Promise(function(o,a){n=i._emit("import.parse.start",{xml:n})||n,i._moddle.fromXML(n,"bpmn:Definitions").then(function(s){var c=s.rootElement,d=s.warnings;c=i._emit("import.parse.complete",function r(o){var a=i.get("eventBus").createEvent(o);return Object.defineProperty(a,"context",{enumerable:!0,get:function(){return console.warn(new Error("import.parse.complete is deprecated and will be removed in future library versions")),{warnings:o.warnings,references:o.references,elementsById:o.elementsById}}}),a}({error:null,definitions:c,elementsById:s.elementsById,references:s.references,warnings:d}))||c,i.importDefinitions(c,t).then(function(h){var f=[].concat(d,h.warnings||[]);return i._emit("import.done",{error:null,warnings:f}),o({warnings:f})}).catch(function(h){var f=[].concat(d,h.warnings||[]);return i._emit("import.done",{error:h,warnings:f}),a(kb(h,f))})}).catch(function(s){return i._emit("import.parse.complete",{error:s}),s=function Wde(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);return t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]),e}(s),i._emit("import.done",{error:s,warnings:s.warnings}),a(s)})})}),Qn.prototype.importDefinitions=Lu(function(n,t){var i=this;return new Promise(function(r,o){i._setDefinitions(n),i.open(t).then(function(a){return r({warnings:a.warnings})}).catch(function(a){return o(a)})})}),Qn.prototype.open=Lu(function(n){var t=this._definitions,i=n,r=this;return new Promise(function(o,a){if(!t){var s=new Error("no XML imported");return a(kb(s,[]))}if("string"==typeof n&&(i=function Yde(e,n){return n&&mo(e.diagrams,function(t){return t.id===n})||null}(t,n),!i)){var c=new Error("BPMNDiagram <"+n+"> not found");return a(kb(c,[]))}try{r.clear()}catch(l){return a(kb(l,[]))}(function Vde(e,n,t){var i,r,o,s=[];return new Promise(function(l,d){try{return i=e.get("bpmnImporter"),r=e.get("eventBus"),o=e.get("translate"),r.fire("import.render.start",{definitions:n}),function c(l,d){new Bde({root:function(f){return i.add(f)},element:function(f,m){return i.add(f,m)},error:function(f,m){s.push({message:f,context:m})}},o).handleDefinitions(l,d)}(n,t),r.fire("import.render.complete",{error:void 0,warnings:s}),l({warnings:s})}catch(u){return u.warnings=s,d(u)}})})(r,t,i).then(function(l){return o({warnings:l.warnings})}).catch(function(l){return a(l)})})}),Qn.prototype.saveXML=Lu(function(n){n=n||{};var t=this,i=this._definitions;return new Promise(function(r){if(!i)return r({error:new Error("no definitions loaded")});i=t._emit("saveXML.start",{definitions:i})||i,t._moddle.toXML(i,n).then(function(o){var a=o.xml;return a=t._emit("saveXML.serialized",{xml:a})||a,r({xml:a})})}).catch(function(r){return{error:r}}).then(function(r){t._emit("saveXML.done",r);var o=r.error;return o?Promise.reject(o):r})}),Qn.prototype.saveSVG=Lu(function(n){n=n||{};var t=this;return new Promise(function(i,r){var o,a;t._emit("saveSVG.start");try{var s=t.get("canvas"),c=s.getDefaultLayer(),l=Xn("defs",s._svg),d=Z3(c),u=l?""+Z3(l)+"":"",h=c.getBBox();o='\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n\n'+u+d+""}catch(f){a=f}return t._emit("saveSVG.done",{error:a,svg:o}),a?r(a):i({svg:o})})}),Qn.prototype._setDefinitions=function(e){this._definitions=e},Qn.prototype.getModules=function(){return this._modules},Qn.prototype.clear=function(){this.getDefinitions()&&(this.get("elementRegistry").forEach(function(e){var n=e.businessObject;n&&n.di&&delete n.di}),Iu.prototype.clear.call(this))},Qn.prototype.destroy=function(){Iu.prototype.destroy.call(this),Ua(this._container)},Qn.prototype.on=function(e,n,t,i){return this.get("eventBus").on(e,n,t,i)},Qn.prototype.off=function(e,n){this.get("eventBus").off(e,n)},Qn.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=Xn(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Qn.prototype.getDefinitions=function(){return this._definitions},Qn.prototype.detach=function(){var e=this._container,n=e.parentNode;n&&(this._emit("detach",{}),n.removeChild(e))},Qn.prototype._init=function(e,n,t){var i=t.modules||this.getModules(),a=[].concat([{bpmnjs:["value",this],moddle:["value",n]}],i,t.additionalModules||[]),s=qe(F3(t,["additionalModules"]),{canvas:qe({},t.canvas,{container:e}),modules:a});Iu.call(this,s),t&&t.container&&this.attachTo(t.container)},Qn.prototype._emit=function(e,n){return this.get("eventBus").fire(e,n)},Qn.prototype._createContainer=function(e){var n=In('
');return qe(n.style,{width:nB(e.width),height:nB(e.height),position:e.position}),n},Qn.prototype._createModdle=function(e){return new Pde(qe({},this._moddleExtensions,e.moddleExtensions))},Qn.prototype._modules=[];var qde={width:"100%",height:"100%",position:"relative"};function nB(e){return e+(P3(e)?"px":"")}function $m(e){Qn.call(this,e),this.on("import.parse.complete",function(n){n.error||this._collectIds(n.definitions,n.elementsById)},this),this.on("diagram.destroy",function(){this.get("moddle").ids.clear()},this)}function b(e,n){var t=Ue(e);return t&&"function"==typeof t.$instanceOf&&t.$instanceOf(n)}function tn(e,n){return wu(n,function(t){return b(e,t)})}function Ue(e){return e&&e.businessObject||e}function pn(e){return!b(e,"bpmn:CallActivity")&&(b(e,"bpmn:SubProcess")?Ue(e).di&&!!Ue(e).di.isExpanded:!b(e,"bpmn:Participant")||!!Ue(e).processRef)}function yo(e){return e&&!!Ue(e).triggeredByEvent}function Tb(e,n){var t=Ue(e),i=!1;return t.eventDefinitions&&ht(t.eventDefinitions,function(r){b(r,n)&&(i=!0)}),i}function iB(e){return b(e,"bpmn:FlowElement")||b(e,"bpmn:Participant")||b(e,"bpmn:Lane")||b(e,"bpmn:SequenceFlow")||b(e,"bpmn:MessageFlow")||b(e,"bpmn:DataInput")||b(e,"bpmn:DataOutput")?"name":b(e,"bpmn:TextAnnotation")?"text":b(e,"bpmn:Group")?"categoryValueRef":void 0}function fa(e){var n=e.businessObject,t=iB(n);if(t)return"categoryValueRef"===t?function eue(e){var n=e.categoryValueRef;return n&&n.value||""}(n):n[t]||""}function qa(e,n,t){return wu(e.eventDefinitions,function(r){return r.$type===n&&function i(r,o){return KC(o,function(a,s){return r[s]==a})}(e,t)})}function Bu(e){return e.businessObject.di}function pr(e){return e.businessObject}function Yt(e,n){var t=Bu(e);return t.get("color:background-color")||t.get("bioc:fill")||n||"white"}function Fe(e,n){var t=Bu(e);return t.get("color:border-color")||t.get("bioc:stroke")||n||"black"}function Um(e,n,t){var r=Bu(e).get("label");return r&&r.get("color:color")||n||Fe(e,t)}tt()($m,Qn),$m.prototype._createModdle=function(e){var n=Qn.prototype._createModdle.call(this,e);return n.ids=new qC([32,36,1]),n},$m.prototype._collectIds=function(e,n){var r,i=e.$model.ids;for(r in i.clear(),n)i.claim(r,n[r])};var cue=new qC,Vu=.95;function Vl(e,n,t,i,r,o,a){ua.call(this,n,a);var s=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,l=e&&e.defaultLabelColor,d=cue.next(),u={},h=t.computeStyle;function f(_,p){var D=qe({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},p.attrs),A=p.ref||{x:0,y:0},ee=p.scale||1;"none"===D.strokeDasharray&&(D.strokeDasharray=[1e4,1]);var P=Qe("marker");ve(p.element,D),nt(P,p.element),ve(P,{id:_,viewBox:"0 0 20 20",refX:A.x,refY:A.y,markerWidth:20*ee,markerHeight:20*ee,orient:"auto"});var q=Xn("defs",r._svg);q||(q=Qe("defs"),nt(r._svg,q)),nt(q,P),u[_]=P}function m(_){return _.replace(/[^0-9a-zA-z]+/g,"_")}function g(_,p,D){var A=_+"-"+m(p)+"-"+m(D)+"-"+d;return u[A]||function v(_,p,D,A){if("sequenceflow-end"===p){var ee=Qe("path");ve(ee,{d:"M 1 5 L 11 10 L 1 15 Z"}),f(_,{element:ee,ref:{x:11,y:10},scale:.5,attrs:{fill:A,stroke:A}})}if("messageflow-start"===p){var P=Qe("circle");ve(P,{cx:6,cy:6,r:3.5}),f(_,{element:P,attrs:{fill:D,stroke:A},ref:{x:6,y:6}})}if("messageflow-end"===p){var q=Qe("path");ve(q,{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z"}),f(_,{element:q,attrs:{fill:D,stroke:A,strokeLinecap:"butt"},ref:{x:8.5,y:5}})}if("association-start"===p){var Re=Qe("path");ve(Re,{d:"M 11 5 L 1 10 L 11 15"}),f(_,{element:Re,attrs:{fill:"none",stroke:A,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}if("association-end"===p){var bt=Qe("path");ve(bt,{d:"M 1 5 L 11 10 L 1 15"}),f(_,{element:bt,attrs:{fill:"none",stroke:A,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}if("conditional-flow-marker"===p){var Tt=Qe("path");ve(Tt,{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z"}),f(_,{element:Tt,attrs:{fill:D,stroke:A},ref:{x:-1,y:10},scale:.5})}if("conditional-default-flow-marker"===p){var En=Qe("path");ve(En,{d:"M 6 4 L 10 16"}),f(_,{element:En,attrs:{stroke:A},ref:{x:0,y:10},scale:.5})}}(A,_,p,D),"url(#"+A+")"}function C(_,p,D,A,ee){Ss(A)&&(ee=A,A=0),A=A||0,"none"===(ee=h(ee,{stroke:"black",strokeWidth:2,fill:"white"})).fill&&delete ee.fillOpacity;var P=p/2,q=D/2,Re=Qe("circle");return ve(Re,{cx:P,cy:q,r:Math.round((p+D)/4-A)}),ve(Re,ee),nt(_,Re),Re}function w(_,p,D,A,ee,P){Ss(ee)&&(P=ee,ee=0),ee=ee||0,P=h(P,{stroke:"black",strokeWidth:2,fill:"white"});var q=Qe("rect");return ve(q,{x:ee,y:ee,width:p-2*ee,height:D-2*ee,rx:A,ry:A}),ve(q,P),nt(_,q),q}function x(_,p,D){var A=Em(p,D=h(D,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"}));return nt(_,A),A}function k(_,p,D){D=h(D,["no-fill"],{strokeWidth:2,stroke:"black"});var A=Qe("path");return ve(A,{d:p}),ve(A,D),nt(_,A),A}function O(_,p,D,A){return k(p,D,qe({"data-marker":_},A))}function L(_){return function(p,D){return Kt[_](p,D)}}function R(_){return Kt[_]}function te(_,p){var D=pr(_),A=function nue(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}(D);return D.eventDefinitions&&D.eventDefinitions.length>1?D.parallelMultiple?R("bpmn:ParallelMultipleEventDefinition")(p,_,A):R("bpmn:MultipleEventDefinition")(p,_,A):qa(D,"bpmn:MessageEventDefinition")?R("bpmn:MessageEventDefinition")(p,_,A):qa(D,"bpmn:TimerEventDefinition")?R("bpmn:TimerEventDefinition")(p,_,A):qa(D,"bpmn:ConditionalEventDefinition")?R("bpmn:ConditionalEventDefinition")(p,_):qa(D,"bpmn:SignalEventDefinition")?R("bpmn:SignalEventDefinition")(p,_,A):qa(D,"bpmn:EscalationEventDefinition")?R("bpmn:EscalationEventDefinition")(p,_,A):qa(D,"bpmn:LinkEventDefinition")?R("bpmn:LinkEventDefinition")(p,_,A):qa(D,"bpmn:ErrorEventDefinition")?R("bpmn:ErrorEventDefinition")(p,_,A):qa(D,"bpmn:CancelEventDefinition")?R("bpmn:CancelEventDefinition")(p,_,A):qa(D,"bpmn:CompensateEventDefinition")?R("bpmn:CompensateEventDefinition")(p,_,A):qa(D,"bpmn:TerminateEventDefinition")?R("bpmn:TerminateEventDefinition")(p,_,A):null}function we(_,p,D){D=qe({size:{width:100}},D);var A=o.createText(p||"",D);return Bt(A).add("djs-label"),nt(_,A),A}function Ge(_,p,D){return we(_,pr(p).name,{box:p,align:D,padding:5,style:{fill:Um(p,l,c)}})}function Ce(_,p,D){DS(we(_,p,{box:{height:30,width:D.height},align:"center-middle",style:{fill:Um(D,l,c)}}),0,1*D.height,270)}function ze(_){for(var p=_.waypoints,D="m "+p[0].x+","+p[0].y,A=1;A1)for(;i=t.shift();){if(!(i.length+ow?E.width:w},0),g=o.top;"middle"===r.vertical&&(g+=(t.height-f)/2),g-=(s||l[0].height)/4;var v=Qe("text");return ve(v,i),Z(l,function(w){var E;switch(g+=s||w.height,r.horizontal){case"left":E=o.left;break;case"right":E=(a?m:d)-o.right-w.width;break;default:E=Math.max(((a?m:d)-w.width)/2+o.left,0)}var x=Qe("tspan");ve(x,{x:E,y:g}),x.textContent=w.text,nt(v,x)}),ui(u),{dimensions:{width:m,height:f},element:v}},oB.$inject=["config.textRenderer"];var Sue=/\{([^{}]+)\}/g,Due=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;const Aue={__init__:["bpmnRenderer"],bpmnRenderer:["type",Vl],textRenderer:["type",oB],pathMap:["type",iD]},Ib={translate:["value",function Mue(e,n){return n=n||{},e.replace(/{([^}]+)}/g,function(t,i){return n[i]||"{"+i+"}"})}]};var ju={width:90,height:20},aB=15;function Ya(e){return b(e,"bpmn:Event")||b(e,"bpmn:Gateway")||b(e,"bpmn:DataStoreReference")||b(e,"bpmn:DataObjectReference")||b(e,"bpmn:DataInput")||b(e,"bpmn:DataOutput")||b(e,"bpmn:SequenceFlow")||b(e,"bpmn:MessageFlow")||b(e,"bpmn:Group")}function zu(e){return Mi(e.label)}function Hu(e){return e.waypoints?function Iue(e){var n=e.length/2-1,t=e[Math.floor(n)],i=e[Math.ceil(n+.01)],r=function Oue(e){var n=e.length/2-1,t=e[Math.floor(n)],i=e[Math.ceil(n+.01)];return{x:t.x+(i.x-t.x)/2,y:t.y+(i.y-t.y)/2}}(e),o=Math.atan((i.y-t.y)/(i.x-t.x)),a=r.x,s=r.y;return Math.abs(o)=e.x&&t<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}(n,Pt(l))||(n=this._canvas.getRootElement())),this._canvas.addShape(i,n,a)}else{if(!b(t,"bpmndi:BPMNEdge"))throw new Error(r("unknown di {di} for element {semantic}",{di:ir(t),semantic:ir(e)}));var d=this._getSource(e),u=this._getTarget(e);i=this._elementFactory.createConnection(Ob(e,{hidden:n&&(n.hidden||n.collapsed),source:d,target:u,waypoints:Nue(e,d,u)})),b(e,"bpmn:DataAssociation")&&(n=null),b(e,"bpmn:SequenceFlow")&&(a=0),this._canvas.addConnection(i,n,a)}return Ya(e)&&fa(i)&&this.addLabel(e,i),this._eventBus.fire("bpmnElement.added",{element:i}),i},As.prototype._attachBoundary=function(e,n){var t=this._translate,i=e.attachedToRef;if(!i)throw new Error(t("missing {semantic}#attachedToRef",{semantic:ir(e)}));var r=this._elementRegistry.get(i.id),o=r&&r.attachers;if(!r)throw sB(t,e,i,"attachedToRef");n.host=r,o||(r.attachers=o=[]),-1===o.indexOf(n)&&o.push(n)},As.prototype.addLabel=function(e,n){var t,i,r;return t=function Rue(e,n){var t,i,r,a=e.di.label;return a&&a.bounds?(r=a.bounds,i={width:Math.max(ju.width,r.width),height:r.height},t={x:r.x+r.width/2,y:r.y+r.height/2}):(t=Hu(n),i=ju),qe({x:t.x-i.width/2,y:t.y-i.height/2},i)}(e,n),(i=fa(n))&&(t=this._textRenderer.getExternalLabelBounds(t,i)),r=this._elementFactory.createLabel(Ob(e,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!fa(n),x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height)})),this._canvas.addShape(r,n.parent)},As.prototype._getEnd=function(e,n){var t,i,r=e.$type,o=this._translate;if(i=e[n+"Ref"],"source"===n&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===n&&"bpmn:DataOutputAssociation"===r||"target"===n&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),t=i&&this._getElement(i))return t;throw i?sB(o,e,i,n+"Ref"):new Error(o("{semantic}#{side} Ref not specified",{semantic:ir(e),side:n}))},As.prototype._getSource=function(e){return this._getEnd(e,"source")},As.prototype._getTarget=function(e){return this._getEnd(e,"target")},As.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};const Lue={__depends__:[Aue,{__depends__:[Ib],bpmnImporter:["type",As]}]};function cB(e){!e||"function"!=typeof e.stopPropagation||e.stopPropagation()}function $u(e){return e.originalEvent||e.srcEvent}function rD(e,n){cB(e),cB($u(e))}function Sc(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function oD(e,n){return($u(e)||e).button===n}function Dc(e){return oD(e,0)}function Uu(e){var n=$u(e)||e;return!!Dc(e)&&(function Bue(){return/mac/i.test(navigator.platform)}()?n.metaKey:n.ctrlKey)}function lB(e){var n=$u(e)||e;return Dc(e)&&n.shiftKey}function jue(e){return!0}function Rb(e){return Dc(e)||function Vue(e){return oD(e,1)}(e)}function uB(e,n,t){var i=this;function r(L,R,te){var we,Ge;(function s(L,R){return!(l[L]||Dc)(R)})(L,R)||(te?Ge=n.getGraphics(te):(we=R.delegateTarget||R.target)&&(te=n.get(Ge=we)),Ge&&te&&!1===e.fire(L,{element:te,gfx:Ge,originalEvent:R})&&(R.stopPropagation(),R.preventDefault()))}var o={};function a(L){return o[L]}var c={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},l={"element.contextmenu":jue,"element.mousedown":Rb,"element.mouseup":Rb,"element.click":Rb,"element.dblclick":Rb};function h(L,R,te,we){var Ge=o[te]=function(de){r(te,de)};we&&(l[te]=we),Ge.$delegate=go.bind(L,"svg, .djs-element",R,Ge)}function f(L,R,te){var we=a(te);we&&go.unbind(L,R,we.$delegate)}e.on("canvas.destroy",function(L){!function g(L){Z(c,function(R,te){f(L,te,R)})}(L.svg)}),e.on("canvas.init",function(L){!function m(L){Z(c,function(R,te){h(L,te,R)})}(L.svg)}),e.on(["shape.added","connection.added"],function(L){e.fire("interactionEvents.createHit",{element:L.element,gfx:L.gfx})}),e.on(["shape.changed","connection.changed"],500,function(L){e.fire("interactionEvents.updateHit",{element:L.element,gfx:L.gfx})}),e.on("interactionEvents.createHit",500,function(L){i.createDefaultHit(L.element,L.gfx)}),e.on("interactionEvents.updateHit",function(L){i.updateDefaultHit(L.element,L.gfx)});var v=x("djs-hit djs-hit-stroke"),C=x("djs-hit djs-hit-click-stroke"),E={all:x("djs-hit djs-hit-all"),"click-stroke":C,stroke:v};function x(L,R){return R=je({stroke:"white",strokeWidth:15},R||{}),t.cls(L,["no-fill","no-border"],R)}function k(L,R){var te=E[R];if(!te)throw new Error("invalid hit type <"+R+">");return ve(L,te),L}function O(L,R){nt(L,R)}this.removeHits=function(L){Z(iS(".djs-hit",L),ui)},this.createDefaultHit=function(L,R){var te=L.waypoints,we=L.isFrame;return te?this.createWaypointsHit(R,te):this.createBoxHit(R,we?"stroke":"all",{width:L.width,height:L.height})},this.createWaypointsHit=function(L,R){var te=Em(R);return k(te,"stroke"),O(L,te),te},this.createBoxHit=function(L,R,te){te=je({x:0,y:0},te);var we=Qe("rect");return k(we,R),ve(we,te),O(L,we),we},this.updateDefaultHit=function(L,R){var te=Xn(".djs-hit",R);if(te)return L.waypoints?function Yse(e,n){ve(e,{points:Q3(n)})}(te,L.waypoints):ve(te,{width:L.width,height:L.height}),te},this.fire=r,this.triggerMouseEvent=function d(L,R,te){var we=c[L];if(!we)throw new Error("unmapped DOM event name <"+L+">");return r(we,R,te)},this.mouseHandler=a,this.registerEvent=h,this.unregisterEvent=f}uB.$inject=["eventBus","elementRegistry","styles"];const Gm={__init__:["interactionEvents"],interactionEvents:["type",uB]};function Nb(e,n,t){this.offset=6;var i=n.cls("djs-outline",["no-fill"]),r=this;function o(a,s){var c=Qe("rect");return ve(c,je({x:10,y:10,width:100,height:100},i)),nt(a,c),c}e.on(["shape.added","shape.changed"],500,function(a){var s=a.element,c=a.gfx,l=Xn(".djs-outline",c);l||(l=o(c)),r.updateShapeOutline(l,s)}),e.on(["connection.added","connection.changed"],function(a){var s=a.element,c=a.gfx,l=Xn(".djs-outline",c);l||(l=o(c)),r.updateConnectionOutline(l,s)})}Nb.prototype.updateShapeOutline=function(e,n){ve(e,{x:-this.offset,y:-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},Nb.prototype.updateConnectionOutline=function(e,n){var t=tr(n);ve(e,{x:t.x-this.offset,y:t.y-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},Nb.$inject=["eventBus","styles","elementRegistry"];const hB={__init__:["outline"],outline:["type",Nb]};function Gu(e,n){this._eventBus=e,this._canvas=n,this._selectedElements=[];var t=this;e.on(["shape.remove","connection.remove"],function(i){t.deselect(i.element)}),e.on(["diagram.clear","plane.set"],function(i){t.select(null)})}Gu.$inject=["eventBus","canvas"],Gu.prototype.deselect=function(e){var n=this._selectedElements,t=n.indexOf(e);if(-1!==t){var i=n.slice();n.splice(t,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})}},Gu.prototype.get=function(){return this._selectedElements},Gu.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},Gu.prototype.select=function(e,n){var t=this._selectedElements,i=t.slice();mn(e)||(e=e?[e]:[]);var r=this._canvas;e=e.filter(function(o){return r.findPlane(o)===r.getActivePlane()}),n?Z(e,function(o){-1===t.indexOf(o)&&t.push(o)}):this._selectedElements=t=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})};var mB="selected";function pB(e,n,t,i){function r(a,s){n.addMarker(a,s)}function o(a,s){n.removeMarker(a,s)}this._multiSelectionBox=null,e.on("element.hover",function(a){r(a.element,"hover")}),e.on("element.out",function(a){o(a.element,"hover")}),e.on("selection.changed",function(a){var l=a.oldSelection,d=a.newSelection;Z(l,function(u){-1===d.indexOf(u)&&function s(u){o(u,mB)}(u)}),Z(d,function(u){-1===l.indexOf(u)&&function c(u){r(u,mB)}(u)})})}function gB(e,n,t,i){e.on("create.end",500,function(r){var o=r.context,s=o.elements,l=(o.hints||{}).autoSelect;if(o.canExecute){if(!1===l)return;mn(l)?n.select(l):n.select(s.filter(Hue))}}),e.on("connect.end",500,function(r){var o=r.context,s=o.hover;o.canExecute&&s&&n.select(s)}),e.on("shape.move.end",500,function(r){var o=r.previousSelection||[],a=i.get(r.context.shape.id);Gi(o,function(c){return a.id===c.id})||n.select(a)}),e.on("element.click",function(r){if(Dc(r)){var o=r.element;o===t.getRootElement()&&(o=null);var a=n.isSelected(o),s=n.get().length>1,c=Uu(r)||lB(r);if(a&&s)return c?n.deselect(o):n.select(o);a?n.deselect(o):n.select(o,c)}})}function Hue(e){return!e.hidden}pB.$inject=["eventBus","canvas","selection","styles"],gB.$inject=["eventBus","selection","canvas","elementRegistry"];const Ka={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Gm,hB],selection:["type",Gu],selectionVisuals:["type",pB],selectionBehavior:["type",gB]};function aD(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}aD.prototype.next=function(){return this._prefix+ ++this._counter};var $ue=new aD("ov");function Wi(e,n,t,i){this._eventBus=n,this._canvas=t,this._elementRegistry=i,this._ids=$ue,this._overlayDefaults=je({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=function Gue(e){var n=In('
');return e.insertBefore(n,e.firstChild),n}(t.getContainer()),this._init()}function vB(e,n,t){je(e.style,{left:n+"px",top:t+"px"})}function Wm(e,n){e.style.display=!1===n?"none":""}function _B(e,n){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(t){e.style[t+"transform"]=n})}Wi.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Wi.prototype.get=function(e){if(Sm(e)&&(e={id:e}),Sm(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var n=this._getOverlayContainer(e.element,!0);return n?e.type?Mr(n.overlays,yc({type:e.type})):n.overlays.slice():[]}return e.type?Mr(this._overlays,yc({type:e.type})):e.id?this._overlays[e.id]:null},Wi.prototype.add=function(e,n,t){if(vo(n)&&(t=n,n=null),e.id||(e=this._elementRegistry.get(e)),!t.position)throw new Error("must specifiy overlay position");if(!t.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var i=this._ids.next();return t=je({},this._overlayDefaults,t,{id:i,type:n,element:e,html:t.html}),this._addOverlay(t),i},Wi.prototype.remove=function(e){var n=this.get(e)||[];mn(n)||(n=[n]);var t=this;Z(n,function(i){var r=t._getOverlayContainer(i.element,!0);if(i&&(Ua(i.html),Ua(i.htmlContainer),delete i.htmlContainer,delete i.element,delete t._overlays[i.id]),r){var o=r.overlays.indexOf(i);-1!==o&&r.overlays.splice(o,1)}})},Wi.prototype.show=function(){Wm(this._overlayRoot)},Wi.prototype.hide=function(){Wm(this._overlayRoot,!1)},Wi.prototype.clear=function(){this._overlays={},this._overlayContainers=[],tb(this._overlayRoot)},Wi.prototype._updateOverlayContainer=function(e){var n=e.element,t=e.html,i=n.x,r=n.y;if(n.waypoints){var o=tr(n);i=o.x,r=o.y}vB(t,i,r),po(e.html,"data-container-id",n.id)},Wi.prototype._updateOverlay=function(e){var a,s,n=e.position,t=e.htmlContainer,i=e.element,r=n.left,o=n.top;void 0!==n.right&&(a=i.waypoints?tr(i).width:i.width,r=-1*n.right+a),void 0!==n.bottom&&(s=i.waypoints?tr(i).height:i.height,o=-1*n.bottom+s),vB(t,r||0,o||0)},Wi.prototype._createOverlayContainer=function(e){var n=In('
');this._overlayRoot.appendChild(n);var t={html:n,element:e,overlays:[]};return this._updateOverlayContainer(t),this._overlayContainers.push(t),t},Wi.prototype._updateRoot=function(e){var n=e.scale||1,t="matrix("+[n,0,0,n,-1*e.x*n,-1*e.y*n].join(",")+")";_B(this._overlayRoot,t)},Wi.prototype._getOverlayContainer=function(e,n){var t=Gi(this._overlayContainers,function(i){return i.element===e});return t||n?t:this._createOverlayContainer(e)},Wi.prototype._addOverlay=function(e){var r,o,n=e.id,t=e.element,i=e.html;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),Sm(i)&&(i=In(i)),o=this._getOverlayContainer(t),(r=In('
')).appendChild(i),e.type&&Ti(r).add("djs-overlay-"+e.type);var a=this._canvas.findPlane(t),s=this._canvas.getActivePlane();e.plane=a,a!==s&&Wm(r,!1),e.htmlContainer=r,o.overlays.push(e),o.html.appendChild(r),this._overlays[n]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Wi.prototype._updateOverlayVisibilty=function(e,n){var t=e.show,r=t&&t.minZoom,o=t&&t.maxZoom,a=e.htmlContainer,c=!0;(e.plane!==this._canvas.getActivePlane()||t&&(Wa(r)&&r>n.scale||Wa(o)&&or&&(a=(1/n.scale||1)*r)),Wa(a)&&(s="scale("+a+","+a+")"),_B(o,s)},Wi.prototype._updateOverlaysVisibilty=function(e){var n=this;Z(this._overlays,function(t){n._updateOverlayVisibilty(t,e)})},Wi.prototype._init=function(){var e=this._eventBus,n=this;e.on("canvas.viewbox.changing",function(i){n.hide()}),e.on("canvas.viewbox.changed",function(i){!function t(i){n._updateRoot(i),n._updateOverlaysVisibilty(i),n.show()}(i.viewbox)}),e.on(["shape.remove","connection.remove"],function(i){var r=i.element;Z(n.get({element:r}),function(c){n.remove(c.id)});var a=n._getOverlayContainer(r);if(a){Ua(a.html);var s=n._overlayContainers.indexOf(a);-1!==s&&n._overlayContainers.splice(s,1)}}),e.on("element.changed",500,function(i){var o=n._getOverlayContainer(i.element,!0);o&&(Z(o.overlays,function(a){n._updateOverlay(a)}),n._updateOverlayContainer(o))}),e.on("element.marker.update",function(i){var r=n._getOverlayContainer(i.element,!0);r&&Ti(r.html)[i.add?"add":"remove"](i.marker)}),e.on("plane.set",function(i){Z(n._overlays,function(r){Wm(r.htmlContainer,r.plane===i.plane)})}),e.on("diagram.clear",this.clear,this)};const sD={__init__:["overlays"],overlays:["type",Wi]};function kc(e){Qn.call(this,e)}tt()(kc,Qn),kc.prototype._modules=[Lue,Ib,Ka,sD],kc.prototype._moddleExtensions={};var Xue=["c","C",67],Zue=["v","V",86],Que=["y","Y",89],bB=["z","Z",90];function xo(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function ma(e,n){return-1!==(e=mn(e)?e:[e]).indexOf(n.key)||-1!==e.indexOf(n.keyCode)}function cD(e){return e.shiftKey}var Pb="keyboard.keydown",yB="input-handle-modified-keys";function qi(e,n){var t=this;this._config=e||{},this._eventBus=n,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),n.on("diagram.destroy",function(){t._fire("destroy"),t.unbind()}),n.on("diagram.init",function(){t._fire("init")}),n.on("attach",function(){e&&e.bindTo&&t.bind(e.bindTo)}),n.on("detach",function(){t.unbind()})}qi.$inject=["config.keyboard","eventBus"],qi.prototype._keydownHandler=function(e){this._keyHandler(e,Pb)},qi.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},qi.prototype._keyHandler=function(e,n){this._isEventIgnored(e)||this._eventBus.fire(n||Pb,{keyEvent:e})&&e.preventDefault()},qi.prototype._isEventIgnored=function(e){return function ahe(e){return e&&(nb(e,"input, textarea")||"true"===e.contentEditable)}(e.target)&&this._isModifiedKeyIgnored(e)},qi.prototype._isModifiedKeyIgnored=function(e){return!xo(e)||!this._getAllowedModifiers(e.target).includes(e.key)},qi.prototype._getAllowedModifiers=function(e){var n=Rl(e,"["+yB+"]",!0);return!n||this._node&&!this._node.contains(n)?[]:n.getAttribute(yB).split(",")},qi.prototype.bind=function(e){this.unbind(),this._node=e,ft.bind(e,"keydown",this._keydownHandler,!0),ft.bind(e,"keyup",this._keyupHandler,!0),this._fire("bind")},qi.prototype.getBinding=function(){return this._node},qi.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),ft.unbind(e,"keydown",this._keydownHandler,!0),ft.unbind(e,"keyup",this._keyupHandler,!0)),this._node=null},qi.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},qi.prototype.addListener=function(e,n,t){Ar(e)&&(t=n,n=e,e=1e3),this._eventBus.on(t||Pb,e,n)},qi.prototype.removeListener=function(e,n){this._eventBus.off(n||Pb,e)},qi.prototype.hasModifier=function Jue(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},qi.prototype.isCmd=xo,qi.prototype.isShift=cD,qi.prototype.isKey=ma;var she=500;function Wu(e,n){var t=this;e.on("editorActions.init",she,function(i){t.registerBindings(n,i.editorActions)})}Wu.$inject=["eventBus","keyboard"],Wu.prototype.registerBindings=function(e,n){function t(i,r){n.isRegistered(i)&&e.addListener(r)}t("undo",function(i){if(function nhe(e){return xo(e)&&!cD(e)&&ma(bB,e)}(i.keyEvent))return n.trigger("undo"),!0}),t("redo",function(i){if(function ihe(e){return xo(e)&&(ma(Que,e)||ma(bB,e)&&cD(e))}(i.keyEvent))return n.trigger("redo"),!0}),t("copy",function(i){if(function ehe(e){return xo(e)&&ma(Xue,e)}(i.keyEvent))return n.trigger("copy"),!0}),t("paste",function(i){if(function the(e){return xo(e)&&ma(Zue,e)}(i.keyEvent))return n.trigger("paste"),!0}),t("stepZoom",function(i){var r=i.keyEvent;if(ma(["+","Add","="],r)&&xo(r))return n.trigger("stepZoom",{value:1}),!0}),t("stepZoom",function(i){var r=i.keyEvent;if(ma(["-","Subtract"],r)&&xo(r))return n.trigger("stepZoom",{value:-1}),!0}),t("zoom",function(i){var r=i.keyEvent;if(ma("0",r)&&xo(r))return n.trigger("zoom",{value:1}),!0}),t("removeSelection",function(i){if(ma(["Backspace","Delete","Del"],i.keyEvent))return n.trigger("removeSelection"),!0})};const lD={__init__:["keyboard","keyboardBindings"],keyboard:["type",qi],keyboardBindings:["type",Wu]};var hhe={moveSpeed:50,moveSpeedAccelerated:200};function xB(e,n,t){var i=this;this._config=je({},hhe,e||{}),n.addListener(function r(o){var a=o.keyEvent,s=i._config;if(n.isCmd(a)&&n.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],a)){var l,c=n.isShift(a)?s.moveSpeedAccelerated:s.moveSpeed;switch(a.key){case"ArrowLeft":case"Left":l="left";break;case"ArrowUp":case"Up":l="up";break;case"ArrowRight":case"Right":l="right";break;case"ArrowDown":case"Down":l="down"}return i.moveCanvas({speed:c,direction:l}),!0}}),this.moveCanvas=function(o){var a=0,s=0,l=o.speed/Math.min(Math.sqrt(t.viewbox().scale),1);switch(o.direction){case"left":a=l;break;case"up":s=l;break;case"right":a=-l;break;case"down":s=-l}t.scroll({dx:a,dy:s})}}xB.$inject=["config.keyboardMove","keyboard","canvas"];const wB={__depends__:[lD],__init__:["keyboardMove"],keyboardMove:["type",xB]};var fhe=/^djs-cursor-.*$/;function Fb(e){var n=Ti(document.body);n.removeMatching(fhe),e&&n.add("djs-cursor-"+e)}function EB(){Fb(null)}var mhe=5e3;function CB(e,n){function t(){return!1}return e.once(n=n||"element.click",mhe,t),function(){e.off(n,t)}}function qm(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Xa(e,n){return{x:e.x-n.x,y:e.y-n.y}}function SB(e,n){var t;function i(a){var s=t.start,c=t.button,l=Sc(a),d=Xa(l,s);!t.dragging&&function ghe(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}(d)>15&&(t.dragging=!0,0===c&&CB(e),Fb("grab")),t.dragging&&(d=Xa(l,t.last||t.start),n.scroll({dx:d.x,dy:d.y}),t.last=l),a.preventDefault()}function r(a){ft.unbind(document,"mousemove",i),ft.unbind(document,"mouseup",r),t=null,EB()}e.on("element.mousedown",500,function(a){return function o(a){if(!Rl(a.target,".djs-draggable")){var s=a.button;if(!(s>=2||a.ctrlKey||a.shiftKey||a.altKey))return t={button:s,start:Sc(a)},ft.bind(document,"mousemove",i),ft.bind(document,"mouseup",r),!0}}(a.originalEvent)}),this.isActive=function(){return!!t}}SB.$inject=["eventBus","canvas"];const DB={__init__:["moveCanvas"],moveCanvas:["type",SB]};function dD(e){return Math.log(e)/Math.log(10)}function kB(e,n){var t=dD(e.min),i=dD(e.max);return(Math.abs(t)+Math.abs(i))/n}var _he=Math.sign||function(e){return e>=0?1:-1},uD={min:.2,max:4};function Za(e,n,t){e=e||{},this._enabled=!1,this._canvas=t,this._container=t._container,this._handleWheel=km(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var i=this;n.on("canvas.init",function(r){i._init(!1!==e.enabled)})}Za.$inject=["config.zoomScroll","eventBus","canvas"],Za.prototype.scroll=function(n){this._canvas.scroll(n)},Za.prototype.reset=function(){this._canvas.zoom("fit-viewport")},Za.prototype.zoom=function(n,t){var i=kB(uD,20);this._totalDelta+=n,Math.abs(this._totalDelta)>.1&&(this._zoom(n,t,i),this._totalDelta=0)},Za.prototype._handleWheel=function(n){if(!Rl(n.target,".djs-scrollable",!0)){var t=this._container;n.preventDefault();var a,i=n.ctrlKey,r=n.shiftKey,o=-1*this._scale;if(o*=i?0===n.deltaMode?.02:.32:0===n.deltaMode?1:16,i){var s=t.getBoundingClientRect(),c={x:n.clientX-s.left,y:n.clientY-s.top};a=Math.sqrt(Math.pow(n.deltaY,2)+Math.pow(n.deltaX,2))*_he(n.deltaY)*o,this.zoom(a,c)}else this.scroll(a=r?{dx:o*n.deltaY,dy:0}:{dx:o*n.deltaX,dy:o*n.deltaY})}},Za.prototype.stepZoom=function(n,t){var i=kB(uD,10);this._zoom(n,t,i)},Za.prototype._zoom=function(e,n,t){var i=this._canvas,r=e>0?1:-1,o=dD(i.zoom()),a=Math.round(o/t)*t,s=Math.pow(10,a+=t*r);i.zoom(function vhe(e,n){return Math.max(e.min,Math.min(e.max,n))}(uD,s),n)},Za.prototype.toggle=function(n){var r=this._enabled;return typeof n>"u"&&(n=!r),r!==n&&ft[n?"bind":"unbind"](this._container,"wheel",this._handleWheel,!1),this._enabled=n,n},Za.prototype._init=function(e){this.toggle(e)};const AB={__init__:["zoomScroll"],zoomScroll:["type",Za]};function Ym(e){kc.call(this,e)}tt()(Ym,kc),Ym.prototype._modules=[].concat(kc.prototype._modules,Ym.prototype._navigationModules=[wB,DB,AB]);var xhe=K(716),jl=K.n(xhe),MB=["mousedown","mouseup","mouseover","mouseout","click","dblclick"];function Lb(e,n){return n.get(e,!1)}function hD(e){e.preventDefault(),"function"==typeof e.stopPropagation?e.stopPropagation():e.srcEvent&&"function"==typeof e.srcEvent.stopPropagation&&e.srcEvent.stopPropagation(),"function"==typeof e.stopImmediatePropagation&&e.stopImmediatePropagation()}function fD(e){function t(l){setTimeout(function(){Z(MB,function(d){ft.unbind(e,d,hD,!0)})},500)}ft.bind(e,"touchstart",function n(l){Z(MB,function(d){ft.bind(e,d,hD,!0)})},!0),ft.bind(e,"touchend",t,!0),ft.bind(e,"touchcancel",t,!0);var i=new(jl().Manager)(e,{inputClass:jl().TouchInput,recognizers:[],domEvents:!0}),r=new(jl().Tap),o=new(jl().Pan)({threshold:10}),a=new(jl().Press),s=new(jl().Pinch),c=new(jl().Tap)({event:"doubletap",taps:2});return s.requireFailure(o),s.requireFailure(a),i.add([o,a,s,c,r]),i.reset=function(l){var d=this.recognizers,u=this.session;u.stopped||(i.stop(l),setTimeout(function(){var h,f;for(h=0;f=d[h];h++)f.reset(),f.state=8;u.curRecognizer=null},0))},i.on("hammer.input",function(l){l.srcEvent.defaultPrevented&&i.reset(!0)}),i}function IB(e,n,t,i,r){var l,o=Lb("dragging",e),a=Lb("move",e),s=Lb("contextPad",e),c=Lb("palette",e);function d(f,m){return function(g){var v=u(g.target),C=v&&i.get(v);return m&&(g.srcEvent.button=m),r.fire(f,g,C)}}function u(f){return Rl(f,"svg, .djs-element",!0)}o&&t.on("drag.move",function(f){var m=f.originalEvent;if(m&&!(m instanceof MouseEvent)){var g=Sc(m),C=u(document.elementFromPoint(g.x,g.y)),w=C&&i.get(C);w!==f.hover&&(f.hover&&o.out(f),w&&(o.hover({element:w,gfx:C}),f.hover=w,f.hoverGfx=C))}}),s&&t.on("contextPad.create",function(f){var g=fD(f.pad.html);g.on("panstart",function(v){s.trigger("dragstart",v,!0)}),g.on("press",function(v){s.trigger("dragstart",v,!0)}),g.on("tap",function(v){s.trigger("click",v)})}),c&&t.on("palette.create",function(f){var g=fD(f.container);g.on("panstart",function(v){c.trigger("dragstart",v,!0)}),g.on("press",function(v){c.trigger("dragstart",v,!0)}),g.on("tap",function(v){c.trigger("click",v)})}),t.on("canvas.init",function(f){!function h(f){function g(C){var w=u(C.target),E=w&&i.get(w);if(a&&n.getRootElement()!==E)return a.start(C,E,!0);!function m(C){var w=0,E=0;function x(O){n.scroll({dx:O.deltaX-w,dy:O.deltaY-E}),w=O.deltaX,E=O.deltaY}function k(O){l.off("panmove",x),l.off("panend",k),l.off("pancancel",k)}l.on("panmove",x),l.on("panend",k),l.on("pancancel",k)}()}(l=fD(f)).on("tap",d("element.click")),l.on("doubletap",d("element.dblclick",1)),l.on("panstart",g),l.on("press",g),l.on("pinchstart",function v(C){var w=n.zoom(),E=C.center;function x(O){var R=Math.max(.2,Math.min(4,(1-(1-O.scale)/1.5)*w));n.zoom(R,E),hD(O)}function k(O){l.off("pinchmove",x),l.off("pinchend",k),l.off("pinchcancel",k),l.reset(!0)}l.on("pinchmove",x),l.on("pinchend",k),l.on("pinchcancel",k)})}(f.svg)})}function mD(e,n){var t=this;n.on("canvas.init",function(i){t.addBBoxMarker(i.svg)})}IB.$inject=["injector","canvas","eventBus","elementRegistry","interactionEvents","touchFix"],mD.$inject=["canvas","eventBus"],mD.prototype.addBBoxMarker=function(e){var n={fill:"none",class:"outer-bound-marker"},t=Qe("rect");ve(t,{x:-1e4,y:1e4,width:10,height:10}),ve(t,n),nt(e,t);var i=Qe("rect");ve(i,{x:1e4,y:1e4,width:10,height:10}),ve(i,n),nt(e,i)};const Che={__depends__:[{__depends__:[Gm],__init__:["touchInteractionEvents"],touchInteractionEvents:["type",IB],touchFix:["type",mD]}]};function pD(e){return e&&e[e.length-1]}function OB(e){return e.y}function RB(e){return e.x}var She={left:RB,center:RB,right:function(e){return e.x+e.width},top:OB,middle:OB,bottom:function(e){return e.y+e.height}};function qu(e){this._modeling=e}qu.$inject=["modeling"],qu.prototype._getOrientationDetails=function(e){var t="x",i="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",i="height"),{axis:t,dimension:i}},qu.prototype._isType=function(e,n){return-1!==n.indexOf(e)},qu.prototype._alignmentPosition=function(e,n){var c,l,d,t=this._getOrientationDetails(e),i=t.axis,r=t.dimension,o={},a={},s=!1;if(this._isType(e,["left","top"]))o[e]=n[0][i];else if(this._isType(e,["right","bottom"]))d=pD(n),o[e]=d[i]+d[r];else if(this._isType(e,["center","middle"])){if(Z(n,function(h){var f=h[i]+Math.round(h[r]/2);a[f]?a[f].elements.push(h):a[f]={elements:[h],center:f}}),c=bc(a,function(h){return h.elements.length>1&&(s=!0),h.elements.length}),s)return o[e]=pD(c).center,o;l=n[0],d=pD(n=bc(n,function(h){return h[i]+h[r]})),o[e]=function u(h,f){return Math.round((h[i]+f[i]+f[r])/2)}(l,d)}return o},qu.prototype.trigger=function(e,n){var t=this._modeling,i=Mr(e,function(s){return!(s.waypoints||s.host||s.labelTarget)});if(!(i.length<2)){var o=bc(i,She[n]),a=this._alignmentPosition(n,o);t.alignElements(o,a)}};const Dhe={__init__:["alignElements"],alignElements:["type",qu]};var khe=10,NB=50,The=250;function gD(e,n,t,i){for(var r;r=Ahe(e,t,n);)t=i(n,t,r);return t}function vD(e){return function(n,t,i){var r={x:t.x,y:t.y};return["x","y"].forEach(function(o){var a=e[o];if(a){var s="x"===o?"width":"height",c=a.margin,l=a.minDistance;r[o]=c<0?Math.min(i[o]+c-n[s]/2,t[o]-l+c):Math.max(i[o]+i[s]+c+n[s]/2,t[o]+l+c)}}),r}}function Ahe(e,n,t){var i={x:n.x-t.width/2,y:n.y-t.height/2,width:t.width,height:t.height},r=function Ihe(e){var n=_D(e);return e.host&&(n=n.concat(_D(e.host))),e.attachers&&(n=n.concat(e.attachers.reduce(function(t,i){return t.concat(_D(i))},[]))),n}(e);return Gi(r,function(o){return o!==t&&"intersect"===nr(o,i,khe)})}function _D(e){return function Rhe(e){return e.outgoing.map(function(n){return n.target})}(e).concat(function Ohe(e){return e.incoming.map(function(n){return n.source})}(e))}function Nhe(){return!0}function PB(e,n,t){e.on("autoPlace",100,function(i){return function Fhe(e,n,t){t||(t={});var i=t.defaultDistance||NB,r=Pt(e);return{x:lt(e).right+i+n.width/2,y:r.y}}(i.source,i.shape)}),e.on("autoPlace.end",function(i){t.scrollToElement(i.shape)}),this.append=function(i,r,o){e.fire("autoPlace.start",{source:i,shape:r});var a=e.fire("autoPlace",{source:i,shape:r}),s=n.appendShape(i,r,a,i.parent,o);return e.fire("autoPlace.end",{source:i,shape:s}),s}}function FB(e,n){e.on("autoPlace.end",500,function(t){n.select(t.shape)})}PB.$inject=["eventBus","modeling","canvas"],FB.$inject=["eventBus","selection"];const Lhe={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",PB],autoPlaceSelectionBehavior:["type",FB]};function LB(e,n){return b(n,"bpmn:TextAnnotation")?function jhe(e,n){var t=lt(e);return gD(e,n,{x:t.right+n.width/2,y:t.top-50-n.height/2},vD({y:{margin:-30,minDistance:20}}))}(e,n):tn(n,["bpmn:DataObjectReference","bpmn:DataStoreReference"])?function zhe(e,n){var t=lt(e);return gD(e,n,{x:t.right-10+n.width/2,y:t.bottom+40+n.width/2},vD({x:{margin:30,minDistance:30}}))}(e,n):b(n,"bpmn:FlowNode")?function Bhe(e,n){var t=lt(e),i=Pt(e),r=function Mhe(e,n){n||(n={});var i=n.defaultDistance||NB,r=n.direction||"e",o=n.filter,a=n.getWeight||function t(m){return m.source===e?1:-1},s=n.maxDistance||The,c=n.reference||"start";function l(m,g){return"n"===r?"start"===c?lt(m).top-lt(g).bottom:"center"===c?lt(m).top-Pt(g).y:lt(m).top-lt(g).top:"w"===r?"start"===c?lt(m).left-lt(g).right:"center"===c?lt(m).left-Pt(g).x:lt(m).left-lt(g).left:"s"===r?"start"===c?lt(g).top-lt(m).bottom:"center"===c?Pt(g).y-lt(m).bottom:lt(g).bottom-lt(m).bottom:"start"===c?lt(g).left-lt(m).right:"center"===c?Pt(g).x-lt(m).right:lt(g).right-lt(m).right}o||(o=Nhe);var d=e.incoming.filter(o).map(function(m){var g=a(m),v=g<0?l(m.source,e):l(e,m.source);return{id:m.source.id,distance:v,weight:g}}),u=e.outgoing.filter(o).map(function(m){var g=a(m),v=g>0?l(e,m.target):l(m.target,e);return{id:m.target.id,distance:v,weight:g}});return Nl(d.concat(u).reduce(function(m,g){return m[g.id+"__weight_"+g.weight]=g,m},{}),function(m,g){var v=g.distance,C=g.weight;return v<0||v>s||(m[String(v)]||(m[String(v)]=0),m[String(v)]+=1*C,(!m.distance||m[m.distance]n.top&&(t=t.concat("n")),e.rightn.left&&(t=t.concat("e")),t}(Tm(n,["x","y","width","height"]),i);this.resize(n,i,{autoResize:r});var o=n.parent;o&&this._expand([n],o)}}},Ms.prototype.getOffset=function(e){return{top:60,bottom:60,left:100,right:100}},Ms.prototype.getPadding=function(e){return{top:2,bottom:2,left:15,right:15}},Ms.prototype.resize=function(e,n,t){this._modeling.resizeShape(e,n,null,t)},Bb.$inject=["injector"],tt()(Bb,Ms),Bb.prototype.resize=function(e,n,t){b(e,"bpmn:Participant")?this._modeling.resizeLane(e,n,null,t):this._modeling.resizeShape(e,n,null,t)},Qa.$inject=["eventBus"],tt()(Qa,Ve),Qa.prototype.addRule=function(e,n,t){var i=this;"string"==typeof e&&(e=[e]),e.forEach(function(r){i.canExecute(r,n,function(o,a,s){return t(o)},!0)})},Qa.prototype.init=function(){},Km.$inject=["eventBus"],tt()(Km,Qa),Km.prototype.canResize=function(e,n){return!1},tt()(Vb,Km),Vb.$inject=["eventBus","modeling"],Vb.prototype.canResize=function(e,n){if(!b(n,"bpmn:Participant")&&!b(n,"bpmn:Lane")&&!b(n,"bpmn:SubProcess"))return!1;var t=!0;return ht(e,function(i){(b(i,"bpmn:Lane")||i.labelTarget)&&(t=!1)}),t};const Yhe={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",Bb],bpmnAutoResizeProvider:["type",Vb]};function jB(e,n,t){var a,s,i=this,r=t.get("dragging",!1);r&&n.on("drag.start",function(a){n.once("drag.move",1500,function(s){!function o(a){if(!a.hover){var s=a.originalEvent,c=i._findTargetGfx(s),l=c&&e.get(c);c&&l&&(a.stopPropagation(),r.hover({element:l,gfx:c}),r.move(s))}}(s)})}),n.on("element.hover",function(c){a=c.gfx,s=c.element}),n.on("element.hover",1500,function(c){s&&n.fire("element.out",{element:s,gfx:a})}),n.on("element.out",function(){a=null,s=null}),this._findTargetGfx=function(a){var s;if(a instanceof MouseEvent)return s=Sc(a),function Khe(e){return Rl(e,"svg, .djs-element",!0)}(document.elementFromPoint(s.x,s.y))}}jB.$inject=["elementRegistry","eventBus","injector"];const Xhe={__init__:["hoverFix"],hoverFix:["type",jB]};var Yu=Math.round,zB="djs-drag-active";function zl(e){e.preventDefault()}function HB(e,n,t,i){var o,r={threshold:5,trapClick:!0};function a(E){var x=n.viewbox(),k=n._container.getBoundingClientRect();return{x:x.x+(E.x-k.left)/x.scale,y:x.y+(E.y-k.top)/x.scale}}function s(E,x){var k=e.createEvent(je({},(x=x||o).payload,x.data,{isTouch:x.isTouch}));return!1!==e.fire("drag."+E,k)&&e.fire(x.prefix+"."+E,k)}function l(E,x){var k=o.payload,O=o.displacement,L=o.globalStart,R=Sc(E),te=Xa(R,L),we=o.localStart,Ge=a(R),de=Xa(Ge,we);if(!o.active&&(x||function Qhe(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}(te)>o.threshold)){if(je(k,{x:Yu(we.x+O.x),y:Yu(we.y+O.y),dx:0,dy:0},{originalEvent:E}),!1===s("start"))return v();o.active=!0,o.keepSelection||(k.previousSelection=t.get(),t.select(null)),o.cursor&&Fb(o.cursor),n.addMarker(n.getRootElement(),zB)}rD(E),o.active&&(je(k,{x:Yu(Ge.x+O.x),y:Yu(Ge.y+O.y),dx:Yu(de.x),dy:Yu(de.y)},{originalEvent:E}),s("move"))}function d(E){var k=!0;o.active&&(E&&(o.payload.originalEvent=E,rD(E)),k=s("end")),!1===k&&s("rejected"),s("ended",C(!0!==k))}function u(E){27===E.which&&(zl(E),v())}function h(E){var x;o.active&&(x=CB(e),setTimeout(x,400),zl(E)),d(E)}function f(E){l(E)}function m(E){var x=o.payload;x.hoverGfx=E.gfx,x.hover=E.element,s("hover")}function g(E){s("out");var x=o.payload;x.hoverGfx=null,x.hover=null}function v(E){var x;if(o){var k=o.active;k&&s("cancel"),x=C(E),k&&s("canceled",x)}}function C(E){var x,k;s("cleanup"),EB(),k=o.trapClick?h:d,ft.unbind(document,"mousemove",l),ft.unbind(document,"dragstart",zl),ft.unbind(document,"selectstart",zl),ft.unbind(document,"mousedown",k,!0),ft.unbind(document,"mouseup",k,!0),ft.unbind(document,"keyup",u),ft.unbind(document,"touchstart",f,!0),ft.unbind(document,"touchcancel",v,!0),ft.unbind(document,"touchmove",l,!0),ft.unbind(document,"touchend",d,!0),e.off("element.hover",m),e.off("element.out",g),n.removeMarker(n.getRootElement(),zB);var O=o.payload.previousSelection;return!1!==E&&O&&!t.get().length&&function c(E){var x=E.filter(function(k){return i.get(k.id)});x.length&&t.select(x)}(O),x=o,o=null,x}e.on("diagram.destroy",v),this.init=function w(E,x,k,O){o&&v(!1),"string"==typeof x&&(O=k,k=x,x=null);var R,te,we,Ge,de,L=(O=je({},r,O||{})).data||{};Ge=O.trapClick?h:d,E?(R=$u(E)||E,te=Sc(E),rD(E),"dragstart"===R.type&&zl(R)):(R=null,te={x:0,y:0}),we=a(te),x||(x=we),de=function Zhe(e){return typeof TouchEvent<"u"&&e instanceof TouchEvent}(R),o=je({prefix:k,data:L,payload:{},globalStart:te,displacement:Xa(x,we),localStart:we,isTouch:de},O),O.manual||(de?(ft.bind(document,"touchstart",f,!0),ft.bind(document,"touchcancel",v,!0),ft.bind(document,"touchmove",l,!0),ft.bind(document,"touchend",d,!0)):(ft.bind(document,"mousemove",l),ft.bind(document,"dragstart",zl),ft.bind(document,"selectstart",zl),ft.bind(document,"mousedown",Ge,!0),ft.bind(document,"mouseup",Ge,!0)),ft.bind(document,"keyup",u),e.on("element.hover",m),e.on("element.out",g)),s("init"),O.autoActivate&&l(E,!0)},this.move=l,this.hover=m,this.out=g,this.end=d,this.cancel=v,this.context=function(){return o},this.setOptions=function(E){je(r,E)}}HB.$inject=["eventBus","canvas","selection","elementRegistry"];const Is={__depends__:[Xhe,Ka],dragging:["type",HB]};function Ku(e,n,t){this._canvas=t,this._opts=je({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var i=this;n.on("drag.move",function(r){var o=i._toBorderPoint(r);i.startScroll(o)}),n.on(["drag.cleanup"],function(){i.stopScroll()})}function Jhe(e,n,t){return nO-3&&(te=nr(f.target,k),g===O-2?"intersect"===te&&(E.pop(),E[E.length-1]=k):"intersect"!==te&&E.push(C)),h.newWaypoints=f.waypoints=s(f,E),function l(u,h,f){var m=u.newWaypoints,x=function ffe(e,n,t,i){var r=Math.max(n[i],t[i]),o=Math.min(n[i],t[i]);return DD(n,i,Math.min(Math.max(o+20,e[i]),r-20))}(f,m[u.segmentStartIndex+h],m[u.segmentEndIndex+h],r6(u.axis));Or(u.draggerGfx,x.x,x.y)}(h,L,u),h.newSegmentStartIndex=m+L,c(u)}),n.on("connectionSegment.move.hover",function(u){u.context.hover=u.hover,t.addMarker(u.hover,t6)}),n.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],function(u){var h=u.context.hover;h&&t.removeMarker(h,t6)}),n.on("connectionSegment.move.cleanup",function(u){var h=u.context,f=h.connection;h.draggerGfx&&ui(h.draggerGfx),t.removeMarker(f,n6)}),n.on(["connectionSegment.move.cancel","connectionSegment.move.end"],function(u){var h=u.context;h.connection.waypoints=h.originalWaypoints,c(u)}),n.on("connectionSegment.move.end",function(u){var h=u.context,f=h.connection,m=h.newWaypoints,g=h.newSegmentStartIndex,v=function d(u,h){var f=0;return{waypoints:u.filter(function(g,v){return!xS(u[v-1],u[v+1],g)||(f=v<=h?f-1:f,!1)}),segmentOffset:f}}(m=m.map(function(k){return{original:k.original,x:Math.round(k.x),y:Math.round(k.y)}}),g),w=s(f,v.waypoints);o.updateWaypoints(f,w,{segmentMove:{segmentStartIndex:h.segmentStartIndex,newSegmentStartIndex:g+v.segmentOffset}})})}a6.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var mfe=Math.abs,s6=Math.round;function c6(e){return{x:e.x,y:e.y}}function l6(e){return{x:e.x+e.width,y:e.y+e.height}}function No(e,n){return!e||isNaN(e.x)||isNaN(e.y)?n:{x:s6(e.x+e.width/2),y:s6(e.y+e.height/2)}}function Xu(e,n){var t=e.snapped;return!!t&&("string"==typeof n?t[n]:t.x&&t.y)}function Ii(e,n,t){if("string"!=typeof n)throw new Error("axis must be in [x, y]");if("number"!=typeof t&&!1!==t)throw new Error("value must be Number or false");var i,r=e[n],o=e.snapped=e.snapped||{};return!1===t?o[n]=!1:(o[n]=!0,e[n]+=i=t-r,e["d"+n]+=i),r}function d6(e){return e.children||[]}var gfe=Math.abs,u6=Math.round;function h6(e){function n(o,a){if(mn(o)){for(var s=o.length;s--;)if(gfe(o[s]-a)<=10)return o[s]}else{var c=a%(o=+o);if(c<10)return a-c;if(c>o-10)return a-c+o}return a}function t(o){if(o.width)return{x:u6(o.width/2+o.x),y:u6(o.height/2+o.y)}}e.on("connectionSegment.move.move",1500,function(o){var d,u,s=function i(o){var a=o.snapPoints,s=o.connection,c=s.waypoints,d=o.segmentStartIndex,h=o.segmentEndIndex,f=o.axis;if(a)return a;var m=[c[d-1],o.segmentStart,o.segmentEnd,c[h+1]];return d<2&&m.unshift(t(s.source)),h>c.length-3&&m.unshift(t(s.target)),o.snapPoints=a={horizontal:[],vertical:[]},Z(m,function(g){g&&(g=g.original||g,"y"===f&&a.horizontal.push(g.y),"x"===f&&a.vertical.push(g.x))}),a}(o.context),c=o.x,l=o.y;if(s){var h=c-(d=n(s.vertical,c)),f=l-(u=n(s.horizontal,l));je(o,{dx:o.dx-h,dy:o.dy-f,x:d,y:u}),(h||-1!==s.vertical.indexOf(c))&&Ii(o,"x",d),(f||-1!==s.horizontal.indexOf(l))&&Ii(o,"y",u)}}),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,function(o){var h,f,a=o.context,s=function r(o){var a=o.snapPoints,s=o.connection.waypoints,c=o.bendpointIndex;if(a)return a;var l=[s[c-1],s[c+1]];return o.snapPoints=a={horizontal:[],vertical:[]},Z(l,function(d){d&&(a.horizontal.push((d=d.original||d).y),a.vertical.push(d.x))}),a}(a),c=a.hover,l=c&&t(c),d=o.x,u=o.y;if(s){var m=d-(h=n(l?s.vertical.concat([l.x]):s.vertical,d)),g=u-(f=n(l?s.horizontal.concat([l.y]):s.horizontal,u));je(o,{dx:o.dx-m,dy:o.dy-g,x:o.x-m,y:o.y-g}),(m||-1!==s.vertical.indexOf(d))&&Ii(o,"x",h),(g||-1!==s.horizontal.indexOf(u))&&Ii(o,"y",f)}})}h6.$inject=["eventBus"];const vfe={__depends__:[Is,Ja],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",qB],bendpointMove:["type",SD],bendpointMovePreview:["type",e6],connectionSegmentMove:["type",a6],bendpointSnapping:["type",h6]};function f6(e,n,t,i){function r(a,s){return i.allowed("connection.create",{source:a,target:s})}e.on("connect.hover",function(a){var d,s=a.context,c=s.start,l=a.hover;if(s.hover=l,!sb(d=s.canExecute=r(c,l))){if(!1!==d)return s.source=c,void(s.target=l);d=s.canExecute=function o(a,s){return r(s,a)}(c,l),!sb(d)&&!1!==d&&(s.source=l,s.target=c)}}),e.on(["connect.out","connect.cleanup"],function(a){var s=a.context;s.hover=null,s.source=null,s.target=null,s.canExecute=!1}),e.on("connect.end",function(a){var s=a.context,c=s.canExecute,l=s.connectionStart,d={x:a.x,y:a.y},u=s.source,h=s.target;if(!c)return!1;var f=null,m={connectionStart:TD(s)?d:l,connectionEnd:TD(s)?l:d};vo(c)&&(f=c),t.connect(u,h,f,m)}),this.start=function(a,s,c,l){vo(c)||(l=c,c=Pt(s)),n.init(a,"connect",{autoActivate:l,data:{shape:s,context:{start:s,connectionStart:c}}})}}function TD(e){var n=e.hover,t=e.source;return n&&t&&n===t&&t!==e.target}f6.$inject=["eventBus","dragging","modeling","rules"];var m6="connect-ok",p6="connect-not-ok";function g6(e,n,t){var i=e.get("connectionPreview",!1);i&&n.on("connect.move",function(r){var o=r.context,a=o.canExecute,s=o.hover,c=o.source,l=o.start,u=o.target,h=o.connectionStart||o.startPosition,f=o.connectionEnd||{x:r.x,y:r.y},m=h,g=f;TD(o)&&(m=f,g=h),i.drawPreview(o,a,{source:c||l,target:u||s,connectionStart:m,connectionEnd:g})}),n.on("connect.hover",900,function(r){var s=r.context.canExecute;null!==s&&t.addMarker(r.hover,s?m6:p6)}),n.on(["connect.out","connect.cleanup"],1100,function(r){var o=r.hover;o&&(t.removeMarker(o,m6),t.removeMarker(o,p6))}),i&&n.on("connect.cleanup",function(r){i.cleanUp(r.context)})}g6.$inject=["injector","eventBus","canvas"];const AD={__depends__:[Ka,Ja,Is],__init__:["connectPreview"],connect:["type",f6],connectPreview:["type",g6]};function Os(e,n,t,i){this._canvas=n,this._graphicsFactory=t,this._elementFactory=i,this._connectionDocking=e.get("connectionDocking",!1),this._layouter=e.get("layouter",!1)}Os.$inject=["injector","canvas","graphicsFactory","elementFactory"],Os.prototype.drawPreview=function(e,n,t){var f,i=e.connectionPreviewGfx,r=e.getConnection,o=(t=t||{}).source,a=t.target,s=t.waypoints,c=t.connectionStart,l=t.connectionEnd,d=t.noLayout,u=t.noCropping,h=t.noNoop,m=this;i||(i=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),cS(i),r||(r=e.getConnection=function xfe(e){var n={};return function(t){var i=JSON.stringify(t),r=n[i];return r||(r=n[i]=e.apply(null,arguments)),r}}(function(g,v,C){return m.getConnection(g,v,C)})),n&&(f=r(n,o,a)),f?(f.waypoints=s||[],this._layouter&&!d&&(f.waypoints=this._layouter.layoutConnection(f,{source:o,target:a,connectionStart:c,connectionEnd:l,waypoints:t.waypoints||f.waypoints})),(!f.waypoints||!f.waypoints.length)&&(f.waypoints=[o?Pt(o):c,a?Pt(a):l]),this._connectionDocking&&(o||a)&&!u&&(f.waypoints=this._connectionDocking.getCroppedWaypoints(f,o,a)),this._graphicsFactory.drawConnection(i,f)):!h&&this.drawNoopPreview(i,t)},Os.prototype.drawNoopPreview=function(e,n){var t=n.source,i=n.target,r=n.connectionStart||Pt(t),o=n.connectionEnd||Pt(i),a=this.cropWaypoints(r,o,t,i);nt(e,this.createNoopConnection(a[0],a[1]))},Os.prototype.cropWaypoints=function(e,n,t,i){var r=this._graphicsFactory,o=t&&r.getShapePath(t),a=i&&r.getShapePath(i),s=r.getConnectionPath({waypoints:[e,n]});return[e=t&&CS(o,s,!0)||e,n=i&&CS(a,s,!1)||n]},Os.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&ui(e.connectionPreviewGfx)},Os.prototype.getConnection=function(e){var n=function wfe(e){return vo(e)?e:{}}(e);return this._elementFactory.createConnection(n)},Os.prototype.createConnectionPreviewGfx=function(){var e=Qe("g");return ve(e,{pointerEvents:"none"}),Bt(e).add("djs-connection-preview"),nt(this._canvas.getActiveLayer(),e),e},Os.prototype.createNoopConnection=function(e,n){var t=Qe("polyline");return ve(t,{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"}),ve(t,{points:[e.x,e.y,n.x,n.y]}),t};const Efe={__init__:["connectionPreview"],connectionPreview:["type",Os]};var Qm=Object.prototype.toString,Cfe=Object.prototype.hasOwnProperty;function kfe(e,n){return Cfe.call(e,n)}function b6(e,n){var t;return n=function ND(e){return function _6(e){var n=Qm.call(e);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}(e)?e:function(n){return n===e}}(n),qr(e,function(i,r){if(n(i,r))return t=i,!1}),t}function qr(e,n){var t;if(!function Jm(e){return void 0===e}(e)){var r=function MD(e){return"[object Array]"===Qm.call(e)}(e)?Rfe:Ofe;for(var o in e)if(kfe(e,o)&&!1===n(t=e[o],r(o)))return t}}function Ofe(e){return e}function Rfe(e){return Number(e)}function $b(e,n){return e.bind(n)}function PD(){return PD=Object.assign||function(e){for(var n=1;n1?n-1:0),i=1;i
'),this.content=Xn("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=$b(this.autoResize,this),this.handlePaste=$b(this.handlePaste,this)}function Po(e,n){this._eventBus=e,this._providers=[],this._textbox=new pa({container:n.getContainer(),keyHandler:$b(this._handleKey,this),resizeHandler:$b(this._handleResize,this)})}pa.prototype.create=function(e,n,t,i){var o=this.parent,a=this.content,s=this.container;i=this.options=i||{};var c=y6(n=this.style=n||{},["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);Gb(o.style,{width:e.width+"px",height:e.height+"px",maxWidth:e.maxWidth+"px",maxHeight:e.maxHeight+"px",minWidth:e.minWidth+"px",minHeight:e.minHeight+"px",left:e.x+"px",top:e.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},c);var l=y6(n,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return Gb(a.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},l),i.centerVertically&&Gb(a.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},l),a.innerText=t,ft.bind(a,"keydown",this.keyHandler),ft.bind(a,"mousedown",ep),ft.bind(a,"paste",this.handlePaste),i.autoResize&&ft.bind(a,"input",this.autoResize),i.resizable&&this.resizable(n),s.appendChild(o),this.setSelection(a.lastChild,a.lastChild&&a.lastChild.length),o},pa.prototype.handlePaste=function(e){var i,n=this.options,t=this.style;if(e.preventDefault(),i=e.clipboardData?e.clipboardData.getData("text/plain"):window.clipboardData.getData("Text"),this.insertText(i),n.autoResize){var r=this.autoResize(t);r&&this.resizeHandler(r)}},pa.prototype.insertText=function(e){e=function Lfe(e){return e.replace(/\r\n|\r|\n/g,"\n")}(e),document.execCommand("insertText",!1,e)||this._insertTextIE(e)},pa.prototype._insertTextIE=function(e){var c,l,n=this.getSelection(),t=n.startContainer,i=n.endContainer,r=n.startOffset,o=n.endOffset,a=n.commonAncestorContainer,s=function Ffe(e){return[].slice.call(e)}(a.childNodes);if(function Pfe(e){return e.nodeType===Node.TEXT_NODE}(a)){var d=t.textContent;t.textContent=d.substring(0,r)+e+d.substring(o),c=t,l=r+e.length}else if(t===this.content&&i===this.content){var u=document.createTextNode(e);this.content.insertBefore(u,s[r]),c=u,l=u.textContent.length}else{var h=s.indexOf(t),f=s.indexOf(i);s.forEach(function(m,g){g===h?m.textContent=t.textContent.substring(0,r)+e+i.textContent.substring(o):g>h&&g<=f&&Ua(m)}),c=t,l=r+e.length}c&&void 0!==l&&setTimeout(function(){self.setSelection(c,l)})},pa.prototype.autoResize=function(){var e=this.parent,n=this.content,t=parseInt(this.style.fontSize)||12;if(n.scrollHeight>e.offsetHeight||n.scrollHeight
');var s,c,l,d,h=function(m){FD(m),ep(m);var g=x6(w6(l+m.clientX-s,i),o),v=x6(w6(d+m.clientY-c,r),a);n.style.width=g+"px",n.style.height=v+"px",e.resizeHandler({width:l,height:d,dx:m.clientX-s,dy:m.clientY-c})},f=function(m){FD(m),ep(m),ft.unbind(document,"mousemove",h,!1),ft.unbind(document,"mouseup",f,!1)};ft.bind(t,"mousedown",function(m){FD(m),ep(m),s=m.clientX,c=m.clientY;var g=n.getBoundingClientRect();l=g.width,d=g.height,ft.bind(document,"mousemove",h),ft.bind(document,"mouseup",f)})}Gb(t.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),n.appendChild(t)},pa.prototype.destroy=function(){var e=this.parent,n=this.content,t=this.resizeHandle;n.innerText="",e.removeAttribute("style"),n.removeAttribute("style"),ft.unbind(n,"keydown",this.keyHandler),ft.unbind(n,"mousedown",ep),ft.unbind(n,"input",this.autoResize),ft.unbind(n,"paste",this.handlePaste),t&&(t.removeAttribute("style"),Ua(t)),Ua(e)},pa.prototype.getValue=function(){return this.content.innerText.trim()},pa.prototype.getSelection=function(){return window.getSelection().getRangeAt(0)},pa.prototype.setSelection=function(e,n){var t=document.createRange();null===e?t.selectNodeContents(this.content):(t.setStart(e,n),t.setEnd(e,n));var i=window.getSelection();i.removeAllRanges(),i.addRange(t)},Po.$inject=["eventBus","canvas"],Po.prototype.registerProvider=function(e){this._providers.push(e)},Po.prototype.isActive=function(e){return!(!this._active||e&&this._active.element!==e)},Po.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},Po.prototype._fire=function(e,n){this._eventBus.fire("directEditing."+e,n||{active:this._active})},Po.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},Po.prototype.complete=function(){var e=this._active;if(e){var n,t=e.context.bounds,i=this.$textbox.getBoundingClientRect(),r=this.getValue();(r!==e.context.text||i.height!==t.height||i.width!==t.width)&&(n=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,r,e.context.text,{x:i.left-n.left,y:i.top-n.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}},Po.prototype.getValue=function(){return this._textbox.getValue()},Po.prototype._handleKey=function(e){e.stopPropagation();var n=e.keyCode||e.charCode;return 27===n?(e.preventDefault(),this.cancel()):13!==n||e.shiftKey?void 0:(e.preventDefault(),this.complete())},Po.prototype._handleResize=function(e){this._fire("resize",e)},Po.prototype.activate=function(e){this.isActive()&&this.cancel();var n,t=b6(this._providers,function(i){return(n=i.activate(e))?i:null});return n&&(this.$textbox=this._textbox.create(n.bounds,n.style,n.text,n.options),this._active={element:e,context:n,provider:t},n.options&&n.options.resizable&&(this.resizable=!0),this._fire("activate")),!!n};const LD={__depends__:[Gm],__init__:["directEditing"],directEditing:["type",Po]};function Fo(e,n,t){this._eventBus=n,this._overlays=t;var i=Wa(e&&e.scale)?e.scale:{min:1,max:1.5};this._overlaysConfig={position:{right:-9,top:-6},scale:i},this._current=null,this._init()}Fo.$inject=["config.contextPad","eventBus","overlays"],Fo.prototype._init=function(){var e=this._eventBus,n=this;e.on("selection.changed",function(t){var i=t.newSelection;1===i.length?n.open(i[0]):n.close()}),e.on("elements.delete",function(t){Z(t.elements,function(r){n.isOpen(r)&&n.close()})}),e.on("element.changed",function(t){var i=t.element,r=n._current;r&&r.element===i&&n.open(i,!0)})},Fo.prototype.registerProvider=function(e,n){n||(n=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,function(t){t.providers.push(n)})},Fo.prototype.getEntries=function(e){var n=this._getProviders(),t={};return Z(n,function(i){var r=i.getContextPadEntries(e);Ar(r)?t=r(t):Z(r,function(o,a){t[a]=o})}),t},Fo.prototype.trigger=function(e,n,t){var o,a,s,i=this._current.element,r=this._current.entries,c=n.delegateTarget||n.target;if(!c)return n.preventDefault();if(o=r[po(c,"data-action")],s=n.originalEvent||n,Ar(a=o.action)){if("click"===e)return a(s,i,t)}else if(a[e])return a[e](s,i,t);n.preventDefault()},Fo.prototype.open=function(e,n){!n&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},Fo.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Fo.prototype._updateAndOpen=function(e){var n=this.getEntries(e),t=this.getPad(e),i=t.html;Z(n,function(r,o){var c,a=r.group||"default",s=In(r.html||'
');po(s,"data-action",o),(c=Xn("[data-group="+a+"]",i))||(c=In('
'),i.appendChild(c)),c.appendChild(s),r.className&&function Vfe(e,n){var t=Ti(e);(mn(n)?n:n.split(/\s+/g)).forEach(function(r){t.add(r)})}(s,r.className),r.title&&po(s,"title",r.title),r.imageUrl&&s.appendChild(In(''))}),Ti(i).add("open"),this._current={element:e,pad:t,entries:n},this._eventBus.fire("contextPad.open",{current:this._current})},Fo.prototype.getPad=function(e){if(this.isOpen())return this._current.pad;var n=this,t=this._overlays,i=In('
'),r=je({html:i},this._overlaysConfig);go.bind(i,".entry","click",function(a){n.trigger("click",a)}),go.bind(i,".entry","dragstart",function(a){n.trigger("dragstart",a)}),ft.bind(i,"mousedown",function(a){a.stopPropagation()}),this._overlayId=t.add(e,"context-pad",r);var o=t.get(this._overlayId);return this._eventBus.fire("contextPad.create",{element:e,pad:o}),o},Fo.prototype.close=function(){this.isOpen()&&(this._overlays.remove(this._overlayId),this._overlayId=null,this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},Fo.prototype.isOpen=function(e){return!(!this._current||e&&this._current.element!==e)};const BD={__depends__:[Gm,sD],contextPad:["type",Fo]};var jfe=["marker-start","marker-mid","marker-end"],zfe=["circle","ellipse","line","path","polygon","polyline","rect"];function Ul(e,n,t,i){this._elementRegistry=e,this._canvas=t,this._styles=i,this._clonedMarkers={};var r=this;n.on("drag.cleanup",function(){Z(r._clonedMarkers,function(o){ui(o)}),r._clonedMarkers={}})}Ul.$inject=["elementRegistry","eventBus","canvas","styles"],Ul.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},Ul.prototype.addDragger=function(e,n,t){var i=W3(t=t||this.getGfx(e)),r=t.getBoundingClientRect();return this._cloneMarkers(pb(i)),ve(i,this._styles.cls("djs-dragger",[],{x:r.top,y:r.left})),nt(n,i),i},Ul.prototype.addFrame=function(e,n){var t=Qe("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return nt(n,t),t},Ul.prototype._cloneMarkers=function(e){var n=this;if(e.childNodes)for(var t=0;t0,a=r&&Dm(r)>0;return!o&&!a},bi.prototype.open=function(e,n,t){var i=this._getProviders(n);if(!e)throw new Error("Element is missing");if(!i||!i.length)throw new Error("No registered providers for: "+n);if(!t)throw new Error("the position argument is missing");this.isOpen()&&this.close(),this._emit("open");var r=this._current={className:n,element:e,position:t},o=this._getEntries(e,i),a=this._getHeaderEntries(e,i);r.entries=je({},o,a),r.container=this._createContainer(),Dm(a)&&r.container.appendChild(this._createEntries(a,"djs-popup-header")),Dm(o)&&r.container.appendChild(this._createEntries(o,"djs-popup-body"));var c=this._canvas.getContainer();this._attachContainer(r.container,c,t.cursor),this._bindAutoClose()},bi.prototype.close=function(){this.isOpen()&&(this._emit("close"),this._unbindAutoClose(),Ua(this._current.container),this._current.container=null)},bi.prototype.isOpen=function(){return!!this._current.container},bi.prototype.trigger=function(e){e.preventDefault();var t=po(e.delegateTarget||e.target,O6),i=this._getEntry(t);if(i.action)return i.action.call(null,e,i)},bi.prototype._getProviders=function(e){var n=this._eventBus.createEvent({type:"popupMenu.getProviders."+e,providers:[]});return this._eventBus.fire(n),n.providers},bi.prototype._getEntries=function(e,n){var t={};return Z(n,function(i){if(i.getPopupMenuEntries){var r=i.getPopupMenuEntries(e);Ar(r)?t=r(t):Z(r,function(o,a){t[a]=o})}else Z(i.getEntries(e),function(o){var a=o.id;if(!a)throw new Error("every entry must have the id property set");t[a]=ku(o,["id"])})}),t},bi.prototype._getHeaderEntries=function(e,n){var t={};return Z(n,function(i){if(i.getPopupMenuHeaderEntries){var r=i.getPopupMenuHeaderEntries(e);Ar(r)?t=r(t):Z(r,function(o,a){t[a]=o})}else{if(!i.getHeaderEntries)return;Z(i.getHeaderEntries(e),function(o){var a=o.id;if(!a)throw new Error("every entry must have the id property set");t[a]=ku(o,["id"])})}}),t},bi.prototype._getEntry=function(e){var n=this._current.entries[e];if(!n)throw new Error("entry not found");return n},bi.prototype._emit=function(e){this._eventBus.fire("popupMenu."+e)},bi.prototype._createContainer=function(){var e=In('
'),n=this._current.position,t=this._current.className;return je(e.style,{position:"absolute",left:n.x+"px",top:n.y+"px",visibility:"hidden"}),Ti(e).add(t),e},bi.prototype._attachContainer=function(e,n,t){var i=this;go.bind(e,".entry","click",function(r){i.trigger(r)}),this._updateScale(e),n.appendChild(e),t&&this._assureIsInbounds(e,t)},bi.prototype._updateScale=function(e){var i,r,n=this._canvas.zoom(),t=this._config.scale,o=n;!0!==t&&(!1===t?(i=1,r=1):(i=t.min,r=t.max),Wa(i)&&nr&&(o=r)),function Zfe(e,n){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(t){e.style[t+"transform"]=n})}(e,"scale("+o+")")},bi.prototype._assureIsInbounds=function(e,n){var l,d,i=this._canvas._container.getBoundingClientRect(),o=e.offsetTop,a=e.scrollWidth,s=e.scrollHeight,c={},u_x=n.x-i.left,u_y=n.y-i.top;e.offsetLeft+a>i.width&&(c.x=!0),o+s>i.height&&(c.y=!0),c.x&&c.y?(l=u_x-a+"px",d=u_y-s+"px"):c.x?(l=u_x-a+"px",d=u_y+"px"):c.y&&u_y"),i=this;return Ti(t).add(n),Z(e,function(r,o){var a=i._createEntry(r,o);t.appendChild(a)}),t},bi.prototype._createEntry=function(e,n){var t=In("
"),i=Ti(t);if(i.add("entry"),e.className&&e.className.split(" ").forEach(function(o){i.add(o)}),po(t,O6,n),e.label){var r=In("");r.textContent=e.label,t.appendChild(r)}return e.imageUrl&&t.appendChild(In('')),!0===e.active&&i.add("active"),!0===e.disabled&&i.add("disabled"),e.title&&(t.title=e.title),t},bi.prototype._bindAutoClose=function(){this._eventBus.once(R6,this.close,this)},bi.prototype._unbindAutoClose=function(){this._eventBus.off(R6,this.close,this)};const Qfe={__init__:["popupMenu"],popupMenu:["type",bi]};function ip(){}ip.prototype.get=function(){return this._data},ip.prototype.set=function(e){this._data=e},ip.prototype.clear=function(){var e=this._data;return delete this._data,e},ip.prototype.isEmpty=function(){return!this._data};const Jfe={clipboard:["type",ip]};function VD(e){var n=this;function t(i){n._lastMoveEvent=i}this._lastMoveEvent=null,e.on("canvas.init",function(i){(n._svg=i.svg).addEventListener("mousemove",t)}),e.on("canvas.destroy",function(){n._lastMouseEvent=null,n._svg.removeEventListener("mousemove",t)})}VD.$inject=["eventBus"],VD.prototype.getLastMoveEvent=function(){return this._lastMoveEvent||function eme(e,n){var t=document.createEvent("MouseEvent");return t.initMouseEvent&&t.initMouseEvent("mousemove",!0,!0,window,0,e,n,e,n,!1,!1,!1,!1,0,null),t}(0,0)};const rp={__init__:["mouse"],mouse:["type",VD]};function ga(e,n,t,i,r,o,a,s){this._canvas=e,this._create=n,this._clipboard=t,this._elementFactory=i,this._eventBus=r,this._modeling=o,this._mouse=a,this._rules=s,r.on("copyPaste.copyElement",function(c){var l=c.descriptor,d=c.element,u=c.elements;l.priority=1,l.id=d.id,Gi(u,function(f){return f===d.parent})&&(l.parent=d.parent.id),function tme(e){return!!e.host}(d)&&(l.priority=2,l.host=d.host.id),Wb(d)&&(l.priority=3,l.source=d.source.id,l.target=d.target.id,l.waypoints=function nme(e){return Ir(e.waypoints,function(n){return(n=N6(n)).original&&(n.original=N6(n.original)),n})}(d)),qb(d)&&(l.priority=4,l.labelTarget=d.labelTarget.id),Z(["x","y","width","height"],function(f){Ot(d[f])&&(l[f]=d[f])}),l.hidden=d.hidden,l.collapsed=d.collapsed}),r.on("copyPaste.pasteElements",function(c){je(c.hints,{createElementsBehavior:!1})})}function Wb(e){return!!e.waypoints}function qb(e){return!!e.labelTarget}function N6(e){return je({},e)}function P6(e,n){var t=n.indexOf(e);return-1===t?n:n.splice(t,1)}ga.$inject=["canvas","create","clipboard","elementFactory","eventBus","modeling","mouse","rules"],ga.prototype.copy=function(e){var n,t;return mn(e)||(e=e?[e]:[]),t=!1===(n=this._eventBus.fire("copyPaste.canCopyElements",{elements:e}))?{}:this.createTree(mn(n)?n:e),this._clipboard.set(t),this._eventBus.fire("copyPaste.elementsCopied",{elements:e,tree:t}),t},ga.prototype.paste=function(e){var n=this._clipboard.get();if(!this._clipboard.isEmpty()){var t=e&&e.hints||{};this._eventBus.fire("copyPaste.pasteElements",{hints:t});var i=this._createElements(n);if(e&&e.element&&e.point)return this._paste(i,e.element,e.point,t);this._create.start(this._mouse.getLastMoveEvent(),i,{hints:t||{}})}},ga.prototype._paste=function(e,n,t,i){Z(e,function(o){Ot(o.x)||(o.x=0),Ot(o.y)||(o.y=0)});var r=tr(e);return Z(e,function(o){Wb(o)&&(o.waypoints=Ir(o.waypoints,function(a){return{x:a.x-r.x-r.width/2,y:a.y-r.y-r.height/2}})),je(o,{x:o.x-r.x-r.width/2,y:o.y-r.y-r.height/2})}),this._modeling.createElements(e,t,n,je({},i))},ga.prototype._createElements=function(e){var n=this,t=this._eventBus,i={},r=[];return Z(e,function(o,a){a=parseInt(a,10),Z(o=bc(o,"priority"),function(s){var l,c=je({},ku(s,["priority"]));return i[s.parent]?c.parent=i[s.parent]:delete c.parent,t.fire("copyPaste.pasteElement",{cache:i,descriptor:c}),Wb(c)?(c.source=i[s.source],c.target=i[s.target],l=i[s.id]=n.createConnection(c),void r.push(l)):qb(c)?(c.labelTarget=i[c.labelTarget],l=i[s.id]=n.createLabel(c),void r.push(l)):(c.host&&(c.host=i[c.host]),l=i[s.id]=n.createShape(c),void r.push(l))})}),r},ga.prototype.createConnection=function(e){return this._elementFactory.createConnection(ku(e,["id"]))},ga.prototype.createLabel=function(e){return this._elementFactory.createLabel(ku(e,["id"]))},ga.prototype.createShape=function(e){return this._elementFactory.createShape(ku(e,["id"]))},ga.prototype.hasRelations=function(e,n){var t,i,r;return!(Wb(e)&&(i=Gi(n,yc({id:e.source.id})),r=Gi(n,yc({id:e.target.id})),!i||!r)||qb(e)&&(t=Gi(n,yc({id:e.labelTarget.id})),!t))},ga.prototype.createTree=function(e){var n=this._rules,t=this,i={},r=[];function s(l,d){var u=Gi(r,function(h){return l===h.element});u?u.depth=120&&qe(u,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:d("Divide into two Lanes"),action:{click:C(2)}}}),e.height>=180&&qe(u,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:d("Divide into three Lanes"),action:{click:C(3)}}})),qe(u,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:d("Add Lane below"),action:{click:function(x,k){t.addLane(k,"bottom")}}}})}b(h,"bpmn:FlowNode")&&(b(h,"bpmn:EventBasedGateway")?qe(u,{"append.receive-task":v("bpmn:ReceiveTask","bpmn-icon-receive-task",d("Append ReceiveTask")),"append.message-intermediate-event":v("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",d("Append MessageIntermediateCatchEvent"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":v("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",d("Append TimerIntermediateCatchEvent"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":v("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",d("Append ConditionIntermediateCatchEvent"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":v("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",d("Append SignalIntermediateCatchEvent"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):q6(h,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?qe(u,{"append.compensation-activity":v("bpmn:Task","bpmn-icon-task",d("Append compensation activity"),{isForCompensation:!0})}):!b(h,"bpmn:EndEvent")&&!h.isForCompensation&&!q6(h,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")&&!yo(h)&&qe(u,{"append.end-event":v("bpmn:EndEvent","bpmn-icon-end-event-none",d("Append EndEvent")),"append.gateway":v("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",d("Append Gateway")),"append.append-task":v("bpmn:Task","bpmn-icon-task",d("Append Task")),"append.intermediate-event":v("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",d("Append Intermediate/Boundary Event"))})),a.isEmpty(e,"bpmn-replace")||qe(u,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:d("Change type"),action:{click:function(x,k){var O=qe(function g(x){var O=s.getContainer(),L=n.getPad(x).html,R=O.getBoundingClientRect(),te=L.getBoundingClientRect();return{x:te.left-R.left,y:te.top-R.top+te.height+5}}(k),{cursor:{x:x.x,y:x.y}});a.open(k,"bpmn-replace",O)}}}}),tn(h,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&qe(u,{"append.text-annotation":v("bpmn:TextAnnotation","bpmn-icon-text-annotation"),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:d("Connect using "+(h.isForCompensation?"":"Sequence/MessageFlow or ")+"Association"),action:{click:f,dragstart:f}}}),b(h,"bpmn:TextAnnotation")&&qe(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:d("Connect using Association"),action:{click:f,dragstart:f}}}),tn(h,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&qe(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:d("Connect using DataInputAssociation"),action:{click:f,dragstart:f}}}),b(h,"bpmn:Group")&&qe(u,{"append.text-annotation":v("bpmn:TextAnnotation","bpmn-icon-text-annotation")});var E=c.allowed("elements.delete",{elements:[e]});return da(E)&&(E=E[0]===e),E&&qe(u,{delete:{group:"edit",className:"bpmn-icon-trash",title:d("Remove"),action:{click:function m(x){t.removeElements([e])}}}}),u};const Lme={__depends__:[LD,BD,Ka,AD,Zu,HD],__init__:["contextPadProvider"],contextPadProvider:["type",sp]};var Bme={horizontal:["x","width"],vertical:["y","height"]};function Rs(e){this._modeling=e,this._filters=[],this.registerFilter(function(n,t,i){var a,r=0,o=0;return Z(n,function(s){s.waypoints||s.labelTarget||(r+=s[i],o+=1)}),a=Math.round(r/o),Mr(n,function(s){return s[i]=Math.min(n.min,n.max)&&Math.min(e.min,e.max)<=Math.max(n.min,n.max)},Rs.prototype._findRange=function(e){var n=e[this._axis];return{min:n+5,max:n+e[this._dimension]-5}};const Vme={__init__:["distributeElements"],distributeElements:["type",Rs]};function K6(e){e.registerFilter(function(n){return Bn(n,function(t){var i=tn(t,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:Participant","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(t.labelTarget||i)})})}K6.$inject=["distributeElements"];const jme={__depends__:[Vme],__init__:["bpmnDistributeElements"],bpmnDistributeElements:["type",K6]};var X6="is not a registered action";function Bo(e,n){this._actions={};var t=this;e.on("diagram.init",function(){t._registerDefaultActions(n),e.fire("editorActions.init",{editorActions:t})})}function $D(e,n){return new Error(e+" "+n)}Bo.$inject=["eventBus","injector"],Bo.prototype._registerDefaultActions=function(e){var n=e.get("commandStack",!1),t=e.get("modeling",!1),i=e.get("selection",!1),r=e.get("zoomScroll",!1),o=e.get("copyPaste",!1),a=e.get("canvas",!1),s=e.get("rules",!1),c=e.get("keyboardMove",!1),l=e.get("keyboardMoveSelection",!1);n&&(this.register("undo",function(){n.undo()}),this.register("redo",function(){n.redo()})),o&&i&&this.register("copy",function(){var d=i.get();o.copy(d)}),o&&this.register("paste",function(){o.paste()}),r&&this.register("stepZoom",function(d){r.stepZoom(d.value)}),a&&this.register("zoom",function(d){a.zoom(d.value)}),t&&i&&s&&this.register("removeSelection",function(){var d=i.get();if(d.length){var h,u=s.allowed("elements.delete",{elements:d});!1!==u&&(h=mn(u)?u:d).length&&t.removeElements(h.slice())}}),c&&this.register("moveCanvas",function(d){c.moveCanvas(d)}),l&&this.register("moveSelection",function(d){l.moveSelection(d.direction,d.accelerated)})},Bo.prototype.trigger=function(e,n){if(!this._actions[e])throw $D(e,X6);return this._actions[e](n)},Bo.prototype.register=function(e,n){var t=this;if("string"==typeof e)return this._registerAction(e,n);Z(e,function(i,r){t._registerAction(r,i)})},Bo.prototype._registerAction=function(e,n){if(this.isRegistered(e))throw $D(e,"is already registered");this._actions[e]=n},Bo.prototype.unregister=function(e){if(!this.isRegistered(e))throw $D(e,X6);this._actions[e]=void 0},Bo.prototype.getActions=function(){return Object.keys(this._actions)},Bo.prototype.isRegistered=function(e){return!!this._actions[e]};const Hme={__init__:["editorActions"],editorActions:["type",Bo]};function ny(e){e.invoke(Bo,this)}tt()(ny,Bo),ny.$inject=["injector"],ny.prototype._registerDefaultActions=function(e){Bo.prototype._registerDefaultActions.call(this,e);var n=e.get("canvas",!1),t=e.get("elementRegistry",!1),i=e.get("selection",!1),r=e.get("spaceTool",!1),o=e.get("lassoTool",!1),a=e.get("handTool",!1),s=e.get("globalConnect",!1),c=e.get("distributeElements",!1),l=e.get("alignElements",!1),d=e.get("directEditing",!1),u=e.get("searchPad",!1),h=e.get("modeling",!1);n&&t&&i&&this._registerAction("selectElements",function(){var f=n.getRootElement(),m=t.filter(function(g){return g!==f});return i.select(m),m}),r&&this._registerAction("spaceTool",function(){r.toggle()}),o&&this._registerAction("lassoTool",function(){o.toggle()}),a&&this._registerAction("handTool",function(){a.toggle()}),s&&this._registerAction("globalConnectTool",function(){s.toggle()}),i&&c&&this._registerAction("distributeElements",function(f){var m=i.get();m.length&&c.trigger(m,f.type)}),i&&l&&this._registerAction("alignElements",function(f){var m=i.get(),g=[],v=f.type;m.length&&(g=Bn(m,function(C){return!b(C,"bpmn:Lane")}),l.trigger(g,v))}),i&&h&&this._registerAction("setColor",function(f){var m=i.get();m.length&&h.setColor(m,f)}),i&&d&&this._registerAction("directEditing",function(){var f=i.get();f.length&&d.activate(f[0])}),u&&this._registerAction("find",function(){u.toggle()}),n&&h&&this._registerAction("moveToOrigin",function(){var m,g,f=n.getRootElement();m=tr(g=b(f,"bpmn:Collaboration")?t.filter(function(v){return b(v.parent,"bpmn:Collaboration")}):t.filter(function(v){return v!==f&&!b(v.parent,"bpmn:SubProcess")})),h.moveElements(g,{x:-m.x,y:-m.y},f)})};const $me={__depends__:[Hme],editorActions:["type",ny]};function Z6(e){e.on(["create.init","shape.move.init"],function(n){var t=n.context;tn(n.shape,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(t.gridSnappingContext||(t.gridSnappingContext={}),t.gridSnappingContext.snapLocation="top-left")})}function UD(e,n,t){return t||(t="round"),Math[t](e/n)*n}function Tc(e,n,t){var i=!t||!1!==t.active;this._eventBus=n;var r=this;n.on("diagram.init",800,function(){r.setActive(i)}),n.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],1200,function(o){var a=o.originalEvent;if(!(!r.active||a&&xo(a))){var s=o.context,c=s.gridSnappingContext;c||(c=s.gridSnappingContext={}),["x","y"].forEach(function(l){var d={},u=function qme(e,n,t){var r=e.shape,o=e.context.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;return s&&Ot(s[n])||(s||(s=o.snapOffset={}),Ot(s[n])||(s[n]=0),!r)||(t.get(r.id)||(ry(n)?s[n]+=r[n]+r.width/2:s[n]+=r[n]+r.height/2),!a)||("x"===n?/left/.test(a)?s[n]-=r.width/2:/right/.test(a)&&(s[n]+=r.width/2):/top/.test(a)?s[n]-=r.height/2:/bottom/.test(a)&&(s[n]+=r.height/2)),s[n]}(o,l,e);u&&(d.offset=u);var h=function Wme(e,n){var t=e.context,i=t.createConstraints,r=t.resizeConstraints||{},o=t.gridSnappingContext,a=o.snapConstraints;if(a&&a[n])return a[n];a||(a=o.snapConstraints={}),a[n]||(a[n]={});var s=t.direction;i&&(ry(n)?(a.x.min=i.left,a.x.max=i.right):(a.y.min=i.top,a.y.max=i.bottom));var c=r.min,l=r.max;return c&&(ry(n)?J6(s)?a.x.max=c.left:a.x.min=c.right:Q6(s)?a.y.max=c.top:a.y.min=c.bottom),l&&(ry(n)?J6(s)?a.x.min=l.left:a.x.max=l.right:Q6(s)?a.y.min=l.top:a.y.max=l.bottom),a[n]}(o,l);h&&je(d,h),Xu(o,l)||r.snapEvent(o,l,d)})}})}function ry(e){return"x"===e}function Q6(e){return-1!==e.indexOf("n")}function J6(e){return-1!==e.indexOf("w")}function Wl(e,n){Ve.call(this,e),this._gridSnapping=n;var t=this;this.preExecute("shape.resize",function(i){var r=i.context,a=(r.hints||{}).autoResize;if(a){var s=r.shape,c=r.newBounds;r.newBounds=Sm(a)?t.snapComplex(c,a):t.snapSimple(s,c)}})}function eV(e,n){e.on(["spaceTool.move","spaceTool.end"],2e3,function(t){var o,i=t.context;i.initialized&&("x"===i.axis?(o=n.snapValue(t.dx),t.x=t.x+o-t.dx,t.dx=o):(o=n.snapValue(t.dy),t.y=t.y+o-t.dy,t.dy=o))})}Z6.$inject=["eventBus"],Tc.prototype.snapEvent=function(e,n,t){Ii(e,n,this.snapValue(e[n],t))},Tc.prototype.getGridSpacing=function(){return 10},Tc.prototype.snapValue=function(e,n){var i,r,t=0;return n&&n.offset&&(t=n.offset),e=UD(e+=t,10),n&&n.min&&Ot(i=n.min)&&(i=UD(i+t,10,"ceil"),e=Math.max(e,i)),n&&n.max&&Ot(r=n.max)&&(r=UD(r+t,10,"floor"),e=Math.min(e,r)),e-t},Tc.prototype.isActive=function(){return this.active},Tc.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},Tc.prototype.toggleActive=function(){this.setActive(!this.active)},Tc.$inject=["elementRegistry","eventBus","config.gridSnapping"],Wl.$inject=["eventBus","gridSnapping","modeling"],tt()(Wl,Ve),Wl.prototype.snapSimple=function(e,n){var t=this._gridSnapping;return n.width=t.snapValue(n.width,{min:n.width}),n.height=t.snapValue(n.height,{min:n.height}),n.x=e.x+e.width/2-n.width/2,n.y=e.y+e.height/2-n.height/2,n},Wl.prototype.snapComplex=function(e,n){return/w|e/.test(n)&&(e=this.snapHorizontally(e,n)),/n|s/.test(n)&&(e=this.snapVertically(e,n)),e},Wl.prototype.snapHorizontally=function(e,n){var t=this._gridSnapping,i=/w/.test(n),r=/e/.test(n),o={};return o.width=t.snapValue(e.width,{min:e.width}),r&&(i?(o.x=t.snapValue(e.x,{max:e.x}),o.width+=t.snapValue(e.x-o.x,{min:e.x-o.x})):e.x=e.x+e.width-o.width),je(e,o),e},Wl.prototype.snapVertically=function(e,n){var t=this._gridSnapping,i=/n/.test(n),r=/s/.test(n),o={};return o.height=t.snapValue(e.height,{min:e.height}),i&&(r?(o.y=t.snapValue(e.y,{max:e.y}),o.height+=t.snapValue(e.y-o.y,{min:e.y-o.y})):e.y=e.y+e.height-o.height),je(e,o),e},eV.$inject=["eventBus","gridSnapping"];const Kme={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Wl],gridSnappingSpaceToolBehavior:["type",eV]}],__init__:["gridSnapping"],gridSnapping:["type",Tc]};function tV(e,n){e.on("autoPlace",2e3,function(t){var i=t.source,r=Pt(i),o=t.shape,a=LB(i,o);return["x","y"].forEach(function(s){var c={};a[s]!==r[s]&&(a[s]>r[s]?c.min=a[s]:c.max=a[s],b(o,"bpmn:TextAnnotation")&&(c.offset=function Zme(e){return"x"===e}(s)?-o.width/2:-o.height/2),a[s]=n.snapValue(a[s],c))}),a})}function nV(e,n,t){n.on(["create.start","shape.move.start"],1750,function(i){var r=i.context,o=r.shape,a=e.getRootElement();b(o,"bpmn:Participant")&&b(a,"bpmn:Process")&&a.children.length&&r.createConstraints&&(o.width=t.snapValue(o.width,{min:o.width}),o.height=t.snapValue(o.height,{min:o.height}))})}function oy(e,n,t){Ve.call(this,e),this._gridSnapping=n;var i=this;this.postExecuted(["connection.create","connection.layout"],3e3,function(r){var o=r.context,a=o.connection,s=o.hints||{},c=a.waypoints;s.connectionStart||s.connectionEnd||!1===s.createElementsBehavior||function epe(e){return e.length>3}(c)&&t.updateWaypoints(a,i.snapMiddleSegments(c))})}function ipe(e,n,t){var i=Ds(n,t),r={};return function tpe(e){return"h"===e}(i)&&(r.y=e.snapValue(n.y)),function npe(e){return"v"===e}(i)&&(r.x=e.snapValue(n.x)),("x"in r||"y"in r)&&(n=qe({},n,r),t=qe({},t,r)),[n,t]}tV.$inject=["eventBus","gridSnapping"],nV.$inject=["canvas","eventBus","gridSnapping"],oy.$inject=["eventBus","gridSnapping","modeling"],tt()(oy,Ve),oy.prototype.snapMiddleSegments=function(e){var t,n=this._gridSnapping;e=e.slice();for(var i=1;i5&&ve(c,{x:s.x,width:s.width}),s.height>5&&ve(c,{y:s.y,height:s.height}),o.canExecute?Bt(c).remove(hV):Bt(c).add(hV)}(o.context)}),e.on("resize.cleanup",function(o){!function r(o){var a=o.shape;o.frame&&ui(o.frame),n.removeMarker(a,uV)}(o.context)})}fV.$inject=["eventBus","canvas","previewSupport"];var dp="djs-resizer",vpe=["n","w","s","e","nw","ne","se","sw"];function Ac(e,n,t,i){this._resize=i,this._canvas=n;var r=this;e.on("selection.changed",function(o){var a=o.newSelection;r.removeResizers(),1===a.length&&Z(a,km(r.addResizer,r))}),e.on("shape.changed",function(o){var a=o.element;t.isSelected(a)&&(r.removeResizers(),r.addResizer(a))})}Ac.prototype.makeDraggable=function(e,n,t){var i=this._resize;function r(o){Dc(o)&&i.activate(o,e,t)}ft.bind(n,"mousedown",r),ft.bind(n,"touchstart",r)},Ac.prototype._createResizer=function(e,n,t,i){var r=this._getResizersParent(),o=function _pe(e){var n={x:0,y:0};return-1!==e.indexOf("e")?n.x=6:-1!==e.indexOf("w")&&(n.x=-6),-1!==e.indexOf("s")?n.y=6:-1!==e.indexOf("n")&&(n.y=-6),n}(i),a=Qe("g");Bt(a).add(dp),Bt(a).add(dp+"-"+e.id),Bt(a).add(dp+"-"+i),nt(r,a);var s=Qe("rect");ve(s,{x:-2+o.x,y:-2+o.y,width:4,height:4}),Bt(s).add(dp+"-visual"),nt(a,s);var c=Qe("rect");return ve(c,{x:-10+o.x,y:-10+o.y,width:20,height:20}),Bt(c).add(dp+"-hit"),nt(a,c),DS(a,n,t),a},Ac.prototype.createResizer=function(e,n){var t=dV(e,n),i=this._createResizer(e,t.x,t.y,n);this.makeDraggable(e,i,n)},Ac.prototype.addResizer=function(e){var n=this;this._resize.canResize({shape:e})&&Z(vpe,function(i){n.createResizer(e,i)})},Ac.prototype.removeResizers=function(){cS(this._getResizersParent())},Ac.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},Ac.$inject=["eventBus","canvas","selection","resize"];const dy={__depends__:[Ja,Is,tp],__init__:["resize","resizePreview","resizeHandles"],resize:["type",lp],resizePreview:["type",fV],resizeHandles:["type",Ac]};function WD(e,n){var t=n.create("bpmn:CategoryValue"),i=n.create("bpmn:Category",{categoryValue:[t]});return ri(e.get("rootElements"),i),Ue(i).$parent=e,Ue(t).$parent=i,t}function up(e,n,t,i,r,o,a){function s(c,l){(l||tn(c,["bpmn:Task","bpmn:TextAnnotation"])||qD(c))&&i.activate(c)}this._bpmnFactory=n,this._canvas=t,this._modeling=r,this._textRenderer=a,i.registerProvider(this),e.on("element.dblclick",function(c){s(c.element,!0)}),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open"],function(c){i.isActive()&&i.complete()}),e.on(["commandStack.changed"],function(c){i.isActive()&&i.cancel()}),e.on("directEditing.activate",function(c){o.removeResizers()}),e.on("create.end",500,function(c){var l=c.context;c.isTouch||c.context.canExecute&&(l.hints&&!1===l.hints.createElementsBehavior||s(l.shape))}),e.on("autoPlace.end",500,function(c){s(c.shape)})}function qD(e){return b(e,"bpmn:SubProcess")&&!pn(e)}up.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],up.prototype.activate=function(e){var n=fa(e);if(void 0!==n){var t={text:n};qe(t,this.getEditingBBox(e));var r={};return(tn(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||qD(e))&&qe(r,{centerVertically:!0}),Ya(e)&&qe(r,{autoResize:!0}),b(e,"bpmn:TextAnnotation")&&qe(r,{resizable:!0,autoResize:!0}),qe(t,{options:r}),t}},up.prototype.getEditingBBox=function(e){var n=this._canvas,t=e.label||e,i=n.getAbsoluteBBox(t),r_x=i.x+i.width/2,r_y=i.y+i.height/2,o={x:i.x,y:i.y},a=n.zoom(),s=this._textRenderer.getDefaultStyle(),c=this._textRenderer.getExternalStyle(),l=c.fontSize*a,d=c.lineHeight,u=s.fontSize*a,h=s.lineHeight,f={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};(b(e,"bpmn:Lane")||function xpe(e){return b(e,"bpmn:Participant")&&pn(e)}(e))&&(qe(o,{width:i.height,height:30*a,x:i.x-i.height/2+15*a,y:r_y-30*a/2}),qe(f,{fontSize:u+"px",lineHeight:h,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px",transform:"rotate(-90deg)"})),(tn(e,["bpmn:Task","bpmn:CallActivity"])||function ype(e){return b(e,"bpmn:Participant")&&!pn(e)}(e)||qD(e))&&(qe(o,{width:i.width,height:i.height}),qe(f,{fontSize:u+"px",lineHeight:h,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px"})),function bpe(e){return b(e,"bpmn:SubProcess")&&pn(e)}(e)&&(qe(o,{width:i.width,x:i.x}),qe(f,{fontSize:u+"px",lineHeight:h,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px"}));var m=90*a,g=7*a,v=4*a;if(t.labelTarget&&(qe(o,{width:m,height:i.height+g+v,x:r_x-m/2,y:i.y-g}),qe(f,{fontSize:l+"px",lineHeight:d,paddingTop:g+"px",paddingBottom:v+"px"})),Ya(t)&&!zu(t)&&!Mi(t)){var C=Hu(e),w=n.getAbsoluteBBox({x:C.x,y:C.y,width:0,height:0}),E=l+g+v;qe(o,{width:m,height:E,x:w.x-m/2,y:w.y-E/2}),qe(f,{fontSize:l+"px",lineHeight:d,paddingTop:g+"px",paddingBottom:v+"px"})}return b(e,"bpmn:TextAnnotation")&&(qe(o,{width:i.width,height:i.height,minWidth:30*a,minHeight:10*a}),qe(f,{textAlign:"left",paddingTop:5*a+"px",paddingBottom:7*a+"px",paddingLeft:7*a+"px",paddingRight:5*a+"px",fontSize:u+"px",lineHeight:h})),{bounds:o,style:f}},up.prototype.update=function(e,n,t,i){var r,o;if(b(e,"bpmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(e),r={x:e.x,y:e.y,width:e.width/o.width*i.width,height:e.height/o.height*i.height}),b(e,"bpmn:Group")&&!Ue(e).categoryValueRef){var l=WD(Ue(this._canvas.getRootElement()).$parent,this._bpmnFactory);Ue(e).categoryValueRef=l}(function wpe(e){return!e||!e.trim()})(n)&&(n=null),this._modeling.updateLabel(e,n,r)};var mV="djs-element-hidden",pV="djs-label-hidden";function gV(e,n,t,i){var a,s,c,r=this,o=n.getDefaultLayer();e.on("directEditing.activate",function(l){var d=l.active;if(b(a=d.element.label||d.element,"bpmn:TextAnnotation")){s=n.getAbsoluteBBox(a),c=Qe("g");var u=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:a.width,containerHeight:a.height,position:{mx:0,my:0}}),h=r.path=Qe("path");ve(h,{d:u,strokeWidth:2,stroke:Epe(a)}),nt(c,h),nt(o,c),Or(c,a.x,a.y)}b(a,"bpmn:TextAnnotation")||a.labelTarget?n.addMarker(a,mV):(b(a,"bpmn:Task")||b(a,"bpmn:CallActivity")||b(a,"bpmn:SubProcess")||b(a,"bpmn:Participant"))&&n.addMarker(a,pV)}),e.on("directEditing.resize",function(l){if(b(a,"bpmn:TextAnnotation")){var h=Math.max(a.height/s.height*(l.height+l.dy),0),f=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:a.width,containerHeight:h,position:{mx:0,my:0}});ve(r.path,{d:f})}}),e.on(["directEditing.complete","directEditing.cancel"],function(l){var d=l.active;d&&(n.removeMarker(d.element.label||d.element,mV),n.removeMarker(a,pV)),a=void 0,s=void 0,c&&(ui(c),c=void 0)})}function Epe(e,n){return Ue(e).di.get("stroke")||n||"black"}gV.$inject=["eventBus","canvas","elementRegistry","pathMap"];const Cpe={__depends__:[GD,dy,LD],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",up],labelEditingPreview:["type",gV]};var YD=["top","bottom","left","right"];function KD(e,n){function t(r){if(zu(r)){var o=function kpe(e){var n=Pt(e.label),i=vV(Pt(e),n);if(function Tpe(e){return-1!==YD.indexOf(e)}(i)){var r=function Dpe(e){var n=Pt(e),t=[].concat(e.incoming.map(function(i){return i.waypoints[i.waypoints.length-2]}),e.outgoing.map(function(i){return i.waypoints[1]})).map(function(i){return vV(n,i)});return t}(e);if(e.host){var o=function Spe(e){var r,n=e.host,i=nr(Pt(e),n);r=i.indexOf("-")>=0?i.split("-"):[i];var o=YD.filter(function(a){return-1===r.indexOf(a)});return o}(e);r=r.concat(o)}var a=YD.filter(function(s){return-1===r.indexOf(s)});if(-1===a.indexOf(i))return a[0]}}(r);o&&function i(r,o){var a=Pt(r),s=r.label,c=Pt(s);if(s.parent){var d,l=lt(r);switch(o){case"top":d={x:a.x,y:l.top-10-s.height/2};break;case"left":d={x:l.left-10-s.width/2,y:a.y};break;case"bottom":d={x:a.x,y:l.bottom+10+s.height/2};break;case"right":d={x:l.right+10+s.width/2,y:a.y}}var u=Xa(d,c);n.moveShape(s,u)}}(r,o)}}Ve.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],function(r){var o=r.context,a=o.connection,c=a.target;!1!==(o.hints||{}).createElementsBehavior&&(t(a.source),t(c))}),this.postExecuted(["label.create"],function(r){var o=r.context;!1!==(o.hints||{}).createElementsBehavior&&t(o.shape.labelTarget)}),this.postExecuted(["elements.create"],function(r){var o=r.context;!1!==(o.hints||{}).createElementsBehavior&&o.elements.forEach(function(c){t(c)})})}function vV(e,n){return nr(n,e,5)}function XD(e,n,t){Ve.call(this,e),this.preExecute("shape.append",function(i){var r=i.source,o=i.shape;i.position||(i.position=b(o,"bpmn:TextAnnotation")?{x:r.x+r.width/2+75,y:r.y-50-o.height/2}:{x:r.x+r.width+80+o.width/2,y:r.y+r.height/2})},!0)}function ZD(e,n){e.invoke(Ve,this),this.postExecute("shape.move",function(t){var i=t.newParent,r=t.shape;ht(Bn(r.incoming.concat(r.outgoing),function(a){return b(a,"bpmn:Association")}),function(a){n.moveConnection(a,{x:0,y:0},i)})},!0)}function hy(e,n){n.invoke(Ve,this),this._bpmnReplace=e;var t=this;this.postExecuted("elements.create",500,function(i){var r=i.elements;1===(r=r.filter(function(o){return bV(o,o.host)})).length&&r.map(function(o){return r.indexOf(o)}).forEach(function(o){i.elements[o]=t.replaceShape(r[o],r[o])})},!0),this.preExecute("elements.move",500,function(i){var r=i.shapes,o=i.newHost;if(1===r.length){var a=r[0];bV(a,o)&&(i.shapes=[t.replaceShape(a,o)])}},!0)}function bV(e,n){return!Mi(e)&&tn(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!n}function QD(e,n,t){function i(r){return Bn(r.attachers,function(o){return b(o,"bpmn:BoundaryEvent")})}Ve.call(this,e),this.postExecute("connection.create",function(r){var o=r.context.source,a=r.context.target,s=i(a);b(o,"bpmn:EventBasedGateway")&&b(a,"bpmn:ReceiveTask")&&s.length>0&&t.removeElements(s)}),this.postExecute("connection.reconnect",function(r){var a=r.context.newSource;b(r.context.oldSource,"bpmn:Gateway")&&b(a,"bpmn:EventBasedGateway")&&ht(a.outgoing,function(s){var c=s.target,l=i(c);b(c,"bpmn:ReceiveTask")&&l.length>0&&t.removeElements(l)})}),e.on("moddleCopy.canCopyProperty",2e3,function(r){var o=r.parent,a=r.property,s=r.propertyName,c=n.getPropertyDescriptor(o,s);c&&c.isReference&&b(a,"bpmn:RootElement")&&o.set(s,a)})}function JD(e,n,t,i,r){function o(d){return tn(d,["bpmn:ReceiveTask","bpmn:SendTask"])||function Ope(e,n){return da(n)||(n=[n]),wu(n,function(t){return Tb(e,t)})}(d,["bpmn:ErrorEventDefinition","bpmn:EscalationEventDefinition","bpmn:MessageEventDefinition","bpmn:SignalEventDefinition"])}function a(d){return!!mo(e.getDefinitions().get("rootElements"),ZC({id:d.id}))}function s(d){return b(d,"bpmn:ErrorEventDefinition")?"errorRef":b(d,"bpmn:EscalationEventDefinition")?"escalationRef":b(d,"bpmn:MessageEventDefinition")?"messageRef":b(d,"bpmn:SignalEventDefinition")?"signalRef":void 0}function c(d){if(tn(d,["bpmn:ReceiveTask","bpmn:SendTask"]))return d.get("messageRef");var h=d.get("eventDefinitions")[0];return h.get(s(h))}t.invoke(Ve,this),this.executed("shape.create",function(d){var u=d.shape;if(o(u)){var f=c(Ue(u));f&&!a(f)&&(ri(e.getDefinitions().get("rootElements"),f),d.addedRootElement=f)}},!0),this.reverted("shape.create",function(d){var u=d.addedRootElement;u&&ii(e.getDefinitions().get("rootElements"),u)},!0),n.on("copyPaste.copyElement",function(d){var u=d.descriptor,h=d.element;if(o(h)){var m=c(Ue(h));m&&(u.referencedRootElement=m)}}),n.on("copyPaste.pasteElement",500,function(d){var u=d.descriptor,h=u.businessObject;if(o(h)){var f=u.referencedRootElement;f&&(a(f)||(f=i.copyElement(f,r.create(f.$type))),function l(d,u){if(tn(d,["bpmn:ReceiveTask","bpmn:SendTask"]))return d.set("messageRef",u);var f=d.get("eventDefinitions")[0];f.set(s(f),u)}(h,f))}})}function ek(e){e.invoke(Ve,this),this.preExecute("shape.create",1500,function(n){var t=n.context,i=t.parent,r=t.shape;b(i,"bpmn:Lane")&&!b(r,"bpmn:Lane")&&(t.parent=Xb(i,"bpmn:Participant"))})}function yV(e,n,t){n.on(["create.hover","create.move","create.out","create.end","shape.move.hover","shape.move.move","shape.move.out","shape.move.end"],1500,function(i){var o=i.context.shape||i.shape,a=i.hover;b(a,"bpmn:Lane")&&!tn(o,["bpmn:Lane","bpmn:Participant"])&&(i.hover=va(a),i.hoverGfx=e.getGraphics(i.hover));var s=t.getRootElement();a!==s&&(o.labelTarget||b(o,"bpmn:Group"))&&(i.hover=s,i.hoverGfx=e.getGraphics(i.hover))}),n.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],1500,function(i){var r=i.hover;b(r,"bpmn:Lane")&&(i.hover=va(r)||r,i.hoverGfx=e.getGraphics(i.hover))}),n.on(["bendpoint.move.hover"],1500,function(i){var o=i.hover,a=i.context.type;b(o,"bpmn:Lane")&&/reconnect/.test(a)&&(i.hover=va(o)||o,i.hoverGfx=e.getGraphics(i.hover))}),n.on(["connect.start"],1500,function(i){var r=i.context,o=r.start;b(o,"bpmn:Lane")&&(r.start=va(o)||o)}),n.on("shape.move.start",2e3,function(i){var r=i.shape;b(r,"bpmn:Lane")&&(i.shape=va(r)||r)})}function tk(e,n,t){Ve.call(this,e),this.preExecute("shape.create",function(i){var o=i.context.shape;if(b(o,"bpmn:DataObjectReference")&&"label"!==o.type){var a=n.create("bpmn:DataObject");o.businessObject.dataObjectRef=a}})}tt()(KD,Ve),KD.$inject=["eventBus","modeling"],tt()(XD,Ve),XD.$inject=["eventBus","elementFactory","bpmnRules"],tt()(ZD,Ve),ZD.$inject=["injector","modeling"],hy.$inject=["bpmnReplace","injector"],tt()(hy,Ve),hy.prototype.replaceShape=function(e,n){var t=function Ape(e){var t=Ue(e).eventDefinitions;return t&&t[0]}(e),i={type:"bpmn:BoundaryEvent",host:n};return t&&(i.eventDefinitionType=t.$type),this._bpmnReplace.replaceElement(e,i,{layoutConnection:!1})},QD.$inject=["eventBus","moddle","modeling"],tt()(QD,Ve),JD.$inject=["bpmnjs","eventBus","injector","moddleCopy","bpmnFactory"],tt()(JD,Ve),ek.$inject=["injector"],tt()(ek,Ve),yV.$inject=["elementRegistry","eventBus","canvas"],tk.$inject=["eventBus","bpmnFactory","moddle"],tt()(tk,Ve);function rk(e,n,t){function i(){var r=e.getRootElement();return b(r,"bpmn:Collaboration")?r:t.makeCollaboration()}Ve.call(this,n),n.on(["create.start","shape.move.start"],2e3,function(r){var o=r.context,a=o.shape,s=e.getRootElement();if(b(a,"bpmn:Participant")&&b(s,"bpmn:Process")&&s.children.length){var c=s.children.filter(function(u){return!b(u,"bpmn:Group")&&!Mi(u)&&!function Fpe(e){return!!e.waypoints}(u)});if(c.length){var l=tr(c),d=function Npe(e,n){n={width:n.width+40+30,height:n.height+40};var t=Math.max(e.width,n.width),i=Math.max(e.height,n.height);return{x:-t/2,y:-i/2,width:t,height:i}}(a,l);qe(a,d),o.createConstraints=function Ppe(e,n){return{bottom:(n=lt(n)).top+e.height/2-20,left:n.right-e.width/2+20,top:n.bottom-e.height/2+20,right:n.left+e.width/2-20-30}}(a,l)}}}),n.on("create.start",2e3,function(r){var a=r.context.shape,s=e.getRootElement(),c=e.getGraphics(s);function l(d){d.element=s,d.gfx=c}b(a,"bpmn:Participant")&&b(s,"bpmn:Process")&&(n.on("element.hover",2e3,l),n.once("create.cleanup",function(){n.off("element.hover",l)}))}),this.preExecute("elements.create",2e3,function(r){var c,a=r.parent,s=function Lpe(e){return mo(e,function(n){return b(n,"bpmn:Participant")})}(r.elements);s&&b(a,"bpmn:Process")&&(r.parent=i(),(c=r.hints=r.hints||{}).participant=s,c.process=a,c.processRef=Ue(s).get("processRef"))},!0),this.preExecute("shape.create",function(r){var o=r.parent,a=r.shape;b(a,"bpmn:Participant")&&b(o,"bpmn:Process")&&(r.parent=i(),r.process=o,r.processRef=Ue(a).get("processRef"))},!0),this.execute("shape.create",function(r){var o=r.hints||{},a=r.process||o.process,s=r.shape,c=o.participant;a&&(!c||s===c)&&Ue(s).set("processRef",Ue(a))},!0),this.revert("shape.create",function(r){var o=r.hints||{},s=r.processRef||o.processRef,c=r.shape,l=o.participant;(r.process||o.process)&&(!l||c===l)&&Ue(c).set("processRef",s)},!0),this.postExecute("shape.create",function(r){var a=r.process||r.hints.process,s=r.shape,c=(r.hints||{}).participant;if(a){var l=a.children.slice();c?s===c&&t.moveElements(l,{x:0,y:0},c):t.moveElements(l,{x:0,y:0},s)}},!0)}rk.$inject=["canvas","eventBus","modeling"],tt()(rk,Ve);var wV="__targetRef_placeholder";function ok(e,n){function i(a,s){var c=a.get("properties"),l=mo(c,function(d){return d.name===wV});return!l&&s&&ri(c,l=n.create("bpmn:Property",{name:wV})),l}function r(a,s){var c=i(a);c&&(function t(a,s,c){return mo(a.get("dataInputAssociations"),function(d){return d!==c&&d.targetRef===s})}(a,c,s)||ii(a.get("properties"),c))}function o(a){var C,s=a.context,c=s.connection,l=c.businessObject,d=c.target,u=d&&d.businessObject,h=s.newTarget,f=h&&h.businessObject,m=s.oldTarget||s.target,g=m&&m.businessObject,v=c.businessObject;g&&g!==u&&r(g,l),f&&f!==u&&r(f,l),u?(C=i(u,!0),v.targetRef=C):v.targetRef=null}Ve.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],EV(o)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],EV(o))}function EV(e){return function(n){if(b(n.context.connection,"bpmn:DataInputAssociation"))return e(n)}}function py(e){this._bpmnUpdater=e}function ak(e,n,t,i){function o(s){return s.children.filter(function(c){return b(c,"bpmn:DataStoreReference")&&!c.labelTarget})}function a(s,c){var l=s.businessObject||s;if(c=c||function r(){return t.filter(function(s){return b(s,"bpmn:Participant")&&Ue(s).processRef})[0]}(),c){var d=c.businessObject||c;n.execute("dataStore.updateContainment",{dataStoreBo:l,newSemanticParent:d.processRef||d,newDiParent:d.di})}}Ve.call(this,i),n.registerHandler("dataStore.updateContainment",py),this.preExecute("shape.create",function(s){var c=s.context,l=c.shape;b(l,"bpmn:DataStoreReference")&&"label"!==l.type&&(c.hints||(c.hints={}),c.hints.autoResize=!1)}),this.preExecute("elements.move",function(s){var c=s.context,l=c.shapes;l.filter(function(u){return b(u,"bpmn:DataStoreReference")}).length&&(c.hints||(c.hints={}),c.hints.autoResize=l.filter(function(u){return!b(u,"bpmn:DataStoreReference")}))}),this.postExecute("shape.create",function(s){var l=s.context.shape,d=l.parent;b(l,"bpmn:DataStoreReference")&&"label"!==l.type&&b(d,"bpmn:Collaboration")&&a(l)}),this.postExecute("shape.move",function(s){var c=s.context,l=c.shape,d=c.oldParent,u=l.parent;if(!b(d,"bpmn:Collaboration")&&b(l,"bpmn:DataStoreReference")&&"label"!==l.type&&b(u,"bpmn:Collaboration")){var h=b(d,"bpmn:Participant")?d:function Vpe(e,n){for(;e.parent;){if(b(e.parent,n))return e.parent;e=e.parent}}(d,"bpmn:Participant");a(l,h)}}),this.postExecute("shape.delete",function(s){var l=s.context.shape,d=e.getRootElement();tn(l,["bpmn:Participant","bpmn:SubProcess"])&&b(d,"bpmn:Collaboration")&&o(d).filter(function(u){return function Bpe(e,n){for(var t=e.businessObject||e,i=n.businessObject||n;t.$parent;){if(t.$parent===i.processRef||i)return!0;t=t.$parent}return!1}(u,l)}).forEach(function(u){a(u)})}),this.postExecute("canvas.updateRoot",function(s){var c=s.context,d=c.newRoot;o(c.oldRoot).forEach(function(h){b(d,"bpmn:Process")&&a(h,d)})})}function sk(e,n,t){Ve.call(this,e),this.postExecuted("shape.delete",500,function(r){var o=r.context,a=o.hints,s=o.shape,c=o.oldParent;b(s,"bpmn:Lane")&&(a&&a.nested||function i(r,o){var l,d,u,a=Gl(o),s=[],c=[];Pl(a,function(h){return h.y>r.y?c.push(h):s.push(h),h.children}),a.length&&(l=c.length&&s.length?r.height/2:r.height,s.length&&(d=t.calculateAdjustments(s,"y",l,r.y-10),t.makeSpace(d.movingShapes,d.resizingShapes,{x:0,y:l},"s")),c.length&&(u=t.calculateAdjustments(c,"y",-l,r.y+r.height+10),t.makeSpace(u.movingShapes,u.resizingShapes,{x:0,y:-l},"n")))}(s,c))})}function gy(e,n){n.invoke(Ve,this),this._bpmnReplace=e;var t=this;this.postExecuted("elements.create",500,function(i){var r=i.elements;r.filter(function(o){return SV(o,o.host)}).map(function(o){return r.indexOf(o)}).forEach(function(o){i.elements[o]=t.replaceShape(r[o])})},!0),this.preExecute("elements.move",500,function(i){var r=i.shapes,o=i.newHost;r.forEach(function(a,s){var c=a.host;SV(a,function Hpe(e,n){return-1!==e.indexOf(n)}(r,c)?c:o)&&(r[s]=t.replaceShape(a))})},!0)}function SV(e,n){return!Mi(e)&&b(e,"bpmn:BoundaryEvent")&&!n}function ck(e,n,t){function i(r,o,a){var c,l,d,h,f,m,C,s=o.waypoints,g=r.outgoing.slice(),v=r.incoming.slice(),w=yD(s,C=P3(a.width)?Pt(a):a);if(w){if(c=s.slice(0,w.index),l=s.slice(w.index+(w.bendpoint?1:0)),!c.length||!l.length)return;d=w.bendpoint?s[w.index]:C,(1===c.length||!DV(r,c[c.length-1]))&&c.push(kV(d)),(1===l.length||!DV(r,l[0]))&&l.unshift(kV(d))}h=o.target,n.canConnect(o.source,r,o)&&(t.reconnectEnd(o,r,c||C),f=o),n.canConnect(r,h,o)&&(f?m=t.connect(r,h,{type:o.type,waypoints:l}):(t.reconnectStart(o,r,l||C),m=o));var E=[].concat(f&&Bn(v,function(x){return x.source===f.source})||[],m&&Bn(g,function(x){return x.target===m.target})||[]);E.length&&t.removeElements(E)}Ve.call(this,e),this.preExecute("elements.move",function(r){var o=r.newParent,a=r.shapes,s=r.delta,c=a[0];if(c&&o){o&&o.waypoints&&(r.newParent=o=o.parent);var l=Pt(c),d={x:l.x+s.x,y:l.y+s.y},u=mo(o.children,function(h){return n.canInsert(a,h)&&yD(h.waypoints,d)});u&&(r.targetFlow=u,r.position=d)}},!0),this.postExecuted("elements.move",function(r){var a=r.targetFlow;a&&i(r.shapes[0],a,r.position)},!0),this.preExecute("shape.create",function(r){var o=r.parent;n.canInsert(r.shape,o)&&(r.targetFlow=o,r.parent=o.parent)},!0),this.postExecuted("shape.create",function(r){var a=r.targetFlow;a&&i(r.shape,a,r.position)},!0)}function DV(e,n){var t=n.x,i=n.y;return t>=e.x&&t<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function kV(e){return qe({},e)}function lk(e,n){Ve.call(this,e),this.preExecuted("connection.create",function(t){var i=t.context,r=i.source,o=i.target,a=o.incoming.slice();i.hints&&!1===i.hints.createElementsBehavior||b(r,"bpmn:EventBasedGateway")&&o.incoming.length&&a.filter(dk).forEach(function(s){n.removeConnection(s)})}),this.preExecuted("shape.replace",function(t){var i=t.context.newShape;b(i,"bpmn:EventBasedGateway")&&i.outgoing.filter(dk).map(function(a){return a.target}).reduce(function(a,s){var c=s.incoming.filter(dk);return a.concat(c)},[]).forEach(function(a){a.source!==i&&n.removeConnection(a)})})}function dk(e){return b(e,"bpmn:SequenceFlow")}function uk(e,n,t,i,r,o){function a(){return Ue(n.getRootElement()).$parent}function s(u){var f=Ue(u).categoryValueRef;if(f){var m=f.$parent;f&&(ii(m.categoryValue,f),m&&!m.categoryValue.length&&function c(u){ii(a().get("rootElements"),u)}(m))}}r.invoke(Ve,this),this.executed("shape.delete",function(u){var f=u.context.shape;if(b(f,"bpmn:Group")){var g=Ue(f).categoryValueRef,v=function l(){return t.filter(function(u){return b(u,"bpmn:Group")})}();(function d(u,h){return u.some(function(f){var m=Ue(f);return m.categoryValueRef&&m.categoryValueRef===h})})(v,g)||s(f)}}),this.reverted("shape.delete",function(u){var f=u.context.shape;if(b(f,"bpmn:Group")){var g=Ue(f).categoryValueRef,v=a(),C=g?g.$parent:null;ri(C.get("categoryValue"),g),ri(v.get("rootElements"),C)}}),this.execute("shape.create",function(u){var m=Ue(u.context.shape);if(b(m,"bpmn:Group")&&!m.categoryValueRef){var v=WD(a(),e);m.categoryValueRef=v}}),this.revert("shape.create",function(u){var f=u.context.shape;b(f,"bpmn:Group")&&(s(f),delete Ue(f).categoryValueRef)}),i.on("moddleCopy.canCopyProperty",2e3,function(u){var f,h=u.property;if(b(h,"bpmn:CategoryValue"))return f=WD(a(),e),o.copyElement(h,f)})}function hk(e,n,t,i){var r,s;return 0==(r=(i.y-t.y)*(n.x-e.x)-(i.x-t.x)*(n.y-e.y))?null:(s=((i.x-t.x)*(e.y-t.y)-(i.y-t.y)*(e.x-t.x))/r,{x:Math.round(e.x+s*(n.x-e.x)),y:Math.round(e.y+s*(n.y-e.y))})}function TV(e){function n(i,r,o){var d,s={x:o.x-50,y:o.y},c=hk(i,r,o,{x:o.x,y:o.y-50}),l=hk(i,r,o,s);d=c&&l?AV(c,o)>AV(l,o)?l:c:c||l,i.original=d}e.on("bpmnElement.added",function(i){var r=i.element;r.waypoints&&function t(i){var r=i.waypoints;n(r[0],r[1],Pt(i.source)),n(r[r.length-1],r[r.length-2],Pt(i.target))}(r)})}function AV(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function fk(e){Ve.call(this,e);var n=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],function(t){var i=Ue(t.context.shape);tn(i,n)&&!i.di.get("isHorizontal")&&i.di.set("isHorizontal",!0)})}function MV(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function IV(e){return Math.atan((e[1].y-e[0].y)/(e[1].x-e[0].x))}function OV(e,n){var t=n[0],i=n[1],r={x:i.x-t.x,y:i.y-t.y},o=function Gpe(e,n,t){var i=[{n:e[0]-t[0],lambda:n[0]},{n:e[1]-t[1],lambda:n[1]}];return-(i[0].n*n[0]+i[1].n*n[1])/(i[0].lambda*n[0]+i[1].lambda*n[1])}([t.x,t.y],[r.x,r.y],[e.x,e.y]);return{x:t.x+o*r.x,y:t.y+o*r.y}}function Wpe(e,n){var t=OV(e,n);return MV({x:t.x-e.x,y:t.y-e.y})}function vy(e,n){return MV({x:e.x-n.x,y:e.y-n.y})}ok.$inject=["eventBus","bpmnFactory"],tt()(ok,Ve),py.$inject=["bpmnUpdater"],py.prototype.execute=function(e){var n=e.dataStoreBo,t=e.newSemanticParent,i=e.newDiParent;e.oldSemanticParent=n.$parent,e.oldDiParent=n.di.$parent,this._bpmnUpdater.updateSemanticParent(n,t),this._bpmnUpdater.updateDiParent(n.di,i)},py.prototype.revert=function(e){var n=e.dataStoreBo,i=e.oldDiParent;this._bpmnUpdater.updateSemanticParent(n,e.oldSemanticParent),this._bpmnUpdater.updateDiParent(n.di,i)},ak.$inject=["canvas","commandStack","elementRegistry","eventBus"],tt()(ak,Ve),sk.$inject=["eventBus","modeling","spaceTool"],tt()(sk,Ve),gy.$inject=["bpmnReplace","injector"],tt()(gy,Ve),gy.prototype.replaceShape=function(e){var n=function zpe(e){var t=Ue(e).eventDefinitions;return t&&t[0]}(e);return this._bpmnReplace.replaceElement(e,n?{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:n.$type}:{type:"bpmn:IntermediateThrowEvent"},{layoutConnection:!1})},tt()(ck,Ve),ck.$inject=["eventBus","bpmnRules","modeling"],lk.$inject=["eventBus","modeling"],tt()(lk,Ve),uk.$inject=["bpmnFactory","canvas","elementRegistry","eventBus","injector","moddleCopy"],tt()(uk,Ve),TV.$inject=["eventBus"],fk.$inject=["eventBus"],tt()(fk,Ve);var RV=Math.sqrt,NV=Math.min,qpe=Math.max,PV=Math.abs;function FV(e){return Math.pow(e,2)}function hp(e,n){return RV(FV(e.x-n.x)+FV(e.y-n.y))}function Kpe(e,n,t,i){var r=n.x-e.x,o=n.y-e.y,a=t.x-e.x,s=t.y-e.y,c=r*r+o*o,u=(r*a+o*s)/c,f=u*u-(a*a+s*s-i*i)/c;if(f<0&&f>-1e-6&&(f=0),f<0)return[];var m=RV(f),g=-u+m,v=-u-m,C={x:e.x-r*g,y:e.y-o*g};return 0===f?[C]:[C,{x:e.x-r*v,y:e.y-o*v}].filter(function(E){return function Xpe(e,n,t){return LV(e.x,n.x,t.x)&&LV(e.y,n.y,t.y)}(E,e,n)})}function LV(e,n,t){return e>=NV(n,t)-_y&&e<=qpe(n,t)+_y}function Zpe(e,n){return{x:(e.x+n.x)/2,y:(e.y+n.y)/2}}var _y=.1;function BV(e,n){return PV(e.x-n.x)<=_y&&PV(e.y-n.y)<=_y}function VV(e,n){var t=vy(e[n-1],e[n]);return t/(t+vy(e[n],e[n+1]))}function jV(e,n){return[e[n],e[n+1]]}function fp(e,n,t){var i=qm(n),r=qm(t),o=Xa(e,i);return wc({x:r.x+o.x*(t.width/n.width),y:r.y+o.y*(t.height/n.height)})}function zV(e,n,t){var i=qm(e),r=qm(n),o=qm(t),a=Xa(e,i),s=Xa(i,r),c=function ige(e,n,t){var i=lt(n),r=lt(t);if(function rge(e,n){return function oge(e,n){return e.right!==n.right&&e.left!==n.left}(e,n)||function age(e,n){return e.top!==n.top&&e.bottom!==n.bottom}(e,n)}(i,r))return null;var a,o=nr(n,e);if("top"===o)a={x:0,y:r.bottom-i.bottom};else if("bottom"===o)a={x:0,y:r.top-i.top};else if("right"===o)a={x:r.left-i.left,y:0};else{if("left"!==o)return null;a={x:r.right-i.right,y:0}}return nr(t,{x:e.x+a.x,y:e.y+a.y})!==o?null:a}(i,n,t);return c||wc({x:o.x+s.x*(t.width/n.width)+a.x-e.x,y:o.y+s.y*(t.height/n.height)+a.y-e.y})}var sge={width:90,height:20};function mk(e,n,t,i){Ve.call(this,e),this.postExecute("element.updateProperties",function(o){var a=o.context,s=a.element,c=a.properties;if("name"in c&&n.updateLabel(s,c.name),"text"in c&&b(s,"bpmn:TextAnnotation")){var l=i.getTextAnnotationBounds({x:s.x,y:s.y,width:s.width,height:s.height},c.text||"");n.updateLabel(s,c.text,l)}}),this.postExecute(["shape.create","connection.create"],function(o){var a=o.context;if(!1!==(a.hints||{}).createElementsBehavior){var c=a.shape||a.connection,l=c.businessObject;if(!Mi(c)&&Ya(c)&&fa(c)){var d=Hu(c),u=i.getExternalLabelBounds(sge,fa(c));n.createLabel(c,d,{id:l.id+"_label",businessObject:l,width:u.width,height:u.height})}}}),this.postExecute("shape.delete",function(o){var a=o.context,s=a.labelTarget;s&&!1!==(a.hints||{}).unsetLabel&&n.updateLabel(s,null,null,{removeShape:!1})}),this.postExecute(["label.create"],function(o){var l,s=o.context.shape;s.labelTarget&&b(s.labelTarget||s,"bpmn:BaseElement")&&((l=s.businessObject.di).label||(l.label=t.create("bpmndi:BPMNLabel",{bounds:t.create("dc:Bounds")})),qe(l.label.bounds,{x:s.x,y:s.y,width:s.width,height:s.height}))}),this.postExecute(["connection.layout","connection.updateWaypoints"],function(o){var a=o.context;if(!1!==(a.hints||{}).labelBehavior){var d,l=a.connection.label;!l||!l.parent||(d=function r(o){var a=o.context,s=a.connection,c=s.label,l=qe({},a.hints),d=a.newWaypoints||s.waypoints,u=a.oldWaypoints;return typeof l.startChanged>"u"&&(l.startChanged=!!l.connectionStart),typeof l.endChanged>"u"&&(l.endChanged=!!l.connectionEnd),function Jpe(e,n,t,i){var r=0,o=0,a=function ege(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}(e),s=function Ype(e,n){var i,r,o,a,s,l,d,u,h,f,t=0;for(t=0;t line intersections");1===l.length&&(d={type:"bendpoint",position:l[0],segmentIndex:t,bendpointIndex:BV(i,l[0])?t:t+1}),2===l.length&&(d={type:"segment",position:s=Zpe(l[0],l[1]),segmentIndex:t,relativeLocation:hp(i,s)/hp(i,r)}),u=hp(d.position,e),(!f||h>u)&&(f=d,h=u)}return f}(a,t),c=s.segmentIndex,l=function Qpe(e,n,t,i){var r=t.segmentIndex,o=n.length-e.length;if(i.segmentMove){var s=i.segmentMove.newSegmentStartIndex;return r===i.segmentMove.segmentStartIndex?s:r>=s?r+o=l&&(d=c?r+1:r-1),rn.length-2)return{x:r,y:o};var d=jV(t,c),u=jV(n,l),h=s.position,f=function nge(e,n){var t=vy(e[0],e[1]),i=vy(e[0],n);return 0===t?0:i/t}(d,h),m=function tge(e,n){var t=IV(e);return IV(n)-t}(d,u);if("bendpoint"===s.type){var g=n.length-t.length,v=s.bendpointIndex;if(-1!==n.indexOf(t[v]))return{x:r,y:o};if(0===g){var w=n[v];return{x:w.x-s.position.x,y:w.y-s.position.y}}g<0&&0!==v&&v"+o+"
"})}(r,t("flow elements must be children of pools/participants"))})}function _k(e,n,t,i){Ve.call(this,e);var r=i.get("dragging",!1);function o(c){var h,f,l=c.source,d=c.target;c.parent&&(b(c,"bpmn:SequenceFlow")&&(t.canConnectSequenceFlow(l,d)||(f=!0),t.canConnectMessageFlow(l,d)&&(h="bpmn:MessageFlow")),b(c,"bpmn:MessageFlow")&&(t.canConnectMessageFlow(l,d)||(f=!0),t.canConnectSequenceFlow(l,d)&&(h="bpmn:SequenceFlow")),b(c,"bpmn:Association")&&!t.canConnectAssociation(l,d)&&(f=!0),f&&n.removeConnection(c),h&&n.connect(l,d,{type:h,waypoints:c.waypoints.slice()}))}this.postExecuted("elements.move",function(c){ht(c.closure.allConnections,o)},!0),this.preExecute("connection.reconnect",function a(c){var f,m,l=c.context,d=l.connection,u=l.newSource||d.source,h=l.newTarget||d.target;(f=t.canConnect(u,h))&&f.type!==d.type&&(m=n.connect(u,h,{type:f.type,waypoints:d.waypoints.slice()}),n.removeConnection(d),l.connection=m,r&&function s(c,l){var h,d=r.context(),u=d&&d.payload.previousSelection;!u||!u.length||-1!==(h=u.indexOf(c))&&u.splice(h,1,l)}(d,m))}),this.postExecuted("element.updateProperties",function(c){var f,l=c.context,d=l.properties,u=l.element,h=u.businessObject;d.default&&(f=mo(u.outgoing,ZC({id:u.businessObject.default.id})))&&n.updateProperties(f,{conditionExpression:void 0}),d.conditionExpression&&h.sourceRef.default===h&&n.updateProperties(u.source,{default:void 0})})}function bk(e,n){Ve.call(this,e),this.preExecute("shape.delete",function(t){var i=t.shape,r=i.parent;b(i,"bpmn:Participant")&&(t.collaborationRoot=r)},!0),this.postExecute("shape.delete",function(t){var i=t.collaborationRoot;i&&!i.businessObject.participants.length&&n.makeProcess()},!0)}function wy(e,n,t,i,r,o){i.invoke(Ve,this),this._bpmnReplace=e,this._elementRegistry=t,this._selection=o,this.postExecuted(["elements.create"],500,function(a){var s=a.context,l=s.elements,d=n.canReplace(l,s.parent);d&&this.replaceElements(l,d.replacements)},this),this.postExecuted(["elements.move"],500,function(a){var s=a.context,c=s.newParent,l=s.newHost,d=[];ht(s.closure.topLevel,function(h){d=yo(h)?d.concat(h.children):d.concat(h)}),1===d.length&&l&&(c=l);var u=n.canReplace(d,c);u&&this.replaceElements(d,u.replacements,l)},this),this.postExecute(["shape.replace"],1500,function(a){var u,s=a.context,d=s.oldShape.attachers;d&&d.length&&(u=n.canReplace(d,s.newShape),this.replaceElements(d,u.replacements))},this),this.postExecuted(["shape.replace"],1500,function(a){var s=a.context,c=s.oldShape,l=s.newShape;r.unclaimId(c.businessObject.id,c.businessObject),r.updateProperties(l,{id:c.id})})}tt()(mk,Ve),mk.$inject=["eventBus","modeling","bpmnFactory","textRenderer"],vk.$inject=["eventBus","modeling"],tt()(vk,Ve),WV.$inject=["eventBus","tooltips","translate"],tt()(_k,Ve),_k.$inject=["eventBus","modeling","bpmnRules","injector"],bk.$inject=["eventBus","modeling"],tt()(bk,Ve),tt()(wy,Ve),wy.prototype.replaceElements=function(e,n){var t=this._elementRegistry,i=this._bpmnReplace,r=this._selection;ht(n,function(o){var a={type:o.newElementType},s=t.get(o.oldElementId),c=e.indexOf(s);e[c]=i.replaceElement(s,a,{select:!1})}),n&&r.select(e)},wy.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var ql={width:300,height:60},mp={width:300,height:150},qV={width:140,height:120},YV={width:50,height:30};function KV(e){e.on("resize.start",1500,function(n){var t=n.context,i=t.shape,r=t.direction,o=t.balanced;(b(i,"bpmn:Lane")||b(i,"bpmn:Participant"))&&(t.resizeConstraints=function Cge(e,n,t){var i=va(e),r=!0,o=!0,a=ty(i,[i]),s=lt(e),c={},l={};return/e/.test(n)?l.right=s.left+ql.width:/w/.test(n)&&(l.left=s.right-ql.width),a.forEach(function(u){var h=lt(u);/n/.test(n)&&(h.tops.bottom+10&&(o=!1),t&&Ey(s.bottom-h.top)<10&&Cy(c,"bottom",h.bottom-ql.height),Ey(s.bottom-h.bottom)<5&&Sy(l,"bottom",h.top+ql.height))}),i.children.filter(function(u){return!u.hidden&&!u.waypoints&&(b(u,"bpmn:FlowElement")||b(u,"bpmn:Artifact"))}).forEach(function(u){var h=lt(u);r&&/n/.test(n)&&Cy(l,"top",h.top-wge),/e/.test(n)&&Sy(l,"right",h.right+yge),o&&/s/.test(n)&&Sy(l,"bottom",h.bottom+Ege),/w/.test(n)&&Cy(l,"left",h.left-xge)}),{min:l,max:c}}(i,r,o)),b(i,"bpmn:Participant")&&(t.minDimensions=mp),b(i,"bpmn:SubProcess")&&pn(i)&&(t.minDimensions=qV),b(i,"bpmn:TextAnnotation")&&(t.minDimensions=YV)})}KV.$inject=["eventBus"];var Ey=Math.abs,_ge=Math.min,bge=Math.max;function XV(e,n,t,i){var r=e[n];e[n]=void 0===r?t:i(t,r)}function Cy(e,n,t){return XV(e,n,t,_ge)}function Sy(e,n,t){return XV(e,n,t,bge)}var yge=20,xge=50,wge=20,Ege=20;function QV(e,n){e.on("resize.start",1501,function(t){var i=t.context,r=i.shape;(b(r,"bpmn:Lane")||b(r,"bpmn:Participant"))&&(i.balanced=!Uu(t))}),e.on("resize.end",1001,function(t){var i=t.context,r=i.shape,o=i.canExecute,a=i.newBounds;if(b(r,"bpmn:Lane")||b(r,"bpmn:Participant"))return o&&(a=u5(a),n.resizeLane(r,a,i.balanced)),!1})}function yk(e,n,t){Ve.call(this,e),this.preExecute("shape.delete",function(i){var r=i.context.shape;if(1===r.incoming.length&&1===r.outgoing.length){var o=r.incoming[0],a=r.outgoing[0];if(b(o,"bpmn:SequenceFlow")&&b(a,"bpmn:SequenceFlow")&&n.canConnect(o.source,a.target,o)){var s=function Sge(e,n){var t=hk(Ju(e[e.length-2]),Ju(e[e.length-1]),Ju(n[1]),Ju(n[0]));return t?[].concat(e.slice(0,e.length-1),[t],n.slice(1)):[Ju(e[0]),Ju(n[n.length-1])]}(o.waypoints,a.waypoints);t.reconnectEnd(o,a.target,s)}}})}function Ju(e){return e.original||e}QV.$inject=["eventBus","modeling"],tt()(yk,Ve),yk.$inject=["eventBus","bpmnRules","modeling"];var Dge=Math.max;function JV(e){e.on("spaceTool.getMinDimensions",function(n){var i=n.axis,r=n.start,o={};return ht(n.shapes,function(a){var s=a.id;b(a,"bpmn:Participant")&&(o[s]=function kge(e){return"x"===e}(i)?mp:{width:mp.width,height:Tge(a,r)}),b(a,"bpmn:SubProcess")&&pn(a)&&(o[s]=qV),b(a,"bpmn:TextAnnotation")&&(o[s]=YV)}),o})}function Tge(e,n){var t;return function Age(e){return!!Gl(e).length}(e)?(t=function Mge(e,n){var i;return i=ej(Gl(e),n),e.height-i.height+ql.height}(e,n),Dge(mp.height,t)):mp.height}function ej(e,n){var t,i,r;for(t=0;t=(i=e[t]).y&&n<=i.y+i.height)return(r=Gl(i)).length?ej(r,n):i}function xk(e,n){e.invoke(Ve,this),this.postExecuted("shape.replace",function(t){var i=t.context.oldShape,r=t.context.newShape;if(b(r,"bpmn:SubProcess")&&b(i,"bpmn:Task")&&pn(r)){var o=function Ige(e){return{x:e.x+e.width/6,y:e.y+e.height/2}}(r);n.createShape({type:"bpmn:StartEvent"},o,r)}})}function Ek(e,n,t,i){Ve.call(this,e),this.executed(["shape.toggleCollapse"],500,function(s){var l=s.context.shape;b(l,"bpmn:SubProcess")&&(l.collapsed?Ue(l).di.isExpanded=!1:(function r(s){s.length&&s.forEach(function(c){"label"===c.type&&!c.businessObject.name&&(c.hidden=!0)})}(l.children),Ue(l).di.isExpanded=!0))}),this.reverted(["shape.toggleCollapse"],500,function(s){var l=s.context.shape;Ue(l).di.isExpanded=!l.collapsed}),this.postExecuted(["shape.toggleCollapse"],500,function(s){var d,c=s.context.shape,l=n._getDefaultSize(c);d=c.collapsed?function a(s,c){return{x:s.x+(s.width-c.width)/2,y:s.y+(s.height-c.height)/2,width:c.width,height:c.height}}(c,l):function o(s,c){var u,h,d=c;return u=function Oge(e){return e.filter(function(n){return!n.hidden})}(s.children).concat([s]),(h=W6(u))?(d.width=Math.max(h.width,d.width),d.height=Math.max(h.height,d.height),d.x=h.x+(h.width-d.width)/2,d.y=h.y+(h.height-d.height)/2):(d.x=s.x+(s.width-d.width)/2,d.y=s.y+(s.height-d.height)/2),d}(c,l),t.resizeShape(c,d,null,{autoResize:!c.collapsed&&"nwse"})})}function Ck(e,n,t,i){n.invoke(Ve,this),this.preExecute("shape.delete",function(r){var a=r.context.shape,s=a.businessObject;Mi(a)||(b(a,"bpmn:Participant")&&pn(a)&&t.ids.unclaim(s.processRef.id),i.unclaimId(s.id,s))}),this.preExecute("connection.delete",function(r){var s=r.context.connection.businessObject;i.unclaimId(s.id,s)}),this.preExecute("canvas.updateRoot",function(){var r=e.getRootElement(),o=r.businessObject;b(r,"bpmn:Collaboration")&&t.ids.unclaim(o.id)})}function Sk(e,n,t){var i;Ve.call(this,e);var s=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(s,5e3,function(c){!function r(){(i=i||new Pge).enter()}()}),this.postExecuted(s,500,function(c){!function a(){if(!i)throw new Error(t("out of bounds release"));var c=i.leave();c&&(n.updateLaneRefs(i.flowNodes,i.lanes),i=null)}()}),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],function(c){var d=c.context.shape,u=function o(){if(!i)throw new Error(t("out of bounds release"));return i}();d.labelTarget||(b(d,"bpmn:Lane")&&u.addLane(d),b(d,"bpmn:FlowNode")&&u.addFlowNode(d))})}function Pge(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}function Dk(e,n){Ve.call(this,e),this.preExecute("connection.delete",function(t){var r=t.context.connection,o=r.source;(function Fge(e,n){if(!b(e,"bpmn:SequenceFlow"))return!1;var t=Ue(n),i=Ue(e);return t.get("default")===i})(r,o)&&n.updateProperties(o,{default:null})})}JV.$inject=["eventBus"],xk.$inject=["injector","modeling"],tt()(xk,Ve),tt()(Ek,Ve),Ek.$inject=["eventBus","elementFactory","modeling"],tt()(Ck,Ve),Ck.$inject=["canvas","injector","moddle","modeling"],Sk.$inject=["eventBus","modeling","translate"],tt()(Sk,Ve),tt()(Dk,Ve),Dk.$inject=["eventBus","modeling"];const Lge={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","rootElementReferenceBehavior","createBehavior","fixHoverBehavior","createDataObjectBehavior","createParticipantBehavior","dataStoreBehavior","dataInputAssociationBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","messageFlowBehavior","modelingFeedback","removeElementBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","toggleElementCollapseBehaviour","spaceToolBehavior","subProcessStartEventBehavior","unclaimIdBehavior","unsetDefaultFlowBehavior","updateFlowNodeRefsBehavior"],adaptiveLabelPositioningBehavior:["type",KD],appendBehavior:["type",XD],associationBehavior:["type",ZD],attachEventBehavior:["type",hy],boundaryEventBehavior:["type",QD],rootElementReferenceBehavior:["type",JD],createBehavior:["type",ek],fixHoverBehavior:["type",yV],createDataObjectBehavior:["type",tk],createParticipantBehavior:["type",rk],dataInputAssociationBehavior:["type",ok],dataStoreBehavior:["type",ak],deleteLaneBehavior:["type",sk],detachEventBehavior:["type",gy],dropOnFlowBehavior:["type",ck],eventBasedGatewayBehavior:["type",lk],groupBehavior:["type",uk],importDockingFix:["type",TV],isHorizontalFix:["type",fk],labelBehavior:["type",mk],messageFlowBehavior:["type",vk],modelingFeedback:["type",WV],replaceConnectionBehavior:["type",_k],removeParticipantBehavior:["type",bk],replaceElementBehaviour:["type",wy],resizeBehavior:["type",KV],resizeLaneBehavior:["type",QV],removeElementBehavior:["type",yk],toggleElementCollapseBehaviour:["type",Ek],spaceToolBehavior:["type",JV],subProcessStartEventBehavior:["type",xk],unclaimIdBehavior:["type",Ck],updateFlowNodeRefsBehavior:["type",Sk],unsetDefaultFlowBehavior:["type",Dk]};function tj(e,n){var t=nr(e,n,-15);return"intersect"!==t?t:null}function rr(e){Qa.call(this,e)}function kk(e){return!e||Mi(e)}function nj(e){do{if(b(e,"bpmn:Process"))return Ue(e);if(b(e,"bpmn:Participant"))return Ue(e).processRef||Ue(e)}while(e=e.parent)}function Tk(e){return b(e,"bpmn:TextAnnotation")}function Ak(e){return b(e,"bpmn:Group")&&!e.labelTarget}function Mk(e){return b(e,"bpmn:BoundaryEvent")&&es(e,"bpmn:CompensateEventDefinition")}function eh(e){return Ue(e).isForCompensation}function ij(e){for(var n=e;n=n.parent;){if(b(n,"bpmn:FlowElementsContainer"))return Ue(n);if(b(n,"bpmn:Participant"))return Ue(n).processRef}return null}function es(e,n){return!!mo(Ue(e).eventDefinitions||[],function(i){return b(i,n)})}function rj(e,n){return(Ue(e).eventDefinitions||[]).every(function(i){return b(i,n)})}function oj(e){return b(e,"bpmn:ReceiveTask")||b(e,"bpmn:IntermediateCatchEvent")&&(es(e,"bpmn:MessageEventDefinition")||es(e,"bpmn:TimerEventDefinition")||es(e,"bpmn:ConditionalEventDefinition")||es(e,"bpmn:SignalEventDefinition"))}function Dy(e){return e.waypoints}function Ik(e,n){var t=function Wge(e){for(var n=[];e;)(e=e.parent)&&n.push(e);return n}(n);return-1!==t.indexOf(e)}function ky(e,n,t){if(kk(e)||kk(n))return null;if(!b(t,"bpmn:DataAssociation")){if(fj(e,n))return{type:"bpmn:MessageFlow"};if(mj(e,n))return{type:"bpmn:SequenceFlow"}}return Rk(e,n)||(Mk(e)&&eh(n)?{type:"bpmn:Association",associationDirection:"One"}:!!hj(e,n)&&{type:"bpmn:Association"})}function th(e,n,t){return!(!Mi(e)&&!Ak(e))||!(b(n,"bpmn:Participant")&&!pn(n))&&(b(e,"bpmn:Participant")?b(n,"bpmn:Process")||b(n,"bpmn:Collaboration"):tn(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?n===e.parent:b(e,"bpmn:Lane")?b(n,"bpmn:Participant")||b(n,"bpmn:Lane"):!(b(e,"bpmn:BoundaryEvent")&&!function qge(e){return Ue(e).cancelActivity&&(aj(e)||sj(e))}(e))&&(b(e,"bpmn:FlowElement")&&!b(e,"bpmn:DataStoreReference")?b(n,"bpmn:FlowElementsContainer")?pn(n):tn(n,["bpmn:Participant","bpmn:Lane"]):b(e,"bpmn:DataStoreReference")&&b(n,"bpmn:Collaboration")?wu(Ue(n).get("participants"),function(i){return!!i.get("processRef")}):tn(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?tn(n,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):!!b(e,"bpmn:MessageFlow")&&(b(n,"bpmn:Collaboration")||e.source.parent==n||e.target.parent==n)))}function Kge(e){return b(e,"bpmn:Lane")}function aj(e){var n=Ue(e);return n&&!(n.eventDefinitions&&n.eventDefinitions.length)}function sj(e){return cj(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function cj(e,n){return n.some(function(t){return es(e,t)})}function pp(e,n,t,i){if(Array.isArray(e)||(e=[e]),1!==e.length)return!1;var r=e[0];return!(Mi(r)||!function Xge(e){return!!(function Yge(e){return!Mi(e)&&b(e,"bpmn:BoundaryEvent")}(e)||b(e,"bpmn:IntermediateThrowEvent")&&aj(e))||b(e,"bpmn:IntermediateCatchEvent")&&sj(e)}(r)||yo(n)||!b(n,"bpmn:Activity")||eh(n)||i&&!tj(i,n)||function Zge(e){return b(e,"bpmn:ReceiveTask")&&mo(e.incoming,function(n){return b(n.source,"bpmn:EventBasedGateway")})}(n))&&"attach"}function lj(e,n,t){if(!n)return!1;var i={replacements:[]};return ht(e,function(r){yo(n)||b(r,"bpmn:StartEvent")&&"label"!==r.type&&th(r,n)&&(function Xde(e){return e&&!1!==Ue(e).isInterrupting}(r)||i.replacements.push({oldElementId:r.id,newElementType:"bpmn:StartEvent"}),(function Zde(e){return Tb(e,"bpmn:ErrorEventDefinition")}(r)||function Qde(e){return Tb(e,"bpmn:EscalationEventDefinition")}(r)||function Jde(e){return Tb(e,"bpmn:CompensateEventDefinition")}(r))&&i.replacements.push({oldElementId:r.id,newElementType:"bpmn:StartEvent"}),cj(r,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&b(n,"bpmn:SubProcess")&&i.replacements.push({oldElementId:r.id,newElementType:"bpmn:StartEvent"})),b(n,"bpmn:Transaction")||es(r,"bpmn:CancelEventDefinition")&&"label"!==r.type&&(b(r,"bpmn:EndEvent")&&th(r,n)&&i.replacements.push({oldElementId:r.id,newElementType:"bpmn:EndEvent"}),b(r,"bpmn:BoundaryEvent")&&pp(r,n,0,t)&&i.replacements.push({oldElementId:r.id,newElementType:"bpmn:BoundaryEvent"}))}),!!i.replacements.length&&i}function dj(e,n){return!wu(e,Kge)&&(!n||e.every(function(t){return th(t,n)}))}function Ok(e,n,t,i){return!!n&&(!(!Mi(e)&&!Ak(e))||!(function Vge(e,n){return e===n}(t,n)||t&&Ik(t,n))&&(th(e,n)||Ty(e,n)))}function uj(e,n){return b(e,"bpmn:SubProcess")?pn(e)&&(!n||n.width>=100&&n.height>=80):b(e,"bpmn:Lane")?!n||n.width>=130&&n.height>=60:b(e,"bpmn:Participant")?!n||n.width>=250&&n.height>=50:!(!Tk(e)&&!Ak(e))}function hj(e,n){return!(Dy(e)||Dy(n)||(!Mk(e)||!eh(n))&&(Ik(n,e)||Ik(e,n)||!function Qge(e,n){var t=Tk(e),i=Tk(n);return(t||i)&&t!==i}(e,n)&&!Rk(e,n)))}function fj(e,n){return!(gj(e)&&!gj(n))&&function zge(e){return b(e,"bpmn:InteractionNode")&&!b(e,"bpmn:BoundaryEvent")&&(!b(e,"bpmn:Event")||b(e,"bpmn:ThrowEvent")&&rj(e,"bpmn:MessageEventDefinition"))}(e)&&function Hge(e){return b(e,"bpmn:InteractionNode")&&!eh(e)&&(!b(e,"bpmn:Event")||b(e,"bpmn:CatchEvent")&&rj(e,"bpmn:MessageEventDefinition"))&&!(b(e,"bpmn:BoundaryEvent")&&!es(e,"bpmn:MessageEventDefinition"))}(n)&&!function jge(e,n){return nj(e)===nj(n)}(e,n)}function mj(e,n){return!(oj(n)&&n.incoming.length>0&&function tve(e){return(e=e||[]).some(eve)}(n.incoming)&&!b(e,"bpmn:EventBasedGateway"))&&function Uge(e){return b(e,"bpmn:FlowNode")&&!b(e,"bpmn:EndEvent")&&!yo(e)&&!(b(e,"bpmn:IntermediateThrowEvent")&&es(e,"bpmn:LinkEventDefinition"))&&!Mk(e)&&!eh(e)}(e)&&function Gge(e){return b(e,"bpmn:FlowNode")&&!b(e,"bpmn:StartEvent")&&!b(e,"bpmn:BoundaryEvent")&&!yo(e)&&!(b(e,"bpmn:IntermediateCatchEvent")&&es(e,"bpmn:LinkEventDefinition"))&&!eh(e)}(n)&&function $ge(e,n){return ij(e)===ij(n)}(e,n)&&!(b(e,"bpmn:EventBasedGateway")&&!oj(n))}function Rk(e,n){return tn(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&tn(n,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:!(!tn(n,["bpmn:DataObjectReference","bpmn:DataStoreReference"])||!tn(e,["bpmn:Activity","bpmn:CatchEvent"]))&&{type:"bpmn:DataOutputAssociation"}}function Ty(e,n,t){if(!n)return!1;if(Array.isArray(e)){if(1!==e.length)return!1;e=e[0]}return n.source!==e&&n.target!==e&&tn(n,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!Mi(n)&&b(e,"bpmn:FlowNode")&&!b(e,"bpmn:BoundaryEvent")&&th(e,n.parent)}function pj(e,n){return!!Mi(n)||!(b(n,"bpmn:Lane")&&!function Jge(e,n){return e&&n&&-1!==e.indexOf(n)}(e,n.parent))}function eve(e){if(e&&e.source)return b(e.source,"bpmn:EventBasedGateway")}function gj(e){return Xb(e,"bpmn:Process")||Xb(e,"bpmn:Collaboration")}tt()(rr,Qa),rr.$inject=["eventBus"],rr.prototype.init=function(){this.addRule("connection.start",function(e){return function Bge(e){return kk(e)?null:tn(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"])}(e.source)}),this.addRule("connection.create",function(e){var n=e.source,t=e.target,i=e.hints||{},r=i.targetParent;if(i.targetAttach)return!1;r&&(t.parent=r);try{return ky(n,t)}finally{r&&(t.parent=null)}}),this.addRule("connection.reconnect",function(e){return ky(e.source,e.target,e.connection)}),this.addRule("connection.updateWaypoints",function(e){return{type:e.connection.type}}),this.addRule("shape.resize",function(e){return uj(e.shape,e.newBounds)}),this.addRule("elements.create",function(e){var n=e.elements,t=e.position,i=e.target;return!(Dy(i)&&!Ty(n,i))&&KC(n,function(r){return Dy(r)?ky(r.source,r.target,r):r.host?pp(r,r.host,0,t):Ok(r,i,null)})}),this.addRule("elements.move",function(e){var n=e.target,t=e.shapes,i=e.position;return pp(t,n,0,i)||lj(t,n,i)||dj(t,n)||Ty(t,n)}),this.addRule("shape.create",function(e){return Ok(e.shape,e.target,e.source)}),this.addRule("shape.attach",function(e){return pp(e.shape,e.target,0,e.position)}),this.addRule("element.copy",function(e){return pj(e.elements,e.element)})},rr.prototype.canConnectMessageFlow=fj,rr.prototype.canConnectSequenceFlow=mj,rr.prototype.canConnectDataAssociation=Rk,rr.prototype.canConnectAssociation=hj,rr.prototype.canMove=dj,rr.prototype.canAttach=pp,rr.prototype.canReplace=lj,rr.prototype.canDrop=th,rr.prototype.canInsert=Ty,rr.prototype.canCreate=Ok,rr.prototype.canConnect=ky,rr.prototype.canResize=uj,rr.prototype.canCopy=pj;const nve={__depends__:[Ja],__init__:["bpmnRules"],bpmnRules:["type",rr]};function vj(e,n){e.on("saveXML.start",2e3,function t(){var a,i=n.getRootElement(),r=Ue(i).di;a=Eu(Bn(db([i],!1),function(s){return s!==i&&!s.labelTarget}),Bu),r.set("planeElement",a)})}vj.$inject=["eventBus","canvas"];const rve={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",vj]};function Ay(e){Ve.call(this,e);var n=this;this.preExecute(["shape.create","connection.create"],function(t){var i=t.context,a=n.getOrdering(i.shape||i.connection,i.parent);a&&(void 0!==a.parent&&(i.parent=a.parent),i.parentIndex=a.index)}),this.preExecute(["shape.move","connection.move"],function(t){var i=t.context,r=i.shape||i.connection,a=n.getOrdering(r,i.newParent||r.parent);a&&(void 0!==a.parent&&(i.newParent=a.parent),i.newParentIndex=a.index)})}function Nk(e,n,t){Ay.call(this,e);var i=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:3,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:Process"]}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:Process"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function o(s){var c=s.order;if(c||(s.order=c=function r(s){if(s.labelTarget)return{level:10};var c=mo(i,function(l){return tn(s,[l.type])});return c&&c.order||{level:1}}(s)),!c)throw new Error("no order for <"+s.id+">");return c}this.getOrdering=function(s,c){if(s.labelTarget)return{parent:n.getRootElement(),index:-1};var l=o(s);l.containers&&(c=function a(s,c,l){for(var d=c;d&&!tn(d,l);)d=d.parent;if(!d)throw new Error("no parent for <"+s.id+"> in <"+(c&&c.id)+">");return d}(s,c,l.containers));var d=c.children.indexOf(s),u=function ise(e,n){n=JC(n);var t=da(e)?-1:void 0;return ht(e,function(i,r){if(n(i,r))return t=r,!1}),t}(c.children,function(h){return!(!s.labelTarget&&h.labelTarget)&&l.level");this._pushAction(e),n||(this._fire(i,"preExecute",e),o.preExecute&&o.preExecute(r),this._fire(i,"preExecuted",e)),this._atomicDo(function(){t._fire(i,"execute",e),o.execute&&t._markDirty(o.execute(r)),t._executedAction(e,n),t._fire(i,"executed",e)}),n||(this._fire(i,"postExecute",e),o.postExecute&&o.postExecute(r),this._fire(i,"postExecuted",e)),this._popAction(e)},Rn.prototype._pushAction=function(e){var n=this._currentExecution,t=n.actions,i=t[0];if(n.atomic)throw new Error("illegal invocation in or phase (action: "+e.command+")");e.id||(e.id=i&&i.id||this._createId()),t.push(e)},Rn.prototype._popAction=function(){var e=this._currentExecution,n=e.trigger,t=e.actions,i=e.dirty;t.pop(),t.length||(this._eventBus.fire("elements.changed",{elements:J3("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:n}),e.trigger=null)},Rn.prototype._markDirty=function(e){var n=this._currentExecution;e&&(e=mn(e)?e:[e],n.dirty=n.dirty.concat(e))},Rn.prototype._executedAction=function(e,n){var t=++this._stackIdx;n||this._stack.splice(t,this._stack.length,e)},Rn.prototype._revertedAction=function(e){this._stackIdx--},Rn.prototype._getHandler=function(e){return this._handlerMap[e]},Rn.prototype._setHandler=function(e,n){if(!e||!n)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=n};const ave={commandStack:["type",Rn]};var sve=new aD("tt");function Pk(e,n){e.style.display=!1===n?"none":""}var _j="djs-tooltip",Fk="."+_j;function Nr(e,n){this._eventBus=e,this._canvas=n,this._ids=sve,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=function cve(e){var n=In('
');return e.insertBefore(n,e.firstChild),n}(n.getContainer());var t=this;go.bind(this._tooltipRoot,Fk,"mousedown",function(i){i.stopPropagation()}),go.bind(this._tooltipRoot,Fk,"mouseover",function(i){t.trigger("mouseover",i)}),go.bind(this._tooltipRoot,Fk,"mouseout",function(i){t.trigger("mouseout",i)}),this._init()}Nr.$inject=["eventBus","canvas"],Nr.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var n=this._ids.next();return e=je({},this._tooltipDefaults,e,{id:n}),this._addTooltip(e),e.timeout&&this.setTimeout(e),n},Nr.prototype.trigger=function(e,n){var i=this.get(po(n.delegateTarget||n.target,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},Nr.prototype.get=function(e){return"string"!=typeof e&&(e=e.id),this._tooltips[e]},Nr.prototype.clearTimeout=function(e){if(e=this.get(e)){var n=e.removeTimer;n&&(clearTimeout(n),e.removeTimer=null)}},Nr.prototype.setTimeout=function(e){if(e=this.get(e)){this.clearTimeout(e);var n=this;e.removeTimer=setTimeout(function(){n.remove(e)},e.timeout)}},Nr.prototype.remove=function(e){var n=this.get(e);n&&(Ua(n.html),Ua(n.htmlContainer),delete n.htmlContainer,delete this._tooltips[n.id])},Nr.prototype.show=function(){Pk(this._tooltipRoot)},Nr.prototype.hide=function(){Pk(this._tooltipRoot,!1)},Nr.prototype._updateRoot=function(e){var n=e.scale||1,t=e.scale||1,i="matrix("+n+",0,0,"+t+","+-1*e.x*n+","+-1*e.y*t+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},Nr.prototype._addTooltip=function(e){var i,n=e.id,t=e.html,r=this._tooltipRoot;t.get&&t.constructor.prototype.jquery&&(t=t.get(0)),Sm(t)&&(t=In(t)),(i=In('
')).appendChild(t),e.type&&Ti(i).add("djs-tooltip-"+e.type),e.className&&Ti(i).add(e.className),e.htmlContainer=i,r.appendChild(i),this._tooltips[n]=e,this._updateTooltip(e)},Nr.prototype._updateTooltip=function(e){var n=e.position;!function lve(e,n,t){je(e.style,{left:n+"px",top:t+"px"})}(e.htmlContainer,n.x,n.y)},Nr.prototype._updateTooltipVisibilty=function(e){Z(this._tooltips,function(n){var t=n.show,r=!0;t&&((t.minZoom>e.scale||t.maxZoomjk(e.dy)?"x":"y",i=e["d"+t],r=e[t]-i;if(jk(i)<5)return!1;i<0&&(i*=-1),Uu(e)&&(i*=-1);var o=function xve(e,n){if("x"===e){if(n>0)return"e";if(n<0)return"w"}if("y"===e){if(n>0)return"s";if(n<0)return"n"}return null}(t,i),s=db(this._canvas.getRootElement(),!0),c=this.calculateAdjustments(s,t,i,r),d=function Dve(e,n,t,i,r){var o=e.movingShapes,a=e.resizingShapes;if(a.length){var c,l,s={};return Z(a,function(d){var m,g,v,u=lt(d),h=Mr(d.children,function(w){return!(Hk(w)||kj(w)||zk(o,w)||zk(a,w))}),f=Mr(d.children,function(w){return!Hk(w)&&!kj(w)&&zk(o,w)});h.length&&(g=Sj(lt(tr(h))),m=i-u[Iy[t]]+g[Iy[t]],"n"===t?s.bottom=l=Ot(l)?Math.min(l,m):m:"w"===t?s.right=l=Ot(l)?Math.min(l,m):m:"s"===t?s.top=c=Ot(c)?Math.max(c,m):m:"e"===t&&(s.left=c=Ot(c)?Math.max(c,m):m)),f.length&&(v=Sj(lt(tr(f))),m=i-v[Iy[Cj[t]]]+u[Iy[Cj[t]]],"n"===t?s.bottom=l=Ot(l)?Math.min(l,m):m:"w"===t?s.right=l=Ot(l)?Math.min(l,m):m:"s"===t?s.top=c=Ot(c)?Math.max(c,m):m:"e"===t&&(s.left=c=Ot(c)?Math.max(c,m):m));var C=r&&r[d.id];C&&("n"===t?(m=i+d[Ns[n]]-C[Ns[n]],s.bottom=l=Ot(l)?Math.min(l,m):m):"w"===t?(m=i+d[Ns[n]]-C[Ns[n]],s.right=l=Ot(l)?Math.min(l,m):m):"s"===t?(m=i-d[Ns[n]]+C[Ns[n]],s.top=c=Ot(c)?Math.max(c,m):m):"e"===t&&(m=i-d[Ns[n]]+C[Ns[n]],s.left=c=Ot(c)?Math.max(c,m):m))}),s}}(c,t,o,r,this._eventBus.fire("spaceTool.getMinDimensions",{axis:t,direction:o,shapes:c.resizingShapes,start:r}));return je(n,c,{axis:t,direction:o,spaceToolConstraints:d,start:r}),Fb("resize-"+("x"===t?"ew":"ns")),!0},Ps.prototype.calculateAdjustments=function(e,n,t,i){var r=this._rules,o=[],a=[];return Z(e,function(s){if(s.parent&&!Hk(s)){var c=s[n],l=c+s[Ns[n]];if(t>0&&c>i||t<0&&li&&r.allowed("shape.resize",{shape:s}))return a.push(s)}}),{movingShapes:o,resizingShapes:a}},Ps.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},Ps.prototype.isActive=function(){var e=this._dragging.context();return e&&/^spaceTool/.test(e.prefix)};var $k="djs-dragging",Tj="djs-resizing",Ry=Math.max;function Aj(e,n,t,i,r){function o(a,s){Z(a,function(c){r.addDragger(c,s),t.addMarker(c,$k)})}e.on("spaceTool.selection.start",function(a){var s=t.getLayer("space"),c=a.context,d=Qe("g");ve(d,i.cls("djs-crosshair-group",["no-events"])),nt(s,d);var u=Qe("path");ve(u,"d","M 0,-10000 L 0,10000"),Bt(u).add("djs-crosshair"),nt(d,u);var h=Qe("path");ve(h,"d","M -10000,0 L 10000,0"),Bt(h).add("djs-crosshair"),nt(d,h),c.crosshairGroup=d}),e.on("spaceTool.selection.move",function(a){Or(a.context.crosshairGroup,a.x,a.y)}),e.on("spaceTool.selection.cleanup",function(a){var c=a.context.crosshairGroup;c&&ui(c)}),e.on("spaceTool.move",250,function(a){var s=a.context,c=s.line,l=s.axis,d=s.movingShapes,u=s.resizingShapes;if(s.initialized){if(!s.dragGroup){var h=t.getLayer("space");ve(c=Qe("path"),"d","M0,0 L0,0"),Bt(c).add("djs-crosshair"),nt(h,c),s.line=c;var f=Qe("g");ve(f,i.cls("djs-drag-group",["no-events"])),nt(t.getActiveLayer(),f),o(d,f);var m=s.movingConnections=n.filter(function(x){var k=!1;Z(d,function(te){Z(te.outgoing,function(we){x===we&&(k=!0)})});var O=!1;Z(d,function(te){Z(te.incoming,function(we){x===we&&(O=!0)})});var L=!1;Z(u,function(te){Z(te.outgoing,function(we){x===we&&(L=!0)})});var R=!1;return Z(u,function(te){Z(te.incoming,function(we){x===we&&(R=!0)})}),function Tve(e){return e.waypoints}(x)&&(k||L)&&(O||R)});o(m,f),s.dragGroup=f}if(!s.frameGroup){var g=Qe("g");ve(g,i.cls("djs-frame-group",["no-events"])),nt(t.getActiveLayer(),g);var v=[];Z(u,function(x){var k=r.addFrame(x,g),O=k.getBBox();v.push({element:k,initialBounds:O}),t.addMarker(x,Tj)}),s.frameGroup=g,s.frames=v}ve(c,{d:{x:"M"+a.x+", -10000 L"+a.x+", 10000",y:"M -10000, "+a.y+" L 10000, "+a.y}[l]});var E={x:a.dx,y:a.dy};E[{x:"y",y:"x"}[s.axis]]=0,Or(s.dragGroup,E.x,E.y),Z(s.frames,function(x){var L,R,k=x.element,O=x.initialBounds;ve(k,"e"===s.direction?{width:Ry(O.width+E.x,5)}:{width:L=Ry(O.width-E.x,5),x:O.x+O.width-L}),ve(k,"s"===s.direction?{height:Ry(O.height+E.y,5)}:{height:R=Ry(O.height-E.y,5),y:O.y+O.height-R})})}}),e.on("spaceTool.cleanup",function(a){var s=a.context,l=s.movingConnections,d=s.resizingShapes,u=s.line,h=s.dragGroup,f=s.frameGroup;Z(s.movingShapes,function(m){t.removeMarker(m,$k)}),Z(l,function(m){t.removeMarker(m,$k)}),h&&(ui(u),ui(h)),Z(d,function(m){t.removeMarker(m,Tj)}),f&&ui(f)})}Aj.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];const Mj={__init__:["spaceToolPreview"],__depends__:[Is,Ja,My,tp,rp],spaceTool:["type",Ps],spaceToolPreview:["type",Aj]};function Vo(e){this._model=e}function Yr(e,n,t,i){Ve.call(this,e),this._bpmnFactory=n,this._translate=i;var r=this;function c(f){ht(f.context.oldRoot.children,function(C){b(C,"bpmn:BaseElement")&&r.updateParent(C)})}function l(f){var m=f.context.shape;b(m,"bpmn:BaseElement")&&r.updateBounds(m)}function d(f){r.updateConnection(f.context)}function u(f){r.updateConnectionWaypoints(f.context.connection)}function h(f){r.updateAttachment(f.context)}this.executed(["connection.layout","connection.create"],function o(f){var v,m=f.context;!m.cropped&&!1!==(m.hints||{}).createElementsBehavior&&((v=m.connection).waypoints=t.getCroppedWaypoints(v),m.cropped=!0)}),this.reverted(["connection.layout"],function(f){delete f.context.cropped}),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],jo(function a(f){var m=f.context;r.updateParent(m.shape||m.connection,m.oldParent)})),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],jo(function s(f){var m=f.context;r.updateParent(m.shape||m.connection,m.parent||m.newParent)})),this.executed(["canvas.updateRoot"],c),this.reverted(["canvas.updateRoot"],c),this.executed(["shape.move","shape.create","shape.resize"],jo(function(f){"label"!==f.context.shape.type&&l(f)})),this.reverted(["shape.move","shape.create","shape.resize"],jo(function(f){"label"!==f.context.shape.type&&l(f)})),e.on("shape.changed",function(f){"label"===f.element.type&&l({context:{shape:f.element}})}),this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],jo(d)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],jo(d)),this.executed(["connection.layout","connection.move","connection.updateWaypoints"],jo(u)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],jo(u)),this.executed("connection.reconnect",jo(function(f){var m=f.context,v=m.oldSource,C=m.newSource,w=Ue(m.connection),E=Ue(v),x=Ue(C);w.conditionExpression&&!tn(x,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(m.oldConditionExpression=w.conditionExpression,delete w.conditionExpression),v!==C&&E.default===w&&(m.oldDefault=E.default,delete E.default)})),this.reverted("connection.reconnect",jo(function(f){var m=f.context,v=m.oldSource,C=m.newSource,w=Ue(m.connection),E=Ue(v),x=Ue(C);m.oldConditionExpression&&(w.conditionExpression=m.oldConditionExpression),m.oldDefault&&(E.default=m.oldDefault,delete x.default)})),this.executed(["element.updateAttachment"],jo(h)),this.reverted(["element.updateAttachment"],jo(h))}function jo(e){return function(n){var t=n.context;b(t.shape||t.connection,"bpmn:BaseElement")&&e(n)}}function zo(e,n,t){ks.call(this),this._bpmnFactory=e,this._moddle=n,this._translate=t}function Ij(e,n,t){e[t]=n[t],delete n[t]}function Ny(e,n){this._modeling=e,this._canvas=n}function Py(e){this._modeling=e}function Fy(e,n){this._canvas=e,this._layouter=n}Vo.$inject=["moddle"],Vo.prototype._needsId=function(e){return tn(e,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"])},Vo.prototype._ensureId=function(e){var n;e.id?this._model.ids.claim(e.id,e):(n=b(e,"bpmn:Activity")?"Activity":b(e,"bpmn:Event")?"Event":b(e,"bpmn:Gateway")?"Gateway":tn(e,["bpmn:SequenceFlow","bpmn:MessageFlow"])?"Flow":(e.$type||"").replace(/^[^:]*:/g,""),n+="_",!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(n,e)))},Vo.prototype.create=function(e,n){var t=this._model.create(e,n||{});return this._ensureId(t),t},Vo.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},Vo.prototype.createDiShape=function(e,n,t){return this.create("bpmndi:BPMNShape",qe({bpmnElement:e,bounds:this.createDiBounds(n)},t))},Vo.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},Vo.prototype.createDiWaypoints=function(e){var n=this;return Eu(e,function(t){return n.createDiWaypoint(t)})},Vo.prototype.createDiWaypoint=function(e){return this.create("dc:Point",tS(e,["x","y"]))},Vo.prototype.createDiEdge=function(e,n,t){return this.create("bpmndi:BPMNEdge",qe({bpmnElement:e,waypoint:this.createDiWaypoints(n)},t))},Vo.prototype.createDiPlane=function(e){return this.create("bpmndi:BPMNPlane",{bpmnElement:e})},tt()(Yr,Ve),Yr.$inject=["eventBus","bpmnFactory","connectionDocking","translate"],Yr.prototype.updateAttachment=function(e){var n=e.shape,i=n.host;n.businessObject.attachedToRef=i&&i.businessObject},Yr.prototype.updateParent=function(e,n){if(!(e instanceof fb||b(e,"bpmn:DataStoreReference")&&e.parent&&b(e.parent,"bpmn:Collaboration"))){var t=e.parent,i=e.businessObject,r=t&&t.businessObject,o=r&&r.di;b(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,r,n&&n.businessObject),b(e,"bpmn:DataOutputAssociation")&&(r=e.source?e.source.businessObject:null),b(e,"bpmn:DataInputAssociation")&&(r=e.target?e.target.businessObject:null),this.updateSemanticParent(i,r),b(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,r),this.updateDiParent(i.di,o)}},Yr.prototype.updateBounds=function(e){var n=e.businessObject.di,t=e instanceof fb?this._getLabel(n):n,i=t.bounds;i||(i=this._bpmnFactory.createDiBounds(),t.set("bounds",i)),qe(i,{x:e.x,y:e.y,width:e.width,height:e.height})},Yr.prototype.updateFlowNodeRefs=function(e,n,t){t!==n&&(b(t,"bpmn:Lane")&&ii(t.get("flowNodeRef"),e),b(n,"bpmn:Lane")&&ri(n.get("flowNodeRef"),e))},Yr.prototype.updateDiConnection=function(e,n,t){e.sourceElement&&e.sourceElement.bpmnElement!==n&&(e.sourceElement=n&&n.di),e.targetElement&&e.targetElement.bpmnElement!==t&&(e.targetElement=t&&t.di)},Yr.prototype.updateDiParent=function(e,n){if(n&&!b(n,"bpmndi:BPMNPlane")&&(n=n.$parent),e.$parent!==n){var t=(n||e.$parent).get("planeElement");n?(t.push(e),e.$parent=n):(ii(t,e),e.$parent=null)}},Yr.prototype.getLaneSet=function(e){var n,t;return b(e,"bpmn:Lane")?((n=e.childLaneSet)||(n=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=n,n.$parent=e),n):(b(e,"bpmn:Participant")&&(e=e.processRef),(n=(t=e.get("laneSets"))[0])||((n=this._bpmnFactory.create("bpmn:LaneSet")).$parent=e,t.push(n)),n)},Yr.prototype.updateSemanticParent=function(e,n,t){var i,r=this._translate;if(e.$parent!==n&&(!b(e,"bpmn:DataInput")&&!b(e,"bpmn:DataOutput")||(b(n,"bpmn:Participant")&&"processRef"in n&&(n=n.processRef),!("ioSpecification"in n)||n.ioSpecification!==e.$parent))){if(b(e,"bpmn:Lane"))n&&(n=this.getLaneSet(n)),i="lanes";else if(b(e,"bpmn:FlowElement")){if(n)if(b(n,"bpmn:Participant"))n=n.processRef;else if(b(n,"bpmn:Lane"))do{n=n.$parent.$parent}while(b(n,"bpmn:Lane"));i="flowElements"}else if(b(e,"bpmn:Artifact")){for(;n&&!b(n,"bpmn:Process")&&!b(n,"bpmn:SubProcess")&&!b(n,"bpmn:Collaboration");){if(b(n,"bpmn:Participant")){n=n.processRef;break}n=n.$parent}i="artifacts"}else if(b(e,"bpmn:MessageFlow"))i="messageFlows";else if(b(e,"bpmn:Participant")){i="participants";var a,o=e.processRef;o&&(a=function Ave(e){for(;e&&!b(e,"bpmn:Definitions");)e=e.$parent;return e}(e.$parent||n),e.$parent&&(ii(a.get("rootElements"),o),o.$parent=null),n&&(ri(a.get("rootElements"),o),o.$parent=a))}else b(e,"bpmn:DataOutputAssociation")?i="dataOutputAssociations":b(e,"bpmn:DataInputAssociation")&&(i="dataInputAssociations");if(!i)throw new Error(r("no parent for {element} in {parent}",{element:e.id,parent:n.id}));var s;if(e.$parent&&ii(s=e.$parent.get(i),e),n?((s=n.get(i)).push(e),e.$parent=n):e.$parent=null,t){var c=t.get(i);ii(s,e),n&&(c||n.set(i,c=[]),c.push(e))}}},Yr.prototype.updateConnectionWaypoints=function(e){e.businessObject.di.set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},Yr.prototype.updateConnection=function(e){var n=e.connection,t=Ue(n),i=Ue(n.source),r=Ue(n.target);if(b(t,"bpmn:DataAssociation"))b(t,"bpmn:DataInputAssociation")?(t.get("sourceRef")[0]=i,this.updateSemanticParent(t,r,e.parent||e.newParent||r)):b(t,"bpmn:DataOutputAssociation")&&(this.updateSemanticParent(t,i,e.parent||e.newParent||i),t.targetRef=r);else{var a=b(t,"bpmn:SequenceFlow");t.sourceRef!==i&&(a&&(ii(t.sourceRef&&t.sourceRef.get("outgoing"),t),i&&i.get("outgoing")&&i.get("outgoing").push(t)),t.sourceRef=i),t.targetRef!==r&&(a&&(ii(t.targetRef&&t.targetRef.get("incoming"),t),r&&r.get("incoming")&&r.get("incoming").push(t)),t.targetRef=r)}this.updateConnectionWaypoints(n),this.updateDiConnection(t.di,i,r)},Yr.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label},tt()(zo,ks),zo.$inject=["bpmnFactory","moddle","translate"],zo.prototype.baseCreate=ks.prototype.create,zo.prototype.create=function(e,n){return"label"===e?this.baseCreate(e,qe({type:"label"},ju,n)):this.createBpmnElement(e,n)},zo.prototype.createBpmnElement=function(e,n){var t,o,a,r=(n=n||{}).businessObject;if(!r){if(!n.type)throw new Error((0,this._translate)("no shape type specified"));r=this._bpmnFactory.create(n.type)}return r.di||(r.di="root"===e?this._bpmnFactory.createDiPlane(r,[],{id:r.id+"_di"}):"connection"===e?this._bpmnFactory.createDiEdge(r,[],{id:r.id+"_di"}):this._bpmnFactory.createDiShape(r,{},{id:r.id+"_di"})),b(r,"bpmn:Group")&&(n=qe({isFrame:!0},n)),n.di&&(qe(r.di,n.di),delete n.di),function Mve(e,n,t){ht(t,function(i){void 0!==n[i]&&Ij(e,n,i)})}(r,n,["processRef","isInterrupting","associationDirection","isForCompensation"]),n.isExpanded&&Ij(r.di,n,"isExpanded"),b(r,"bpmn:ExclusiveGateway")&&(r.di.isMarkerVisible=!0),n.eventDefinitionType&&(o=r.get("eventDefinitions")||[],a=this._bpmnFactory.create(n.eventDefinitionType,n.eventDefinitionAttrs),"bpmn:ConditionalEventDefinition"===n.eventDefinitionType&&(a.condition=this._bpmnFactory.create("bpmn:FormalExpression")),o.push(a),a.$parent=r,r.eventDefinitions=o,delete n.eventDefinitionType),t=this._getDefaultSize(r),n=qe({businessObject:r,id:r.id},t,n),this.baseCreate(e,n)},zo.prototype._getDefaultSize=function(e){return b(e,"bpmn:SubProcess")?pn(e)?{width:350,height:200}:{width:100,height:80}:b(e,"bpmn:Task")?{width:100,height:80}:b(e,"bpmn:Gateway")?{width:50,height:50}:b(e,"bpmn:Event")?{width:36,height:36}:b(e,"bpmn:Participant")?pn(e)?{width:600,height:250}:{width:400,height:60}:b(e,"bpmn:Lane")?{width:400,height:100}:b(e,"bpmn:DataObjectReference")?{width:36,height:50}:b(e,"bpmn:DataStoreReference")?{width:50,height:50}:b(e,"bpmn:TextAnnotation")?{width:100,height:30}:b(e,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}},zo.prototype.createParticipantShape=function(e){return Ss(e)||(e={isExpanded:e}),!1!==(e=qe({type:"bpmn:Participant"},e||{})).isExpanded&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)},Ny.$inject=["modeling","canvas"],Ny.prototype.preExecute=function(e){var n=this._modeling,i=e.alignment;Z(e.elements,function(r){var o={x:0,y:0};i.left?o.x=i.left-r.x:i.right?o.x=i.right-r.width-r.x:i.center?o.x=i.center-Math.round(r.width/2)-r.x:i.top?o.y=i.top-r.y:i.bottom?o.y=i.bottom-r.height-r.y:i.middle&&(o.y=i.middle-Math.round(r.height/2)-r.y),n.moveElements([r],o,r.parent)})},Ny.prototype.postExecute=function(e){},Py.$inject=["modeling"],Py.prototype.preExecute=function(e){var n=e.source;if(!n)throw new Error("source required");var i=e.shape;i=e.shape=this._modeling.createShape(i,e.position,e.target||n.parent,{attach:(e.hints||{}).attach}),e.shape=i},Py.prototype.postExecute=function(e){var n=e.hints||{};(function Ive(e,n){return function Jse(e,n){return!!Gi(e,n)}(e.outgoing,function(t){return t.target===n})})(e.source,e.shape)||(n.connectionTarget===e.source?this._modeling.connect(e.shape,e.source,e.connection):this._modeling.connect(e.source,e.shape,e.connection))},Fy.$inject=["canvas","layouter"],Fy.prototype.execute=function(e){var n=e.connection,t=e.source,i=e.target,r=e.parent,o=e.parentIndex,a=e.hints;if(!t||!i)throw new Error("source and target required");if(!r)throw new Error("parent required");return n.source=t,n.target=i,n.waypoints||(n.waypoints=this._layouter.layoutConnection(n,a)),this._canvas.addConnection(n,r,o),n},Fy.prototype.revert=function(e){var n=e.connection;return this._canvas.removeConnection(n),n.source=null,n.target=null,n};var Ly=Math.round;function Uk(e){this._modeling=e}function Oj(e){return!!e.waypoints}Uk.$inject=["modeling"],Uk.prototype.preExecute=function(e){var n=e.elements,t=e.parent,i=e.parentIndex,r=e.position,o=e.hints,a=this._modeling;Z(n,function(d){Ot(d.x)||(d.x=0),Ot(d.y)||(d.y=0)});var s=tr(n);Z(n,function(d){Oj(d)&&(d.waypoints=Ir(d.waypoints,function(u){return{x:Ly(u.x-s.x-s.width/2+r.x),y:Ly(u.y-s.y-s.height/2+r.y)}})),je(d,{x:Ly(d.x-s.x-s.width/2+r.x),y:Ly(d.y-s.y-s.height/2+r.y)})});var c=t5(n),l={};Z(n,function(d){if(Oj(d))l[d.id]=Ot(i)?a.createConnection(l[d.source.id],l[d.target.id],i,d,d.parent||t,o):a.createConnection(l[d.source.id],l[d.target.id],d,d.parent||t,o);else{var u=je({},o);-1===c.indexOf(d)&&(u.autoResize=!1),l[d.id]=Ot(i)?a.createShape(d,Tm(d,["x","y","width","height"]),d.parent||t,i,u):a.createShape(d,Tm(d,["x","y","width","height"]),d.parent||t,u)}}),e.elements=gS(l)};var Rj=Math.round;function Mc(e){this._canvas=e}function vp(e){Mc.call(this,e)}Mc.$inject=["canvas"],Mc.prototype.execute=function(e){var n=e.shape,t=e.position,i=e.parent,r=e.parentIndex;if(!i)throw new Error("parent required");if(!t)throw new Error("position required");return je(n,void 0!==t.width?t:{x:t.x-Rj(n.width/2),y:t.y-Rj(n.height/2)}),this._canvas.addShape(n,i,r),n},Mc.prototype.revert=function(e){var n=e.shape;return this._canvas.removeShape(n),n},tt()(vp,Mc),vp.$inject=["canvas"];var Ove=Mc.prototype.execute;vp.prototype.execute=function(e){var n=e.shape;return function Nve(e){["width","height"].forEach(function(n){typeof e[n]>"u"&&(e[n]=0)})}(n),n.labelTarget=e.labelTarget,Ove.call(this,e)};var Rve=Mc.prototype.revert;function By(e,n){this._canvas=e,this._modeling=n}function Gk(e,n){this._modeling=e,this._elementRegistry=n}function _p(e,n){this._canvas=e,this._modeling=n}function Vy(e){this._modeling=e}vp.prototype.revert=function(e){return e.shape.labelTarget=null,Rve.call(this,e)},By.$inject=["canvas","modeling"],By.prototype.execute=function(e){var n=e.connection,t=n.parent;return e.parent=t,e.parentIndex=yS(t.children,n),e.source=n.source,e.target=n.target,this._canvas.removeConnection(n),n.source=null,n.target=null,n},By.prototype.revert=function(e){var n=e.connection,t=e.parent,i=e.parentIndex;return n.source=e.source,n.target=e.target,ri(t.children,n,i),this._canvas.addConnection(n,t),n},Gk.$inject=["modeling","elementRegistry"],Gk.prototype.postExecute=function(e){var n=this._modeling,t=this._elementRegistry;Z(e.elements,function(r){t.get(r.id)&&(r.waypoints?n.removeConnection(r):n.removeShape(r))})},_p.$inject=["canvas","modeling"],_p.prototype.preExecute=function(e){var n=this._modeling,t=e.shape;nh(t.incoming,function(i){n.removeConnection(i,{nested:!0})}),nh(t.outgoing,function(i){n.removeConnection(i,{nested:!0})}),nh(t.children,function(i){!function Pve(e){return e.waypoints}(i)?n.removeShape(i,{nested:!0}):n.removeConnection(i,{nested:!0})})},_p.prototype.execute=function(e){var n=this._canvas,t=e.shape,i=t.parent;return e.oldParent=i,e.oldParentIndex=yS(i.children,t),n.removeShape(t),t},_p.prototype.revert=function(e){var n=this._canvas,t=e.shape,i=e.oldParent;return ri(i.children,t,e.oldParentIndex),n.addShape(t,i),t},Vy.$inject=["modeling"];var Nj={x:"y",y:"x"};function jy(e,n){this._layouter=e,this._canvas=n}function Wk(){}function qk(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}function bp(e){this._modeling=e}function zy(e){this._helper=new bp(e)}function Kl(e){this._modeling=e,this._helper=new bp(e)}function yp(e){this._modeling=e}function Pj(e){return e.original||e}function Fs(e,n){this._modeling=e,this._rules=n}function xp(e){this._modeling=e}function Ic(e){this._modeling=e}function Fj(e){return je({},e)}function Lj(e){switch(e){case"n":case"s":return"y";case"w":case"e":return"x"}}function Bj(e,n,t){var i=Lj(t);return/e|s/.test(t)?e[i]>n:/n|w/.test(t)?e[i] required");var r=e.changed||this.getVisualReferences(t).concat(n),o=e.oldProperties||function Bve(e,n){return Ol(n,function(t,i){return t[i]=e.get(i),t},{})}(t,J_(i));return Uj(t,i),e.oldProperties=o,e.changed=r,r},wp.prototype.revert=function(e){var i=e.changed;return Uj(e.moddleElement,e.oldProperties),i},wp.prototype.getVisualReferences=function(e){var n=this._elementRegistry;return b(e,"bpmn:DataObject")?function Vve(e,n){return n.filter(function(t){return b(t,"bpmn:DataObjectReference")&&Ue(t).dataObjectRef===e})}(e,n):[]};var Ep="default",Ls="id",jve={width:0,height:0};function Cp(e,n,t,i,r){this._elementRegistry=e,this._moddle=n,this._translate=t,this._modeling=i,this._textRenderer=r}function Wj(e,n){return Ls in e&&e[Ls]!==n[Ls]}function qj(e,n){ht(n,function(t,i){"di"!==i?e.set(i,t):e.di&&function $ve(e,n){ht(n,function(t,i){e.set(i,t)})}(e.di,t)})}Cp.$inject=["elementRegistry","moddle","translate","modeling","textRenderer"],Cp.prototype.execute=function(e){var n=e.element,t=[n];if(!n)throw new Error((0,this._translate)("element required"));var r=this._elementRegistry,o=this._moddle.ids,a=n.businessObject,s=function Gve(e){var n=qe({},e);return Uve.forEach(function(t){t in e&&(n[t]=Ue(n[t]))}),n}(e.properties),c=e.oldProperties||function zve(e,n){return Ol(J_(n),function(i,r){return i[r]="di"!==r?e.get(r):function Hve(e,n){return Ol(n,function(t,i){return t[i]=e.get(i),t},{})}(e.di,J_(n.di)),i},{})}(a,s);return Wj(s,a)&&(o.unclaim(a[Ls]),r.updateId(n,s[Ls]),o.claim(s[Ls],a)),Ep in s&&(s[Ep]&&t.push(r.get(s[Ep].id)),a[Ep]&&t.push(r.get(a[Ep].id))),qj(a,s),e.oldProperties=c,e.changed=t,t},Cp.prototype.postExecute=function(e){var t=e.element.label,i=t&&Ue(t).name;if(i){var r=this._textRenderer.getExternalLabelBounds(t,i);this._modeling.resizeShape(t,r,jve)}},Cp.prototype.revert=function(e){var n=e.element,t=e.properties,i=e.oldProperties,r=n.businessObject,o=this._elementRegistry,a=this._moddle.ids;return qj(r,i),Wj(t,r)&&(a.unclaim(t[Ls]),o.updateId(n,i[Ls]),a.claim(i[Ls],r)),e.changed};var Uve=["default"];function Uy(e,n){this._canvas=e,this._modeling=n}function Kk(e,n){this._modeling=e,this._spaceTool=n}function Xk(e,n){this._modeling=e,this._translate=n}function Sp(e,n){this._modeling=e,this._spaceTool=n}Uy.$inject=["canvas","modeling"],Uy.prototype.execute=function(e){var n=this._canvas,t=e.newRoot,i=t.businessObject,r=n.getRootElement(),o=r.businessObject,a=o.$parent,s=o.di;n.setRootElement(t,!0),ri(a.rootElements,i),i.$parent=a,ii(a.rootElements,o),o.$parent=null,o.di=null,s.bpmnElement=i,i.di=s,e.oldRoot=r},Uy.prototype.revert=function(e){var i=e.newRoot.businessObject,r=e.oldRoot,o=r.businessObject,a=i.$parent,s=i.di;this._canvas.setRootElement(r,!0),ii(a.rootElements,i),i.$parent=null,ri(a.rootElements,o),o.$parent=a,i.di=null,s.bpmnElement=o,o.di=s},Kk.$inject=["modeling","spaceTool"],Kk.prototype.preExecute=function(e){var n=this._spaceTool,t=this._modeling,i=e.shape,r=e.location,o=va(i),a=o===i,s=a?i:i.parent;Gl(s).length||t.createShape({type:"bpmn:Lane"},{x:i.x+30,y:i.y,width:i.width-30,height:i.height},s);var l=[];Pl(o,function(g){return l.push(g),g.label&&l.push(g.label),g===i?[]:Bn(g.children,function(v){return v!==i})});var d="top"===r?-120:120,u="top"===r?i.y:i.y+i.height,h=u+("top"===r?10:-10),f="top"===r?"n":"s",m=n.calculateAdjustments(l,"y",d,h);n.makeSpace(m.movingShapes,m.resizingShapes,{x:0,y:d},f,h),e.newLane=t.createShape({type:"bpmn:Lane"},{x:i.x+(a?30:0),y:u-("top"===r?120:0),width:i.width-(a?30:0),height:120},s)},Xk.$inject=["modeling","translate"],Xk.prototype.preExecute=function(e){var n=this._modeling,t=this._translate,i=e.shape,r=e.count,o=Gl(i),a=o.length;if(a>r)throw new Error(t("more than {count} child lanes",{count:r}));var d,h,s=Math.round(i.height/r);for(h=0;h0||o.bottom<0?-l:l,e.y+(o.bottom?e.height:0)+(o.bottom?-10:10)),t.makeSpace(f.movingShapes,f.resizingShapes,{x:0,y:l},u)),(o.left||o.right)&&(l=o.right||o.left,u=o.right?"e":"w",f=t.calculateAdjustments(c,"x",o.left>0||o.right<0?-l:l,e.x+(o.right?e.width:0)+(o.right?-10:100)),t.makeSpace(f.movingShapes,f.resizingShapes,{x:l,y:0},u))};var Dp="flowNodeRef",Zk="lanes";function kp(e){this._elementRegistry=e}function Gy(e){this._moddle=e}kp.$inject=["elementRegistry"],kp.prototype.computeUpdates=function(e,n){var t=[],i=[],r={},o=[];function s(d){-1===t.indexOf(d)&&(o.push(d),t.push(d))}return n.forEach(function(d){var u=va(d);u&&-1===t.indexOf(u)&&(u.children.filter(function(f){return b(f,"bpmn:FlowNode")}).forEach(s),t.push(u))}),e.forEach(s),o.forEach(function(d){var u=d.businessObject,f=u.get(Zk).slice(),m=function l(d){if(!d.parent)return[];var u=function c(d){var u=va(d);return r[u.id]||(r[u.id]=ty(u)),r[u.id]}(d);return u.filter(function(h){return function a(d,u){var h=lt(u),f_x=d.x+d.width/2,f_y=d.y+d.height/2;return f_x>h.left&&f_xh.top&&f_y"u"&&(u=n.getExternalLabelBounds(l,f)),u&&e.resizeShape(l,u,Xve)}}}function Kj(e){return!e||!e.trim()}function si(e,n,t,i){yn.call(this,e,n,t),this._bpmnRules=i}function Xj(){}Yj.$inject=["modeling","textRenderer"],tt()(si,yn),si.$inject=["eventBus","elementFactory","commandStack","bpmnRules"],si.prototype.getHandlers=function(){var e=yn.prototype.getHandlers.call(this);return e["element.updateModdleProperties"]=wp,e["element.updateProperties"]=Cp,e["canvas.updateRoot"]=Uy,e["lane.add"]=Kk,e["lane.resize"]=Sp,e["lane.split"]=Xk,e["lane.updateRefs"]=kp,e["id.updateClaim"]=Gy,e["element.setColor"]=Qk,e["element.updateLabel"]=Yj,e},si.prototype.updateLabel=function(e,n,t,i){this._commandStack.execute("element.updateLabel",{element:e,newLabel:n,newBounds:t,hints:i||{}})},si.prototype.connect=function(e,n,t,i){if(t||(t=this._bpmnRules.canConnect(e,n)),t)return this.createConnection(e,n,t,e.parent,i)},si.prototype.updateModdleProperties=function(e,n,t){this._commandStack.execute("element.updateModdleProperties",{element:e,moddleElement:n,properties:t})},si.prototype.updateProperties=function(e,n){this._commandStack.execute("element.updateProperties",{element:e,properties:n})},si.prototype.resizeLane=function(e,n,t){this._commandStack.execute("lane.resize",{shape:e,newBounds:n,balanced:t})},si.prototype.addLane=function(e,n){var t={shape:e,location:n};return this._commandStack.execute("lane.add",t),t.newLane},si.prototype.splitLane=function(e,n){this._commandStack.execute("lane.split",{shape:e,count:n})},si.prototype.makeCollaboration=function(){var e=this._create("root",{type:"bpmn:Collaboration"});return this._commandStack.execute("canvas.updateRoot",{newRoot:e}),e},si.prototype.updateLaneRefs=function(e,n){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:e,laneShapes:n})},si.prototype.makeProcess=function(){var e=this._create("root",{type:"bpmn:Process"});this._commandStack.execute("canvas.updateRoot",{newRoot:e})},si.prototype.claimId=function(e,n){this._commandStack.execute("id.updateClaim",{id:e,element:n,claiming:!0})},si.prototype.unclaimId=function(e,n){this._commandStack.execute("id.updateClaim",{id:e,element:n})},si.prototype.setColor=function(e,n){e.length||(e=[e]),this._commandStack.execute("element.setColor",{elements:e,colors:n})},Xj.prototype.layoutConnection=function(e,n){return[(n=n||{}).connectionStart||Pt(n.source||e.source),n.connectionEnd||Pt(n.target||e.target)]};var Wy=20,Zve=5,qy=Math.round,Zj=20,Qve={"h:h":20,"v:v":20,"h:v":-10,"v:h":-10};function Qj(e,n,t){var s,c,i=nr(n,e,Zve),r=t.split(":")[0],o=qy((n.x-e.x)/2+e.x),a=qy((n.y-e.y)/2+e.y),l=function e_e(e,n){return{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/left|right/,v:/top|bottom/}[e].test(n)}(r,i),d=/h|r|l/.test(r),u=!1,h=!1;return l?(s=d?{x:o,y:e.y}:{x:e.x,y:a},c=d?"h:h":"v:v"):(u=function Jve(e,n){return!{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/./,v:/./}[n].test(e)}(i,r),c=d?"h:v":"v:h",u?d?(h=a===e.y,s={x:e.x+Wy*(/l/.test(r)?-1:1),y:h?a+Wy:a}):s={x:(h=o===e.x)?o+Wy:o,y:e.y+Wy*(/t/.test(r)?-1:1)}:s={x:o,y:a}),{waypoints:Jk(e,s,c).concat(s),directions:c,turnNextDirections:h}}function Jj(e){return e.split(":").reverse().join(":")}function Jk(e,n,t){if(!function f_e(e){return e&&/^h|v|t|r|b|l:h|v|t|r|b|l$/.test(e)}(t=t||"h:h"))throw new Error("unknown directions: <"+t+">: must be specified as : with start/end in { h,v,t,r,b,l }");if(t8(t)){var i=function t_e(e,n,t){return Qj(e,n,t)}(e,n,t),r=function n_e(e,n,t){var i=Qj(n,e,Jj(t));return{waypoints:i.waypoints.slice().reverse(),directions:Jj(i.directions),turnNextDirections:i.turnNextDirections}}(e,n,t),o=function i_e(e,n){var t=e.directions.split(":")[1],i=n.directions.split(":")[0];e.turnNextDirections&&(t="h"==t?"v":"h"),n.turnNextDirections&&(i="h"==i?"v":"h");var r=t+":"+i;return{waypoints:Jk(e.waypoints[e.waypoints.length-1],n.waypoints[0],r),directions:r}}(i,r);return[].concat(i.waypoints,o.waypoints,r.waypoints)}return function r_e(e,n,t){var i=qy((n.x-e.x)/2+e.x),r=qy((n.y-e.y)/2+e.y);if("h:v"===t)return[{x:n.x,y:e.y}];if("v:h"===t)return[{x:e.x,y:n.y}];if("h:h"===t)return[{x:i,y:e.y},{x:i,y:n.y}];if("v:v"===t)return[{x:e.x,y:r},{x:n.x,y:r}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]")}(e,n,t)}function a_e(e,n,t,i,r){var a=function Qse(e,n){return Su(e)?[]:(function Xse(e){if(!mn(e))throw new Error("must supply array")}(e),n=_S(n),e.filter(function(t,i){return!n(t,i)}))}(r&&r.preferredLayouts||[],"straight")[0]||"h:h",c=nr(e,n,Qve[a]||0),l=function h_e(e,n){if(t8(n))return n;switch(e){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return n}}(c,a);t=t||Pt(e),i=i||Pt(n);var d=l.split(":"),u=n8(t,e,d[0],function m_e(e){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[e]}(c));return function o_e(e,n,t){var i=Jk(e,n,t);return i.unshift(e),i.push(n),i8(i)}(u,n8(i,n,d[1],c),l)}function e8(e,n,t){return function c_e(e,n,t){return e>=n&&e<=t}(n[e],t[e],t[e]+t[{x:"width",y:"height"}[e]])}function eT(e,n,t,i){if(function r(d){return d.length<3||!(d.length>4)&&!!Gi(d,function(u,h){var f=d[h-1];return f&&Mm(u,f)<3})}(i))return null;var l,s=i[0],c=i.slice();return c[0]=t,c[1]=function o(d,u,h){switch(Ds(u,d)){case"v":return{x:h.x,y:d.y};case"h":return{x:d.x,y:h.y}}return{x:d.x,y:d.y}}(c[1],s,t),(l=function a(d,u,h){var f;for(f=d.length-2;0!==f;f--)if(l5(d[f],u,Zj)||l5(d[f],h,Zj))return d.slice(f);return d}(c,e,n))!==c&&(c=eT(e,n,t,l)),c&&Ds(c)?null:c}function t8(e){return e&&/t|r|b|l/.test(e)}function n8(e,n,t,i){if("h"===t&&(t=/left/.test(i)?"l":"r"),"v"===t&&(t=/top/.test(i)?"t":"b"),"t"===t)return{original:e,x:e.x,y:n.y};if("r"===t)return{original:e,x:n.x+n.width,y:e.y};if("b"===t)return{original:e,x:e.x,y:n.y+n.height};if("l"===t)return{original:e,x:n.x,y:e.y};throw new Error("unexpected dockingDirection: <"+t+">")}function i8(e){return e.reduce(function(n,t,i){return xS(n[n.length-1],e[i+1],t,0)||n.push(t),n},[])}var g_e=40,tT={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},Yy={top:"t",right:"r",bottom:"b",left:"l"};function nT(){}function b_e(e,n){return b(n,"bpmn:Participant")?"source":b(e,"bpmn:Participant")?"target":Tp(n)?"source":Tp(e)||b(n,"bpmn:Event")?"target":b(e,"bpmn:Event")?"source":null}function x_e(e){return Tp(e)?"target":"source"}function r8(e,n){return e?e.original||e:Pt(n)}function o8(e,n){return b(n,"bpmn:Activity")&&b(e,"bpmn:BoundaryEvent")&&n.businessObject.isForCompensation}function Tp(e){return b(e,"bpmn:SubProcess")&&pn(e)}function Ap(e,n){return e===n}function Mp(e){var n=/right|left/.exec(e);return n&&n[0]}function Xl(e){var n=/top|bottom/.exec(e);return n&&n[0]}function iT(e){return"right"===e||"left"===e}function D_e(e,n){var t=n.waypoints,i=t&&t.length&&nr(t[0],e);return"top"===i?["t:r"]:"right"===i?["r:b"]:"left"===i?["l:t"]:["b:l"]}function k_e(e,n,t){var a,s,i=Pt(e),r=Pt(n),o=function v_e(e){var n=e.host;return nr(Pt(e),n,-10)}(e),c=Ap(e.host,n),l=function w_e(e,n){return-1!==n.indexOf(e)}(o,["top","right","bottom","left"]),d=nr(r,i,{x:e.width/2+n.width/2,y:e.height/2+n.height/2});return c?function T_e(e,n,t,i,r){var o=n?e:Xl(e);return[Yy[o]+":"+(n?iT(e)?a8("y",t,i,r)?"h":"b":a8("x",t,i,r)?"v":"l":"v")]}(o,l,e,n,t):(a=function A_e(e,n,t){return t?Yy[e]:Ap(Xl(e),Xl(n))||function E_e(e,n){return tT[e]===n}(Mp(e),Mp(n))?Yy[Xl(e)]:Yy[Mp(e)]}(o,d,l),s=function M_e(e,n,t){return t?iT(e)?function C_e(e,n){var t=Mp(e);return-1!==n.indexOf(tT[t])}(e,n)||Ap(e,n)?"h":"v":function S_e(e,n){var t=Xl(e);return-1!==n.indexOf(tT[t])}(e,n)||Ap(e,n)?"v":"h":iT(n)||Ap(Xl(e),Xl(n))&&Mp(n)?"h":"v"}(o,d,l),[a+":"+s])}function a8(e,n,t,i){var r=g_e;return!(rT(e,i,t,r)||rT(e,i,{x:t.x+t.width,y:t.y+t.height},r)||rT(e,i,Pt(n),r))}function rT(e,n,t,i){return Math.abs(n[e]-t[e])
'),e.appendChild(o));var s=In(t.html||(t.separator?'
':'
'));o.appendChild(s),t.separator||(po(s,"data-action",i),t.title&&po(s,"title",t.title),t.className&&function U_e(e,n){var t=Ti(e);(mn(n)?n:n.split(/\s+/g)).forEach(function(r){t.add(r)})}(s,t.className),t.imageUrl&&s.appendChild(In('')))}),this.open()},yi.prototype.trigger=function(e,n,t){var r,o,a,i=this._entries,s=n.delegateTarget||n.target;if(!s)return n.preventDefault();(r=i[po(s,"data-action")])&&(a=n.originalEvent||n,Ar(o=r.action)?"click"===e&&o(a,t):o[e]&&o[e](a,t),n.preventDefault())},yi.prototype._layoutChanged=function(){this._toggleState({})},yi.prototype._needsCollapse=function(e,n){return e<46*Object.keys(n).length+50},yi.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},yi.prototype.open=function(){this._toggleState({open:!0})},yi.prototype.toggle=function(e){this.isOpen()?this.close():this.open()},yi.prototype.isActiveTool=function(e){return e&&this._activeTool===e},yi.prototype.updateToolHighlight=function(e){var n;this._toolsContainer||(n=Xn(".djs-palette-entries",this._container),this._toolsContainer=Xn("[data-group=tools]",n)),Z(this._toolsContainer.children,function(i){var r=i.getAttribute("data-action");if(r){var o=Ti(i);r=r.replace("-tool",""),o.contains("entry")&&r===e?o.add("highlighted-entry"):o.remove("highlighted-entry")}})},yi.prototype.isOpen=function(){return Ti(this._container).has(sT)},yi.prototype._getParentContainer=function(){return this._canvas.getContainer()},yi.HTML_MARKUP='
';const W_e={__init__:["palette"],palette:["type",yi]};var _8="crosshair";function Zl(e,n,t,i,r,o,a){this._selection=r,this._dragging=t,this._mouse=a;var s=this;o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",function(l){!l.hover&&!(l.originalEvent.target instanceof SVGElement)||e.once("lasso.selection.ended",function(){s.activateLasso(l.originalEvent,!0)})}),e.on("lasso.end",function(l){var d=cT(l),u=i.filter(function(h){return h});s.select(u,d)}),e.on("lasso.start",function(l){var d=l.context;d.bbox=cT(l),function(l){var u,d=n.getActiveLayer();ve(u=l.frame=Qe("rect"),{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),nt(d,u)}(d)}),e.on("lasso.move",function(l){var d=l.context;d.bbox=cT(l),function(l){var u=l.bbox;ve(l.frame,{x:u.x,y:u.y,width:u.width,height:u.height})}(d)}),e.on("lasso.cleanup",function(l){!function(l){l.frame&&ui(l.frame)}(l.context)}),e.on("element.mousedown",1500,function(l){if(lB(l))return s.activateLasso(l.originalEvent),!0})}function cT(e){var n={x:e.x-e.dx,y:e.y-e.dy},t={x:e.x,y:e.y};return n.x<=t.x&&n.y=t.x&&n.yt.x&&n.y<=t.y?{x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:n.x<=t.x&&n.y>t.y||n.x=t.y?{x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:n.x>=t.x&&n.y>t.y||n.x>t.x&&n.y>=t.y?{x:t.x,y:t.y,width:n.x-t.x,height:n.y-t.y}:{x:t.x,y:t.y,width:0,height:0}}Zl.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],Zl.prototype.activateLasso=function(e,n){this._dragging.init(e,"lasso",{autoActivate:n,cursor:_8,data:{context:{}}})},Zl.prototype.activateSelection=function(e,n){this._dragging.init(e,"lasso.selection",{trapClick:!1,autoActivate:n,cursor:_8,data:{context:{}}})},Zl.prototype.select=function(e,n){var t=function ace(e,n){var t={};return Z(e,function(i){var r=i;r.waypoints&&(r=tr(r)),!Ot(n.y)&&r.x>n.x&&(t[i.id]=i),!Ot(n.x)&&r.y>n.y&&(t[i.id]=i),r.x>n.x&&r.y>n.y&&(Ot(n.width)&&Ot(n.height)&&r.width+r.xn[i]+r-t&&Ii(e,i,n[i]+r-t)})}(n,o,function sbe(e){return b(e,"bpmn:Task")?10:20}(o)),o&&function abe(e,n){return wu(n,function(t){return k8(e,t)})}(i,["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"])?(t.connectionStart=No(r),tn(o,["bpmn:Event","bpmn:Gateway"])&&D8(n,No(o)),tn(o,["bpmn:Task","bpmn:SubProcess"])&&function rbe(e,n){var t=No(n);C8.forEach(function(i){(function cbe(e,n,t){return e[t]>n[t]+20&&e[t]r[s]?r[s]+40:r[s]-40)})}}(n)):k8(i,"bpmn:MessageFlow")?(b(r,"bpmn:Event")&&(t.connectionStart=No(r)),b(o,"bpmn:Event")&&D8(n,No(o))):t.connectionStart=t.initialConnectionStart)})}function D8(e,n){Ii(e,"x",n.x),Ii(e,"y",n.y)}function k8(e,n){return e&&e.type===n}function T8(e,n){return"x"===e?n.width:n.height}function Nc(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function Xy(e){this._snapValues={}}S8.$inject=["eventBus"],Nc.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},Nc.prototype.setSnapOrigin=function(e,n){this._snapOrigins[e]=n,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},Nc.prototype.addDefaultSnap=function(e,n){var t=this._defaultSnaps[e];t||(t=this._defaultSnaps[e]=[]),t.push(n)},Nc.prototype.getSnapLocations=function(){return this._snapLocations},Nc.prototype.setSnapLocations=function(e){this._snapLocations=e},Nc.prototype.pointsForTarget=function(e){var n=e.id||e,t=this._targets[n];return t||(t=this._targets[n]=new Xy).initDefaults(this._defaultSnaps),t},Xy.prototype.add=function(e,n){var t=this._snapValues[e];t||(t=this._snapValues[e]={x:[],y:[]}),-1===t.x.indexOf(n.x)&&t.x.push(n.x),-1===t.y.indexOf(n.y)&&t.y.push(n.y)},Xy.prototype.snap=function(e,n,t,i){var r=this._snapValues[n];return r&&function pfe(e,n,t){var i,r;for(t=void 0===t?10:t,i=0;i=e.x||r&&r<=e.x)&&Ii(e,"x",e.x),(i&&i>=e.y||o&&o<=e.y)&&Ii(e,"y",e.y)}}function M8(e,n){return-1!==e.indexOf(n)}function I8(e,n,t){return n?{x:e.x-t.x,y:e.y-t.y}:{x:e.x,y:e.y}}function Ip(e,n){var t=this;e.on(["resize.start"],function(i){t.initSnap(i)}),e.on(["resize.move","resize.end"],1250,function(i){var r=i.context,o=r.shape,a=o.parent,s=r.direction,c=r.snapContext;if(!(i.originalEvent&&xo(i.originalEvent)||Xu(i))){var l=c.pointsForTarget(a);l.initialized||((l=t.addSnapTargetPoints(l,o,a,s)).initialized=!0),function wbe(e){return"n"===e||"s"===e}(s)&&Ii(i,"x",i.x),function Ebe(e){return"e"===e||"w"===e}(s)&&Ii(i,"y",i.y),n.snap(i,l)}}),e.on(["resize.cleanup"],function(){n.hide()})}function O8(e,n){var t=Pt(e),i=lt(e),r={x:t.x,y:t.y};return-1!==n.indexOf("n")?r.y=i.top:-1!==n.indexOf("s")&&(r.y=i.bottom),-1!==n.indexOf("e")?r.x=i.right:-1!==n.indexOf("w")&&(r.x=i.left),r}function Pc(e){this._canvas=e,this._asyncHide=e5(km(this.hide,this),1e3)}ts.$inject=["elementRegistry","eventBus","snapping"],ts.prototype.initSnap=function(e){var o,n=this._elementRegistry,t=e.context,i=t.shape,r=t.snapContext;r||(r=t.snapContext=new Nc);var a_x=(o=n.get(i.id)?No(i,e):{x:e.x+No(i).x,y:e.y+No(i).y}).x-i.width/2,a_y=o.y-i.height/2,s_x=o.x+i.width/2,s_y=o.y+i.height/2;return r.setSnapOrigin("mid",{x:o.x-e.x,y:o.y-e.y}),fT(i)||(r.setSnapOrigin("top-left",{x:a_x-e.x,y:a_y-e.y}),r.setSnapOrigin("bottom-right",{x:s_x-e.x,y:s_y-e.y})),r},ts.prototype.addSnapTargetPoints=function(e,n,t){return Z(this.getSnapTargets(n,t),function(r){if(fT(r))fT(n)&&e.add("mid",No(r));else if(function ube(e){return!!e.waypoints}(r)){if(r.waypoints.length<3)return;Z(r.waypoints.slice(1,-1),function(a){e.add("mid",a)})}else e.add("mid",No(r))}),!Ot(n.x)||!Ot(n.y)||this._elementRegistry.get(n.id)&&e.add("mid",No(n)),e},ts.prototype.getSnapTargets=function(e,n){return d6(n).filter(function(t){return!function hbe(e){return!!e.hidden}(t)})},tt()(oh,ts),oh.$inject=["eventBus","injector"],oh.prototype.initSnap=function(e){var n=ts.prototype.initSnap.call(this,e),t=e.shape,i=!!this._elementRegistry.get(t.id);return ht(t.outgoing,function(r){var o=r.waypoints[0];n.setSnapOrigin(r.id+"-docking",I8(o=o.original||o,i,e))}),ht(t.incoming,function(r){var o=r.waypoints[r.waypoints.length-1];n.setSnapOrigin(r.id+"-docking",I8(o=o.original||o,i,e))}),b(t,"bpmn:Participant")&&n.setSnapLocations(["top-left","bottom-right","mid"]),n},oh.prototype.addSnapTargetPoints=function(e,n,t){ts.prototype.addSnapTargetPoints.call(this,e,n,t);var i=this.getSnapTargets(n,t);ht(i,function(o){(function pbe(e){return!(!b(e,"bpmn:SubProcess")||!pn(e))||b(e,"bpmn:Participant")}(o)||function mbe(e,n){return e.every(function(t){return b(t,n)})}([n,o],"bpmn:TextAnnotation"))&&(e.add("top-left",c6(o)),e.add("bottom-right",l6(o)))});var r=this._elementRegistry;return ht(n.incoming,function(o){if(r.get(n.id)){M8(i,o.source)||e.add("mid",Pt(o.source));var a=o.waypoints[0];e.add(o.id+"-docking",a.original||a)}}),ht(n.outgoing,function(o){if(r.get(n.id)){M8(i,o.target)||e.add("mid",Pt(o.target));var a=o.waypoints[o.waypoints.length-1];e.add(o.id+"-docking",a.original||a)}}),b(t,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,n,t.parent)),e},oh.prototype.getSnapTargets=function(e,n){return ts.prototype.getSnapTargets.call(this,e,n).filter(function(t){return!b(t,"bpmn:Lane")})},Ip.prototype.initSnap=function(e){var n=e.context,t=n.shape,i=n.direction,r=n.snapContext;r||(r=n.snapContext=new Nc);var o=O8(t,i);return r.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),r},Ip.prototype.addSnapTargetPoints=function(e,n,t,i){return Z(this.getSnapTargets(n,t),function(o){e.add("corner",l6(o)),e.add("corner",c6(o))}),e.add("corner",O8(n,i)),e},Ip.$inject=["eventBus","snapping"],Ip.prototype.getSnapTargets=function(e,n){return d6(n).filter(function(t){return!(function _be(e,n){return e.host===n}(t,e)||function bbe(e){return!!e.waypoints}(t)||function ybe(e){return!!e.hidden}(t)||function xbe(e){return!!e.labelTarget}(t))})},Pc.$inject=["canvas"],Pc.prototype.snap=function(e,n){var i=e.context.snapContext,r=i.getSnapLocations(),o={x:Xu(e,"x"),y:Xu(e,"y")};Z(r,function(a){var s=i.getSnapOrigin(a),c={x:e.x+s.x,y:e.y+s.y};if(Z(["x","y"],function(l){var d;o[l]||void 0!==(d=n.snap(c,a,l,7))&&(o[l]={value:d,originValue:d-s[l]})}),o.x&&o.y)return!1}),this.showSnapLine("vertical",o.x&&o.x.value),this.showSnapLine("horizontal",o.y&&o.y.value),Z(["x","y"],function(a){var s=o[a];vo(s)&&Ii(e,a,s.originValue)})},Pc.prototype._createLine=function(e){var n=this._canvas.getLayer("snap"),t=Qe("path");return ve(t,{d:"M0,0 L0,0"}),Bt(t).add("djs-snap-line"),nt(n,t),{update:function(i){Ot(i)?ve(t,"horizontal"===e?{d:"M-100000,"+i+" L+100000,"+i,display:""}:{d:"M "+i+",-100000 L "+i+", +100000",display:""}):ve(t,{display:"none"})}}},Pc.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},Pc.prototype.showSnapLine=function(e,n){var t=this.getSnapLine(e);t&&t.update(n),this._asyncHide()},Pc.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},Pc.prototype.hide=function(){Z(this._snapLines,function(e){e.update()})};const Dbe={__depends__:[{__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",ts],resizeSnapping:["type",Ip],snapping:["type",Pc]}],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",S8],createMoveSnapping:["type",oh]};var kbe={"&":"&","<":"<",">":">",'"':""","'":"'"};function R8(e){return(e=""+e)&&e.replace(/[&<>"']/g,function(n){return kbe[n]})}function _t(e,n,t,i){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=n,this._overlays=t,this._selection=i,this._container=In(_t.BOX_HTML),this._searchInput=Xn(_t.INPUT_SELECTOR,this._container),this._resultsContainer=Xn(_t.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),n.on(["canvas.destroy","diagram.destroy"],this.close,this)}function N8(e,n,t){var i=function Abe(e){var n="";return e.forEach(function(t){n+=t.matched?''+R8(t.matched)+"":R8(t.normal)}),""!==n?n:null}(n),r=In(t);r.innerHTML=i,e.appendChild(r)}_t.$inject=["canvas","eventBus","overlays","selection"],_t.prototype._bindEvents=function(){var e=this;function n(t,i,r,o){e._eventMaps.push({el:t,type:r,listener:go.bind(t,i,r,o)})}n(document,"html","click",function(t){e.close()}),n(this._container,_t.INPUT_SELECTOR,"click",function(t){t.stopPropagation(),t.delegateTarget.focus()}),n(this._container,_t.RESULT_SELECTOR,"mouseover",function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)}),n(this._container,_t.RESULT_SELECTOR,"click",function(t){t.stopPropagation(),e._select(t.delegateTarget)}),n(this._container,_t.INPUT_SELECTOR,"keydown",function(t){38===t.keyCode&&t.preventDefault(),40===t.keyCode&&t.preventDefault()}),n(this._container,_t.INPUT_SELECTOR,"keyup",function(t){if(27===t.keyCode)return e.close();if(13===t.keyCode){var i=e._getCurrentResult();return i?e._select(i):e.close()}return 38===t.keyCode?e._scrollToDirection(!0):40===t.keyCode?e._scrollToDirection():void(37===t.keyCode||39===t.keyCode||e._search(t.delegateTarget.value))})},_t.prototype._unbindEvents=function(){this._eventMaps.forEach(function(e){go.unbind(e.el,e.type,e.listener)})},_t.prototype._search=function(e){var n=this;if(this._clearResults(),e&&""!==e){var t=this._searchProvider.find(e);if(t.length){t.forEach(function(r){var o=r.element.id,a=n._createResultNode(r,o);n._results[o]={element:r.element,node:a}});var i=Xn(_t.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}}},_t.prototype._scrollToDirection=function(e){var n=this._getCurrentResult();if(n){var t=e?n.previousElementSibling:n.nextElementSibling;t&&(this._scrollToNode(t),this._preselect(t))}},_t.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var n=e.offsetTop,t=this._resultsContainer.scrollTop,i=n-this._resultsContainer.clientHeight+e.clientHeight;n0&&N8(t,e.primaryTokens,_t.RESULT_PRIMARY_HTML),N8(t,e.secondaryTokens,_t.RESULT_SECONDARY_HTML),po(t,_t.RESULT_ID_ATTRIBUTE,n),this._resultsContainer.appendChild(t),t},_t.prototype.registerProvider=function(e){this._searchProvider=e},_t.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,Ti(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},_t.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,Ti(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))},_t.prototype.toggle=function(){this.isOpen()?this.close():this.open()},_t.prototype.isOpen=function(){return this._open},_t.prototype._preselect=function(e){var n=this._getCurrentResult();if(e!==n){n&&Ti(n).remove(_t.RESULT_SELECTED_CLASS);var t=po(e,_t.RESULT_ID_ATTRIBUTE),i=this._results[t].element;Ti(e).add(_t.RESULT_SELECTED_CLASS),this._resetOverlay(i),this._canvas.scrollToElement(i,{top:400}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},_t.prototype._select=function(e){var n=po(e,_t.RESULT_ID_ATTRIBUTE),t=this._results[n].element;this.close(),this._resetOverlay(),this._canvas.scrollToElement(t,{top:400}),this._selection.select(t),this._eventBus.fire("searchPad.selected",t)},_t.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=function Tbe(e){var t=e.width+12,i=e.height+12;return{position:{bottom:i-6,right:t-6},show:!0,html:'
'}}(tr(e));this._overlayId=this._overlays.add(e,t)}},_t.CONTAINER_SELECTOR=".djs-search-container",_t.INPUT_SELECTOR=".djs-search-input input",_t.RESULTS_CONTAINER_SELECTOR=".djs-search-results",_t.RESULT_SELECTOR=".djs-search-result",_t.RESULT_SELECTED_SELECTOR="."+(_t.RESULT_SELECTED_CLASS="djs-search-result-selected"),_t.RESULT_ID_ATTRIBUTE="data-result-id",_t.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",_t.OVERLAY_CLASS="djs-search-overlay",_t.BOX_HTML='
',_t.RESULT_HTML='
',_t.RESULT_PRIMARY_HTML='
',_t.RESULT_SECONDARY_HTML='

';const Mbe={__depends__:[sD,Ka],searchPad:["type",_t]};function mT(e,n,t){this._elementRegistry=e,this._canvas=t,n.registerProvider(this)}function P8(e){return Bn(e,function(t){return!!t.matched}).length>0}function F8(e,n){var t=[],i=e;if(!e)return t;e=e.toLowerCase(),n=n.toLowerCase();var r=e.indexOf(n);return r>-1?(0!==r&&t.push({normal:i.substr(0,r)}),t.push({matched:i.substr(r,n.length)}),n.length+r')}),_a.prototype._modules=[].concat(kc.prototype._modules,_a.prototype._interactionModules=[wB,DB,Che,AB],_a.prototype._modelingModules=[Dhe,Hhe,efe,Yhe,vfe,AD,Efe,Lme,B6,Zu,jme,$me,rpe,spe,cpe,fpe,Cpe,I_e,j_e,X_e,Q_e,dy,Dbe,Ibe]);let pT=[];function gT(){}function L8(e){let n;return n=e>9999?0:e<10?"000"+e:e<100?"00"+e:e<1e3?"0"+e:""+e,n}function Pbe(e){let n=!1;return pT.forEach(t=>{e===t&&(n=!0)}),n}function Op(e,n){zo.call(this,e,n);let t=this,i=new gT;this.create=function(r,o){let a=o.type;if("label"===r)return t.baseCreate(r,it({type:"label"},ju,o));if(/^domainStory:/.test(a)){o.businessObject||(o.businessObject={type:a,name:o.name?o.name:""}),o.id?i.registerId(o.id):o.id=i.getId(r),it(o.businessObject,{id:o.id});let s=o.id;return o.businessObject.get=function(c){if("id"===c)return s},o.businessObject.set=function(c,l){"id"===c&&it(o.businessObject,{id:l})},o.businessObject.$type||it(o.businessObject,{$type:"Element"}),it(o.businessObject,{di:{}}),o.businessObject.$descriptor||it(o.businessObject,{$descriptor:{}}),(!/:activity$/.test(a)||!/:connection$/.test(a))&&!(/:group$/.test(a)&&o.height||o.width)&&it(o,t._getCustomElementSize(a)),"$instanceOf"in o.businessObject||Object.defineProperty(o.businessObject,"$instanceOf",{value:function(c){return this.type===c}}),t.baseCreate(r,o)}return t.createBpmnElement(r,o)}}function Kr(e,n){const t=B8(e);return t&&"function"==typeof t.$instanceOf&&t.$instanceOf(n)}function B8(e){return e&&e.businessObject||e}gT.prototype.getId=function(e){return function Rbe(e){let n=function Nbe(){return Math.floor(1e4*Math.random())}(),t=e+"_"+L8(n);for(;Pbe(t);)n++,t=e+"_"+L8(n);return pT.push(t),t}(e)},gT.prototype.registerId=function(e){pT.push(e)},tt()(Op,zo),Op.$inject=["bpmnFactory","moddle"],Op.prototype._getCustomElementSize=function(e){let n={__default:{width:75,height:75},"domainStory:textAnnotation":{width:100,height:30},"domainStory:group":{width:525,height:275}};return n[e]||n.__default};const V8="djs-element-hidden",j8="djs-label-hidden";let vT=0;function z8(e,n,t){let o,a,s,i=this,r=n.getDefaultLayer();e.on("directEditing.activate",function(c){let l=c.active;if(o=l.element.label||l.element,Kr(o,$.TEXTANNOTATION)){a=n.getAbsoluteBBox(o),s=Qe("g"),vT=o.height;let d=t.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:0,my:0}}),u=i.path=Qe("path");ve(u,{d,strokeWidth:2,stroke:"black"}),nt(s,u),nt(r,s),Or(s,o.x,o.y)}Kr(o,$.TEXTANNOTATION)||o.labelTarget?n.addMarker(o,V8):(o.type.includes($.ACTOR)||o.type.includes($.WORKOBJECT)||o.type.includes($.ACTIVITY)||o.type.includes($.GROUP))&&n.addMarker(o,j8)}),e.on("directEditing.resize",function(c){if(Kr(o,$.TEXTANNOTATION)){let u=Math.max(o.height/a.height*(c.height+c.dy),0);vT=u;let h=t.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:u,position:{mx:0,my:0}});ve(i.path,{d:h})}}),e.on(["directEditing.complete","directEditing.cancel"],function(c){let l=c.active;l&&(n.removeMarker(l.element.label||l.element,V8),n.removeMarker(o,j8)),o=void 0,a=void 0,s&&(ui(s),s=void 0)})}function H8(e){return e.type.includes($.ACTOR)||e.type.includes($.WORKOBJECT)||e.type.includes($.ACTIVITY)||e.type.includes($.GROUP)?"name":Kr(e,$.TEXTANNOTATION)?"text":void 0}function $8(e){if(Kr(e,$.ACTIVITY))return"number"}function U8(e){let n;n=e.businessObject?e.businessObject:e;let t=H8(n);if(t&&n)return n[t]||""}z8.$inject=["eventBus","canvas","pathMap"];let G8,W8=0,Zy=!1;function q8(e){setTimeout(()=>e.focus(),0)}function Rp(e,n,t,i,r,o,a){function s(l,d){(d||tn(l,[$.TEXTANNOTATION])||l.businessObject.type.includes($.DOMAINSTORY))&&t.activate(l)}this._canvas=n,this._modeling=i,this._textRenderer=o,this._updateLabelHandler=a,t.registerProvider(this),e.on("element.dblclick",function(l){s(l.element,!0),Kr(l.element,$.ACTIVITY)&&(W8=l.element.businessObject.number,Zy=!0,t.complete())}),e.on(["element.mousedown","drag.init","canvas.viewbox.changing","autoPlace","popupMenu.open"],function(){t.isActive()&&t.complete()}),e.on(["commandStack.changed"],function(){t.isActive()&&t.cancel()}),e.on("directEditing.activate",function(l){r.removeResizers(),function c(l){let d=document.getElementsByClassName("djs-direct-editing-content");q8(d.item(0)),function Gbe(e,n,t,i){let r,o;function a(l){if(!l||l.length<1)return!1;(function s(l){if(l.length>1)for(const d of l)d.classList.remove("autocomplete-active")})(l),r>=l.length&&(r=0),r<0&&(r=l.length-1),l[r].classList.add("autocomplete-active")}function c(l){let d=document.getElementsByClassName("autocomplete-items");for(const u of d)l!=u&&l!=e&&u.parentNode.removeChild(u)}c(),e.addEventListener("input",function(){if(0===n.length)return;t.type.includes($.WORKOBJECT)&&(this.value=this.innerHTML);let l,d,u=this.value;c(),r=-1,l=document.createElement("DIV"),l.setAttribute("id","autocomplete-list"),l.setAttribute("class","autocomplete-items"),this.parentNode.appendChild(l),o=[];for(const h of n)u&&h.substring(0,u.length).toUpperCase()===u.toUpperCase()&&(d=document.createElement("DIV"),d.innerHTML=""+h.substring(0,u.length)+""+h.substring(u.length),d.innerHTML+="",l.appendChild(d),o.push(h));t.type.includes($.ACTOR)&&(l.style.visibility="hidden")}),e.onkeydown=function(l){let d=document.getElementById("autocomplete-list");d&&(d=d.getElementsByTagName("div")),40===l.keyCode?(r++,a(d)):38===l.keyCode?(r--,a(d)):13===l.keyCode&&(l.preventDefault(),r>-1&&(t.businessObject.name=o[r],i.fire("element.changed",{element:t})))},document.addEventListener("click",function(l){c(l.target)})}(d[0],G8.getUniqueWorkObjectNames(),l,e)}(l.active.element)}),e.on("create.end",500,function(l){let d=l.shape;!l.isTouch&&l.context.canExecute&&(Kr(d,$.ACTIVITY)||s(d),q8(document.getElementsByClassName("djs-direct-editing-content").item(0)))}),e.on("autoPlace.end",500,function(l){s(l.shape)})}function Qy(e){return 180*e/Math.PI}function Np(e,n){let t;t=e.x<=n.x?e.y>=n.y?0:3:e.y>=n.y?1:2;const i=Math.abs(e.y-n.y),r=Math.abs(e.x-n.x);return 0===t?90-Qy(Math.atan2(r,i)):1===t?90+Qy(Math.atan2(r,i)):2===t?270-Qy(Math.atan2(r,i)):3===t?270+Qy(Math.atan2(r,i)):void 0}function Kbe(e,n,t,i,r,o){return r>t&&ri&&o125?i.width/2.5:125,maxWidth:i.width,minHeight:30*a,x:i.x,y:i.y}),it(f,{fontSize:u+"px",lineHeight:h,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px",textAlign:"left"})),(/^domainStory:actor\w*/.test(e.type)||/^domainStory:workObject\w*/.test(e.type))&&(it(o,{width:i.width,minHeight:30,y:i.y+i.height-20,x:i.x}),it(f,{fontSize:u+"px",lineHeight:h,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px"}));let m=90*a,g=7*a,v=4*a;if(t.labelTarget&&(it(o,{width:m,height:i.height+g+v,x:r_x-m/2,y:i.y-g}),it(f,{fontSize:l+"px",lineHeight:d,paddingTop:g+"px",paddingBottom:v+"px"})),Ya(t)&&!zu(t)&&!Mi(t)){let C=Hu(e),w=n.getAbsoluteBBox({x:C.x,y:C.y,width:0,height:0}),E=l+g+v;it(o,{width:m,height:E,x:w.x-m/2,y:w.y-E/2}),it(f,{fontSize:l+"px",lineHeight:d,paddingTop:g+"px",paddingBottom:v+"px"})}return Kr(e,$.TEXTANNOTATION)&&(it(o,{width:i.width,height:i.height,minWidth:30*a,minHeight:10*a}),it(f,{textAlign:"left",paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px",fontSize:u+"px",lineHeight:h})),{bounds:o,style:f}},Rp.prototype.update=function(e,n,t,i){let r,o;Kr(e,$.TEXTANNOTATION)&&(o=this._canvas.getAbsoluteBBox(e),r={x:e.x,y:e.y,width:e.width/o.width*i.width,height:e.height/o.height*i.height}),this._modeling.updateLabel(e,n,r)};let _T,Y8=[],K8=[!1];function X8(e,n){const t=e.businessObject,i=[0];let r=-1;const o=_T.getActivitiesFromActors();o.forEach(a=>{a.businessObject.number&&i.push(+a.businessObject.number)});for(let a=0;a{let r=+i.businessObject.number;r>=n&&(n++,setTimeout(function(){t.execute("activity.changed",{businessObject:i.businessObject,newLabel:i.businessObject.name,newNumber:r,element:i})},10))})}(o,r,n),t.number=r,r}function Z8(e,n,t){let i=[[]];e.forEach(o=>{i[o.businessObject.number]||(i[o.businessObject.number]=[]),i[o.businessObject.number].push(o)});let r=n;for(;r{if(i){let r=i.businessObject;r&&(r.number=n),t.fire("element.changed",{element:i})}})}function J8(e,n){let t=Np(e,n),i=0,r=0;return 0===t||180===t||90===t||270===t?i=0:t>0&&t<90?i=5-t/6:t>90&&t<180?(r=t-90,i=5-r/18):t>180&&t<270?(r=t-180,i=r/18):t>270&&(r=t-270,i=5-r/6),i+(e.x+n.x)/2}function ez(e,n,t=1){let i=Np(e,n),r=0,o=0;return 0===i||180===i?r=15:90===i||270===i?r=0:i>0&&i<90?r=15-i/6:i>90&&i<180?(o=i-90,r=-o/9*t):i>180&&i<270?(o=i-180,r=15-o/3):i>270&&(o=i-270,r=-o/9*t),r+(e.y+n.y)/2}let bT,nz,yT,Ql,lye,aye=new qC,sye=[];function Fc(e,n,t,i,r,o){ua.call(this,e,2e3);let a=aye.next(),s={},c=n.computeStyle;function f(N,_,p,D){return w(N,_.businessObject.name,{box:_,align:p,padding:D||0,style:{fill:"#000000"}},_.type)}function g(N,_){if(_&&_.source){let p=_.businessObject,D=function Zbe(e){let r=0;e.waypoints.length>1&&(r=Np(e.waypoints[0],e.waypoints[1]));let o=e.waypoints[0].x,a=e.waypoints[0].y,s=0,c=0,l=0,d=0;return r>=0&&r<=45?(s=25,d=20*(1-r/45)):r<=90?(s=5,l=15*(1-(r-45)/45)):r<=135?(s=5,l=(r-90)/45*-20):r<=180?(s=-15,d=(r-135)/45*20):r<=225?(s=-15,c=15,d=(r-180)/45*25):r<=270?(s=5,l=-20*(1-(r-225)/45),c=40):r<=315?(s=5,l=(r-270)/45*25,c=40):(s=25,c=20,d=15*(1-(r-315)/45)),o=o+s+l,a=a+c+d,{textAlign:"center",width:30,height:30,x:o,y:a}}(_);null==p.number&&_.source.type&&_.source.type.includes($.ACTOR)&&X8(_,o),p.number&&_.source.type.includes($.ACTOR)?function l(N,_,p){let D=function qbe(){let e={use:Zy,number:W8};return Zy=!1,e}(),A=_.businessObject;D.use&&(A.number=D.number),p.x-=65,p.y-=12,v(N,".",function h(N){return{box:N,fitBox:!0,style:it({},i.getExternalStyle(),{fill:"white",fontSize:150,position:"absolute",fontFamily:"Courier"})}}(p),_.type),p.x+=30,p.y+=3,v(N,"o",function u(N){return{box:N,fitBox:!0,style:it({},i.getExternalStyle(),{fill:"black",fontSize:50,position:"absolute",fontFamily:"Courier New"})}}(p),_.type),sye[A.number]=!0,p.x+=9,p.y-=7,A.number<10&&(p.x+=3);let ee=v(N,A.number,function d(N){return{box:N,fitBox:!0,style:it({},i.getExternalStyle(),{fill:"black",position:"absolute"})}}(p),_.type);!function eye(e,n){Y8[n]=e}(ee,A.number)}(N,_,D):p.number=null}}function v(N,_,p,D){_<10&&(_=String(_)),_=String(_);let A=i.createText(_||"",p);return Bt(A).add("djs-labelNumber"),C(D,A,p,0,N),nt(N,A),A}function C(N,_,p,D,A){/:activity$/.test(N)?(_.innerHTML=function x(N,_,p){if(N){let D="";for(let A=0;A':function k(N,_){N.businessObject.pickedColor||(N.businessObject.pickedColor="black");const p=_.match(/fill=".*?"/);if(p&&p.length>1)return _.replace(/fill=".*?"/,'fill="'+N.businessObject.pickedColor+'"');{const D=_.indexOf("_.y+60&&N.x>_.x+3&&N.x<_.x+72){let p=function we(N){let _=N.id,p=0,D=document.getElementsByClassName("djs-element djs-shape");for(let A=0;AN.y&&(N.y+=p)}}function Ce(N,_,p,D,A,ee){(function Z_(e){return"[object Object]"===_m.call(e)})(A)&&(ee=A,A=0),A=A||0,ee=c(ee,{stroke:"black",strokeWidth:2,fill:"white"});let P=Qe("rect");return ve(P,{x:A,y:A,width:_-2*A,height:p-2*A,rx:D,ry:D}),ve(P,ee),nt(N,P),P}function ze(N,_,p){let D=N+"-"+_+"-"+p+"-"+a;return s[D]||function Kt(N,_,p){let D=N+"-"+_+"-"+p+"-"+a;if("activity"===N){let A=Qe("path");ve(A,{d:"M 1 5 L 11 10 L 1 15 Z"}),function me(N,_){let p=it({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},_.attrs),D=_.ref||{x:0,y:0},A=_.scale||1;"none"===p.strokeDasharray&&(p.strokeDasharray=[1e4,1]);let ee=Qe("marker");ve(_.element,p),nt(ee,_.element),ve(ee,{id:N,viewBox:"0 0 20 20",refX:D.x,refY:D.y,markerWidth:20*A,markerHeight:20*A,orient:"auto"});let P=Xn("defs",t._svg);P||(P=Qe("defs"),nt(t._svg,P)),nt(P,ee),s[N]=ee}(D,{element:A,ref:{x:11,y:10},scale:.5,attrs:{fill:p,stroke:p}})}}(N,_,p),"url(#"+D+")"}this.drawGroup=function(N,_){_.businessObject.pickedColor||(_.businessObject.pickedColor="black");let p=Ce(N,_.width,_.height,0,it({fill:"none",stroke:_.businessObject.pickedColor},_.attrs));return f(N,_,"left-top",8),p},this.drawActor=function(N,_){let D,p={width:_.width,height:_.height},A=bT.getTypeIconSRC($.ACTOR,Al(_.type));return A=O(A,_),D=Qe(A),ve(D,p),nt(N,D),f(N,_,"center",-5),D},this.drawWorkObject=function(N,_){let D,p={width:.65*_.width,height:.65*_.height,x:_.width/2-25,y:_.height/2-25},A=bT.getTypeIconSRC($.WORKOBJECT,Al(_.type));return A=O(A,_),D=Qe(A),ve(D,p),nt(N,D),f(N,_,"center",-5),D},this.drawActivity=function(N,_){if(function te(N){let _=N.source,D=N.waypoints,A=D[0],ee=D[D.length-1];A&&ee&&_&&N.target&&(R(A,_),R(ee,_))}(_),_){let p=function L(N){return N.businessObject.pickedColor||(N.businessObject.pickedColor="black"),c("",{stroke:N.businessObject.pickedColor,fill:"none",strokeWidth:1.5,strokeLinejoin:"round",markerEnd:ze("activity","black",N.businessObject.pickedColor)})}(_),D=nt(N,Em(_.waypoints,p));return function m(N,_){let p=_.businessObject,D=_.waypoints,A=function rye(e){return e.split(/\r\n|\r|\n/).length}(p.name);if(null!=_.waypoints){let ee=function oye(e,n=1){let i,r,o,t=e.length;if(t>2){let a=new Array(t-1);for(let c=0;c49&&(t=r);return t}(e,a);return r=J8(e[s],e[s+1]),o=ez(e[s],e[s+1],n),i={x:r,y:o,selected:s},i}return r=J8(e[0],e[1]),o=ez(e[0],e[1],n),i={x:r,y:o,selected:0},i}(D,A),P=_.waypoints[ee.selected],q=_.waypoints[ee.selected+1],Re=Np(P,q),bt="left",Tt=500,En=ee.x;if((0===Re||180===Re)&&(Tt=Math.abs(P.x-q.x),bt="center",En=(P.x+q.x)/2-function Ube(e){if(!e)return 0;let n=5.1*e.length;return n/=2,n+=20,n}(p.name)),p.name&&p.name.length)w(N,p.name,{box:{textAlign:bt,width:Tt,height:30,x:En,y:ee.y},fitBox:!0,style:it({},i.getExternalStyle(),{fill:"black",wordWrap:"break-word",overflowWrap:"break-word",hyphens:"auto"})},_.type)}}(N,_),g(N,_),function Ge(N){if(N){let _=N.getElementsByTagName("polyline");_.length>1&&_[1].setAttribute("points",_[0].getAttribute("points"))}}(N.parentElement),D}},this.drawDSConnection=function(N,_){let p="";return p=c(p,{stroke:"#000000",strokeWidth:1.5,strokeLinejoin:"round",strokeDasharray:"5, 5"}),nt(N,Em(_.waypoints,p))},this.drawAnnotation=function(N,_){let D=_.businessObject.text||"";if(_.businessObject.text){let P=function Bbe(){return vT}();0===P&&_.businessObject.number&&(P=_.businessObject.number),it(_,{height:P}),it(_.businessObject,{number:P})}let A=Ce(N,_.width,_.height,0,0,{fill:"none",stroke:"none"});return function de(N,_,p){p=c(p,["no-fill"],{strokeWidth:2,stroke:"black"});let D=Qe("path");ve(D,{d:_}),ve(D,p),nt(N,D)}(N,r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:0,my:0}}),{stroke:"black"}),w(N,D,{box:_,align:"left-top",padding:5,style:{fill:"black"}}),A},this.getWorkObjectPath=function(N){return Ga(xT(N))},this.getGroupPath=function(N){return Ga(xT(N))},this.getActivityPath=function(N){let _=N.waypoints.map(function(D){return D.original||D}),p=[["M",_[0].x,_[0].y]];return _.forEach(function(D,A){0!==A&&p.push(["L",D.x,D.y])}),Ga(p)},this.getActorPath=function(N){return Ga(xT(N))}}function xT(e){let r=e.width/2+5,o=e.height/2+5;return[["M",e.x,e.y],["l",r,0],["l",r,o],["l",-r,o],["l",-r,0],["z"]]}function Jy(e,n,t,i,r){this._create=n,this._elementFactory=t,this._spaceTool=i,this._lassoTool=r,e.registerProvider(this)}function iz(e,n,t,i,r){let o=Ql.getIconForBPMN(r,e),a=[];a["domainStory-"+i+e]=n(`${r}${e}`,i,o,e),it(t,a)}tt()(Fc,ua),Fc.$inject=["eventBus","styles","canvas","textRenderer","pathMap","commandStack"],Fc.prototype.canRender=function(e){return/^domainStory:/.test(e.type)},Fc.prototype.drawShape=function(e,n){String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(i,r){return this.substring(r=!r||r<0?0:+r,r+i.length)===i}});let t=n.type;return n.businessObject.type=t,nz.correctInitialize(),yT.makeDirty(),t.includes($.ACTOR)?this.drawActor(e,n):t.includes($.WORKOBJECT)?this.drawWorkObject(e,n):t.includes($.TEXTANNOTATION)?this.drawAnnotation(e,n):t.includes($.GROUP)?this.drawGroup(e,n):void 0},Fc.prototype.getShapePath=function(e){let n=e.type;return n.includes($.ACTOR)?this.getActorPath(e):n.includes($.WORKOBJECT)?this.getWorkObjectPath(e):n.includes($.GROUP)?this.getGroupPath(e):void 0},Fc.prototype.drawConnection=function(e,n){let t=n.type;return yT.makeDirty(),n.businessObject.type||(n.businessObject.type=t),t===$.ACTIVITY?this.drawActivity(e,n):t===$.CONNECTION?this.drawDSConnection(e,n):void 0},Jy.$inject=["palette","create","elementFactory","spaceTool","lassoTool","modeling"],Jy.prototype.getPaletteEntries=function(){let n=this._create,t=this._elementFactory;return function hye(e,n,t,i){let r=Ql?.getCurrentIconConfigurationForBPMN(),o=localStorage.getItem("appendedIcons");if(o&&(o=JSON.parse(o),function fye(e){return!(1===Object.keys(e).length&&"entries"===Object.keys(e)[0])}(o)&&(o=function mye(e){let n=new ln;return Object.keys(e).forEach(t=>{n.set(t,e[t])}),n}(o)),o.entries&&o.entries.forEach)){const c=new ln;o.entries.forEach(l=>{c.putEntry(l)}),E3(c),function uye(e){const n=document.createElement("style");document.head.appendChild(n);let t=new ln;t.appendDict(e),t.keysArray().forEach(r=>{if(Ql.getAppendedIconDictionary().has(r)){let o=t.get(r);const a=".icon-domain-story-"+r.toLowerCase()+'::before{ display: block; content: url("data:image/svg+xml;utf8,'+function pye(e){return""}(o)+'"); margin: 3px;}';n.sheet.insertRule(a,n.sheet.cssRules.length)}})}(o)}return Ql?.initTypeDictionaries(r.actors,r.workObjects),Ql?.getTypeDictionary($.ACTOR)?.keysArray().forEach(c=>{iz(c,i,e,"actor",$.ACTOR)}),it(e,{"actor-separator":{group:"actor",separator:!0}}),Ql?.getTypeDictionary($.WORKOBJECT)?.keysArray().forEach(c=>{iz(c,i,e,"actor",$.WORKOBJECT)}),it(e,{"workObject-separator":{group:"workObject",separator:!0},"domainStory-group":i($.GROUP,"group","icon-domain-story-tool-group","group"),"group-separator":{group:"group",separator:!0},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:"Activate the lasso tool",action:{click:function(c){t.activateSelection(c)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:"Activate the create/remove space tool",action:{click:function(c){n.activateSelection(c)}}}}),e}({},this._spaceTool,this._lassoTool,function o(a,s,c,l,d){function u(f){let m=t.createShape(it({type:a},d));it(m.businessObject,{id:m.id}),d&&(m.businessObject.di.isExpanded=d.isExpanded),n.start(f,m)}return a.replace(/^domainStory:/,""),{group:s,className:c,title:"Create "+l||0,action:{dragstart:u,click:u}}})};const Ho=125;function Lc(e){return e&&/^domainStory:/.test(e.type)}function rz(e){return e&&/^domainStory:group/.test(e.type)}function wT(e){return e&&/^domainStory:actor\w*/.test(e.type)}function ET(e){return e&&/^domainStory:activity/.test(e.type)}function Pp(e){return e&&/^domainStory:connection/.test(e.type)}function Fp(e){return e&&/^domainStory:textAnnotation/.test(e.type)}function t0(e,n){if(!rz(n)&&Lc(e)&&Lc(n)&&e!==n&&(!wT(e)||!wT(n))&&!ET(e)&&!ET(n)&&!Pp(e)&&!Pp(n))return Fp(n)?{type:$.CONNECTION}:{type:$.ACTIVITY}}function oz(e,n){if(Kr(e,$.GROUP)){if(n){let t={x:e.x,y:e.y+e.height},i={x:e.x+e.width,y:e.y+e.height},r={x:e.x+e.width,y:e.y};n.x!==e.x&&n.y!==e.y&&(n.x>i.x-Ho&&it(n,{x:i.x-Ho}),n.y>i.y-Ho&&it(n,{y:i.y-Ho})),n.x!==e.x&&n.y===e.y&&n.x>r.x-Ho&&it(n,{x:r.x-Ho}),n.x===e.x&&n.y!==e.y&&n.y>t.y-Ho&&it(n,{y:t.y-Ho}),n.height{t.id!==n.id&&t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height&&(t.parent=n,n.children.includes(t)||n.children.push(t))})}(l,s)),s&&s.parent&&"type"in s.parent&&s.parent.type===$.GROUP&&it(c,{parent:s.parent.id})}function i(o){let s=o.context.connection,c=s.source,l=s.target,d=s.businessObject;o.newTarget&&(l=o.newTarget),o.newSource&&(c=o.newSource);let h=n._customElements;s.parent?ri(h,d):ii(h,d),it(d,{waypoints:r(s)}),c&&(d.source?d.source=c.id:it(d,{source:c.id})),l&&(d.target?d.target=l.id:it(d,{target:l.id}))}function r(o){return o.waypoints.map(function(a){return a.original?{original:{x:a.original.x,y:a.original.y},x:a.x,y:a.y}:{x:a.x,y:a.y}})}Ve.call(this,e),this.executed(["shape.create","shape.move","shape.delete","shape.resize","shape.removeGroupWithChildren"],r0(t)),this.reverted(["shape.create","shape.move","shape.delete","shape.resize","shape.removeGroupWithChildren"],r0(t)),this.executed(["connection.create","connection.reconnect","connection.updateWaypoints","connection.delete","connection.layout","connection.move"],r0(i)),this.reverted(["connection.create","connection.reconnect","connection.updateWaypoints","connection.delete","connection.layout","connection.move"],r0(i))}function r0(e){return n=>{const t=n.context;(function _ye(e){return e&&/domainStory:/.test(e.type)})(t.shape||t.connection)&&e(n)}}tt()(Bs,Qa),Bs.$inject=["eventBus"],Bs.prototype.init=function(){function e(n,t){if(Lc(n))return!Lc(t)||rz(t)}this.addRule("elements.create",function(n){const r=n.target;return function I3(e,n){return!!M3(e,function(t,i,r){return t&&n(i,r)},!0)}(n.elements,function(o){return Pp(o)?t0(o.source,o.target):o.host?az(o,o.host,null):e(o,r)})}),this.addRule("elements.move",1500,function(n){let r,t=n.target;return M3(n.shapes,function(o,a){return void 0===r&&(r=Lc(a)),r===Lc(a)&&!1!==o&&e(a,t)},void 0)}),this.addRule("shape.create",1500,function(n){return e(n.shape,n.target)}),this.addRule("connection.create",1500,function(n){return t0(n.source,n.target)}),this.addRule("connection.reconnect",1500,function(n){let i=n.hover||n.source,r=n.target;if(function vye(e,n,t){return!(ET(t)&&Fp(n)||Pp(t)&&Fp(e)&&Fp(n)||Pp(t)&&!Fp(n)&&(wT(e)||function gye(e){return e&&/^domainStory:workObject/.test(e.type)}(e)))}(i,r,n.connection))return t0(i,r)}),this.addRule("shape.resize",function(n){return oz(n.shape,n.newBounds)})},Bs.prototype.canConnect=t0,Bs.prototype.canAttach=az,Bs.prototype.isDomainStory=Lc,Bs.prototype.canResize=oz,tt()(n0,Ve),n0.$inject=["eventBus","bpmnjs"];const bye={width:0,height:0};function o0(e,n,t){t.registerHandler("element.updateCustomLabel",function i(){this.preExecute=function(r){let o=r.element,a=o.businessObject,s=r.newLabel,c=r.newNumber;if(!Mi(o)&&Ya(o)&&!zu(o)&&(""!==s||""!==c)){let l=7,d=Hu(o);d={x:d.x,y:d.y+l},e.createLabel(o,d,{id:a.id+"_label",businessObject:a})}},this.execute=function(r){return r.oldLabel=U8(r.element),r.oldNumber=function jbe(e){let n=e.businessObject,t=$8(n);if(t)return n[t]||""}(r.element),sz(r.element,r.newLabel,r.newNumber)},this.revert=function(r){return sz(r.element,r.oldLabel,r.oldNumber)},this.postExecute=function(r){let o=r.element,a=o.label||o,s=r.newLabel,c=r.newBounds;if(Mi(a)&&""===s.trim())return void e.removeShape(a);if(!Ya(o)&&!Kr(o,$.TEXTANNOTATION))return;let l=B8(a),d=l.name||l.text;d&&(typeof c>"u"&&(c=n.getLayoutedBounds(a,d)),c&&e.resizeShape(a,c,bye))}})}function sz(e,n,t){let i=e.label||e,r=e.number||e,o=e.labelTarget||e,a=e.numberTarget||e;return function zbe(e,n){let t;t=e.businessObject?e.businessObject:e;let i=H8(t);i&&(t[i]=n)}(i,n),function Hbe(e,n){let t=e.businessObject,i=$8(t);i&&(t[i]=n)}(r,t),[i,o,r,a]}function CT(e,n){e.registerHandler("story.updateHeadlineAndDescription",function t(){this.execute=function(i){i.oldTitle=n.getTitle(),i.oldDescription=n.getDescription(),n.updateTitleAndDescription(i.newTitle,i.newDescription,!1)},this.revert=function(i){n.updateTitleAndDescription(i.oldTitle,i.oldDescription,!1)}})}let a0,Lp,Bp;function s0(e,n,t,i,r,o,a,s,c,l,d,u){let h,f;e.invoke(sp,this),e.get("autoPlace",!1);let g=function Kae(e,n){return e.bind(n)}(this.getContextPadEntries,this);const v=document.getElementById("colorPicker");function E(de){it(de,{colorChange:{group:"edit",className:"icon-domain-story-color-picker",title:t("Change color"),action:{click:function(Ce,ze){f=ze,v.click()}}}})}function x(de){it(de,{"append.text-annotation":Ge($.TEXTANNOTATION,"bpmn-icon-text-annotation","textannotation","connect")})}function k(de,Ce){it(de,{connect:{group:"connect",className:"bpmn-icon-connection",title:t("Connect with activity"),action:{click:Ce,dragstart:Ce}}})}function O(de,Ce){Lp.getTypeDictionary($.WORKOBJECT).keysArray().forEach(Kt=>{let me=Kt,N=Lp.getIconForBPMN($.WORKOBJECT,Kt),_=[];_["append.workObject"+me]=de(`${$.WORKOBJECT}${Kt}`,N,me,"workObjects"),it(Ce,_)})}function we(de){let ze=o.getContainer(),Kt=a.getPad(de).html,me=ze.getBoundingClientRect(),N=Kt.getBoundingClientRect();return{x:N.left-me.left,y:N.top-me.top+N.height+5}}function Ge(de,Ce,ze,Kt,me){return"string"!=typeof ze&&(me=ze,ze=t("{type}",{type:de.replace(/^domainStory:/,"")})),{group:Kt,className:Ce,title:"Append "+ze,action:{dragstart:h,click:function N(_,p){let D=i.createShape(it({type:de},me));r.start(_,D,{elements:[D],hints:{},source:p})}}}}v.onchange=de=>{l.execute("element.colorChange",{businessObject:f.businessObject,newColor:de.target.value,element:f}),a0.makeDirty()},s.registerProvider("ds-replace",c),s.registerProvider("bpmn-replace",c),this.getContextPadEntries=function(de){const Ce=function Oae(){const e=new ln;return e.addEach(q_),e.keysArray()}();let ze=g(de);return h=function(Kt,me,N){n.start(Kt,me,N)},de.type.includes($.WORKOBJECT)?(Ce.includes(de.type.replace($.WORKOBJECT,""))&&E(ze),k(ze,h),x(ze),function L(de,Ce){Lp.getTypeDictionary($.ACTOR).keysArray().forEach(Kt=>{let me=Kt,N=Lp.getIconForBPMN($.ACTOR,Kt),_=[];_["append.actor"+me]=de(`${$.ACTOR}${Kt}`,N,me,"actors"),it(Ce,_)})}(Ge,ze),O(Ge,ze),function R(de){it(de,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:t("Change type"),action:{click:function(Ce,ze){let Kt=it(we(ze),{cursor:{x:Ce.x,y:Ce.y}});s.open(ze,"ds-replace",Kt)}}}})}(ze)):de.type.includes($.ACTOR)?(Ce.includes(de.type.replace($.ACTOR,""))&&E(ze),k(ze,h),x(ze),O(Ge,ze),function w(de){it(de,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:t("Change type"),action:{click:function(Ce,ze){let Kt=it(we(ze),{cursor:{x:Ce.x,y:Ce.y}});s.open(ze,"ds-replace",Kt)}}}})}(ze)):de.type.includes($.GROUP)?(delete ze.delete,x(ze),it(ze,{deleteGroup:{group:"edit",className:"bpmn-icon-trash",title:"Remove Group without Child-Elements",action:{click:function(Kt,me){u.removeGroup(me),a0.makeDirty()}}}}),E(ze)):de.type.includes($.ACTIVITY)&&(function C(de){delete de.delete,it(de,{changeDirection:{group:"edit",className:"icon-domain-story-changeDirection",title:t("Change direction"),action:{click:function(Ce,ze){!function te(de){let Ce,Kt,ze=de.businessObject;Kt=de.source.type.includes($.ACTOR)?0:X8(de,l),Ce={businessObject:ze,newNumber:Kt,element:de},l.execute("activity.directionChange",Ce)}(ze)}}}})}(ze),E(ze),it(ze,{delete:{group:"edit",className:"bpmn-icon-trash",title:"Remove",action:{click:function(Kt,me){u.removeElements({element:me}),a0.makeDirty()}}}})),ze}}function cz(e){this._modeling=e}function ah(e){this._dsReplace=new cz(e),this._modeling=e}o0.$inject=["modeling","textRenderer","commandStack"],tt()(s0,sp),s0.$inject=["injector","connect","translate","elementFactory","create","canvas","contextPad","popupMenu","replaceMenuProvider","commandStack","eventBus","modeling"],cz.prototype.replaceElement=function xye(e,n,t){let i=function wye(e,n,t){return e.x=Math.ceil(n.x+(e.width||n.width)/2),e.y=Math.ceil(n.y+(e.height||n.height)/2),it(e,{name:n.businessObject.name}),t.replaceShape(n,e,{})}(n,e,t),o=i.incoming;return i.outgoing.forEach(a=>{a.businessObject.source=i.id}),o.forEach(a=>{a.businessObject.target=i.id}),i},ah.$inject=["modeling"],ah.prototype.getEntries=function(e){let n;return e.type.includes("actor")?n=function Cye(e){const n=Bp.getTypeDictionary($.ACTOR);let t={},i=0;return n.keysArray().forEach(r=>{e.includes(r)||(t[i]={label:"Change to "+r,actionName:"replace-with-actor-"+r.toLowerCase(),className:Bp.getIconForBPMN($.ACTOR,r),target:{type:`${$.ACTOR}${r}`}},i++)}),t}(e.type):e.type.includes("workObject")&&(n=function Sye(e){const n=Bp.getTypeDictionary($.WORKOBJECT);let t={},i=0;return n.keysArray().forEach(r=>{e.includes(r)||(t[i]={label:"Change to "+r,actionName:"replace-with-actor-"+r,className:Bp.getIconForBPMN($.WORKOBJECT,r),target:{type:`${$.WORKOBJECT}${r}`}}),i++}),t}(e.type)),this._createEntries(e,n)},ah.prototype._createEntries=function(e,n){let t=[],i=this;return Tr(n,function(r){let o=i._createMenuEntry(r,e);t.push(o)}),t},ah.prototype._createMenuEntry=function(e,n,t){let i=this._dsReplace.replaceElement,r=this._modeling;return{label:e.label,className:e.className,id:e.actionName,action:t=t||function(){return i(n,e.target,r)}}};var Dye=K(525);function Vp(e,n,t,i){si.call(this,e,n,t,i)}si.prototype.updateLabel=function(e,n,t){(e.businessObject?n!==e.businessObject.name:n!==e.name)&&(/^domainStory:/.test(e.type)?this._commandStack.execute("element.updateCustomLabel",{element:e,newLabel:n,newBounds:t}):this._commandStack.execute("element.updateLabel",{element:e,newLabel:n,newBounds:t}))},si.prototype.updateNumber=function(e,n,t){(e.businessObject?n!==e.businessObject.number:n!==e.number)&&(/^domainStory:/.test(e.type)?this._commandStack.execute("element.updateCustomLabel",{element:e,newNumber:n,newBounds:t}):this._commandStack.execute("element.updateLabel",{element:e,newNumber:n,newBounds:t}))},si.prototype.replaceShape=function(e,n,t){let i={oldShape:e,newData:n,hints:t||{}};return this._commandStack.execute("shape.replace",i),i.newShape},si.prototype.removeGroup=function(e){this._commandStack.execute("shape.removeGroupWithoutChildren",{element:e}),this.removeElements({element:e})},(0,Dye.inherits)(Vp,si),Vp.$inject=["eventBus","elementFactory","commandStack","domainStoryRules"];const kye={__depends__:[Zu,BD,HD],__init__:["domainStoryRenderer","paletteProvider","domainStoryRules","domainStoryUpdater","contextPadProvider","replaceMenuProvider"],elementFactory:["type",Op],domainStoryRenderer:["type",Fc],paletteProvider:["type",Jy],domainStoryRules:["type",Bs],domainStoryUpdater:["type",n0],contextPadProvider:["type",s0],elementFactoryBpmn:["type",zo],pathMap:["type",iD],replaceMenuProvider:["type",ah],commandStack:["type",Rn],updateLabelHandler:["type",o0],headlineAndDescriptionUpdateHandler:["type",CT],modeling:["type",Vp]},Tye={__depends__:[GD,dy,LD],__init__:["dSlabelEditingProvider","dSlabelEditingPreview"],dSlabelEditingProvider:["type",Rp],dSlabelEditingPreview:["type",z8],updateLabelHandler:["type",o0],commandStack:["type",Rn],modeling:["type ",Vp]},Aye={__depends__:[Zu,BD,HD],__init__:["domainStoryRenderer","paletteProvider","domainStoryRules","domainStoryUpdater","contextPadProvider","replaceMenuProvider"],elementFactory:["type",Op],domainStoryRenderer:["type",Fc],paletteProvider:["type",Jy],domainStoryRules:["type",Bs],domainStoryUpdater:["type",n0],contextPadProvider:["type",s0],elementFactoryBpmn:["type",zo],pathMap:["type",iD],replaceMenuProvider:["type",ah],commandStack:["type",Rn],updateLabelHandler:["type",o0],headlineAndDescriptionUpdateHandler:["type",CT],modeling:["type",Vp]};function ns(e){_a.call(this,e),this._customElements=[],this._groupElements=[]}function ST(e){return e&&e.type===$.GROUP}tt()(ns,_a),ns.prototype._modules=[].concat(ns.prototype._modules,[kye,Tye,Aye],[dy]),ns.prototype._addCustomShape=function(e){let n=e.parent;delete e.children,delete e.parent,this._customElements.push(e);let t=this.get("canvas"),i=this.get("elementFactory"),r=it({businessObject:e},e),o=i.create("shape",r);if(ST(e)&&(this._groupElements[e.id]=o),n){let a=this._groupElements[n];if(ST(a))return t.addShape(o,a,a.id)}return t.addShape(o)},ns.prototype._addCustomConnection=function(e){this._customElements.push(e);let n=this.get("canvas"),t=this.get("elementFactory"),i=this.get("elementRegistry"),r=it({businessObject:e},e),o=t.create("connection",it(r,{source:i.get(e.source),target:i.get(e.target)}),i.get(e.source).parent);return n.addConnection(o)},ns.prototype.importCustomElements=function(e){this.get("eventBus").fire("diagram.clear",{}),this._customElements=[],this._groupElements=[],this.addCustomElements(e)},ns.prototype.addCustomElements=function(e){if(!X_(e))throw new Error("argument must be an array");let n=[],t=[],i=[];e.forEach(function(r){!function Mye(e){return e.type===$.ACTIVITY||e.type===$.CONNECTION}(r)?ST(r)?i.push(r):n.push(r):t.push(r)}),i.forEach(this._addCustomShape,this),n.forEach(this._addCustomShape,this),t.forEach(this._addCustomConnection,this)},ns.prototype.getCustomElements=function(){return this._customElements},ns.prototype.createDiagram=function(e){};class lz{constructor(n,t,i,r){this.activity=n,this.numberIsAllowedMultipleTimes=t,this.showNumberFields=i,this.saveFN=r}}const Iye=["mat-button",""],Oye=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],Rye=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],Pye=["mat-icon-button",""],Fye=["*"],Lye=new ye("MAT_BUTTON_CONFIG"),Bye=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}];let dz=(()=>{class e{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(t){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,t)}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=t,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._updateRippleDisabled()}constructor(t,i,r,o){this._elementRef=t,this._platform=i,this._ngZone=r,this._animationMode=o,this._focusMonitor=Ye(Qf),this._rippleLoader=Ye(_ie),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;const a=Ye(Lye,{optional:!0}),s=t.nativeElement,c=s.classList;this.disabledInteractive=a?.disabledInteractive??!1,this._rippleLoader?.configureRipple(s,{className:"mat-mdc-button-ripple"});for(const{attribute:l,mdcClasses:d}of Bye)s.hasAttribute(l)&&c.add(...d)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(t="program",i){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,i):this._elementRef.nativeElement.focus(i)}_getAriaDisabled(){return null!=this.ariaDisabled?this.ariaDisabled:!(!this.disabled||!this.disabledInteractive)||null}_getDisabledAttribute(){return!(this.disabledInteractive||!this.disabled)||null}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}static#e=this.\u0275fac=function(i){!function wM(){throw new Error("invalid")}()};static#t=this.\u0275dir=Me({type:e,inputs:{color:"color",disableRipple:[Ze.HasDecoratorInputTransform,"disableRipple","disableRipple",Fn],disabled:[Ze.HasDecoratorInputTransform,"disabled","disabled",Fn],ariaDisabled:[Ze.HasDecoratorInputTransform,"aria-disabled","ariaDisabled",Fn],disabledInteractive:[Ze.HasDecoratorInputTransform,"disabledInteractive","disabledInteractive",Fn]},features:[So]})}return e})(),Vs=(()=>{class e extends dz{constructor(t,i,r,o){super(t,i,r,o)}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(ni),T(at),T(er,8))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(i,r){2&i&&(fn("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),gf(r.color?"mat-"+r.color:""),wt("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[kt,Kn],attrs:Iye,ngContentSelectors:Rye,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(i,r){1&i&&(Ci(Oye),ct(0,"span",0),St(1),B(2,"span",1),St(3,1),W(),St(4,2),ct(5,"span",2)(6,"span",3)),2&i&&wt("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px);display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{font-family:var(--mdc-text-button-label-text-font);font-size:var(--mdc-text-button-label-text-size);letter-spacing:var(--mdc-text-button-label-text-tracking);font-weight:var(--mdc-text-button-label-text-weight);text-transform:var(--mdc-text-button-label-text-transform);height:var(--mdc-text-button-container-height);border-radius:var(--mdc-text-button-container-shape);padding:0 var(--mat-text-button-horizontal-padding, 8px)}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color)}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity)}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity)}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity)}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{font-family:var(--mdc-filled-button-label-text-font);font-size:var(--mdc-filled-button-label-text-size);letter-spacing:var(--mdc-filled-button-label-text-tracking);font-weight:var(--mdc-filled-button-label-text-weight);text-transform:var(--mdc-filled-button-label-text-transform);height:var(--mdc-filled-button-container-height);border-radius:var(--mdc-filled-button-container-shape);padding:0 var(--mat-filled-button-horizontal-padding, 16px)}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color)}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color)}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity)}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity)}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity)}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{font-family:var(--mdc-protected-button-label-text-font);font-size:var(--mdc-protected-button-label-text-size);letter-spacing:var(--mdc-protected-button-label-text-tracking);font-weight:var(--mdc-protected-button-label-text-weight);text-transform:var(--mdc-protected-button-label-text-transform);height:var(--mdc-protected-button-container-height);border-radius:var(--mdc-protected-button-container-shape);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow)}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color)}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color)}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity)}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity)}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity)}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow)}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow)}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow)}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow)}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{font-family:var(--mdc-outlined-button-label-text-font);font-size:var(--mdc-outlined-button-label-text-size);letter-spacing:var(--mdc-outlined-button-label-text-tracking);font-weight:var(--mdc-outlined-button-label-text-weight);text-transform:var(--mdc-outlined-button-label-text-transform);height:var(--mdc-outlined-button-container-height);border-radius:var(--mdc-outlined-button-container-shape);padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width);padding:0 var(--mat-outlined-button-horizontal-padding, 15px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color)}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape)}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color)}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width))}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color)}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity)}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity)}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity)}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button-base{text-decoration:none}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}return e})(),jye=(()=>{class e extends dz{constructor(t,i,r,o){super(t,i,r,o),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(ni),T(at),T(er,8))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(i,r){2&i&&(fn("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),gf(r.color?"mat-"+r.color:""),wt("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[kt,Kn],attrs:Pye,ngContentSelectors:Fye,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(i,r){1&i&&(Ci(),ct(0,"span",0),St(1),ct(2,"span",1)(3,"span",2))},styles:['.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{color:var(--mdc-icon-button-icon-color)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size);height:var(--mdc-icon-button-icon-size)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button{border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 48px);height:var(--mdc-icon-button-state-layer-size, 48px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 48px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size);-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color)}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color)}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color)}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity)}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity)}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity)}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}return e})(),DT=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An,oC,An]})}return e})();class uz extends xt{constructor(n=1/0,t=1/0,i=XE){super(),this._bufferSize=n,this._windowTime=t,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,n),this._windowTime=Math.max(1,t)}next(n){const{isStopped:t,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:a}=this;t||(i.push(n),!r&&i.push(o.now()+a)),this._trimBuffer(),super.next(n)}_subscribe(n){this._throwIfClosed(),this._trimBuffer();const t=this._innerSubscribe(n),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let a=0;a{i.unsubscribe(),e()}});return oo(n(...t)).subscribe(i)}class $ye{constructor(n){this._box=n,this._destroyed=new xt,this._resizeSubject=new xt,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(n){return this._elementObservables.has(n)||this._elementObservables.set(n,new kn(t=>{const i=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(n,{box:this._box}),()=>{this._resizeObserver?.unobserve(n),i.unsubscribe(),this._elementObservables.delete(n)}}).pipe(so(t=>t.some(i=>i.target===n)),function Hye(e,n,t){let i,r=!1;return e&&"object"==typeof e?({bufferSize:i=1/0,windowTime:n=1/0,refCount:r=!1,scheduler:t}=e):i=e??1/0,function zye(e={}){const{connector:n=(()=>new xt),resetOnError:t=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=e;return o=>{let a,s,c,l=0,d=!1,u=!1;const h=()=>{s?.unsubscribe(),s=void 0},f=()=>{h(),a=c=void 0,d=u=!1},m=()=>{const g=a;f(),g?.unsubscribe()};return vr((g,v)=>{l++,!u&&!d&&h();const C=c=c??n();v.add(()=>{l--,0===l&&!u&&!d&&(s=kT(m,r))}),C.subscribe(v),!a&&l>0&&(a=new xa({next:w=>C.next(w),error:w=>{u=!0,h(),s=kT(f,t,w),C.error(w)},complete:()=>{d=!0,h(),s=kT(f,i),C.complete()}}),oo(g).subscribe(a))})(o)}}({connector:()=>new uz(i,n,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}({bufferSize:1,refCount:!0}),aa(this._destroyed))),this._elementObservables.get(n)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}}let Uye=(()=>{class e{constructor(){this._observers=new Map,this._ngZone=Ye(at)}ngOnDestroy(){for(const[,t]of this._observers)t.destroy();this._observers.clear()}observe(t,i){const r=i?.box||"content-box";return this._observers.has(r)||this._observers.set(r,new $ye(r)),this._observers.get(r).observe(t)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Gye=["notch"],Wye=["matFormFieldNotchedOutline",""],qye=["*"],Yye=["textField"],Kye=["iconPrefixContainer"],Xye=["textPrefixContainer"],Zye=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Qye=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function Jye(e,n){1&e&&ct(0,"span",17)}function e0e(e,n){if(1&e&&(B(0,"label",16),St(1,1),ut(2,Jye,1,0,"span",17),W()),2&e){const t=st(2);$e("floating",t._shouldLabelFloat())("monitorResize",t._hasOutline())("id",t._labelId),fn("for",t._control.id),be(2),di(2,!t.hideRequiredMarker&&t._control.required?2:-1)}}function t0e(e,n){1&e&&ut(0,e0e,3,5,"label",16),2&e&&di(0,st()._hasFloatingLabel()?0:-1)}function n0e(e,n){1&e&&ct(0,"div",5)}function i0e(e,n){}function r0e(e,n){1&e&&ut(0,i0e,0,0,"ng-template",11),2&e&&(st(2),$e("ngTemplateOutlet",Er(1)))}function o0e(e,n){if(1&e&&(B(0,"div",7),ut(1,r0e,1,1,null,11),W()),2&e){const t=st();$e("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat()),be(),di(1,t._forceDisplayInfixLabel()?-1:1)}}function a0e(e,n){1&e&&(B(0,"div",8,2),St(2,2),W())}function s0e(e,n){1&e&&(B(0,"div",9,3),St(2,3),W())}function c0e(e,n){}function l0e(e,n){1&e&&ut(0,c0e,0,0,"ng-template",11),2&e&&(st(),$e("ngTemplateOutlet",Er(1)))}function d0e(e,n){1&e&&(B(0,"div",12),St(1,4),W())}function u0e(e,n){1&e&&(B(0,"div",13),St(1,5),W())}function h0e(e,n){1&e&&ct(0,"div",14)}function f0e(e,n){1&e&&(B(0,"div",18),St(1,6),W()),2&e&&$e("@transitionMessages",st()._subscriptAnimationState)}function m0e(e,n){if(1&e&&(B(0,"mat-hint",20),Oe(1),W()),2&e){const t=st(2);$e("id",t._hintLabelId),be(),ko(t.hintLabel)}}function p0e(e,n){if(1&e&&(B(0,"div",19),ut(1,m0e,2,2,"mat-hint",20),St(2,7),ct(3,"div",21),St(4,8),W()),2&e){const t=st();$e("@transitionMessages",t._subscriptAnimationState),be(),di(1,t.hintLabel?1:-1)}}let sh=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["mat-label"]],standalone:!0})}return e})();const g0e=new ye("MatError");let v0e=0,hz=(()=>{class e{constructor(){this.align="start",this.id="mat-mdc-hint-"+v0e++}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(i,r){2&i&&(sl("id",r.id),fn("align",null),wt("mat-mdc-form-field-hint-end","end"===r.align))},inputs:{align:"align",id:"id"},standalone:!0})}return e})();const _0e=new ye("MatPrefix"),b0e=new ye("MatSuffix"),fz=new ye("FloatingLabelParent");let mz=(()=>{class e{get floating(){return this._floating}set floating(t){this._floating=t,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(t){this._monitorResize=t,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(t){this._elementRef=t,this._floating=!1,this._monitorResize=!1,this._resizeObserver=Ye(Uye),this._ngZone=Ye(at),this._parent=Ye(fz),this._resizeSubscription=new ot}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return function y0e(e){if(null!==e.offsetParent)return e.scrollWidth;const t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);const i=t.scrollWidth;return t.remove(),i}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt))};static#t=this.\u0275dir=Me({type:e,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(i,r){2&i&&wt("mdc-floating-label--float-above",r.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0})}return e})();const pz="mdc-line-ripple--active",c0="mdc-line-ripple--deactivating";let gz=(()=>{class e{constructor(t,i){this._elementRef=t,this._handleTransitionEnd=r=>{const o=this._elementRef.nativeElement.classList,a=o.contains(c0);"opacity"===r.propertyName&&a&&o.remove(pz,c0)},i.runOutsideAngular(()=>{t.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const t=this._elementRef.nativeElement.classList;t.remove(c0),t.add(pz)}deactivate(){this._elementRef.nativeElement.classList.add(c0)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(at))};static#t=this.\u0275dir=Me({type:e,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0})}return e})(),vz=(()=>{class e{constructor(t,i){this._elementRef=t,this._ngZone=i,this.open=!1}ngAfterViewInit(){const t=this._elementRef.nativeElement.querySelector(".mdc-floating-label");t?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(t){this._notch.nativeElement.style.width=this.open&&t?`calc(${t}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:""}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(at))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(i,r){if(1&i&&ji(Gye,5),2&i){let o;Wt(o=qt())&&(r._notch=o.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(i,r){2&i&&wt("mdc-notched-outline--notched",r.open)},inputs:{open:[Ze.None,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[Kn],attrs:Wye,ngContentSelectors:qye,decls:5,vars:0,consts:[["notch",""],[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(i,r){1&i&&(Ci(),ct(0,"div",1),B(1,"div",2,0),St(3),W(),ct(4,"div",3))},encapsulation:2,changeDetection:0})}return e})();const x0e={transitionMessages:rm("transitionMessages",[xs("enter",kr({opacity:1,transform:"translateY(0%)"})),xl("void => enter",[kr({opacity:0,transform:"translateY(-5px)"}),yl("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let _z=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e})}return e})();const bz=new ye("MatFormField"),w0e=new ye("MAT_FORM_FIELD_DEFAULT_OPTIONS");let yz=0,l0=(()=>{class e{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=co(t)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(t){const i=this._appearance;this._appearance=t||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==i&&(this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(t){this._subscriptSizing=t||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(t){this._explicitFormFieldControl=t}constructor(t,i,r,o,a,s,c,l){this._elementRef=t,this._changeDetectorRef=i,this._ngZone=r,this._dir=o,this._platform=a,this._defaults=s,this._animationMode=c,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+yz++,this._hintLabelId="mat-mdc-hint-"+yz++,this._subscriptAnimationState="",this._destroyed=new xt,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,s&&(s.appearance&&(this.appearance=s.appearance),this._hideRequiredMarker=!!s?.hideRequiredMarker,s.color&&(this.color=s.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${t.controlType}`),t.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(aa(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(t=>!t._isText),this._hasTextPrefix=!!this._prefixChildren.find(t=>t._isText),this._hasIconSuffix=!!this._suffixChildren.find(t=>!t._isText),this._hasTextSuffix=!!this._suffixChildren.find(t=>t._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),fm(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(aa(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(aa(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(t){const i=this._control?this._control.ngControl:null;return i&&i[t]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){this._hasOutline()&&this._floatingLabel&&this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth()):this._notchedOutline?._setNotchWidth(0)}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const i=this._hintChildren?this._hintChildren.find(o=>"start"===o.align):null,r=this._hintChildren?this._hintChildren.find(o=>"end"===o.align):null;i?t.push(i.id):this._hintLabel&&t.push(this._hintLabelId),r&&t.push(r.id)}else this._errorChildren&&t.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(t)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;const t=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(t.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);const i=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,o=i?.getBoundingClientRect().width??0,a=r?.getBoundingClientRect().width??0;t.style.transform=`var(\n --mat-mdc-form-field-label-transform,\n translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${o+a}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`}_isAttachedToDom(){const t=this._elementRef.nativeElement;if(t.getRootNode){const i=t.getRootNode();return i&&i!==t}return document.documentElement.contains(t)}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(io),T(at),T(Jf),T(ni),T(w0e,8),T(er,8),T(cn))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-form-field"]],contentQueries:function(i,r,o){if(1&i&&(_i(o,sh,5),_i(o,sh,7),_i(o,_z,5),_i(o,_0e,5),_i(o,b0e,5),_i(o,g0e,5),_i(o,hz,5)),2&i){let a;Wt(a=qt())&&(r._labelChildNonStatic=a.first),Wt(a=qt())&&(r._labelChildStatic=a.first),Wt(a=qt())&&(r._formFieldControl=a.first),Wt(a=qt())&&(r._prefixChildren=a),Wt(a=qt())&&(r._suffixChildren=a),Wt(a=qt())&&(r._errorChildren=a),Wt(a=qt())&&(r._hintChildren=a)}},viewQuery:function(i,r){if(1&i&&(ji(Yye,5),ji(Kye,5),ji(Xye,5),ji(mz,5),ji(vz,5),ji(gz,5)),2&i){let o;Wt(o=qt())&&(r._textField=o.first),Wt(o=qt())&&(r._iconPrefixContainer=o.first),Wt(o=qt())&&(r._textPrefixContainer=o.first),Wt(o=qt())&&(r._floatingLabel=o.first),Wt(o=qt())&&(r._notchedOutline=o.first),Wt(o=qt())&&(r._lineRipple=o.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(i,r){2&i&&wt("mat-mdc-form-field-label-always-float",r._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",r._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",r._hasIconSuffix)("mat-form-field-invalid",r._control.errorState)("mat-form-field-disabled",r._control.disabled)("mat-form-field-autofilled",r._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===r._animationMode)("mat-form-field-appearance-fill","fill"==r.appearance)("mat-form-field-appearance-outline","outline"==r.appearance)("mat-form-field-hide-placeholder",r._hasFloatingLabel()&&!r._shouldLabelFloat())("mat-focused",r._control.focused)("mat-primary","accent"!==r.color&&"warn"!==r.color)("mat-accent","accent"===r.color)("mat-warn","warn"===r.color)("ng-untouched",r._shouldForward("untouched"))("ng-touched",r._shouldForward("touched"))("ng-pristine",r._shouldForward("pristine"))("ng-dirty",r._shouldForward("dirty"))("ng-valid",r._shouldForward("valid"))("ng-invalid",r._shouldForward("invalid"))("ng-pending",r._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[en([{provide:bz,useExisting:e},{provide:fz,useExisting:e}]),Kn],ngContentSelectors:Qye,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(i,r){if(1&i){const o=vi();Ci(Zye),ut(0,t0e,1,1,"ng-template",null,0,iu),B(2,"div",4,1),Pe("click",function(s){return jt(o),zt(r._control.onContainerClick(s))}),ut(4,n0e,1,0,"div",5),B(5,"div",6),ut(6,o0e,2,2,"div",7)(7,a0e,3,0,"div",8)(8,s0e,3,0,"div",9),B(9,"div",10),ut(10,l0e,1,1,null,11),St(11),W(),ut(12,d0e,2,0,"div",12)(13,u0e,2,0,"div",13),W(),ut(14,h0e,1,0,"div",14),W(),B(15,"div",15),ut(16,f0e,2,1)(17,p0e,5,2),W()}if(2&i){let o;be(2),wt("mdc-text-field--filled",!r._hasOutline())("mdc-text-field--outlined",r._hasOutline())("mdc-text-field--no-label",!r._hasFloatingLabel())("mdc-text-field--disabled",r._control.disabled)("mdc-text-field--invalid",r._control.errorState),be(2),di(4,r._hasOutline()||r._control.disabled?-1:4),be(2),di(6,r._hasOutline()?6:-1),be(),di(7,r._hasIconPrefix?7:-1),be(),di(8,r._hasTextPrefix?8:-1),be(2),di(10,!r._hasOutline()||r._forceDisplayInfixLabel()?10:-1),be(2),di(12,r._hasTextSuffix?12:-1),be(),di(13,r._hasIconSuffix?13:-1),be(),di(14,r._hasOutline()?-1:14),be(),wt("mat-mdc-form-field-subscript-dynamic-size","dynamic"===r.subscriptSizing),be(),di(16,"error"===(o=r._getDisplayedMessages())?16:"hint"===o?17:-1)}},dependencies:[mz,vz,rE,gz,hz],styles:['.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px,var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 64px/0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 64px/0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 96px/0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;pointer-events:none}.mdc-notched-outline__trailing{flex-grow:1}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-top:1px solid;border-bottom:1px solid}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{max-width:calc(100% - 12px*2)}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-text-field--filled{border-top-left-radius:var(--mdc-filled-text-field-container-shape);border-top-right-radius:var(--mdc-filled-text-field-container-shape);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-caret-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-hover-label-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-disabled-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-focus-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-hover-label-text-color)}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font);font-size:var(--mdc-filled-text-field-label-text-size);font-weight:var(--mdc-filled-text-field-label-text-weight);letter-spacing:var(--mdc-filled-text-field-label-text-tracking)}@media all{.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}}@media all{.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color)}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color)}.mdc-text-field--filled .mdc-line-ripple::before{border-bottom-width:var(--mdc-filled-text-field-active-indicator-height)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-caret-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-hover-label-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-disabled-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-focus-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-hover-label-text-color)}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font);font-size:var(--mdc-outlined-text-field-label-text-size);font-weight:var(--mdc-outlined-text-field-label-text-weight);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking)}@media all{.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}}@media all{.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}}.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(.75*var(--mdc-outlined-text-field-label-text-size))}.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mdc-outlined-text-field-label-text-size)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-outlined-text-field-container-shape))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-focus-outline-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-disabled-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-hover-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-focus-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__trailing{border-width:var(--mdc-outlined-text-field-outline-width)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:var(--mdc-outlined-text-field-focus-outline-width)}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height);padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color)}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color)}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity)}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color)}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color)}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font);line-height:var(--mat-form-field-container-text-line-height);font-size:var(--mat-form-field-container-text-size);letter-spacing:var(--mat-form-field-container-text-tracking);font-weight:var(--mat-form-field-container-text-weight)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color)}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color)}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color)}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color)}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color)}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[x0e.transitionMessages]},changeDetection:0})}return e})(),d0=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An,hl,eC,An]})}return e})();const Ez=Wf({passive:!0});let S0e=(()=>{class e{constructor(t,i){this._platform=t,this._ngZone=i,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return Xf;const i=bs(t),r=this._monitoredElements.get(i);if(r)return r.subject;const o=new xt,a="cdk-text-field-autofilled",s=c=>{"cdk-text-field-autofill-start"!==c.animationName||i.classList.contains(a)?"cdk-text-field-autofill-end"===c.animationName&&i.classList.contains(a)&&(i.classList.remove(a),this._ngZone.run(()=>o.next({target:c.target,isAutofilled:!1}))):(i.classList.add(a),this._ngZone.run(()=>o.next({target:c.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",s,Ez),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:o,unlisten:()=>{i.removeEventListener("animationstart",s,Ez)}}),o}stopMonitoring(t){const i=bs(t),r=this._monitoredElements.get(i);r&&(r.unlisten(),r.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((t,i)=>this.stopMonitoring(i))}static#e=this.\u0275fac=function(i){return new(i||e)(F(ni),F(at))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),D0e=(()=>{class e{get minRows(){return this._minRows}set minRows(t){this._minRows=_s(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=_s(t),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(t){this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}get placeholder(){return this._textareaElement.placeholder}set placeholder(t){this._cachedPlaceholderHeight=void 0,t?this._textareaElement.setAttribute("placeholder",t):this._textareaElement.removeAttribute("placeholder"),this._cacheTextareaPlaceholderHeight()}constructor(t,i,r,o){this._elementRef=t,this._platform=i,this._ngZone=r,this._destroyed=new xt,this._enabled=!0,this._previousMinRows=-1,this._isViewInited=!1,this._handleFocusEvent=a=>{this._hasFocus="focus"===a.type},this._document=o,this._textareaElement=this._elementRef.nativeElement}_setMinHeight(){const t=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.minHeight=t)}_setMaxHeight(){const t=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.maxHeight=t)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{R_(this._getWindow(),"resize").pipe(NC(16),aa(this._destroyed)).subscribe(()=>this.resizeToFitContent(!0)),this._textareaElement.addEventListener("focus",this._handleFocusEvent),this._textareaElement.addEventListener("blur",this._handleFocusEvent)}),this._isViewInited=!0,this.resizeToFitContent(!0))}ngOnDestroy(){this._textareaElement.removeEventListener("focus",this._handleFocusEvent),this._textareaElement.removeEventListener("blur",this._handleFocusEvent),this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;let t=this._textareaElement.cloneNode(!1);t.rows=1,t.style.position="absolute",t.style.visibility="hidden",t.style.border="none",t.style.padding="0",t.style.height="",t.style.minHeight="",t.style.maxHeight="",t.style.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,t.remove(),this._setMinHeight(),this._setMaxHeight()}_measureScrollHeight(){const t=this._textareaElement,i=t.style.marginBottom||"",r=this._platform.FIREFOX,o=r&&this._hasFocus,a=r?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";o&&(t.style.marginBottom=`${t.clientHeight}px`),t.classList.add(a);const s=t.scrollHeight-4;return t.classList.remove(a),o&&(t.style.marginBottom=i),s}_cacheTextareaPlaceholderHeight(){if(!this._isViewInited||null!=this._cachedPlaceholderHeight)return;if(!this.placeholder)return void(this._cachedPlaceholderHeight=0);const t=this._textareaElement.value;this._textareaElement.value=this._textareaElement.placeholder,this._cachedPlaceholderHeight=this._measureScrollHeight(),this._textareaElement.value=t}ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(t=!1){if(!this._enabled||(this._cacheTextareaLineHeight(),this._cacheTextareaPlaceholderHeight(),!this._cachedLineHeight))return;const i=this._elementRef.nativeElement,r=i.value;if(!t&&this._minRows===this._previousMinRows&&r===this._previousValue)return;const o=this._measureScrollHeight(),a=Math.max(o,this._cachedPlaceholderHeight||0);i.style.height=`${a}px`,this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame<"u"?requestAnimationFrame(()=>this._scrollToCaretPosition(i)):setTimeout(()=>this._scrollToCaretPosition(i))}),this._previousValue=r,this._previousMinRows=this._minRows}reset(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollToCaretPosition(t){const{selectionStart:i,selectionEnd:r}=t;!this._destroyed.isStopped&&this._hasFocus&&t.setSelectionRange(i,r)}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(ni),T(at),T(cn,8))};static#t=this.\u0275dir=Me({type:e,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(i,r){1&i&&Pe("input",function(){return r._noopInputHandler()})},inputs:{minRows:[Ze.None,"cdkAutosizeMinRows","minRows"],maxRows:[Ze.None,"cdkAutosizeMaxRows","maxRows"],enabled:[Ze.HasDecoratorInputTransform,"cdkTextareaAutosize","enabled",Fn],placeholder:"placeholder"},exportAs:["cdkTextareaAutosize"],standalone:!0,features:[So]})}return e})(),k0e=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({})}return e})();const T0e=new ye("MAT_INPUT_VALUE_ACCESSOR"),A0e=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let Sz,M0e=0,jp=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=co(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(ite.required)??!1}set required(t){this._required=co(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&bL().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=co(t)}get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}constructor(t,i,r,o,a,s,c,l,d,u){this._elementRef=t,this._platform=i,this.ngControl=r,this._autofillMonitor=l,this._formField=u,this._uid="mat-input-"+M0e++,this.focused=!1,this.stateChanges=new xt,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(m=>bL().has(m)),this._iOSKeyupListener=m=>{const g=m.target;!g.value&&0===g.selectionStart&&0===g.selectionEnd&&(g.setSelectionRange(1,1),g.setSelectionRange(0,0))};const h=this._elementRef.nativeElement,f=h.nodeName.toLowerCase();this._inputValueAccessor=c||h,this._previousNativeValue=this.value,this.id=this.id,i.IOS&&d.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._errorStateTracker=new YL(s,r,a,o,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===f,this._isTextarea="textarea"===f,this._isInFormField=!!u,this._isNativeSelect&&(this.controlType=h.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(t){t!==this.focused&&(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_dirtyCheckPlaceholder(){const t=this._getPlaceholder();if(t!==this._previousPlaceholder){const i=this._elementRef.nativeElement;this._previousPlaceholder=t,t?i.setAttribute("placeholder",t):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){A0e.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const t=this._elementRef.nativeElement,i=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&i&&i.label)}return this.focused||!this.empty}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){const t=this._elementRef.nativeElement;return this._isNativeSelect&&(t.multiple||t.size>1)}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(ni),T(vs,10),T($f,8),T(hu,8),T(uie),T(T0e,10),T(S0e),T(at),T(bz,8))};static#t=this.\u0275dir=Me({type:e,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(i,r){1&i&&Pe("focus",function(){return r._focusChanged(!0)})("blur",function(){return r._focusChanged(!1)})("input",function(){return r._onInput()}),2&i&&(sl("id",r.id)("disabled",r.disabled)("required",r.required),fn("name",r.name||null)("readonly",r.readonly&&!r._isNativeSelect||null)("aria-invalid",r.empty&&r.required?null:r.errorState)("aria-required",r.required)("id",r.id),wt("mat-input-server",r._isServer)("mat-mdc-form-field-textarea-control",r._isInFormField&&r._isTextarea)("mat-mdc-form-field-input-control",r._isInFormField)("mdc-text-field__input",r._isInFormField)("mat-mdc-native-select-inline",r._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[Ze.None,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],standalone:!0,features:[en([{provide:_z,useExisting:e}]),br]})}return e})(),Cz=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An,d0,d0,k0e,An]})}return e})(),I0e=(()=>{class e{constructor(t,i,r){this.fb=t,this.dialogRef=i,this.activity=r.activity,this.activityLabel=r.activity.businessObject.name,this.numberIsAllowedMultipleTimes=r.numberIsAllowedMultipleTimes,this.activityNumber=r.activity.businessObject.number,this.showNumberFields=r.showNumberFields,this.saveFN=r.saveFN,this.form=this.fb.group({activityLabel:[this.activityLabel,[]],activityNumber:[this.activityNumber,[]],multipleNumbers:[this.numberIsAllowedMultipleTimes,[]]})}onSubmit(){this.numberIsAllowedMultipleTimes=!this.numberIsAllowedMultipleTimes,this.form.patchValue({multipleNumbers:this.numberIsAllowedMultipleTimes})}save(){this.saveFN({activity:this.activity,...this.form.value}),this.dialogRef.close()}close(){this.dialogRef.close()}preventDefault(t){t.preventDefault()}static#e=this.\u0275fac=function(i){return new(i||e)(T(GE),T(mc),T(H_))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-activity-dialog"]],decls:20,vars:2,consts:[[3,"formGroup"],[3,"hidden"],[1,"shortWidth"],["matInput","","type","number","formControlName","activityNumber"],["type","checkbox","formControlName","multipleNumbers",3,"change"],[1,"fullWidth"],["matInput","","type","text","formControlName","activityLabel","autofocus","","cdkFocusInitial","",3,"keydown.enter","keyup.enter","keyup.escape"],["mat-flat-button","",3,"click"],["mat-flat-button","","color","primary",3,"click"]],template:function(i,r){1&i&&(B(0,"mat-dialog-content")(1,"h2"),Oe(2,"Edit Activity"),W(),B(3,"form",0)(4,"div",1)(5,"mat-form-field",2)(6,"mat-label"),Oe(7,"Number"),W(),ct(8,"input",3),W(),B(9,"input",4),Pe("change",function(){return r.onSubmit()}),W(),Oe(10," multiple "),W(),B(11,"mat-form-field",5)(12,"mat-label"),Oe(13,"Label"),W(),B(14,"textarea",6),Pe("keydown.enter",function(a){return r.preventDefault(a)})("keyup.enter",function(){return r.save()})("keyup.escape",function(){return r.close()}),W()()()(),B(15,"mat-dialog-actions")(16,"button",7),Pe("click",function(){return r.close()}),Oe(17,"Cancel"),W(),B(18,"button",8),Pe("click",function(){return r.save()}),Oe(19,"Save"),W()()),2&i&&(be(3),$e("formGroup",r.form),be(),$e("hidden",!r.showNumberFields))},dependencies:[d_,Ff,FE,EE,kE,t_,hu,u_,Vs,_u,Dl,l0,sh,jp],styles:[".shortWidth[_ngcontent-%COMP%]{width:200px}.fullWidth[_ngcontent-%COMP%]{width:100%} .mat-form-field-label{font-size:12pt!important}"]})}return e})();let Dz=(()=>{class e{constructor(t,i){this.elementRegistryService=t,this.commandStackService=i}massChangeNames(t,i,r){const o=[];this.elementRegistryService.getAllCanvasObjects().forEach(s=>{s.type.includes(r)&&s.businessObject.name===t&&o.push(s)}),this.commandStackService.execute("domainStoryObjects.massRename",{elements:o,newValue:i})}static#e=this.\u0275fac=function(i){return new(i||e)(F(la),F(UC))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),TT=(()=>{class e{constructor(t,i,r){this.massNamingService=t,this.elementRegistryService=i,this.iconDictionaryService=r,this.activityLabels=[],this.workObjektLabels=[]}createLabelDictionaries(){this.activityLabels=[],this.workObjektLabels=[],this.elementRegistryService.getAllCanvasObjects().forEach(i=>{const r=i.businessObject.name;if(r&&r.length>0&&i.type.includes($.ACTIVITY)&&!this.activityLabels.map(o=>o.name).includes(r))this.activityLabels.push({name:r,originalName:r});else if(r&&r.length>0&&i.type.includes($.WORKOBJECT)&&!this.workObjektLabels.map(o=>o.name).includes(r)){const o=i.type.replace($.WORKOBJECT,"");let a=this.iconDictionaryService.getIconSource(o);if(!a)return;a.startsWith("data")||(a="data:image/svg+xml,"+a),this.workObjektLabels.push({name:r,originalName:r,icon:a})}}),this.activityLabels.sort((i,r)=>i.name.toLowerCase().localeCompare(r.name.toLowerCase())),this.workObjektLabels.sort((i,r)=>i.name.toLowerCase().localeCompare(r.name.toLowerCase()))}getActivityLabels(){return this.activityLabels.slice()}getWorkObjectLabels(){return this.workObjektLabels.slice()}getUniqueWorkObjectNames(){const t=this.elementRegistryService.getAllWorkobjects();return[...new Set(t.filter(i=>!!i.businessObject.name).map(i=>i.businessObject.name))]}massRenameLabels(t,i,r,o){for(let a=0;a{class e{constructor(){this.replayOnSubject=new on(!1),this.replayOn$=this.replayOnSubject.asObservable()}setReplayState(t){this.replayOnSubject.next(t)}getReplayOn(){return this.replayOnSubject.value}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var L0e=K(659),B0e=K.n(L0e);let W0e=(()=>{class e{constructor(t){this.elementRegistryService=t}showAll(){this.removeHighlights(),this.elementRegistryService.getAllCanvasObjects().slice().concat(this.elementRegistryService.getAllGroups().slice()).map(t=>t.businessObject).forEach(t=>{document.querySelector("[data-element-id="+t.id+"]").style.display="block"})}showSentence(t,i){this.removeHighlights(),this.getAllNotShown(t.objects).forEach(o=>{const a=document.querySelector("[data-element-id="+o.id+"]");a&&(a.style.display="none")}),this.highlightSentence(i?t.objects.filter(o=>!i.objects.includes(o)):t.objects),t.objects.forEach(o=>{const a=document.querySelector("[data-element-id="+o.id+"]");a&&(a.style.display="block")})}getNumberDomForActivity(t){const i=t.parentElement?.getElementsByClassName("djs-labelNumber")||["",""];return{numberBackgroundDom:i[0],numberTextDom:i[1]}}removeHighlights(){const t=this.elementRegistryService.getAllActivities(),i=this.elementRegistryService.getAllConnections();t.forEach(r=>{const o=document.querySelector("[data-element-id="+r.id+"]");if(o){const a=o.getElementsByTagName("polyline")[0];a.style.stroke=r.businessObject.pickedColor||"black",a.style.strokeWidth="1.5";const{numberBackgroundDom:s,numberTextDom:c}=this.getNumberDomForActivity(a);s&&c&&(s.style.fill="white",c.style.fill="black")}}),i.forEach(r=>{const o=document.querySelector("[data-element-id="+r.id+"]").getElementsByTagName("polyline")[0];o.style.stroke=r.businessObject.pickedColor||"black",o.style.strokeWidth="1.5"})}highlightSentence(t){t.filter(i=>i.type===$.ACTIVITY).forEach(i=>{const r=document.querySelector("[data-element-id="+i.id+"]");if(r){const o=r.getElementsByTagName("polyline")[0];o.style.stroke="black",o.style.strokeWidth="4";const{numberBackgroundDom:a,numberTextDom:s}=this.getNumberDomForActivity(o);s&&a&&(a.style.fill="#43acbf",s.style.fill="black")}})}getAllNotShown(t){const i=[];return this.elementRegistryService.getAllCanvasObjects().concat(this.elementRegistryService.getAllGroups()).forEach(o=>{t.includes(o.businessObject)||(o.type.includes($.CONNECTION)&&o.source.type.includes($.GROUP)?t.push(o.target):i.push(o.businessObject))}),i}static#e=this.\u0275fac=function(i){return new(i||e)(F(la))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),q0e=(()=>{class e{constructor(t){this.elementRegistryService=t}traceActivitiesAndCreateStory(){const t=new ln,i=[];this.elementRegistryService.getActivitiesFromActors().forEach(o=>{const a=Number(o.businessObject.number),s=t.get(""+(a-1))?t.get(""+(a-1)):[];s.push(o),t.set(""+(a-1),s)});for(let o=0;o<=Math.max(...t.keysArray().map(a=>Number(a)));o++)this.createSentence(t,o,i);return this.addGroupsToLastSentence(i),i}createSentence(t,i,r){const o=this.getSentenceObjects(t.get(`${i}`)||[]),a=o.map(s=>s.id);i>0&&r[i-1].objects.forEach(s=>{o.includes(s)||o.push(s)}),r[i]={highlightedObjects:a,objects:o}}getMissingSentences(t){if(!t||0===t.length)return[];const i=[];for(let r=0;ro.type===$.ACTIVITY).length<=0)&&i.push(r+1);return i}getSentenceObjects(t){const i=[],r=t,o=[];return t.forEach(a=>{i.push(a.source),o.push(a.target);for(const c of o)c.businessObject&&!c.businessObject.type.includes("actor")&&c.outgoing&&c.outgoing.forEach(l=>{r.push(l);const d=l.target;d&&!o.includes(d)&&o.push(d)})}),i.map(a=>a.businessObject).concat(r.map(a=>a.businessObject)).concat(o.map(a=>a.businessObject))}addGroupsToLastSentence(t){const i=this.elementRegistryService.getAllGroups();i.length>0&&(t[t.length-1].objects=t[t.length-1].objects.concat(i.map(r=>r.businessObject)))}static#e=this.\u0275fac=function(i){return new(i||e)(F(la))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Y0e(e,n){if(1&e){const t=vi();B(0,"div",1)(1,"button",2),Pe("click",function(){return jt(t),zt(st().action())}),Oe(2),W()()}if(2&e){const t=st();be(2),fs(" ",t.data.action," ")}}const K0e=["label"];function X0e(e,n){}const Z0e=Math.pow(2,31)-1;class AT{constructor(n,t){this._overlayRef=t,this._afterDismissed=new xt,this._afterOpened=new xt,this._onAction=new xt,this._dismissedByAction=!1,this.containerInstance=n,n._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(n){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(n,Z0e))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}const kz=new ye("MatSnackBarData");class u0{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let Tz=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"],standalone:!0})}return e})(),Az=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"],standalone:!0})}return e})(),Mz=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"],standalone:!0})}return e})(),Iz=(()=>{class e{constructor(t,i){this.snackBarRef=t,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static#e=this.\u0275fac=function(i){return new(i||e)(T(AT),T(kz))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],standalone:!0,features:[Kn],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(i,r){1&i&&(B(0,"div",0),Oe(1),W(),ut(2,Y0e,3,1,"div",1)),2&i&&(be(),fs(" ",r.data.message,"\n"),be(),di(2,r.hasAction?2:-1))},dependencies:[Vs,Tz,Az,Mz],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0})}return e})();const Q0e={snackBarState:rm("state",[xs("void, hidden",kr({transform:"scale(0.8)",opacity:0})),xs("visible",kr({transform:"scale(1)",opacity:1})),xl("* => visible",yl("150ms cubic-bezier(0, 0, 0.2, 1)")),xl("* => void, * => hidden",yl("75ms cubic-bezier(0.4, 0.0, 1, 1)",kr({opacity:0})))])};let J0e=0,Oz=(()=>{class e extends L_{constructor(t,i,r,o,a){super(),this._ngZone=t,this._elementRef=i,this._changeDetectorRef=r,this._platform=o,this.snackBarConfig=a,this._document=Ye(cn),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new xt,this._onExit=new xt,this._onEnter=new xt,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+J0e++,this.attachDomPortal=s=>{this._assertNotAttached();const c=this._portalOutlet.attachDomPortal(s);return this._afterPortalAttached(),c},this._live="assertive"!==a.politeness||a.announcementMessage?"off"===a.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(t){this._assertNotAttached();const i=this._portalOutlet.attachComponentPortal(t);return this._afterPortalAttached(),i}attachTemplatePortal(t){this._assertNotAttached();const i=this._portalOutlet.attachTemplatePortal(t);return this._afterPortalAttached(),i}onAnimationEnd(t){const{fromState:i,toState:r}=t;if(("void"===r&&"void"!==i||"hidden"===r)&&this._completeExit(),"visible"===r){const o=this._onEnter;this._ngZone.run(()=>{o.next(),o.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){const t=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(a=>t.classList.add(a)):t.classList.add(i)),this._exposeToModals();const r=this._label.nativeElement,o="mdc-snackbar__label";r.classList.toggle(o,!r.querySelector(`.${o}`))}_exposeToModals(){const t=this._liveElementId,i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{const i=t.getAttribute("aria-owns");if(i){const r=i.replace(this._liveElementId,"").trim();r.length>0?t.setAttribute("aria-owns",r):t.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const t=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&i){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(r=document.activeElement),t.removeAttribute("aria-hidden"),i.appendChild(t),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static#e=this.\u0275fac=function(i){return new(i||e)(T(at),T(Lt),T(io),T(ni),T(u0))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-snack-bar-container"]],viewQuery:function(i,r){if(1&i&&(ji(gu,7),ji(K0e,7)),2&i){let o;Wt(o=qt())&&(r._portalOutlet=o.first),Wt(o=qt())&&(r._label=o.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(i,r){1&i&&v1("@state.done",function(a){return r.onAnimationEnd(a)}),2&i&&m1("@state",r._animationState)},standalone:!0,features:[kt,Kn],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(i,r){1&i&&(B(0,"div",1)(1,"div",2,0)(3,"div",3),ut(4,X0e,0,0,"ng-template",4),W(),ct(5,"div"),W()()),2&i&&(be(5),fn("aria-live",r._live)("role",r._role)("id",r._liveElementId))},dependencies:[gu],styles:['.mdc-snackbar{display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-snackbar__surface::before{border-color:CanvasText}}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1)}.mdc-snackbar__label{padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-snack-bar-container{margin:8px;position:static}.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:344px}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:100%}}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container{width:100vw}}.mat-mdc-snack-bar-container .mdc-snackbar__surface{max-width:672px}.mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{background-color:var(--mdc-snackbar-container-color)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{border-radius:var(--mdc-snackbar-container-shape)}.mat-mdc-snack-bar-container .mdc-snackbar__label{color:var(--mdc-snackbar-supporting-text-color)}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-size:var(--mdc-snackbar-supporting-text-size);font-family:var(--mdc-snackbar-supporting-text-font);font-weight:var(--mdc-snackbar-supporting-text-weight);line-height:var(--mdc-snackbar-supporting-text-line-height)}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-snack-bar-button-color);--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}.mat-mdc-snack-bar-container .mdc-snackbar__label::before{display:none}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-handset .mdc-snackbar__surface{width:100%}'],encapsulation:2,data:{animation:[Q0e.snackBarState]}})}return e})();const txe=new ye("mat-snack-bar-default-options",{providedIn:"root",factory:function exe(){return new u0}});let Bc=(()=>{class e{get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}constructor(t,i,r,o,a,s){this._overlay=t,this._live=i,this._injector=r,this._breakpointObserver=o,this._parentSnackBar=a,this._defaultConfig=s,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=Iz,this.snackBarContainerComponent=Oz,this.handsetCssClass="mat-mdc-snack-bar-handset"}openFromComponent(t,i){return this._attach(t,i)}openFromTemplate(t,i){return this._attach(t,i)}open(t,i="",r){const o={...this._defaultConfig,...r};return o.data={message:t,action:i},o.announcementMessage===t&&(o.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,o)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,i){const o=li.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:u0,useValue:i}]}),a=new hm(this.snackBarContainerComponent,i.viewContainerRef,o),s=t.attach(a);return s.instance.snackBarConfig=i,s.instance}_attach(t,i){const r={...new u0,...this._defaultConfig,...i},o=this._createOverlay(r),a=this._attachSnackBarContainer(o,r),s=new AT(a,o);if(t instanceof Eo){const c=new F_(t,null,{$implicit:r.data,snackBarRef:s});s.instance=a.attachTemplatePortal(c)}else{const c=this._createInjector(r,s),l=new hm(t,void 0,c),d=a.attachComponentPortal(l);s.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(aa(o.detachments())).subscribe(c=>{o.overlayElement.classList.toggle(this.handsetCssClass,c.matches)}),r.announcementMessage&&a._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(s,r),this._openedSnackBarRef=s,this._openedSnackBarRef}_animateSnackBar(t,i){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),i.duration&&i.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(i.duration))}_createOverlay(t){const i=new LC;i.direction=t.direction;let r=this._overlay.position().global();const o="rtl"===t.direction,a="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!o||"end"===t.horizontalPosition&&o,s=!a&&"center"!==t.horizontalPosition;return a?r.left("0"):s?r.right("0"):r.centerHorizontally(),"top"===t.verticalPosition?r.top("0"):r.bottom("0"),i.positionStrategy=r,this._overlay.create(i)}_createInjector(t,i){return li.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:AT,useValue:i},{provide:kz,useValue:t.data}]})}static#e=this.\u0275fac=function(i){return new(i||e)(F($a),F(Kne),F(li),F(IL),F(e,12),F(txe))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Rz=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({providers:[Bc],imports:[BC,vu,DT,An,Iz,An]})}return e})(),Hp=(()=>{class e{constructor(t,i,r,o){this.replayStateService=t,this.domManipulationService=i,this.storyCreatorService=r,this.snackbar=o,this.story=[],this.currentSentence=new on(-1),this.maxSentenceNumber=new on(0),this.currentSentence$=this.currentSentence.asObservable(),this.maxSentenceNumber$=this.maxSentenceNumber.asObservable()}isReplayable(){return this.storyCreatorService.traceActivitiesAndCreateStory().length>0}initializeReplay(){this.currentSentence.next(1),this.story=this.storyCreatorService.traceActivitiesAndCreateStory(),this.maxSentenceNumber.next(this.story.length)}getCurrentSentenceNumber(){return this.currentSentence.value}getMaxSentenceNumber(){return this.maxSentenceNumber.value}nextSentence(){this.currentSentence.value1&&(this.currentSentence.next(this.currentSentence.value-1),this.showCurrentSentence())}showCurrentSentence(){this.domManipulationService.showSentence(this.story[this.currentSentence.value-1],this.currentSentence.value>1?this.story[this.currentSentence.value-2]:void 0)}startReplay(){if(this.initializeReplay(),this.story?.length){const t=this.storyCreatorService.getMissingSentences(this.story);if(0===t.length)this.replayStateService.setReplayState(!0),this.domManipulationService.showSentence(this.story[this.currentSentence.getValue()-1]);else{const i=t.join(", ");this.snackbar.open(1===t.length?`The Domain Story is not complete. Sentence ${i} is missing.`:`The Domain Story is not complete. Sentences ${i} are missing.`,void 0,{duration:4e3,panelClass:pc})}}else this.snackbar.open("You need a Domain Story for replay.",void 0,{duration:4e3,panelClass:pc})}stopReplay(){this.currentSentence.next(-1),this.maxSentenceNumber.next(0),this.replayStateService.setReplayState(!1),this.domManipulationService.showAll()}static#e=this.\u0275fac=function(i){return new(i||e)(F(zp),F(W0e),F(q0e),F(Bc))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Nz=(()=>{class e{constructor(t,i){this.replayService=t,this.titleService=i}setModelerClasses(t,i,r){this.modeler=r}static viewBoxCoordinates(t){return t.match(/width="([^"]+)"\s+height="([^"]+)"\s+viewBox="([^"]+)"/)[3]}downloadHTMLPresentation(t){var i=this;return he(function*(){const r=[];i.replayService.startReplay();try{const l=yield i.modeler.saveSVG({});i.fixActivityMarkersForEachSentence(l,i.replayService.getCurrentSentenceNumber()),r.push({content:e.createSVGData(l.svg),transition:"slide"})}catch(l){alert("There was an error exporting the SVG.\n"+l)}for(;i.replayService.getCurrentSentenceNumber()"),t.svg.indexOf("")+7),o=r.split("{const d=l.substring(4,l.length-1),u=d.slice(0,l.length-5)+"customId"+i+d.slice(d.length-2);t.svg=t.svg.replaceAll(d,u)}),a+='{class e{constructor(t,i,r,o,a,s,c,l,d,u){this.dirtyFlagService=t,this.iconDictionaryService=i,this.elementRegistryService=r,this.configurationService=o,this.labelDictionaryService=a,this.replayStateService=s,this.dialogService=c,this.commandStackService=l,this.titleService=d,this.htmlPresentationService=u}initializeDomainStoryModelerClasses(){(function yye(e,n){a0=e,Lp=n})(this.dirtyFlagService,this.iconDictionaryService),function dye(e,n){Ql=e,lye=n}(this.iconDictionaryService,this.configurationService),function cye(e,n,t){bT=e,nz=n,yT=t}(this.iconDictionaryService,this.elementRegistryService,this.dirtyFlagService),function Wbe(e){G8=e}(this.labelDictionaryService),function Eye(e){Bp=e}(this.iconDictionaryService),function Xbe(e){_T=e}(this.elementRegistryService),function R0e(e){Sz=e}(this.elementRegistryService)}propagateDomainStoryModelerClassesToServices(t,i,r,o,a){this.commandStackService.setCommandStack(t),this.elementRegistryService.setElementRegistry(i),this.htmlPresentationService.setModelerClasses(r,o,a)}initializeDomainStoryModelerEventHandlers(t,i){(function N0e(e,n){e.registerHandler("activity.directionChange",function i(r){this.preExecute=function(o){o.oldNumber=o.businessObject.number,o.oldWaypoints=o.element.waypoints,o.name=o.businessObject.name,o.oldNumber||(o.oldNumber=0),r.updateNumber(o.businessObject,o.newNumber)},this.execute=function(o){let a=o.businessObject,s=o.element,c=s.source,l=[],d=s.waypoints;for(let u=d.length-1;u>=0;u--)l.push(d[u]);s.source=s.target,a.source=a.target,s.target=c,a.target=c.id,a.name=o.name,a.number=o.newNumber,s.waypoints=l,n.fire("element.changed",{element:s})},this.revert=function(o){let a=o.businessObject,s=o.element,c=s.source;s.source=s.target,a.source=a.target,s.target=c,a.target=c.id,a.name=o.name,a.number=o.oldNumber,s.waypoints=o.oldWaypoints,n.fire("element.changed",{element:s})}}),e.registerHandler("activity.changed",function t(r){this.preExecute=function(o){o.oldLabel=o.businessObject.name||" ";let a=function Jbe(){let e=[],n=_T.getActivitiesFromActors();for(let t=n.length-1;t>=0;t--)e.push({id:n[t].businessObject.id,number:n[t].businessObject.number});return e}();r.updateLabel(o.businessObject,o.newLabel),r.updateNumber(o.businessObject,o.newNumber),o.oldNumber=o.businessObject.number,o.oldNumbersWithIDs=a},this.execute=function(o){let a=o.businessObject,s=o.element;o.newLabel&&o.newLabel.length<1&&(o.newLabel=" "),a.name=o.newLabel,a.number=o.newNumber,n.fire("element.changed",{element:s})},this.revert=function(o){let a=o.businessObject,s=o.element;a.name=o.oldLabel,a.number=o.oldNumber,function P0e(e,n){let t=Sz?.getActivitesFromActors();for(let i=t.length-1;i>=0;i--)for(let r=e.length-1;r>=0;r--)if(e[r].id.includes(t[i].businessObject.id)){let o=t[i];o.businessObject.number=e[r].number,r=-5,n.fire("element.changed",{element:o}),e.splice(r,1)}}(o.oldNumbersWithIDs,n),n.fire("element.changed",{element:s})}})})(t,i),function O0e(e,n){e.registerHandler("domainStoryObjects.massRename",function t(i){this.preExecute=function(r){let o=r.elements;r.oldLabel=o[0].businessObject.name,o.forEach(a=>{i.updateLabel(a.businessObject,confirm.newValue)})},this.execute=function(r){r.elements.forEach(a=>{a.businessObject.name=r.newValue,n.fire("element.changed",{element:a})})},this.revert=function(r){r.elements.forEach(a=>{a.businessObject.name=r.oldLabel,n.fire("element.changed",{element:a})})}})}(t,i),function F0e(e,n){e.registerHandler("element.colorChange",function t(){this.preExecute=function(r){r.oldColor=r.businessObject.pickedColor},this.execute=function(r){let a=r.element;r.businessObject.pickedColor=r.newColor,n.fire("element.changed",{element:a})},this.revert=function(r){let a=r.element;r.businessObject.pickedColor=r.oldColor,n.fire("element.changed",{element:a})}}),e.registerHandler("shape.removeGroupWithoutChildren",function i(){this.preExecute=function(r){r.parent=r.element.parent,r.children=r.element.children.slice()},this.execute=function(r){let o=r.element;r.children.forEach(a=>{(function Lbe(e,n){const t=e.parent;e.children.remove(n),t.children.add(n),n.parent=t;const i=document.querySelector("[data-element-id="+n.id+"]").parentElement,r=i.parentElement,o=r.parentElement.parentElement;r.removeChild(i),o.appendChild(i)})(o,a),n.fire("element.changed",{element:a})}),n.fire("shape.remove",{element:o})},this.revert=function(r){let o=r.element;n.fire("shape.added",{element:o}),r.element.children.forEach(a=>{reworkGroupElements(o,a)})}})}(t,i),CT(t,this.titleService)}initiateEventBusListeners(t,i){t.on("element.dblclick",r=>{if(!this.replayStateService.getReplayOn()){const o=r.element;if(o.type===$.ACTIVITY)this.activityDoubleClick(o,t,i);else{const a=function nye(){return Y8.slice(0)}();if(a.length>1){const s=this.elementRegistryService.getActivitiesFromActors();if(s.length>0){const c=document.getElementById("canvas");if(c){let w,f=c.getElementsByClassName("djs-container")[0].getElementsByTagName("svg")[0].getElementsByClassName("viewport")[0].getAttribute("transform"),m=0,g=0,v=1,C=1;const E=r.originalEvent.offsetX,x=r.originalEvent.offsetY;f&&(f=f.replace("matrix(",""),f.replace(")",""),w=f.split(","),v=parseFloat(w[0]),C=parseFloat(w[3]),m=parseInt(w[4],void 0),g=parseInt(w[5],void 0));const k=25*v,O=22*C;for(let L=1;L{Kt.businessObject.number===de&&Kbe(k,O,Ce,ze,E,x)&&this.activityDoubleClick(Kt,t,i)})}}}}}}}}),t.on(["element.click","element.dblclick","element.mousedown","drag.init","canvas.viewbox.changing","autoPlace","popupMenu.open"],1e10,r=>{this.replayStateService.getReplayOn()&&(r.stopPropagation(),r.preventDefault())})}activityDoubleClick(t,i,r){const o=t.source;!function Ybe(e){Zy=e}(!1);const a=new ca;a.disableClose=!1,a.autoFocus=!0,t.businessObject.number&&o&&o.type.includes($.ACTOR)?a.data=new lz(t,Q8()[t.businessObject.number],!0,s=>this.saveActivityInputLabel(s,i,r)):o&&o.type.includes($.WORKOBJECT)&&(a.data=new lz(t,!1,!1,s=>this.saveActivityInputLabel(s,i,r))),this.dialogService.openDialog(I0e,a)}saveActivityInputLabel(t,i,r){const o=t.activityLabel,a=t.activityNumber??!1,s=t.activityNumber,c=t.multipleNumbers??!1,l=t.activity,d=this.elementRegistryService.getActivitiesFromActors(),u=d.indexOf(l);let h;d.splice(u,1),a&&function tye(e,n){K8[e]=n}(s,c),l.businessObject.multipleNumberAllowed=c,h=a?{businessObject:l.businessObject,newLabel:o,newNumber:s,element:l}:{businessObject:l.businessObject,newLabel:o,element:l},r.execute("activity.changed",h),!1!==l.businessObject.multipleNumberAllowed?!1===Q8()[s]&&Z8(d,s,i):!1===l.businessObject.multipleNumberAllowed&&Z8(d,s,i)}static#e=this.\u0275fac=function(i){return new(i||e)(F(K_),F(Es),F(la),F(Ml),F(TT),F(zp),F(mm),F(UC),F(fo),F(Nz))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function $p(e){const n=new ln,t=new ln;return Object.keys(e.actors).forEach(i=>{n.add(e.actors[i],i)}),Object.keys(e.workObjects).forEach(i=>{t.add(e.workObjects[i],i)}),{name:e.name,actors:n,workObjects:t}}structuredClone({$descriptor:void 0,$type:void 0,di:void 0,get:void 0,set:void 0,id:"test",name:"test",type:$.WORKOBJECT,x:0,y:0,height:38,width:38,pickedColor:void 0}).type=$.ACTOR;let h0=(()=>{class e{set(t,i){localStorage.setItem(t,JSON.stringify(i))}get(t){const i=localStorage.getItem(t);return i?JSON.parse(i):null}removeItem(t){localStorage.removeItem(t)}checkValidityOfConfiguration(t){return t.actors.keysArray().length>1&&t.workObjects.keysArray().length>1&&!t.actors.all().some(i=>"string"!=typeof i.value)&&!t.workObjects.all().some(i=>"string"!=typeof i.value)}getStoredIconSetConfiguration(){const t=localStorage.getItem(b3);if(t){const i=$p(JSON.parse(t));if(this.checkValidityOfConfiguration(i))return i}}setStoredIconSetConfiguration(t){const i={};t.actors.keysArray().forEach(a=>{i[a]=t.actors.get(a)});const r={};t.workObjects.keysArray().forEach(a=>{r[a]=t.workObjects.get(a)}),localStorage.setItem(b3,JSON.stringify({name:t.name,actors:i,workObjects:r},null,2))}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ch=(()=>{class e{constructor(t,i,r,o,a){this.initializerService=t,this.elementRegistryService=i,this.iconDictionaryService=r,this.iconSetConfigurationService=o,this.storageService=a}postInit(){const t=this.storageService.getStoredIconSetConfiguration();t&&(this.iconDictionaryService.setCustomConfiguration(t),this.iconSetConfigurationService.loadConfiguration(t)),this.initializerService.initializeDomainStoryModelerClasses(),this.modeler=new ns({container:"#canvas",keyboard:{bindTo:document},additionalModules:[{bpmnSearch:["value","foo"]}]}),this.modeler.get&&(this.canvas=this.modeler.get("canvas"),this.elementRegistry=this.modeler.get("elementRegistry"),this.eventBus=this.modeler.get("eventBus"),this.commandStack=this.modeler.get("commandStack"),this.selection=this.modeler.get("selection")),this.initializerService.initializeDomainStoryModelerEventHandlers(this.commandStack,this.eventBus),this.initializerService.propagateDomainStoryModelerClassesToServices(this.commandStack,this.elementRegistry,this.canvas,this.selection,this.modeler);const i=this.debounce(this.saveSVG,500);this.modeler.get&&this.modeler.on("commandStack.changed",i),this.initializerService.initiateEventBusListeners(this.eventBus,this.commandStack),this.modeler.createDiagram(),it(window,{bpmnjs:this.modeler}),this.startDebounce()}restart(t,i){const r=i??this.elementRegistryService.createObjectListForDSTDownload().map(o=>o.businessObject);t||(t=this.storageService.getStoredIconSetConfiguration()),t&&(this.storageService.setStoredIconSetConfiguration(t),this.iconDictionaryService.setCustomConfiguration(t),this.iconSetConfigurationService.loadConfiguration(t)),this.elementRegistryService.clear(),this.modeler?.destroy(),this.postInit(),r&&this.modeler.get&&this.modeler.importCustomElements(r)}getModeler(){return this.modeler}commandStackChanged(){this.eventBus.fire("commandStack.changed",this.debounce(this.saveSVG,500))}startDebounce(){this.debounce(this.saveSVG,500)}debounce(t,i){return()=>{let r;r&&clearTimeout(r),r=setTimeout(()=>{t(this.modeler).then(o=>{this.encoded=o})},i)}}getEncoded(){return this.encoded?this.encoded:""}saveSVG(t){return he(function*(){try{return(yield t.saveSVG()).svg}catch(i){alert("There was an error saving the SVG.\n"+i)}})()}static#e=this.\u0275fac=function(i){return new(i||e)(F(nxe),F(la),F(Es),F(Ml),F(h0))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),oxe=(()=>{class e{constructor(t){this.modelerService=t,this.cacheData=""}createSVGData(t,i,r,o,a){this.cacheData=this.modelerService.getEncoded();let h,f,m,g,s=structuredClone(this.cacheData),c=s.indexOf('width="'),{width:l,height:d,viewBox:u}=this.viewBoxCoordinates(s);const v=u.split(/\s/);h=+v[0],m=+v[1],f=+v[2],g=+v[3],f<300&&(f+=300,l+=300);const{insertText:C}=D3(t,i,h,m,l),w=this.createBounds(l,d,h,m,f,g,o),E=s.substring(0,c);c=s.indexOf('" version');const x=s.substring(c);x.substring(c),s=E+w+x;const k=this.findIndexToInsertData(s);if(o&&(s=s.slice(0,k)+C+s.slice(k)),a){const O=s.indexOf('width="');s=s.slice(0,O)+'style="background-color:white" '+s.slice(O)}return this.appendDST(s,r)}findIndexToInsertData(t){let i=t.indexOf("");return i<0?i=t.indexOf('version="1.2">')+14:i+=7,i}createBounds(t,i,r,o,a,s,c){return'width="'+t+'" height=" '+i+'" viewBox="'+r+" "+(c?o-80:o)+" "+a+" "+(s+30)}viewBoxCoordinates(t){const r=t.match(/width="([^"]+)"\s+height="([^"]+)"\s+viewBox="([^"]+)"/);return r?{width:+r[1],height:+r[2],viewBox:r[3]}:{width:0,height:0,viewBox:""}}appendDST(t,i){return t+"\n\x3c!-- \n"+JSON.stringify(i,null,2)+"\n --\x3e"}static#e=this.\u0275fac=function(i){return new(i||e)(F(ch))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),f0=(()=>{class e{constructor(t,i,r){this.modelerService=t,this.elementRegistryService=i,this.dirtyFlagService=r}renderStory(t){this.modelerService.getModeler().importCustomElements(t)}reset(){this.renderStory([])}importStory(t,i,r,o=!0){this.modelerService.restart(r,t),this.renderStory(t),this.elementRegistryService.correctInitialize(),this.modelerService.commandStackChanged(),this.modelerService.startDebounce(),o&&this.dirtyFlagService.makeClean()}getStory(){return this.elementRegistryService.createObjectListForDSTDownload().map(t=>t.businessObject)}static#e=this.\u0275fac=function(i){return new(i||e)(F(ch),F(la),F(K_))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),m0=(()=>{class e{constructor(t,i,r,o,a,s,c){this.configurationService=t,this.titleService=i,this.dirtyFlagService=r,this.pngService=o,this.svgService=a,this.htmlPresentationService=s,this.rendererService=c,this.title="",this.description="",this.titleSubscription=this.titleService.title$.subscribe(l=>{this.title=l}),this.descriptionSubscription=this.titleService.description$.subscribe(l=>{this.description=l})}ngOnDestroy(){this.titleSubscription.unsubscribe(),this.descriptionSubscription.unsubscribe()}isDomainStoryExportable(){return this.rendererService.getStory().length>=1}createConfigAndDST(t){return new Iae(this.configurationService.getCurrentConfigurationForExport(),t)}downloadDST(){const t=this.getStoryForDownload(),i=this.createConfigAndDST(t),r=JSON.stringify(i,null,2),o=gm(this.title+"_"+this.getCurrentDateString());this.downloadFile(r,"data:text/plain;charset=utf-8,",o,".egn",!0)}downloadFile(t,i,r,o,a){const s=document.createElement("a");s.setAttribute("href",i+encodeURIComponent(t)),s.setAttribute("download",r+o),s.style.display="none",document.body.appendChild(s),s.click(),a&&this.dirtyFlagService.makeClean(),document.body.removeChild(s)}downloadSVG(t,i){const r=this.getStoryForDownload(),o=this.createConfigAndDST(r),a=this.svgService.createSVGData(this.title,this.description,o,t,i);this.downloadFile(a,"data:application/bpmn20-xml;charset=UTF-8,",gm(this.title+"_"+this.getCurrentDateString()),".egn.svg",!0)}downloadPNG(t){const i=document.getElementById("canvas");if(i){const a=i.getElementsByClassName("djs-container")[0].getElementsByTagName("svg")[0],s=a.getElementsByClassName("viewport")[0],c=s.getElementsByClassName("layer-base")[0],l=document.createElement("img");let d=this.pngService.extractSVG(s,a);d=this.pngService.prepareSVG(d,c,this.description,this.title,t),l.onload=()=>{const u=document.createElement("canvas");u.width=this.pngService.getWidth()+10,u.height=this.pngService.getHeight()+10;const h=u.getContext("2d");h&&(h.rect(0,0,u.width,u.height),h.fillStyle="white",h.fill(),h.drawImage(l,0,0));const f=u.toDataURL("image/png"),m=document.createElement("a");m.setAttribute("download",gm(this.title)+"_"+this.getCurrentDateString()+".png"),m.setAttribute("href",f),document.body.appendChild(m),m.click(),document.body.removeChild(m),l.src=""},l.onchange=l.onload,l.width=this.pngService.getWidth(),l.height=this.pngService.getHeight(),l.src="data:image/svg+xml,"+d}}downloadHTMLPresentation(){const t=gm(this.title+"_"+this.getCurrentDateString());this.htmlPresentationService.downloadHTMLPresentation(t).then()}getStoryForDownload(){const t=this.rendererService.getStory();return t.push({info:this.titleService.getDescription()}),t.push({version:"2.0.0-beta6"}),t}getCurrentDateString(){return fP(new Date,"YYYY-MM-dd","en-GB")}static#e=this.\u0275fac=function(i){return new(i||e)(F(Ml),F(fo),F(K_),F(Vae),F(oxe),F(Nz),F(f0))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),axe=(()=>{class e{constructor(t,i,r){this.fb=t,this.dialogRef=i,this.titleService=r,this.title="< name of this Domain Story >"===this.titleService.getTitle()?"":this.titleService.getTitle(),this.description=this.titleService.getDescription(),this.form=this.fb.group({title:[this.title,[]],description:[this.description,[]]})}ngOnInit(){}save(){this.titleService.updateTitleAndDescription(this.form.get("title")?.value,this.form.get("description")?.value,!0),this.dialogRef.close()}close(){this.dialogRef.close()}preventDefault(t){t.preventDefault()}static#e=this.\u0275fac=function(i){return new(i||e)(T(GE),T(mc),T(fo))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-header-dialog"]],decls:16,vars:1,consts:[[3,"formGroup"],[1,"dialogWidth"],["matInput","","type","text","formControlName","title"],["maxlength","2000","matInput","","formControlName","description",1,"descriptionInput",3,"keydown.enter","keyup.enter","keyup.escape"],["mat-flat-button","",3,"click"],["mat-flat-button","","color","primary",3,"click"]],template:function(i,r){1&i&&(B(0,"mat-dialog-content")(1,"form",0)(2,"mat-form-field",1)(3,"mat-label"),Oe(4,"Title"),W(),ct(5,"input",2),W(),ct(6,"br"),B(7,"mat-form-field",1)(8,"mat-label"),Oe(9,"Description"),W(),B(10,"textarea",3),Pe("keydown.enter",function(a){return r.preventDefault(a)})("keyup.enter",function(){return r.save()})("keyup.escape",function(){return r.close()}),W()()()(),B(11,"mat-dialog-actions")(12,"button",4),Pe("click",function(){return r.close()}),Oe(13,"Cancel"),W(),B(14,"button",5),Pe("click",function(){return r.save()}),Oe(15,"Save"),W()()),2&i&&(be(),$e("formGroup",r.form))},dependencies:[d_,Ff,kE,t_,UE,hu,u_,Vs,_u,Dl,l0,sh,jp],styles:[".dialogWidth[_ngcontent-%COMP%]{width:50vw}.dialogWidth[_ngcontent-%COMP%] mat-label[_ngcontent-%COMP%]{font-size:12pt}.descriptionInput[_ngcontent-%COMP%]{min-height:75px}"]})}return e})();class sxe{constructor(n,t){this.title=n,this.options=t}}class p0{constructor(n,t,i){this.text=n,this.tooltip=t,this.fn=i}}function cxe(e,n){if(1&e){const t=vi();B(0,"button",3),Pe("click",function(){const r=jt(t).index;return zt(st().doOption(r))}),Oe(1),W()}if(2&e){const t=n.$implicit;$e("title",t.tooltip),be(),fs(" ",t.text," ")}}let lxe=(()=>{class e{constructor(t,i){this.dialogRef=t,this.withTitle=new on(!0),this.useWhiteBackground=new on(!0),this.title=i.title,this.options=i.options}ngOnInit(){}doOption(t){this.options[t].fn(this.withTitle.value,this.useWhiteBackground.value),this.close()}close(){this.dialogRef.close()}updateWithTitle(t){this.withTitle.next(t.target.checked)}updateUseWhiteBackground(t){this.useWhiteBackground.next(t.target.checked)}static#e=this.\u0275fac=function(i){return new(i||e)(T(mc),T(H_))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-export-dialog"]],decls:18,vars:8,consts:[["type","checkbox",3,"change","checked"],["mat-flat-button","",3,"click"],["mat-stroked-button","","class","mr-1",3,"title","click",4,"ngFor","ngForOf"],["mat-stroked-button","",1,"mr-1",3,"click","title"]],template:function(i,r){1&i&&(B(0,"mat-dialog-content")(1,"h2"),Oe(2),W(),B(3,"label")(4,"input",0),Zt(5,"async"),Pe("change",function(a){return r.updateWithTitle(a)}),W(),Oe(6," Add title and description to image "),W(),ct(7,"br"),B(8,"label")(9,"input",0),Zt(10,"async"),Pe("change",function(a){return r.updateUseWhiteBackground(a)}),W(),Oe(11," Add white background to SVG (default: transparent) "),W()(),B(12,"mat-dialog-actions"),ct(13,"br"),B(14,"div")(15,"button",1),Pe("click",function(){return r.close()}),Oe(16,"Cancel"),W(),ut(17,cxe,2,2,"button",2),W()()),2&i&&(be(2),ko(r.title),be(2),$e("checked",Qt(5,4,r.withTitle)),be(5),$e("checked",Qt(10,6,r.useWhiteBackground)),be(8),$e("ngForOf",r.options))},dependencies:[lu,Vs,_u,Dl,za]})}return e})(),dxe=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An,An]})}return e})();class MT{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(n=!1,t,i=!0,r){this._multiple=n,this._emitChanges=i,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new xt,t&&t.length&&(n?t.forEach(o=>this._markSelected(o)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...n){this._verifyValueAssignment(n),n.forEach(i=>this._markSelected(i));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...n){this._verifyValueAssignment(n),n.forEach(i=>this._unmarkSelected(i));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...n){this._verifyValueAssignment(n);const t=this.selected,i=new Set(n);n.forEach(o=>this._markSelected(o)),t.filter(o=>!i.has(this._getConcreteValue(o,i))).forEach(o=>this._unmarkSelected(o));const r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(n){return this.isSelected(n)?this.deselect(n):this.select(n)}clear(n=!0){this._unmarkAll();const t=this._hasQueuedChanges();return n&&this._emitChangeEvent(),t}isSelected(n){return this._selection.has(this._getConcreteValue(n))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(n){this._multiple&&this.selected&&this._selected.sort(n)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(n){n=this._getConcreteValue(n),this.isSelected(n)||(this._multiple||this._unmarkAll(),this.isSelected(n)||this._selection.add(n),this._emitChanges&&this._selectedToEmit.push(n))}_unmarkSelected(n){n=this._getConcreteValue(n),this.isSelected(n)&&(this._selection.delete(n),this._emitChanges&&this._deselectedToEmit.push(n))}_unmarkAll(){this.isEmpty()||this._selection.forEach(n=>this._unmarkSelected(n))}_verifyValueAssignment(n){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(n,t){if(this.compareWith){t=t??this._selection;for(let i of t)if(this.compareWith(n,i))return i;return n}return n}}let Pz=(()=>{class e{constructor(){this._listeners=[]}notify(t,i){for(let r of this._listeners)r(t,i)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(i=>t!==i)}}ngOnDestroy(){this._listeners=[]}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Fz=["*"],Bz=["unscopedContent"],fxe=["text"],mxe=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],pxe=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"],Vz=new ye("ListOption");let jz=(()=>{class e{constructor(t){this._elementRef=t}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt))};static#t=this.\u0275dir=Me({type:e,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"],standalone:!0})}return e})(),zz=(()=>{class e{constructor(t){this._elementRef=t}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt))};static#t=this.\u0275dir=Me({type:e,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"],standalone:!0})}return e})(),Rxe=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"],standalone:!0})}return e})(),Hz=(()=>{class e{constructor(t){this._listOption=t}_isAlignedAtStart(){return!this._listOption||"after"===this._listOption?._getTogglePosition()}static#e=this.\u0275fac=function(i){return new(i||e)(T(Vz,8))};static#t=this.\u0275dir=Me({type:e,hostVars:4,hostBindings:function(i,r){2&i&&wt("mdc-list-item__start",r._isAlignedAtStart())("mdc-list-item__end",!r._isAlignedAtStart())},standalone:!0})}return e})(),Nxe=(()=>{class e extends Hz{static#e=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=ti(e)))(r||e)}})();static#t=this.\u0275dir=Me({type:e,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],standalone:!0,features:[kt]})}return e})(),Pxe=(()=>{class e extends Hz{static#e=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=ti(e)))(r||e)}})();static#t=this.\u0275dir=Me({type:e,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],standalone:!0,features:[kt]})}return e})();const Fxe=new ye("MAT_LIST_CONFIG");let lh=(()=>{class e{constructor(){this._isNonInteractive=!0,this._disableRipple=!1,this._disabled=!1,this._defaultOptions=Ye(Fxe,{optional:!0})}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=co(t)}get disabled(){return this._disabled}set disabled(t){this._disabled=co(t)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,hostVars:1,hostBindings:function(i,r){2&i&&fn("aria-disabled",r.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"},standalone:!0})}return e})(),IT=(()=>{class e{set lines(t){this._explicitLines=_s(t,null),this._updateItemLines(!1)}get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(t){this._disableRipple=co(t)}get disabled(){return this._disabled||!!this._listBase?.disabled}set disabled(t){this._disabled=co(t)}get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(t,i,r,o,a,s){this._elementRef=t,this._ngZone=i,this._listBase=r,this._platform=o,this._explicitLines=null,this._disableRipple=!1,this._disabled=!1,this._subscriptions=new ot,this._rippleRenderer=null,this._hasUnscopedTextContent=!1,this.rippleConfig=a||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement="button"===this._hostElement.nodeName.toLowerCase(),this._noopAnimations="NoopAnimations"===s,r&&!r._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),null!==this._rippleRenderer&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!(!this._avatars.length&&!this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new nm(this,this._ngZone,this._hostElement,this._platform),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(fm(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(t){if(!this._lines||!this._titles||!this._unscopedContent)return;t&&this._checkDomForUnscopedTextContent();const i=this._explicitLines??this._inferLinesFromContent(),r=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",i<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",2===i),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",3===i),this._hasUnscopedTextContent){const o=0===this._titles.length&&1===i;r.classList.toggle("mdc-list-item__primary-text",o),r.classList.toggle("mdc-list-item__secondary-text",!o)}else r.classList.remove("mdc-list-item__primary-text"),r.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let t=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(t+=1),t}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(t=>t.nodeType!==t.COMMENT_NODE).some(t=>!(!t.textContent||!t.textContent.trim()))}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(at),T(lh,8),T(ni),T(im,8),T(er,8))};static#t=this.\u0275dir=Me({type:e,contentQueries:function(i,r,o){if(1&i&&(_i(o,Nxe,4),_i(o,Pxe,4)),2&i){let a;Wt(a=qt())&&(r._avatars=a),Wt(a=qt())&&(r._icons=a)}},hostVars:4,hostBindings:function(i,r){2&i&&(fn("aria-disabled",r.disabled)("disabled",r._isButtonElement&&r.disabled||null),wt("mdc-list-item--disabled",r.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"},standalone:!0})}return e})(),$z=(()=>{class e extends lh{static#e=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=ti(e)))(r||e)}})();static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],standalone:!0,features:[en([{provide:lh,useExisting:e}]),kt,Kn],ngContentSelectors:Fz,decls:1,vars:0,template:function(i,r){1&i&&(Ci(),St(0))},styles:['@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-list-divider::after{content:"";display:block;border-bottom-width:1px;border-bottom-style:solid}}.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item__wrapper{display:block}.mdc-list-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer}.mdc-list-item:focus{outline:none}.mdc-list-item.mdc-list-item--with-one-line{height:48px}.mdc-list-item.mdc-list-item--with-two-lines{height:64px}.mdc-list-item.mdc-list-item--with-three-lines{height:88px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--disabled,.mdc-list-item.mdc-list-item--non-interactive{cursor:auto}.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px double rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected:focus::before{border-color:CanvasText}}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__content[for]{pointer-events:none}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item__overline-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start,.mdc-list-item--with-leading-avatar .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{border-radius:50%}.mdc-list-item--with-leading-icon.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-leading-icon .mdc-list-item__start[dir=rtl]{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-thumbnail.mdc-list-item,.mdc-list-item--with-leading-thumbnail.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-thumbnail .mdc-list-item__start,.mdc-list-item--with-leading-thumbnail .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-image.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-image.mdc-list-item,.mdc-list-item--with-leading-image.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-image .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-image .mdc-list-item__start,.mdc-list-item--with-leading-image .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-video.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-video.mdc-list-item,.mdc-list-item--with-leading-video.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:0;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-video .mdc-list-item__start,.mdc-list-item--with-leading-video .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-radio.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-radio.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-radio .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-switch.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-switch.mdc-list-item,.mdc-list-item--with-leading-switch.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-switch .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-switch .mdc-list-item__start,.mdc-list-item--with-leading-switch .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item,.mdc-list-item--with-trailing-icon.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--with-trailing-icon .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item,.mdc-list-item--with-trailing-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-trailing-meta .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-caption-font-family);font-size:var(--mdc-typography-caption-font-size);line-height:var(--mdc-typography-caption-line-height);font-weight:var(--mdc-typography-caption-font-weight);letter-spacing:var(--mdc-typography-caption-letter-spacing);text-decoration:var(--mdc-typography-caption-text-decoration);text-transform:var(--mdc-typography-caption-text-transform)}.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-radio.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-radio .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-switch.mdc-list-item,.mdc-list-item--with-trailing-switch.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-switch .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-switch .mdc-list-item__end,.mdc-list-item--with-trailing-switch .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-switch.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-list-item,.mdc-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-list-group .mdc-deprecated-list{padding:0}.mdc-list-group__subheader{margin:calc((3rem - 1.5rem)/2) 16px}.mdc-list-divider{padding:0;background-clip:content-box}.mdc-list-divider.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset{padding-left:16px;padding-right:auto}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:16px}.mdc-list-divider.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset{padding-left:auto;padding-right:16px}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,.mdc-list-divider.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset[dir=rtl]{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:0px;padding-right:auto}[dir=rtl] .mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:0px}[dir=rtl] .mdc-list-divider,.mdc-list-divider[dir=rtl]{padding:0}.mdc-list-item{background-color:var(--mdc-list-list-item-container-color)}.mdc-list-item.mdc-list-item--selected{background-color:var(--mdc-list-list-item-selected-container-color)}.mdc-list-item--with-one-line{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-avatar,.mdc-list-item--with-one-line.mdc-list-item--with-leading-icon,.mdc-list-item--with-one-line.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-one-line.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-one-line.mdc-list-item--with-leading-radio,.mdc-list-item--with-one-line.mdc-list-item--with-leading-switch{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-image,.mdc-list-item--with-one-line.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines.mdc-list-item--with-leading-avatar,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-icon,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-radio,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-switch,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-image,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-three-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mdc-list-list-item-one-line-container-height)}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mdc-list-list-item-two-line-container-height)}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mdc-list-list-item-three-line-container-height)}.mdc-list-item__primary-text{color:var(--mdc-list-list-item-label-text-color)}.mdc-list-item__primary-text{font-family:var(--mdc-list-list-item-label-text-font);line-height:var(--mdc-list-list-item-label-text-line-height);font-size:var(--mdc-list-list-item-label-text-size);font-weight:var(--mdc-list-list-item-label-text-weight);letter-spacing:var(--mdc-list-list-item-label-text-tracking)}.mdc-list-item__secondary-text{color:var(--mdc-list-list-item-supporting-text-color)}.mdc-list-item__secondary-text{font-family:var(--mdc-list-list-item-supporting-text-font);line-height:var(--mdc-list-list-item-supporting-text-line-height);font-size:var(--mdc-list-list-item-supporting-text-size);font-weight:var(--mdc-list-list-item-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-supporting-text-tracking)}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-leading-icon-color)}.mdc-list-item--with-leading-icon .mdc-list-item__start{width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start>i{font-size:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon{font-size:var(--mdc-list-list-item-leading-icon-size);width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon,.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon>.materialdesignWizIconSvgsSvgIcon{display:block}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mdc-list-list-item-leading-avatar-size);height:var(--mdc-list-list-item-leading-avatar-size)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-supporting-text-color)}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mdc-list-list-item-trailing-supporting-text-font);line-height:var(--mdc-list-list-item-trailing-supporting-text-line-height);font-size:var(--mdc-list-list-item-trailing-supporting-text-size);font-weight:var(--mdc-list-list-item-trailing-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-trailing-supporting-text-tracking)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-icon-color)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end>i{font-size:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon{font-size:var(--mdc-list-list-item-trailing-icon-size);width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon,.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon>.materialdesignWizIconSvgsSvgIcon{display:block}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-selected-trailing-icon-color)}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text,.mdc-list-item--disabled .mdc-list-item__overline-text{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-disabled-leading-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{opacity:var(--mdc-list-list-item-disabled-leading-icon-opacity)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-disabled-trailing-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{opacity:var(--mdc-list-list-item-disabled-trailing-icon-opacity)}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mdc-list-list-item-hover-label-text-color)}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mdc-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mdc-list-list-item-hover-trailing-icon-color)}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mdc-list-list-item-focus-label-text-color)}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mdc-list-list-item-disabled-label-text-color)}.mdc-list-item:hover::before{background-color:var(--mdc-list-list-item-hover-state-layer-color);opacity:var(--mdc-list-list-item-hover-state-layer-opacity)}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mdc-list-list-item-disabled-state-layer-color);opacity:var(--mdc-list-list-item-disabled-state-layer-opacity)}.mdc-list-item:focus::before{background-color:var(--mdc-list-list-item-focus-state-layer-color);opacity:var(--mdc-list-list-item-focus-state-layer-opacity)}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mdc-list-list-item-leading-avatar-shape);background-color:var(--mdc-list-list-item-leading-avatar-color)}.mat-mdc-list-item-icon{font-size:var(--mdc-list-list-item-leading-icon-size)}.cdk-high-contrast-active a.mdc-list-item--activated::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:"";opacity:0;pointer-events:none}.mat-mdc-list-item>.mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus>.mat-mdc-focus-indicator::before{content:""}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:start}mat-action-list button::-moz-focus-inner{border:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-inline-start:var(--mat-list-list-item-leading-icon-start-space);margin-inline-end:var(--mat-list-list-item-leading-icon-end-space)}a.mdc-list-item.mdc-list-item--activated{background-color:var(--mat-list-active-indicator-color)}a.mdc-list-item.mdc-list-item--activated.mdc-list-item{border-radius:var(--mat-list-active-indicator-shape)}'],encapsulation:2,changeDetection:0})}return e})(),Uz=(()=>{class e extends IT{get activated(){return this._activated}set activated(t){this._activated=co(t)}constructor(t,i,r,o,a,s){super(t,i,r,o,a,s),this._activated=!1}_getAriaCurrent(){return"A"===this._hostElement.nodeName&&this._activated?"page":null}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(at),T(lh,8),T(ni),T(im,8),T(er,8))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(i,r,o){if(1&i&&(_i(o,zz,5),_i(o,jz,5),_i(o,Rxe,5)),2&i){let a;Wt(a=qt())&&(r._lines=a),Wt(a=qt())&&(r._titles=a),Wt(a=qt())&&(r._meta=a)}},viewQuery:function(i,r){if(1&i&&(ji(Bz,5),ji(fxe,5)),2&i){let o;Wt(o=qt())&&(r._unscopedContent=o.first),Wt(o=qt())&&(r._itemText=o.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:11,hostBindings:function(i,r){2&i&&(fn("aria-current",r._getAriaCurrent()),wt("mdc-list-item--activated",r.activated)("mdc-list-item--with-leading-avatar",0!==r._avatars.length)("mdc-list-item--with-leading-icon",0!==r._icons.length)("mdc-list-item--with-trailing-meta",0!==r._meta.length)("_mat-animation-noopable",r._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],standalone:!0,features:[kt,Kn],ngContentSelectors:pxe,decls:10,vars:0,consts:[["unscopedContent",""],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mat-mdc-focus-indicator"]],template:function(i,r){if(1&i){const o=vi();Ci(mxe),St(0),B(1,"span",1),St(2,1),St(3,2),B(4,"span",2,0),Pe("cdkObserveContent",function(){return jt(o),zt(r._updateItemLines(!0))}),St(6,3),W()(),St(7,4),St(8,5),ct(9,"div",3)}},dependencies:[DL],encapsulation:2,changeDetection:0})}return e})(),Wz=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[eC,hl,An,oC,vie,dxe]})}return e})();function zxe(e,n){if(1&e){const t=vi();B(0,"mat-list-item")(1,"mat-form-field",6)(2,"input",7),Pe("change",function(r){const o=jt(t).$implicit;return zt(st().updateWorkobjectEntry(r,o))}),W()()()}if(2&e){const t=n.$implicit;be(2),$e("value",t.name)}}function Hxe(e,n){if(1&e){const t=vi();B(0,"mat-list-item")(1,"mat-form-field",6)(2,"textarea",8),Pe("change",function(r){const o=jt(t).$implicit;return zt(st().updateActivityEntry(r,o))})("keydown.enter",function(r){return jt(t),zt(st().preventDefault(r))})("keyup.enter",function(){return jt(t),zt(st().save())})("keyup.escape",function(){return jt(t),zt(st().close())}),W()()()}if(2&e){const t=n.$implicit;be(2),$e("value",t.name)}}let $xe=(()=>{class e{constructor(t){this.labelDictionaryService=t,this.closeEmitter=new nn,this.labelDictionaryService.createLabelDictionaries(),this.workObjectEntries=this.labelDictionaryService.getWorkObjectLabels(),this.activityEntries=this.labelDictionaryService.getActivityLabels(),this.workobjectEntriesSubject=new on(this.workObjectEntries),this.activityEntriesSubject=new on(this.activityEntries)}ngAfterViewInit(){this.labelDictionaryService.createLabelDictionaries(),this.workobjectEntriesSubject.next(this.labelDictionaryService.getWorkObjectLabels()),this.activityEntriesSubject.next(this.labelDictionaryService.getActivityLabels())}save(){this.workObjectEntries=this.workobjectEntriesSubject.value,this.activityEntries=this.activityEntriesSubject.value;const t=[],i=[],r=[],o=[];this.activityEntries.filter(a=>a.name!==a.originalName).forEach(a=>{t.push(a.name),i.push(a.originalName)}),this.workObjectEntries.filter(a=>a.name!==a.originalName).forEach(a=>{r.push(a.name),o.push(a.originalName)}),this.labelDictionaryService.massRenameLabels(t,i,r,o),this.closeEmitter.emit()}cancel(){this.workObjectEntries.forEach(t=>{t.name=t.originalName}),this.activityEntries.forEach(t=>{t.name=t.originalName}),this.workobjectEntriesSubject.next(this.workObjectEntries),this.activityEntriesSubject.next(this.activityEntries)}updateActivityEntry(t,i){let r=this.activityEntriesSubject.value;r.filter(o=>o.originalName===i.originalName)[0].name=t.target.value,this.activityEntriesSubject.next(r)}updateWorkobjectEntry(t,i){let r=this.workobjectEntriesSubject.value;r.filter(o=>o.originalName===i.originalName)[0].name=t.target.value,this.workobjectEntriesSubject.next(r)}preventDefault(t){t.preventDefault()}close(){this.closeEmitter.emit()}static#e=this.\u0275fac=function(i){return new(i||e)(T(TT))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-label-dictionary"]],outputs:{closeEmitter:"closeEmitter"},decls:18,vars:6,consts:[[1,"workobjectList"],[4,"ngFor","ngForOf"],[1,"activityList"],[1,"activityListTitle"],["mat-flat-button","",3,"click"],["mat-flat-button","","color","primary",3,"click"],[1,"inputText"],["matInput","",1,"inputText",3,"change","value"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","1","cdkAutosizeMaxRows","3",1,"inputText","activity",3,"change","keydown.enter","keyup.enter","keyup.escape","value"]],template:function(i,r){1&i&&(B(0,"mat-dialog-content")(1,"div",0)(2,"h3"),Oe(3,"Workobjects"),W(),B(4,"mat-list"),ut(5,zxe,3,1,"mat-list-item",1),Zt(6,"async"),W()(),B(7,"div",2)(8,"h3",3),Oe(9,"Activities"),W(),B(10,"mat-list"),ut(11,Hxe,3,1,"mat-list-item",1),Zt(12,"async"),W()()(),B(13,"mat-dialog-actions")(14,"button",4),Pe("click",function(){return r.close()}),Oe(15,"Cancel"),W(),B(16,"button",5),Pe("click",function(){return r.save()}),Oe(17,"Save"),W()()),2&i&&(be(5),$e("ngForOf",Qt(6,2,r.workobjectEntriesSubject)),be(6),$e("ngForOf",Qt(12,4,r.activityEntriesSubject)))},dependencies:[lu,Vs,$z,Uz,_u,Dl,l0,jp,D0e,za],styles:["mat-dialog-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;top:0;bottom:0;max-height:75vh;grid-column-gap:5px;width:75vw}mat-dialog-content[_ngcontent-%COMP%] mat-list-item[_ngcontent-%COMP%]{height:unset!important}mat-dialog-content[_ngcontent-%COMP%] mat-list-item-content[_ngcontent-%COMP%]{padding:0!important}h3[_ngcontent-%COMP%]{font-weight:700}.icon[_ngcontent-%COMP%]{width:36px;height:36px}.inputText[_ngcontent-%COMP%]{width:98%;resize:none;font-family:sans-serif;font-size:small;padding-top:1px;padding-bottom:1px;margin:0}.activityListHeader[_ngcontent-%COMP%]{display:inline-grid;grid-template-columns:auto auto auto;width:100%}.activityListTitle[_ngcontent-%COMP%]{justify-self:left}.saveButton[_ngcontent-%COMP%]{justify-self:end;padding-right:0!important}.saveButtonSpan[_ngcontent-%COMP%]{margin-left:2px}.activity[_ngcontent-%COMP%]{max-height:3rem}"]})}return e})(),Uxe=(()=>{class e{constructor(t){this.dialogRef=t}close(){this.dialogRef.close()}static#e=this.\u0275fac=function(i){return new(i||e)(T(mc))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-label-dictionary-dialog"]],decls:4,vars:0,consts:[[3,"closeEmitter"]],template:function(i,r){1&i&&(B(0,"mat-dialog-content")(1,"h2"),Oe(2,"Label Dictionary"),W(),B(3,"app-label-dictionary",0),Pe("closeEmitter",function(){return r.close()}),W()())},dependencies:[$xe,Dl]})}return e})(),qz=(()=>{class e{checkForUnreferencedElementsInActivitiesAndRepair(t){const i=[],r=[];let o=!0;return t.forEach(a=>{const s=a.type;s===$.ACTIVITY||s===$.CONNECTION?i.push(a):r.push(a.id)}),i.forEach(a=>{const c=a.target;if(!r.includes(a.source)||!r.includes(c)){o=!1;const l=t.indexOf(a);t=t.splice(l,1)}}),o}updateCustomElementsPreviousV050(t){for(const i of t)i.type===$.WORKOBJECT?i.type=$.WORKOBJECT+"Document":i.type===$.WORKOBJECT+"Bubble"&&(i.type=$.WORKOBJECT+"Conversation");return t}adjustPositions(t){let i=0,r=0;this.findFirstElement(t,!0,i,r),(i<75||i>150||r<0||r>50)&&(i-=75,r-=50,t.forEach(a=>this.adjustElementPosition(a,i,r)))}adjustElementPosition(t,i,r){t.type===$.ACTIVITY||t.type===$.CONNECTION?t.waypoints.forEach(a=>{a.x-=i,a.y-=r,a.original&&(a.original.x=a.x,a.original.y=a.y)}):(t.x-=i,t.y-=r)}findFirstElement(t,i,r,o){t.forEach(a=>{let s,c;a.type!==$.ACTIVITY&&a.type!==$.CONNECTION&&(i&&(r=a.x,o=a.y,i=!1),s=a.x,c=a.y,s{class e{constructor(t,i,r,o,a,s,c){this.iconDictionaryService=t,this.importRepairService=i,this.titleService=r,this.rendererService=o,this.dialogService=a,this.iconSetConfigurationService=s,this.snackbar=c,this.title=kl,this.description="",this.importedConfiguration=null,this.importedConfigurationEmitter=new nn,this.titleSubscription=this.titleService.title$.subscribe(l=>{this.title=l}),this.descriptionSubscription=this.titleService.description$.subscribe(l=>{this.description=l})}ngOnDestroy(){this.titleSubscription.unsubscribe(),this.descriptionSubscription.unsubscribe()}get importedConfigurationEvent(){return this.importedConfigurationEmitter.asObservable()}getImportedConfiguration(){const t={name:this.importedConfiguration?.name||"",actors:this.importedConfiguration?.actors||new ln,workObjects:this.importedConfiguration?.workObjects||new ln};return this.importedConfiguration=null,t}importDST(t,i,r){const o=new FileReader,a=x3(i,r);this.titleService.updateTitleAndDescription(a,null,!1),o.onloadend=s=>{s&&s.target&&this.fileReaderFunction(s.target.result,r,!1)},o.readAsText(t)}importEGN(t,i,r){const o=new FileReader,a=x3(i,r);this.titleService.updateTitleAndDescription(a,null,!1),o.onloadend=s=>{s&&s.target&&this.fileReaderFunction(s.target.result,r,!0)},o.readAsText(t)}fileReaderFunction(t,i,r){let o;if("string"==typeof t){o=i?this.removeXMLComments(t):t;let a,s,c,l=this.extractDstAndConfig(o,i);if(null==l)return;l.domain?(c=r?l.domain:JSON.parse(l.domain),s=$p(c),a=r?l.dst:JSON.parse(l.dst)):l.config?(c=JSON.parse(l.config),s=$p(c),a=JSON.parse(l.dst)):(a=JSON.parse(o),s=this.iconSetConfigurationService.createMinimalConfigurationWithDefaultIcons());const d=this.checkConfigForChanges(s);let u=a[a.length-1];if(!u.id){u=a.pop();let h=u;h.version&&(u=a.pop()),h.version?h=h.version:(h="?",this.snackbar.open("The version number is unreadable.",void 0,{duration:ho,panelClass:y3})),a=this.handleVersionNumber(h,a)}this.importRepairService.checkForUnreferencedElementsInActivitiesAndRepair(a)||this.showBrokenImportDialog(i?"SVG":"DST"),this.titleService.updateTitleAndDescription(this.title,u.info,!1),this.importRepairService.adjustPositions(a),this.updateIconRegistries(a,s),this.rendererService.importStory(a,d,s)}}handleVersionNumber(t,i){const r=+t.substring(0,t.lastIndexOf("."));return r<=.5&&(i=this.importRepairService.updateCustomElementsPreviousV050(i),this.showPreviousV050Dialog(r)),i}extractDstAndConfig(t,i){let r=null;try{r=JSON.parse(t)}catch{this.showBrokenImportDialog(i?"SVG":"DST")}return r}removeXMLComments(t){for(t=t.substring(t.indexOf(""));t.includes("\x3c!--")||t.includes("--\x3e");)t=t.replace("\x3c!--","").replace("--\x3e","");return(t=t.replace("","")).replace("","")}checkConfigForChanges(t){const i=t.actors.keysArray(),r=t.workObjects.keysArray(),o=this.iconDictionaryService.getTypeDictionaryKeys($.ACTOR),a=this.iconDictionaryService.getTypeDictionaryKeys($.WORKOBJECT);let s=!1;if(i.length!==o.length||r.length!==a.length)return!0;for(let c=0;c{class e{constructor(t,i,r,o,a,s,c,l,d,u,h){this.settingsService=t,this.modelerService=i,this.replayStateService=r,this.dirtyFlagService=o,this.dialogService=a,this.replayService=s,this.exportService=c,this.importService=l,this.titleService=d,this.renderService=u,this.snackbar=h,this.isReplay$=this.replayStateService.replayOn$,this.isDirty$=this.dirtyFlagService.dirty$}import(){const t=document.getElementById("import").files[0].name;t.endsWith(".dst")?this.importService.importDST(document.getElementById("import").files[0],t,!1):t.endsWith(".dst.svg")?this.importService.importDST(document.getElementById("import").files[0],t,!0):t.endsWith(".egn")?this.importService.importEGN(document.getElementById("import").files[0],t,!1):t.endsWith(".egn.svg")&&this.importService.importEGN(document.getElementById("import").files[0],t,!0),this.modelerService.commandStackChanged()}openSettings(){this.settingsService.open()}openDownloadDialog(){if(this.exportService.isDomainStoryExportable()){const t=new p0("SVG","Download an SVG-Image with the Domain-Story embedded. Can be used to save and share your Domain-Story.",(s,c)=>this.exportService.downloadSVG(s,c)),i=new p0("EGN","Download an EGN-File with the Domain-Story. Can be used to save and share your Domain-Story.",()=>this.exportService.downloadDST()),r=new p0("PNG","Download a PNG-Image of the Domain-Story. This does not include the Domain-Story!",s=>this.exportService.downloadPNG(s)),o=new p0("HTML-Presentation","Download an HTML-Presentation. This does not include the Domain-Story!",()=>this.exportService.downloadHTMLPresentation()),a=new ca;a.disableClose=!1,a.autoFocus=!0,a.data=new sxe("Export",[t,i,r,o]),this.dialogService.openDialog(lxe,a)}else this.snackbar.open("No Domain Story to be exported",void 0,{duration:ho,panelClass:pc})}openKeyboardShortcutsDialog(){const r=new ca;r.disableClose=!1,r.autoFocus=!0,r.data=new U_("Keyboard Shortcuts","Undo:\t\t\t\t\tctrl + Z \nRedo:\t\t\t\t\tctrl + Y OR ctrl + shift + Z\nSelect All:\t\t\t\tctrl + A\nExport as EGN:\t\t\tctrl + S\nImport Domain Story: \t\tctrl + L\nSearch for text:\t\t\tctrl + F\nDirect editing:\t\t\tE\nHand tool:\t\t\t\tH\nLasso tool:\t\t\t\tL\nSpace tool:\t\t\t\tS",!0),this.dialogService.openDialog(G_,r)}openLabelDictionary(){if(this.exportService.isDomainStoryExportable()){const t=new ca;t.disableClose=!1,t.autoFocus=!0,this.dialogService.openDialog(Uxe,t)}else this.snackbar.open("There are currently no Elements on the canvas",void 0,{duration:ho,panelClass:pc})}createNewDomainStory(){this.titleService.reset(),this.renderService.reset(),this.dirtyFlagService.makeClean()}startReplay(){this.replayService.startReplay()}stopReplay(){this.replayService.stopReplay()}previousSentence(){this.replayService.previousSentence()}nextSentence(){this.replayService.nextSentence()}isExportable(){return this.titleService.hasTitleOrDescription()||this.exportService.isDomainStoryExportable()}static#e=this.\u0275fac=function(i){return new(i||e)(T(HC),T(ch),T(zp),T(K_),T(mm),T(Hp),T(m0),T(OT),T(fo),T(f0),T(Bc))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-header-buttons"]],decls:4,vars:6,consts:[[4,"ngIf"],["id","buttonStartReplay","title","Start replay",1,"headerButton",3,"click","disabled"],[1,"material-icons","materialIconButton"],["id","buttonImport","title","Import story from file","onclick","document.getElementById('import').click();",1,"headerButton"],["type","file","accept",".dst, .dst.svg, .egn, .egn.svg","id","import","onclick","this.value=null;","name","file",2,"display","none",3,"change"],["id","export","title","Export story as .egn, .svg or .png file",1,"headerButton",3,"click","disabled"],["class","material-icons-outlined materialIconButton",4,"ngIf"],["class","material-icons materialIconButton",4,"ngIf"],["title","Label Dictionary",1,"headerButton",3,"click","disabled"],["title","Label Dictionary",1,"material-icons","materialIconButton"],["title","Settings",1,"headerButton",3,"click"],["title","Change Icons and Settings",1,"material-icons","materialIconButton"],["title","Show keyboard shortcuts",1,"headerButton",3,"click"],["title","Create a new domain story",1,"headerButton",3,"click"],[1,"material-icons-outlined","materialIconButton"],["title","Previous sentence",1,"headerButton",3,"click"],["title","Next sentence",1,"headerButton",3,"click"],["title","Stop replay",1,"headerButton",3,"click"]],template:function(i,r){1&i&&(ut(0,qxe,25,15,"div",0),Zt(1,"async"),ut(2,Yxe,10,0,"div",0),Zt(3,"async")),2&i&&($e("ngIf",!Qt(1,2,r.isReplay$)),be(2),$e("ngIf",Qt(3,4,r.isReplay$)))},dependencies:[cc,za],styles:["span[_ngcontent-%COMP%]{font-size:15pt;color:#fff}#dictionaryButton[_ngcontent-%COMP%]{opacity:.2;pointer-events:none}.headerButton[_ngcontent-%COMP%]:hover{cursor:pointer}.headerButton[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{color:#fff}.disabled[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .disabled[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{cursor:initial;color:gray}.materialIconButton[_ngcontent-%COMP%]:hover{color:#d3d3d3}"]})}return e})();const Xxe=["*",[["mat-toolbar-row"]]],Zxe=["*","mat-toolbar-row"];let RT=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"],standalone:!0})}return e})(),Yz=(()=>{class e{constructor(t,i,r){this._elementRef=t,this._platform=i,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(ni),T(cn))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-toolbar"]],contentQueries:function(i,r,o){if(1&i&&_i(o,RT,5),2&i){let a;Wt(a=qt())&&(r._toolbarRows=a)}},hostAttrs:[1,"mat-toolbar"],hostVars:6,hostBindings:function(i,r){2&i&&(gf(r.color?"mat-"+r.color:""),wt("mat-toolbar-multiple-rows",r._toolbarRows.length>0)("mat-toolbar-single-row",0===r._toolbarRows.length))},inputs:{color:"color"},exportAs:["matToolbar"],standalone:!0,features:[Kn],ngContentSelectors:Zxe,decls:2,vars:0,template:function(i,r){1&i&&(Ci(Xxe),St(0),St(1,1))},styles:[".mat-toolbar{background:var(--mat-toolbar-container-background-color);color:var(--mat-toolbar-container-text-color)}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-family:var(--mat-toolbar-title-text-font);font-size:var(--mat-toolbar-title-text-size);line-height:var(--mat-toolbar-title-text-line-height);font-weight:var(--mat-toolbar-title-text-weight);letter-spacing:var(--mat-toolbar-title-text-tracking);margin:0}.cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar .mat-mdc-button-base.mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color:var(--mat-toolbar-container-text-color);--mdc-outlined-button-label-text-color:var(--mat-toolbar-container-text-color)}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap;height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-row,.mat-toolbar-single-row{height:var(--mat-toolbar-mobile-height)}}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%;min-height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-multiple-rows{min-height:var(--mat-toolbar-mobile-height)}}"],encapsulation:2,changeDetection:0})}return e})(),Kz=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An,An]})}return e})();const Qxe=["*"],twe=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],nwe=["[mat-card-avatar], [matCardAvatar]","mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","*"],iwe=new ye("MAT_CARD_CONFIG");let NT=(()=>{class e{constructor(t){this.appearance=t?.appearance||"raised"}static#e=this.\u0275fac=function(i){return new(i||e)(T(iwe,8))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(i,r){2&i&&wt("mat-mdc-card-outlined","outlined"===r.appearance)("mdc-card--outlined","outlined"===r.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],standalone:!0,features:[Kn],ngContentSelectors:Qxe,decls:1,vars:0,template:function(i,r){1&i&&(Ci(),St(0))},styles:['.mdc-card{display:flex;flex-direction:column;box-sizing:border-box}.mdc-card::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none;pointer-events:none}@media screen and (forced-colors: active){.mdc-card::after{border-color:CanvasText}}.mdc-card--outlined::after{border:none}.mdc-card__content{border-radius:inherit;height:100%}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__media--square::before{margin-top:100%}.mdc-card__media--16-9::before{margin-top:56.25%}.mdc-card__media-content{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box}.mdc-card__primary-action{display:flex;flex-direction:column;box-sizing:border-box;position:relative;outline:none;color:inherit;text-decoration:none;cursor:pointer;overflow:hidden}.mdc-card__primary-action:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__primary-action:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mdc-card__actions--full-bleed{padding:0}.mdc-card__action-buttons,.mdc-card__action-icons{display:flex;flex-direction:row;align-items:center;box-sizing:border-box}.mdc-card__action-icons{color:rgba(0, 0, 0, 0.6);flex-grow:1;justify-content:flex-end}.mdc-card__action-buttons+.mdc-card__action-icons{margin-left:16px;margin-right:0}[dir=rtl] .mdc-card__action-buttons+.mdc-card__action-icons,.mdc-card__action-buttons+.mdc-card__action-icons[dir=rtl]{margin-left:0;margin-right:16px}.mdc-card__action{display:inline-flex;flex-direction:row;align-items:center;box-sizing:border-box;justify-content:center;cursor:pointer;user-select:none}.mdc-card__action:focus{outline:none}.mdc-card__action--button{margin-left:0;margin-right:8px;padding:0 8px}[dir=rtl] .mdc-card__action--button,.mdc-card__action--button[dir=rtl]{margin-left:8px;margin-right:0}.mdc-card__action--button:last-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-card__action--button:last-child,.mdc-card__action--button:last-child[dir=rtl]{margin-left:0;margin-right:0}.mdc-card__actions--full-bleed .mdc-card__action--button{justify-content:space-between;width:100%;height:auto;max-height:none;margin:0;padding:8px 16px;text-align:left}[dir=rtl] .mdc-card__actions--full-bleed .mdc-card__action--button,.mdc-card__actions--full-bleed .mdc-card__action--button[dir=rtl]{text-align:right}.mdc-card__action--icon{margin:-6px 0;padding:12px}.mdc-card__action--icon:not(:disabled){color:rgba(0, 0, 0, 0.6)}.mat-mdc-card{border-radius:var(--mdc-elevated-card-container-shape);background-color:var(--mdc-elevated-card-container-color);border-width:0;border-style:solid;border-color:var(--mdc-elevated-card-container-color);box-shadow:var(--mdc-elevated-card-container-elevation)}.mat-mdc-card .mdc-card::after{border-radius:var(--mdc-elevated-card-container-shape)}.mat-mdc-card-outlined{border-width:var(--mdc-outlined-card-outline-width);border-style:solid;border-color:var(--mdc-outlined-card-outline-color);border-radius:var(--mdc-outlined-card-container-shape);background-color:var(--mdc-outlined-card-container-color);box-shadow:var(--mdc-outlined-card-container-elevation)}.mat-mdc-card-outlined .mdc-card::after{border-radius:var(--mdc-outlined-card-container-shape)}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font);line-height:var(--mat-card-title-text-line-height);font-size:var(--mat-card-title-text-size);letter-spacing:var(--mat-card-title-text-tracking);font-weight:var(--mat-card-title-text-weight)}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color);font-family:var(--mat-card-subtitle-text-font);line-height:var(--mat-card-subtitle-text-line-height);font-size:var(--mat-card-subtitle-text-size);letter-spacing:var(--mat-card-subtitle-text-tracking);font-weight:var(--mat-card-subtitle-text-weight)}.mat-mdc-card{position:relative}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0})}return e})(),Xz=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"],standalone:!0})}return e})(),Zz=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"],standalone:!0})}return e})(),Qz=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],standalone:!0,features:[Kn],ngContentSelectors:nwe,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(i,r){1&i&&(Ci(twe),St(0),B(1,"div",0),St(2,1),W(),St(3,2))},encapsulation:2,changeDetection:0})}return e})(),Jz=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An,hl,An]})}return e})();function swe(e,n){if(1&e){const t=vi();B(0,"button",10),Pe("click",function(){return jt(t),zt(st().setShowDescription(!1))}),B(1,"span",11),Oe(2," expand_less "),W()()}}function cwe(e,n){if(1&e){const t=vi();B(0,"button",12),Pe("click",function(){return jt(t),zt(st().setShowDescription(!0))}),B(1,"span",11),Oe(2," expand_more"),W()()}}function lwe(e,n){if(1&e&&(B(0,"span",13),Oe(1),Zt(2,"async"),W()),2&e){const t=st();be(),fs(" Sentence: ",Qt(2,1,t.sentenceDescription$),"")}}function dwe(e,n){if(1&e&&(B(0,"mat-card",14)(1,"span",15),Oe(2),Zt(3,"async"),W()()),2&e){const t=st();be(2),ko(Qt(3,1,t.description$))}}let uwe=(()=>{class e{constructor(t,i,r,o){this.titleService=t,this.replayService=i,this.replayStateService=r,this.dialogService=o,this.title$=this.titleService.title$,this.description$=this.titleService.description$,this.showDescription$=this.titleService.showDescription$,this.isReplay$=this.replayStateService.replayOn$,this.sentenceDescription$=kL([this.replayService.currentSentence$,this.replayService.maxSentenceNumber$]).pipe(wa(([a,s])=>`${a}/${s}`)),this.showDescription=this.titleService.showDescription$}openHeaderDialog(){const t=new ca;t.disableClose=!1,t.autoFocus=!0,this.dialogService.openDialog(axe,t)}setShowDescription(t){this.titleService.setShowDescription(t)}static#e=this.\u0275fac=function(i){return new(i||e)(T(fo),T(Hp),T(zp),T(mm))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-header"]],decls:19,vars:15,consts:[["color","primary",1,"toolbar"],["class","headerButton","title","Hide Description",3,"click",4,"ngIf"],["class","headerButton","title","Show Description",3,"click",4,"ngIf"],[1,"mr-10"],["title","Edit Title and Description",1,"headline",3,"click"],[1,"material-icons","materialIconButton","editIcon"],[1,"titleSpacer"],["title","Replay Sentence",4,"ngIf"],[1,"buttonSpacer"],["class","smallScrollbar description",4,"ngIf"],["title","Hide Description",1,"headerButton",3,"click"],[1,"material-icons","materialIconButton","toggle"],["title","Show Description",1,"headerButton",3,"click"],["title","Replay Sentence"],[1,"smallScrollbar","description"],[1,"descriptionText"]],template:function(i,r){1&i&&(B(0,"mat-toolbar",0)(1,"mat-toolbar-row"),ut(2,swe,3,0,"button",1),Zt(3,"async"),ut(4,cwe,3,0,"button",2),Zt(5,"async"),B(6,"span",3)(7,"span",4),Pe("click",function(){return r.openHeaderDialog()}),Oe(8),Zt(9,"async"),B(10,"span",5),Oe(11," edit "),W()()(),ct(12,"span",6),ut(13,lwe,3,3,"span",7),Zt(14,"async"),ct(15,"span",8)(16,"app-header-buttons"),W()(),ut(17,dwe,4,3,"mat-card",9),Zt(18,"async")),2&i&&(be(2),$e("ngIf",Qt(3,5,r.showDescription)),be(2),$e("ngIf",!Qt(5,7,r.showDescription)),be(4),fs(" ",Qt(9,9,r.title$)," "),be(5),$e("ngIf",Qt(14,11,r.isReplay$)),be(4),$e("ngIf",Qt(18,13,r.showDescription$)))},dependencies:[cc,Kxe,Yz,RT,NT,za],styles:[".noPointer[_ngcontent-%COMP%]{cursor:default!important}.description[_ngcontent-%COMP%]{top:0;max-width:100vw;overflow-y:scroll;display:grid}.descriptionText[_ngcontent-%COMP%]{position:relative;font-size:10pt;overflow-wrap:anywhere;word-wrap:anywhere;white-space:pre-wrap;padding-top:15px;padding-left:15px;padding-right:15px;line-height:12pt}.description[_ngcontent-%COMP%]:hover{cursor:default}.titleSpacer[_ngcontent-%COMP%]{flex:1 1 auto}.buttonSpacer[_ngcontent-%COMP%]{margin-right:15px}.headline[_ngcontent-%COMP%]:hover > .editIcon[_ngcontent-%COMP%]{display:contents}.headline[_ngcontent-%COMP%] > .editIcon[_ngcontent-%COMP%]{display:none}.headerButton[_ngcontent-%COMP%]{color:#fff}.headerButton[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}return e})(),g0=(()=>{class e{constructor(t,i,r,o,a,s,c){this.configurationService=t,this.iconDictionaryService=i,this.importService=r,this.titleService=o,this.storageService=a,this.elementRegistryService=s,this.snackbar=c,this.allIconListItems=new ln,this.configurationHasChanged=!1,this.selectedActors$=new on([]),this.selectedWorkobjects$=new on([]),this.iconSetConfigurationTypes=new on(this.configurationService.getCurrentConfigurationNamesWithoutPrefix()),this.selectedWorkobjects$.next(this.iconSetConfigurationTypes.value.workObjects),this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors),i.getAllIconDictionary().keysArray().forEach(u=>{this.addIconToAllIconList(u)}),r.importedConfigurationEvent.subscribe(u=>{this.importConfiguration(u)});const l=this.storageService.getStoredIconSetConfiguration();l&&this.importConfiguration(l,!1);const d=this.importService.getImportedConfiguration();d&&this.importConfiguration(d,!1)}importConfiguration(t,i=!0){const r=t.actors.keysArray(),o=t.workObjects.keysArray();this.changeName(t.name),r.forEach(a=>{this.allIconListItems.has(a)||this.addIconToAllIconList(a),this.selectedActors$.value.includes(a)||this.selectActor(a)}),o.forEach(a=>{this.allIconListItems.has(a)||this.addIconToAllIconList(a),this.selectedWorkobjects$.value.includes(a)||this.selectWorkObject(a)}),i&&this.saveIconSet(this.elementRegistryService.getUsedIcons(),!0)}getIconSetConfiguration(){return this.iconSetConfigurationTypes}getIconForName(t){return this.allIconListItems.get(t)}isIconActor(t){return this.iconSetConfigurationTypes.value.actors.filter(i=>i===t).length>0}isIconWorkObject(t){return this.iconSetConfigurationTypes.value.workObjects.filter(i=>i===t).length>0}changeName(t){this.titleService.setIconSetName(t);const i=this.iconSetConfigurationTypes.value;i.name=t,this.iconSetConfigurationTypes.next(i)}setAsUnassigned(t,i){i?this.deselectActor(t):this.deselectWorkobject(t),this.updateIcon(!1,!1,t)}setAsActor(t,i){t?(this.updateIcon(!0,!1,i),this.selectActor(i),this.deselectWorkobject(i)):(this.deselectActor(i),this.updateIcon(!1,!1,i))}setAsWorkobject(t,i){t?(this.updateIcon(!1,!0,i),this.selectWorkObject(i),this.deselectActor(i)):(this.deselectWorkobject(i),this.updateIcon(!1,!1,i))}selectActor(t){const i=this.iconSetConfigurationTypes.value;i.actors.includes(t)||(i.actors.push(t),this.iconSetConfigurationTypes.next(i),this.updateActorSubject())}selectWorkObject(t){const i=this.iconSetConfigurationTypes.value;i.workObjects.includes(t)||(i.workObjects.push(t),this.iconSetConfigurationTypes.next(i),this.updateWorkObjectSubject())}deselectActor(t){this.iconSetConfigurationTypes&&this.iconSetConfigurationTypes.next({name:this.iconSetConfigurationTypes.value.name,actors:this.iconSetConfigurationTypes.value.actors.filter(i=>!i.includes(t)),workObjects:this.iconSetConfigurationTypes.value.workObjects}),this.updateActorSubject()}deselectWorkobject(t){this.iconSetConfigurationTypes&&this.iconSetConfigurationTypes.next({name:this.iconSetConfigurationTypes.value.name,actors:this.iconSetConfigurationTypes.value.actors,workObjects:this.iconSetConfigurationTypes.value.workObjects.filter(i=>!i.includes(t))}),this.updateWorkObjectSubject()}setSelectedWorkObject(t){const i=this.iconSetConfigurationTypes.value;i.workObjects=t,this.iconSetConfigurationTypes.next(i),this.updateWorkObjectSubject()}setSelectedActors(t){const i=this.iconSetConfigurationTypes.value;i.actors=t,this.iconSetConfigurationTypes.next(i),this.updateActorSubject()}updateActorSubject(){this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors),this.configurationHasChanged=!0}updateWorkObjectSubject(){this.selectedWorkobjects$.next(this.iconSetConfigurationTypes.value.workObjects),this.configurationHasChanged=!0}resetIconSet(){const t=this.configurationService.createMinimalConfigurationWithDefaultIcons();this.selectedWorkobjects$.value.forEach(i=>{t.workObjects.has(i)||this.deselectWorkobject(i)}),this.selectedActors$.value.forEach(i=>{t.actors.has(i)||this.deselectActor(i)}),this.iconSetConfigurationTypes.next({name:t.name,actors:t.actors.keysArray(),workObjects:t.workObjects.keysArray()}),this.updateAllIconBehaviourSubjects()}cancel(){this.iconSetConfigurationTypes.next(this.configurationService.getCurrentConfigurationNamesWithoutPrefix()),this.updateAllIconBehaviourSubjects(),this.resetToInitialConfiguration()}resetToInitialConfiguration(){this.updateActorSubject(),this.updateWorkObjectSubject()}saveIconSet(t,i=!1){const r=[],o=[];if(this.configurationHasChanged){const a=this.createIconSetConfiguration(),s=a.actors.keysArray();t?.actors.forEach(l=>{!s?.includes(l)&&!r.includes(l)&&r.push(l)});const c=a.workObjects.keysArray();t?.workobjects.forEach(l=>{!c?.includes(l)&&!o.includes(l)&&o.push(l)}),!r.length&&!o.length&&(this.changedIconSetConfiguration=a,this.updateIcons(a),this.storageService.setStoredIconSetConfiguration(this.changedIconSetConfiguration),this.snackbar.open(i?"Configuration imported successfully":"Configuration saved successfully",void 0,{duration:ho,panelClass:$C}))}else this.snackbar.open(i?"No configuration to be imported":"No configuration to be saved",void 0,{duration:ho,panelClass:pc});if(r.length||o.length){if(r.length){const a=r.join(", ");this.snackbar.open(`The following icons are already in use as actors and cannot be changed: ${a}`,void 0,{duration:6e3,panelClass:pc})}if(o.length){const a=o.join(", ");this.snackbar.open(`The following icons are already in use as workobjects and cannot be changed: ${a}`,void 0,{duration:6e3,panelClass:pc})}}}exportIconSet(){this.configurationService.exportConfiguration()}getAndClearSavedConfiguration(){const t=this.changedIconSetConfiguration;return this.changedIconSetConfiguration=void 0,t}createIconSetConfiguration(){const t=new ln,i=new ln;return this.iconSetConfigurationTypes.value.actors.forEach(r=>{t.add(this.iconDictionaryService.getIconSource(r),r)}),this.iconSetConfigurationTypes.value.workObjects.forEach(r=>{i.add(this.iconDictionaryService.getIconSource(r),r)}),{name:this.iconSetConfigurationTypes.value.name||"",actors:t,workObjects:i}}addNewIcon(t){const i=new ln;i.add(this.getSrcForIcon(t),t),this.iconDictionaryService.addIconsToCss(i),this.addIconToAllIconList(t)}addIconToAllIconList(t){this.allIconListItems.add(new on({name:t,svg:this.getSrcForIcon(t),isActor:this.isIconActor(t),isWorkObject:this.isIconWorkObject(t)}),t)}updateIcon(t,i,r){const o=this.getIconForName(r),a=o.value;a.isActor=t,a.isWorkObject=i,o.next(a)}updateAllIconBehaviourSubjects(){const t=this.iconSetConfigurationTypes.value;this.allIconListItems.keysArray().forEach(i=>{t.actors.includes(i)?this.updateIcon(!0,!1,i):t.workObjects.includes(i)?this.updateIcon(!1,!0,i):this.updateIcon(!1,!1,i)})}getSrcForIcon(t){let i;i=t.includes($.DOMAINSTORY)?Al(t):t;const r=this.iconDictionaryService.getIconSource(i);return r?r.startsWith("data")?r:"data:image/svg+xml,"+r:""}updateIcons(t){this.allIconListItems.keysArray().forEach(i=>this.setAsUnassigned(i,this.isIconActor(i))),t.actors.keysArray().forEach(i=>{this.iconDictionaryService.registerIconForType($.ACTOR,i,this.iconDictionaryService.getFullDictionary().get(i)),this.iconDictionaryService.unregisterIconForType($.WORKOBJECT,i),this.setAsActor(!0,i)}),t.workObjects.keysArray().forEach(i=>{this.iconDictionaryService.registerIconForType($.WORKOBJECT,i,this.iconDictionaryService.getFullDictionary().get(i)),this.iconDictionaryService.unregisterIconForType($.ACTOR,i),this.setAsWorkobject(!0,i)})}static#e=this.\u0275fac=function(i){return new(i||e)(F(Ml),F(Es),F(OT),F(fo),F(h0),F(la),F(Bc))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const eH="autosaveConfiguration",tH={activated:!0,interval:30,maxDrafts:5};let nH=(()=>{class e{constructor(t){this.storageService=t,this.configuration=tH,this.configurationSubject=new uz(1),this.configuration$=this.configurationSubject.asObservable(),this.initializeConfiguration()}initializeConfiguration(){this.loadConfiguration(),this.configurationSubject.next(this.configuration)}setConfiguration(t){try{return this.configuration=t,this.saveConfiguration(),this.configurationSubject.next(t),!0}catch{return!1}}loadConfiguration(){this.configuration=this.storageService.get(eH)??tH}saveConfiguration(){this.storageService.set(eH,this.configuration)}static#e=this.\u0275fac=function(i){return new(i||e)(F(h0))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hwe(e,n){if(1&e){const t=vi();B(0,"mat-card")(1,"mat-card-header")(2,"mat-card-title"),Oe(3,"Autosave Options"),W()(),B(4,"mat-card-content",4)(5,"div",5),ct(6,"input",6,0),B(8,"mat-label"),Oe(9,"Enabled"),W()(),B(10,"div",7)(11,"mat-label"),Oe(12,"Interval [sec]"),W(),ct(13,"input",8,1),W(),B(15,"div",7)(16,"mat-label"),Oe(17,"Max. Drafts"),W(),ct(18,"input",8,2),W(),B(20,"button",9),Pe("click",function(){jt(t);const r=Er(7),o=Er(14),a=Er(19);return zt(st().save(r.checked,+a.value,+o.value))}),Oe(21," Apply "),W()()()}if(2&e){const t=n.ngIf;be(6),$e("checked",t.activated),be(7),$e("value",t.interval),be(5),$e("value",t.maxDrafts)}}let fwe=(()=>{class e{constructor(t,i){this.autosaveConfiguration=t,this.snackbar=i}save(t,i,r){this.autosaveConfiguration.setConfiguration({activated:t,maxDrafts:i,interval:r})?this.snackbar.open("Settings for Autosave saved",void 0,{duration:ho,panelClass:$C}):this.snackbar.open("Unable to save settings for Autosave - please try again",void 0,{duration:4e3,panelClass:y3})}static#e=this.\u0275fac=function(i){return new(i||e)(T(nH),T(Bc))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-autosave-options"]],decls:2,vars:3,consts:[["activated",""],["interval",""],["drafts",""],[4,"ngIf"],[1,"cardContent"],[1,"alignSelfCenter"],["type","checkbox",3,"checked"],[1,"inputContainer"],["min","1","type","number",1,"numberInput",3,"value"],["mat-raised-button","","color","primary",1,"saveButton",3,"click"]],template:function(i,r){1&i&&(ut(0,hwe,22,3,"mat-card",3),Zt(1,"async")),2&i&&$e("ngIf",Qt(1,1,r.autosaveConfiguration.configuration$))},dependencies:[cc,Vs,sh,NT,Zz,Qz,Xz,za],styles:[".autosaveEnabled[_ngcontent-%COMP%], .autosaveInterval[_ngcontent-%COMP%]{display:inline-grid;grid-template-columns:120px auto;width:300px;grid-row-gap:5px;height:20px}.enableButton[_ngcontent-%COMP%]{justify-self:start}.autosaveEnabled[_ngcontent-%COMP%]{padding-bottom:2px}.autosaveInterval[_ngcontent-%COMP%]{padding-bottom:10px}.autosaveIntervalSpan[_ngcontent-%COMP%]{padding-top:2px;justify-self:start}.saveButton[_ngcontent-%COMP%]{align-self:end;right:0;margin-left:-5px}.cardContent[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.inputContainer[_ngcontent-%COMP%]{display:inline-grid;width:-moz-fit-content;width:fit-content}.numberInput[_ngcontent-%COMP%]{justify-self:end;width:64px}.alignSelfCenter[_ngcontent-%COMP%]{align-self:center}"]})}return e})();const PT="autosaveDrafts";let v0=(()=>{class e{constructor(t,i,r,o,a,s,c){this.autosaveConfiguration=t,this.exportService=i,this.iconDictionaryService=r,this.rendererService=o,this.snackbar=a,this.storageService=s,this.titleService=c,this.autosavedDraftsChanged$=new xt,this.autosaveConfiguration.configuration$.subscribe(l=>this.updateConfiguration(l))}loadCurrentDrafts(){const t=this.readDrafts();return this.sortDrafts(t),t}loadDraft(t){const r=$p(t.configAndDST.domain),o=JSON.parse(t.configAndDST.dst);this.titleService.updateTitleAndDescription(t.title,t.description,!1);const a=this.iconDictionaryService.getElementsOfType(o,$.ACTOR),s=this.iconDictionaryService.getElementsOfType(o,$.WORKOBJECT);this.iconDictionaryService.updateIconRegistries(a,s,r),this.rendererService.importStory(o,!0,r,!1)}removeAllDrafts(){this.storageService.set(PT,[]),this.autosavedDraftsChanged$.next()}loadLatestDraft(){const t=this.readDrafts();0!==t.length&&this.loadDraft(t[0])}updateConfiguration(t){this.stopTimer(),t.activated&&this.startTimer(t.interval,t.maxDrafts)}stopTimer(){this.autosaveTimer&&(clearInterval(this.autosaveTimer),this.autosaveTimer=void 0)}startTimer(t,i){this.autosaveTimer=setInterval(()=>{const r=this.loadCurrentDrafts(),o=this.createDraft();let a=i>0;if(r.length>0&&(a=a&&!this.isSame(o,r[0])),a&&!this.isDraftEmpty(o)){for(r.unshift(o);r.length>i;)r.pop();this.writeDrafts(r),this.snackbar.open("Draft Saved",void 0,{panelClass:pc,duration:ho}),this.autosavedDraftsChanged$.next()}},1e3*t)}isDraftEmpty(t){return t.title===kl&&""===t.description&&0===JSON.parse(t.configAndDST.dst).length}isSame(t,i){return t.title===i.title&&t.description===i.description&&JSON.stringify(t.configAndDST)===JSON.stringify(i.configAndDST)}writeDrafts(t){this.storageService.set(PT,t)}readDrafts(){return this.storageService.get(PT)??[]}createDraft(){const t=JSON.stringify(this.rendererService.getStory(),null,2),i=this.exportService.createConfigAndDST(t),r=(new Date).toString().slice(0,25);return{title:this.titleService.getTitle(),description:this.titleService.getDescription(),configAndDST:i,date:r}}sortDrafts(t){t.sort((i,r)=>Date.parse(i.date)>Date.parse(r.date)?0:1)}static#e=this.\u0275fac=function(i){return new(i||e)(F(nH),F(m0),F(Es),F(f0),F(Bc),F(h0),F(fo))};static#t=this.\u0275prov=ge({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),mwe=0;const FT=new ye("CdkAccordion");let pwe=(()=>{class e{constructor(){this._stateChanges=new xt,this._openCloseAllActions=new xt,this.id="cdk-accordion-"+mwe++,this.multi=!1}openAll(){this.multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(t){this._stateChanges.next(t)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[Ze.HasDecoratorInputTransform,"multi","multi",Fn]},exportAs:["cdkAccordion"],standalone:!0,features:[en([{provide:FT,useExisting:e}]),So,br]})}return e})(),gwe=0,vwe=(()=>{class e{get expanded(){return this._expanded}set expanded(t){this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}constructor(t,i,r){this.accordion=t,this._changeDetectorRef=i,this._expansionDispatcher=r,this._openCloseAllSubscription=ot.EMPTY,this.closed=new nn,this.opened=new nn,this.destroyed=new nn,this.expandedChange=new nn,this.id="cdk-accordion-child-"+gwe++,this._expanded=!1,this.disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((o,a)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===a&&this.id!==o&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}static#e=this.\u0275fac=function(i){return new(i||e)(T(FT,12),T(io),T(Pz))};static#t=this.\u0275dir=Me({type:e,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[Ze.HasDecoratorInputTransform,"expanded","expanded",Fn],disabled:[Ze.HasDecoratorInputTransform,"disabled","disabled",Fn]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],standalone:!0,features:[en([{provide:FT,useValue:void 0}]),So]})}return e})(),_we=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({})}return e})();const bwe=["body"],ywe=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],xwe=["mat-expansion-panel-header","*","mat-action-row"];function wwe(e,n){}const Ewe=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Cwe=["mat-panel-title","mat-panel-description","*"];function Swe(e,n){1&e&&(B(0,"span",1),_g(),B(1,"svg",2),ct(2,"path",3),W()()),2&e&&$e("@indicatorRotate",st()._getExpandedState())}const LT=new ye("MAT_ACCORDION"),iH="225ms cubic-bezier(0.4,0.0,0.2,1)",rH={indicatorRotate:rm("indicatorRotate",[xs("collapsed, void",kr({transform:"rotate(0deg)"})),xs("expanded",kr({transform:"rotate(180deg)"})),xl("expanded <=> collapsed, void => collapsed",yl(iH))]),bodyExpansion:rm("bodyExpansion",[xs("collapsed, void",kr({height:"0px",visibility:"hidden"})),xs("expanded",kr({height:"*",visibility:""})),xl("expanded <=> collapsed, void => collapsed",yl(iH))])},oH=new ye("MAT_EXPANSION_PANEL");let Dwe=(()=>{class e{constructor(t,i){this._template=t,this._expansionPanel=i}static#e=this.\u0275fac=function(i){return new(i||e)(T(Eo),T(oH,8))};static#t=this.\u0275dir=Me({type:e,selectors:[["ng-template","matExpansionPanelContent",""]],standalone:!0})}return e})(),kwe=0;const aH=new ye("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let sH=(()=>{class e extends vwe{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=t}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}constructor(t,i,r,o,a,s,c){super(t,i,r),this._viewContainerRef=o,this._animationMode=s,this._hideToggle=!1,this.afterExpand=new nn,this.afterCollapse=new nn,this._inputChanges=new xt,this._headerId="mat-expansion-panel-header-"+kwe++,this.accordion=t,this._document=a,this._animationsDisabled="NoopAnimations"===s,c&&(this.hideToggle=c.hideToggle)}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Zf(null),so(()=>this.expanded&&!this._portal),vl(1)).subscribe(()=>{this._portal=new F_(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,i=this._body.nativeElement;return t===i||i.contains(t)}return!1}_animationStarted(t){!cH(t)&&!this._animationsDisabled&&this._body&&this._body?.nativeElement.setAttribute("inert","")}_animationDone(t){cH(t)||("expanded"===t.toState?this.afterExpand.emit():"collapsed"===t.toState&&this.afterCollapse.emit(),!this._animationsDisabled&&this._body&&this._body.nativeElement.removeAttribute("inert"))}static#e=this.\u0275fac=function(i){return new(i||e)(T(LT,12),T(io),T(Pz),T(Co),T(cn),T(er,8),T(aH,8))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-expansion-panel"]],contentQueries:function(i,r,o){if(1&i&&_i(o,Dwe,5),2&i){let a;Wt(a=qt())&&(r._lazyContent=a.first)}},viewQuery:function(i,r){if(1&i&&ji(bwe,5),2&i){let o;Wt(o=qt())&&(r._body=o.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(i,r){2&i&&wt("mat-expanded",r.expanded)("_mat-animation-noopable",r._animationsDisabled)("mat-expansion-panel-spacing",r._hasSpacing())},inputs:{hideToggle:[Ze.HasDecoratorInputTransform,"hideToggle","hideToggle",Fn],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],standalone:!0,features:[en([{provide:LT,useValue:void 0},{provide:oH,useExisting:e}]),So,kt,br,Kn],ngContentSelectors:xwe,decls:7,vars:4,consts:[["body",""],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(i,r){if(1&i){const o=vi();Ci(ywe),St(0),B(1,"div",1,0),Pe("@bodyExpansion.start",function(s){return jt(o),zt(r._animationStarted(s))})("@bodyExpansion.done",function(s){return jt(o),zt(r._animationDone(s))}),B(3,"div",2),St(4,1),ut(5,wwe,0,0,"ng-template",3),W(),St(6,2),W()}2&i&&(be(),$e("@bodyExpansion",r._getExpandedState())("id",r.id),fn("aria-labelledby",r._headerId),be(4),$e("cdkPortalOutlet",r._portal))},dependencies:[gu],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative;background:var(--mat-expansion-container-background-color);color:var(--mat-expansion-container-text-color);border-radius:var(--mat-expansion-container-shape)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape);border-top-left-radius:var(--mat-expansion-container-shape)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape);border-bottom-left-radius:var(--mat-expansion-container-shape)}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;font-family:var(--mat-expansion-container-text-font);font-size:var(--mat-expansion-container-text-size);font-weight:var(--mat-expansion-container-text-weight);line-height:var(--mat-expansion-container-text-line-height);letter-spacing:var(--mat-expansion-container-text-tracking)}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color)}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[rH.bodyExpansion]},changeDetection:0})}return e})();function cH(e){return"void"===e.fromState}let lH=(()=>{class e{constructor(t,i,r,o,a,s,c){this.panel=t,this._element=i,this._focusMonitor=r,this._changeDetectorRef=o,this._animationMode=s,this._parentChangeSubscription=ot.EMPTY,this.tabIndex=0;const l=t.accordion?t.accordion._stateChanges.pipe(so(d=>!(!d.hideToggle&&!d.togglePosition))):Xf;this.tabIndex=parseInt(c||"")||0,this._parentChangeSubscription=fm(t.opened,t.closed,l,t._inputChanges.pipe(so(d=>!!(d.hideToggle||d.disabled||d.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(so(()=>t._containsFocus())).subscribe(()=>r.focusVia(i,"program")),a&&(this.expandedHeight=a.expandedHeight,this.collapsedHeight=a.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case 32:case 13:Yf(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t,i){t?this._focusMonitor.focusVia(this._element,t,i):this._element.nativeElement.focus(i)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static#e=this.\u0275fac=function(i){return new(i||e)(T(sH,1),T(Lt),T(Qf),T(io),T(aH,8),T(er,8),Zc("tabindex"))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(i,r){1&i&&Pe("click",function(){return r._toggle()})("keydown",function(a){return r._keydown(a)}),2&i&&(fn("id",r.panel._headerId)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r._getPanelId())("aria-expanded",r._isExpanded())("aria-disabled",r.panel.disabled),a1("height",r._getHeaderHeight()),wt("mat-expanded",r._isExpanded())("mat-expansion-toggle-indicator-after","after"===r._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===r._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===r._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[Ze.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:iP(t)]},standalone:!0,features:[So,Kn],ngContentSelectors:Cwe,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(i,r){1&i&&(Ci(Ewe),B(0,"span",0),St(1),St(2,1),St(3,2),W(),ut(4,Swe,3,1,"span",1)),2&i&&(wt("mat-content-hide-toggle",!r._showToggle()),be(4),di(4,r._showToggle()?4:-1))},styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-expansion-header-collapsed-state-height);font-family:var(--mat-expansion-header-text-font);font-size:var(--mat-expansion-header-text-size);font-weight:var(--mat-expansion-header-text-weight);line-height:var(--mat-expansion-header-text-line-height);letter-spacing:var(--mat-expansion-header-text-tracking)}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color)}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color)}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color)}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color)}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color);display:inline-block;display:var(--mat-expansion-legacy-header-indicator-display, inline-block)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color);display:none;display:var(--mat-expansion-header-indicator-display, none)}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[rH.indicatorRotate]},changeDetection:0})}return e})(),Twe=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"],standalone:!0})}return e})(),Awe=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275dir=Me({type:e,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"],standalone:!0})}return e})(),Mwe=(()=>{class e extends pwe{constructor(){super(...arguments),this._ownHeaders=new kd,this.hideToggle=!1,this.displayMode="default",this.togglePosition="after"}ngAfterContentInit(){this._headers.changes.pipe(Zf(this._headers)).subscribe(t=>{this._ownHeaders.reset(t.filter(i=>i.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new PL(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(t){this._keyManager.onKeydown(t)}_handleHeaderFocus(t){this._keyManager.updateActiveItem(t)}ngOnDestroy(){super.ngOnDestroy(),this._keyManager?.destroy(),this._ownHeaders.destroy()}static#e=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=ti(e)))(r||e)}})();static#t=this.\u0275dir=Me({type:e,selectors:[["mat-accordion"]],contentQueries:function(i,r,o){if(1&i&&_i(o,lH,5),2&i){let a;Wt(a=qt())&&(r._headers=a)}},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(i,r){2&i&&wt("mat-accordion-multi",r.multi)},inputs:{hideToggle:[Ze.HasDecoratorInputTransform,"hideToggle","hideToggle",Fn],displayMode:"displayMode",togglePosition:"togglePosition"},exportAs:["matAccordion"],standalone:!0,features:[en([{provide:LT,useExisting:e}]),So,kt]})}return e})(),dH=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An,_we,vu]})}return e})();function Iwe(e,n){if(1&e){const t=vi();B(0,"div",6)(1,"div")(2,"div",7),Oe(3),W(),B(4,"div",8),Oe(5),W()(),B(6,"button",5),Pe("click",function(){const r=jt(t).$implicit;return zt(st(2).loadDraft(r))}),Oe(7," Load Draft "),W()()}if(2&e){const t=n.$implicit;be(3),ko(t.title),be(2),ko(t.date)}}function Owe(e,n){if(1&e){const t=vi();B(0,"div",2),ut(1,Iwe,8,2,"div",3),B(2,"div",4),ct(3,"div"),B(4,"button",5),Pe("click",function(){return jt(t),zt(st().removeAllDrafts())}),Oe(5," Remove All Drafts "),W()()()}if(2&e){const t=st();be(),$e("ngForOf",t.drafts)}}function Rwe(e,n){1&e&&Oe(0,"No drafts found.")}let Nwe=(()=>{class e{constructor(t,i){this.autosaveService=t,this.snackbar=i,this.drafts=[],this.subscription=this.autosaveService.autosavedDraftsChanged$.subscribe(()=>this.initDrafts())}ngOnInit(){this.initDrafts()}initDrafts(){this.drafts=this.autosaveService.loadCurrentDrafts()}loadDraft(t){this.autosaveService.loadDraft(t),this.snackbar.open("Draft loaded",void 0,{duration:ho,panelClass:$C})}removeAllDrafts(){this.autosaveService.removeAllDrafts()}static#e=this.\u0275fac=function(i){return new(i||e)(T(v0),T(Bc))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-autosaved-drafts"]],decls:10,vars:4,consts:[["noDrafts",""],["class","items",4,"ngIf","ngIfElse"],[1,"items"],["class","item border-bottom",4,"ngFor","ngForOf"],[1,"item"],["mat-raised-button","","color","primary",1,"item-button",3,"click"],[1,"item","border-bottom"],[1,"item-title"],[1,"item-date"]],template:function(i,r){if(1&i&&(B(0,"mat-accordion")(1,"mat-expansion-panel")(2,"mat-expansion-panel-header")(3,"mat-panel-title"),Oe(4,"History"),W(),B(5,"mat-panel-description"),Oe(6),W()(),ut(7,Owe,6,1,"div",1),W()(),ut(8,Rwe,1,0,"ng-template",null,0,iu)),2&i){const o=Er(9);be(6),y1(" ",r.drafts.length?r.drafts.length:"no"," ",r.drafts.length>1?"drafts":"draft"," available "),be(),$e("ngIf",r.drafts.length)("ngIfElse",o)}},dependencies:[lu,cc,Vs,Mwe,sH,lH,Awe,Twe],styles:[".items[_ngcontent-%COMP%]{padding-top:0!important}.items[_ngcontent-%COMP%] .mat-list-item-content{padding:0}.item[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;padding:8px 0;width:400px}.border-bottom[_ngcontent-%COMP%]{border-bottom:1px solid darkgray}.item-title[_ngcontent-%COMP%]{font-weight:700;width:270px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.item-date[_ngcontent-%COMP%]{font-weight:400}.item-button[_ngcontent-%COMP%]{margin-left:1rem}mat-list-item[_ngcontent-%COMP%]{border-bottom:1px solid darkgray}"]})}return e})(),Pwe=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-autosave-settings"]],decls:2,vars:0,template:function(i,r){1&i&&ct(0,"app-autosave-options")(1,"app-autosaved-drafts")},dependencies:[fwe,Nwe]})}return e})(),Fwe=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-general-settings"]],decls:2,vars:0,consts:[[1,"content"]],template:function(i,r){1&i&&(B(0,"div",0),ct(1,"app-autosave-settings"),W())},dependencies:[Pwe],styles:[".content[_ngcontent-%COMP%]{display:grid;grid-template-columns:450px auto}"]})}return e})();var Pr=function(e){return e.ICON_FILTER_ACTOR="ICON_FILTER_ACTOR",e.ICON_FILTER_WORKOBJECT="ICON_FILTER_WORKOBJECT",e.ICON_FILTER_UNASSIGNED="ICON_FILTER_UNASSIGNED",e.ICON_FILTER_NONE="ICON_FILTER_NONE",e}(Pr||{});const uH=["*"];class Bwe{constructor(){this.columnIndex=0,this.rowIndex=0}get rowCount(){return this.rowIndex+1}get rowspan(){const n=Math.max(...this.tracker);return n>1?this.rowCount+n-1:this.rowCount}update(n,t){this.columnIndex=0,this.rowIndex=0,this.tracker=new Array(n),this.tracker.fill(0,0,this.tracker.length),this.positions=t.map(i=>this._trackTile(i))}_trackTile(n){const t=this._findMatchingGap(n.colspan);return this._markTilePosition(t,n),this.columnIndex=t+n.colspan,new Vwe(this.rowIndex,t)}_findMatchingGap(n){let t=-1,i=-1;do{this.columnIndex+n>this.tracker.length?(this._nextRow(),t=this.tracker.indexOf(0,this.columnIndex),i=this._findGapEndIndex(t)):(t=this.tracker.indexOf(0,this.columnIndex),-1!=t?(i=this._findGapEndIndex(t),this.columnIndex=t+1):(this._nextRow(),t=this.tracker.indexOf(0,this.columnIndex),i=this._findGapEndIndex(t)))}while(i-t{class e{constructor(t,i){this._element=t,this._gridList=i,this._rowspan=1,this._colspan=1}get rowspan(){return this._rowspan}set rowspan(t){this._rowspan=Math.round(_s(t))}get colspan(){return this._colspan}set colspan(t){this._colspan=Math.round(_s(t))}_setStyle(t,i){this._element.nativeElement.style[t]=i}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(hH,8))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-grid-tile"]],hostAttrs:[1,"mat-grid-tile"],hostVars:2,hostBindings:function(i,r){2&i&&fn("rowspan",r.rowspan)("colspan",r.colspan)},inputs:{rowspan:"rowspan",colspan:"colspan"},exportAs:["matGridTile"],standalone:!0,features:[Kn],ngContentSelectors:uH,decls:2,vars:0,consts:[[1,"mat-grid-tile-content"]],template:function(i,r){1&i&&(Ci(),B(0,"div",0),St(1),W())},styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size)}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size)}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size)}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size)}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}"],encapsulation:2,changeDetection:0})}return e})();const jwe=/^-?\d+((\.\d+)?[A-Za-z%$]?)+$/;class BT{constructor(){this._rows=0,this._rowspan=0}init(n,t,i,r){this._gutterSize=mH(n),this._rows=t.rowCount,this._rowspan=t.rowspan,this._cols=i,this._direction=r}getBaseTileSize(n,t){return`(${n}% - (${this._gutterSize} * ${t}))`}getTilePosition(n,t){return 0===t?"0":Jl(`(${n} + ${this._gutterSize}) * ${t}`)}getTileSize(n,t){return`(${n} * ${t}) + (${t-1} * ${this._gutterSize})`}setStyle(n,t,i){let r=100/this._cols,o=(this._cols-1)/this._cols;this.setColStyles(n,i,r,o),this.setRowStyles(n,t,r,o)}setColStyles(n,t,i,r){let o=this.getBaseTileSize(i,r);n._setStyle("rtl"===this._direction?"right":"left",this.getTilePosition(o,t)),n._setStyle("width",Jl(this.getTileSize(o,n.colspan)))}getGutterSpan(){return`${this._gutterSize} * (${this._rowspan} - 1)`}getTileSpan(n){return`${this._rowspan} * ${this.getTileSize(n,1)}`}getComputedHeight(){return null}}class zwe extends BT{constructor(n){super(),this.fixedRowHeight=n}init(n,t,i,r){super.init(n,t,i,r),this.fixedRowHeight=mH(this.fixedRowHeight),jwe.test(this.fixedRowHeight)}setRowStyles(n,t){n._setStyle("top",this.getTilePosition(this.fixedRowHeight,t)),n._setStyle("height",Jl(this.getTileSize(this.fixedRowHeight,n.rowspan)))}getComputedHeight(){return["height",Jl(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)]}reset(n){n._setListStyle(["height",null]),n._tiles&&n._tiles.forEach(t=>{t._setStyle("top",null),t._setStyle("height",null)})}}class Hwe extends BT{constructor(n){super(),this._parseRatio(n)}setRowStyles(n,t,i,r){this.baseTileHeight=this.getBaseTileSize(i/this.rowHeightRatio,r),n._setStyle("marginTop",this.getTilePosition(this.baseTileHeight,t)),n._setStyle("paddingTop",Jl(this.getTileSize(this.baseTileHeight,n.rowspan)))}getComputedHeight(){return["paddingBottom",Jl(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`)]}reset(n){n._setListStyle(["paddingBottom",null]),n._tiles.forEach(t=>{t._setStyle("marginTop",null),t._setStyle("paddingTop",null)})}_parseRatio(n){const t=n.split(":");this.rowHeightRatio=parseFloat(t[0])/parseFloat(t[1])}}class $we extends BT{setRowStyles(n,t){let o=this.getBaseTileSize(100/this._rowspan,(this._rows-1)/this._rows);n._setStyle("top",this.getTilePosition(o,t)),n._setStyle("height",Jl(this.getTileSize(o,n.rowspan)))}reset(n){n._tiles&&n._tiles.forEach(t=>{t._setStyle("top",null),t._setStyle("height",null)})}}function Jl(e){return`calc(${e})`}function mH(e){return e.match(/([A-Za-z%]+)$/)?e:`${e}px`}let Gwe=(()=>{class e{constructor(t,i){this._element=t,this._dir=i,this._gutter="1px"}get cols(){return this._cols}set cols(t){this._cols=Math.max(1,Math.round(_s(t)))}get gutterSize(){return this._gutter}set gutterSize(t){this._gutter=`${t??""}`}get rowHeight(){return this._rowHeight}set rowHeight(t){const i=`${t??""}`;i!==this._rowHeight&&(this._rowHeight=i,this._setTileStyler(this._rowHeight))}ngOnInit(){this._checkCols(),this._checkRowHeight()}ngAfterContentChecked(){this._layoutTiles()}_checkCols(){}_checkRowHeight(){this._rowHeight||this._setTileStyler("1:1")}_setTileStyler(t){this._tileStyler&&this._tileStyler.reset(this),this._tileStyler="fit"===t?new $we:t&&t.indexOf(":")>-1?new Hwe(t):new zwe(t)}_layoutTiles(){this._tileCoordinator||(this._tileCoordinator=new Bwe);const t=this._tileCoordinator,i=this._tiles.filter(o=>!o._gridList||o._gridList===this),r=this._dir?this._dir.value:"ltr";this._tileCoordinator.update(this.cols,i),this._tileStyler.init(this.gutterSize,t,this.cols,r),i.forEach((o,a)=>{const s=t.positions[a];this._tileStyler.setStyle(o,s.row,s.col)}),this._setListStyle(this._tileStyler.getComputedHeight())}_setListStyle(t){t&&(this._element.nativeElement.style[t[0]]=t[1])}static#e=this.\u0275fac=function(i){return new(i||e)(T(Lt),T(Jf,8))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-grid-list"]],contentQueries:function(i,r,o){if(1&i&&_i(o,fH,5),2&i){let a;Wt(a=qt())&&(r._tiles=a)}},hostAttrs:[1,"mat-grid-list"],hostVars:1,hostBindings:function(i,r){2&i&&fn("cols",r.cols)},inputs:{cols:"cols",gutterSize:"gutterSize",rowHeight:"rowHeight"},exportAs:["matGridList"],standalone:!0,features:[en([{provide:hH,useExisting:e}]),Kn],ngContentSelectors:uH,decls:2,vars:0,template:function(i,r){1&i&&(Ci(),B(0,"div"),St(1),W())},styles:[".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}.mat-grid-tile-header{font-size:var(--mat-grid-list-tile-header-primary-text-size)}.mat-grid-tile-header .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-header .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-header-secondary-text-size)}.mat-grid-tile-footer{font-size:var(--mat-grid-list-tile-footer-primary-text-size)}.mat-grid-tile-footer .mat-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;box-sizing:border-box}.mat-grid-tile-footer .mat-line:nth-child(n+2){font-size:var(--mat-grid-list-tile-footer-secondary-text-size)}.mat-grid-tile-content{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}"],encapsulation:2,changeDetection:0})}return e})(),pH=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[KL,An,KL,An]})}return e})();const Wwe=["button"],qwe=["*"];function Ywe(e,n){1&e&&ct(0,"mat-pseudo-checkbox",3),2&e&&$e("disabled",st().disabled)}function Kwe(e,n){1&e&&ct(0,"mat-pseudo-checkbox",3),2&e&&$e("disabled",st().disabled)}const gH=new ye("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:function Xwe(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1}}}),vH=new ye("MatButtonToggleGroup"),Zwe={provide:ao,useExisting:an(()=>yH),multi:!0};let _H=0;class bH{constructor(n,t){this.source=n,this.value=t}}let yH=(()=>{class e{get name(){return this._name}set name(t){this._name=t,this._markButtonsForCheck()}get value(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(i=>i.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}get selected(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=t,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markButtonsForCheck()}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._markButtonsForCheck()}get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(t){this._hideMultipleSelectionIndicator=t,this._markButtonsForCheck()}constructor(t,i){this._changeDetector=t,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=()=>{},this._onTouched=()=>{},this._name="mat-button-toggle-group-"+_H++,this.valueChange=new nn,this.change=new nn,this.appearance=i&&i.appearance?i.appearance:"standard",this.hideSingleSelectionIndicator=i?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=i?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new MT(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked))}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_emitChangeEvent(t){const i=new bH(t,this.value);this._rawValue=i.value,this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(t,i,r=!1,o=!1){!this.multiple&&this.selected&&!t.checked&&(this.selected.checked=!1),this._selectionModel?i?this._selectionModel.select(t):this._selectionModel.deselect(t):o=!0,o?Promise.resolve().then(()=>this._updateModelValue(t,r)):this._updateModelValue(t,r)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return!(typeof this._rawValue>"u")&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(i=>null!=t.value&&i===t.value):t.value===this._rawValue)}_setSelectionByValue(t){this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(i=>this._selectValue(i))):(this._clearSelection(),this._selectValue(t)))}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>t.checked=!1)}_selectValue(t){const i=this._buttonToggles.find(r=>null!=r.value&&r.value===t);i&&(i.checked=!0,this._selectionModel.select(i))}_updateModelValue(t,i){i&&this._emitChangeEvent(t),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(t=>t._markForCheck())}static#e=this.\u0275fac=function(i){return new(i||e)(T(io),T(gH,8))};static#t=this.\u0275dir=Me({type:e,selectors:[["mat-button-toggle-group"]],contentQueries:function(i,r,o){if(1&i&&_i(o,VT,5),2&i){let a;Wt(a=qt())&&(r._buttonToggles=a)}},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(i,r){2&i&&(fn("aria-disabled",r.disabled),wt("mat-button-toggle-vertical",r.vertical)("mat-button-toggle-group-appearance-standard","standard"===r.appearance))},inputs:{appearance:"appearance",name:"name",vertical:[Ze.HasDecoratorInputTransform,"vertical","vertical",Fn],value:"value",multiple:[Ze.HasDecoratorInputTransform,"multiple","multiple",Fn],disabled:[Ze.HasDecoratorInputTransform,"disabled","disabled",Fn],hideSingleSelectionIndicator:[Ze.HasDecoratorInputTransform,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Fn],hideMultipleSelectionIndicator:[Ze.HasDecoratorInputTransform,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",Fn]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],standalone:!0,features:[en([Zwe,{provide:vH,useExisting:e}]),So]})}return e})(),VT=(()=>{class e{get buttonId(){return`${this.id}-button`}get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=t}constructor(t,i,r,o,a,s){this._changeDetectorRef=i,this._elementRef=r,this._focusMonitor=o,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new nn;const c=Number(a);this.tabIndex=c||0===c?c:null,this.buttonToggleGroup=t,this.appearance=s&&s.appearance?s.appearance:"standard"}ngOnInit(){const t=this.buttonToggleGroup;this.id=this.id||"mat-button-toggle-"+_H++,t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){const t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){const t=!!this._isSingleSelector()||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new bH(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this._isSingleSelector()?this.buttonToggleGroup.name:this.name||null}_isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static#e=this.\u0275fac=function(i){return new(i||e)(T(vH,8),T(io),T(Lt),T(Qf),Zc("tabindex"),T(gH,8))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["mat-button-toggle"]],viewQuery:function(i,r){if(1&i&&ji(Wwe,5),2&i){let o;Wt(o=qt())&&(r._buttonElement=o.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:12,hostBindings:function(i,r){1&i&&Pe("focus",function(){return r.focus()}),2&i&&(fn("aria-label",null)("aria-labelledby",null)("id",r.id)("name",null),wt("mat-button-toggle-standalone",!r.buttonToggleGroup)("mat-button-toggle-checked",r.checked)("mat-button-toggle-disabled",r.disabled)("mat-button-toggle-appearance-standard","standard"===r.appearance))},inputs:{ariaLabel:[Ze.None,"aria-label","ariaLabel"],ariaLabelledby:[Ze.None,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[Ze.HasDecoratorInputTransform,"disableRipple","disableRipple",Fn],appearance:"appearance",checked:[Ze.HasDecoratorInputTransform,"checked","checked",Fn],disabled:[Ze.HasDecoratorInputTransform,"disabled","disabled",Fn]},outputs:{change:"change"},exportAs:["matButtonToggle"],standalone:!0,features:[So,Kn],ngContentSelectors:qwe,decls:8,vars:11,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-label-content"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(i,r){if(1&i){const o=vi();Ci(),B(0,"button",1,0),Pe("click",function(){return jt(o),zt(r._onButtonClick())}),B(2,"span",2),ut(3,Ywe,1,1,"mat-pseudo-checkbox",3)(4,Kwe,1,1,"mat-pseudo-checkbox",3),St(5),W()(),ct(6,"span",4)(7,"span",5)}if(2&i){const o=Er(1);$e("id",r.buttonId)("disabled",r.disabled||null),fn("tabindex",r.disabled?-1:r.tabIndex)("aria-pressed",r.checked)("name",r._getButtonName())("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby),be(3),di(3,r.buttonToggleGroup&&r.checked&&!r.buttonToggleGroup.multiple&&!r.buttonToggleGroup.hideSingleSelectionIndicator?3:-1),be(),di(4,r.buttonToggleGroup&&r.checked&&r.buttonToggleGroup.multiple&&!r.buttonToggleGroup.hideMultipleSelectionIndicator?4:-1),be(3),$e("matRippleTrigger",o)("matRippleDisabled",r.disableRipple||r.disabled)}},dependencies:[b_,gie],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-standard-button-toggle-shape);border:solid 1px var(--mat-standard-button-toggle-divider-color)}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var( --mat-standard-button-toggle-selected-state-text-color )}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var( --mat-legacy-button-toggle-selected-state-text-color )}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle .mat-pseudo-checkbox{margin-right:12px}[dir=rtl] .mat-button-toggle .mat-pseudo-checkbox{margin-right:0;margin-left:12px}.mat-button-toggle-checked{color:var(--mat-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var( --mat-legacy-button-toggle-disabled-state-text-color )}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color);background-color:var(--mat-standard-button-toggle-background-color);font-family:var(--mat-standard-button-toggle-label-text-font);font-size:var(--mat-standard-button-toggle-label-text-size);line-height:var(--mat-standard-button-toggle-label-text-line-height);font-weight:var(--mat-standard-button-toggle-label-text-weight);letter-spacing:var(--mat-standard-button-toggle-label-text-tracking)}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-standard-button-toggle-divider-color)}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-standard-button-toggle-divider-color)}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-standard-button-toggle-divider-color)}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color);background-color:var(--mat-standard-button-toggle-selected-state-background-color)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color);background-color:var(--mat-standard-button-toggle-disabled-state-background-color)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var( --mat-standard-button-toggle-disabled-selected-state-text-color )}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-disabled-selected-state-text-color);background-color:var(--mat-standard-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-standard-button-toggle-state-layer-color)}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-hover-state-layer-opacity)}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-focus-state-layer-opacity)}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-button-toggle-height)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-legacy-button-toggle-state-layer-color)}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius:var(--mat-standard-button-toggle-shape)}.mat-button-toggle-group-appearance-standard .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-standard-button-toggle-shape);border-bottom-right-radius:var(--mat-standard-button-toggle-shape)}.mat-button-toggle-group-appearance-standard .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-standard-button-toggle-shape);border-bottom-left-radius:var(--mat-standard-button-toggle-shape)}"],encapsulation:2,changeDetection:0})}return e})(),xH=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[An,oC,VT,An]})}return e})(),Qwe=(()=>{class e{get name(){return this.iconName}get id(){return"domain-configuration-icon-"+this.iconName}constructor(t){this.iconSetCustomizationService=t,this.iconName="",this.iconInitiated=!1,this.icon=new on({}),this.isActor=!1,this.isWorkobject=!1,this.isNone=!0}ngOnInit(){this.icon=this.iconSetCustomizationService.getIconForName(this.iconName),this.icon&&(this.icon.subscribe(t=>{this.isActor=t.isActor,this.isWorkobject=t.isWorkObject,this.isNone=!(t.isActor||t.isWorkObject)}),this.isActor=this.icon.value.isActor,this.isWorkobject=this.icon.value.isWorkObject,this.isNone=!(this.icon.value.isActor||this.icon.value.isWorkObject))}ngAfterViewChecked(){this.createIcon()}createIcon(){const t=document.getElementById(this.id);t&&!this.iconInitiated&&(t.src=""+this.icon.value?.svg,this.iconInitiated=!0)}toggleNone(){this.iconSetCustomizationService.setAsUnassigned(this.iconName,this.icon.value.isActor)}toggleActor(){this.iconSetCustomizationService.setAsActor(!0,this.iconName)}toggleWorkobject(){this.iconSetCustomizationService.setAsWorkobject(!0,this.iconName)}static#e=this.\u0275fac=function(i){return new(i||e)(T(g0))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-icon-list-item"]],inputs:{iconName:"iconName"},decls:16,vars:13,consts:[[1,"IconContainer"],[1,"content"],["src","",1,"icon",3,"id","alt"],[1,"name"],[1,"footer"],[3,"change","value","checked"],[1,"toggleButtonTitle"]],template:function(i,r){1&i&&(B(0,"div",0)(1,"div",1),ct(2,"img",2),B(3,"div",3),Oe(4),W()(),B(5,"div",4)(6,"mat-button-toggle-group")(7,"mat-button-toggle",5),Pe("change",function(){return r.toggleNone()}),B(8,"span",6),Oe(9,"None"),W()(),B(10,"mat-button-toggle",5),Pe("change",function(){return r.toggleActor()}),B(11,"span",6),Oe(12,"Actor"),W()(),B(13,"mat-button-toggle",5),Pe("change",function(){return r.toggleWorkobject()}),B(14,"span",6),Oe(15,"Workobject"),W()()()()()),2&i&&(be(2),ll("id",r.id),ll("alt",r.name),be(2),ko(r.name),be(3),$e("value",r.isNone)("checked",r.isNone),be(3),wt("activeMatButtonActor",r.isActor),$e("value",r.isActor)("checked",r.isActor),be(3),wt("activeMatButtonWorkObject",r.isWorkobject),$e("value",r.isWorkobject)("checked",r.isWorkobject))},dependencies:[yH,VT],styles:[".IconContainer[_ngcontent-%COMP%]{width:170px;height:170px}.content[_ngcontent-%COMP%]{display:grid;grid-template-rows:auto auto;justify-items:center}.icon[_ngcontent-%COMP%]{width:50px;height:50px}.name[_ngcontent-%COMP%]{word-wrap:anywhere;max-height:75px;overflow:hidden;padding-bottom:2px}.footer[_ngcontent-%COMP%]{display:flex;justify-content:center}.footer[_ngcontent-%COMP%] .mat-button-toggle-label-content{font-size:10pt!important;padding:0 5px!important;line-height:inherit!important}.footer[_ngcontent-%COMP%] .activeMatButtonActor button{background-color:#43acbf;color:#fff}.footer[_ngcontent-%COMP%] .activeMatButtonWorkObject button{background-color:#0168b7;color:#fff}"]})}return e})(),Jwe=(()=>{class e{constructor(){this.iconInitiated=!1}get id(){return"domain-configuration-details-icon-"+this.icon.name.toLowerCase()+"-"+(this.icon.isWorkObject?"workobject":"actor")}get name(){return this.icon.name}ngAfterViewChecked(){this.createIcon()}createIcon(){const t=document.getElementById(this.id);t&&!this.iconInitiated&&(t.src=""+this.icon.svg,this.iconInitiated=!0)}static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-details-list-item"]],inputs:{icon:"icon"},decls:4,vars:4,consts:[[1,"detailsListItem"],[1,"icon",3,"id","alt","src"],[1,"iconName"]],template:function(i,r){1&i&&(B(0,"div",0),ct(1,"img",1),B(2,"mat-label",2),Oe(3),W()()),2&i&&(be(),ll("id",r.id),ll("alt",r.name),$e("src",r.icon.svg,jg),be(2),ko(r.icon.name))},dependencies:[sh],styles:[".icon[_ngcontent-%COMP%]{width:20px;height:20px;padding-right:3px}.detailsListItem[_ngcontent-%COMP%]{display:flex;justify-items:center;align-items:center;width:250px}.iconName[_ngcontent-%COMP%]{max-width:225px;word-wrap:anywhere;white-space:pre-wrap!important}"]})}return e})();function e1e(e,n){if(1&e){const t=vi();B(0,"mat-list-item",7),Pe("dragover",function(r){return jt(t),zt(st().allowDrop(r,"actorList"))})("dragstart",function(){const r=jt(t).index;return zt(st().onDragStart(r,"actorList"))})("drop",function(r){const o=jt(t),a=o.$implicit,s=o.index;return zt(st().onDrop(r,a,!0,s))}),ct(1,"app-details-list-item",8),W()}if(2&e){const t=n.$implicit,i=st();be(),$e("icon",i.getIconForName(t))}}function t1e(e,n){if(1&e){const t=vi();B(0,"mat-list-item",7),Pe("dragover",function(r){return jt(t),zt(st().allowDrop(r,"workobjectList"))})("dragstart",function(){const r=jt(t).index;return zt(st().onDragStart(r,"workobjectList"))})("drop",function(r){const o=jt(t),a=o.$implicit,s=o.index;return zt(st().onDrop(r,a,!1,s))}),ct(1,"app-details-list-item",8),W()}if(2&e){const t=n.$implicit,i=st();be(),$e("icon",i.getIconForName(t))}}let n1e=(()=>{class e{constructor(t,i){this.customizationService=t,this.draggedList="",this.draggedIndex=0,this.selectedActors$=this.customizationService.selectedActors$,this.selectedWorkobjects$=this.customizationService.selectedWorkobjects$,this.iconSetName=i.iconSetName$}ngOnInit(){}changeName(t){this.customizationService.changeName(t.target.value)}getIconForName(t){return this.customizationService.getIconForName(t).value}allowDrop(t,i){this.draggedList===i&&t.preventDefault()}onDrop(t,i,r,o){let a;a=r?this.selectedActors$:this.selectedWorkobjects$;const s=a.value,c=s[this.draggedIndex];s.splice(this.draggedIndex,1),s.splice(o,0,c),a.next(s),r?this.customizationService.setSelectedActors(s):this.customizationService.setSelectedWorkObject(s)}onDragStart(t,i){this.draggedList=i,this.draggedIndex=t}static#e=this.\u0275fac=function(i){return new(i||e)(T(g0),T(fo))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-icon-set-details"]],decls:20,vars:9,consts:[[1,"details","smallScrollbar"],[1,"iconSetDetails","bottom-border"],[1,"inputWidth"],["matInput","","type","text",3,"input","value"],[1,"actorList","bottom-border"],["class","compactItem","draggable","true",3,"dragover","dragstart","drop",4,"ngFor","ngForOf"],[1,"workobjectList"],["draggable","true",1,"compactItem",3,"dragover","dragstart","drop"],[3,"icon"]],template:function(i,r){1&i&&(B(0,"div",0)(1,"div",1)(2,"h3"),Oe(3,"Icon Set Name"),W(),B(4,"form")(5,"mat-form-field",2)(6,"input",3),Zt(7,"async"),Pe("input",function(a){return r.changeName(a)}),W()()()(),B(8,"div",4)(9,"h3"),Oe(10,"Order of Actors"),W(),B(11,"mat-list"),ut(12,e1e,2,1,"mat-list-item",5),Zt(13,"async"),W()(),B(14,"div",6)(15,"h3"),Oe(16,"Order of Work Objects"),W(),B(17,"mat-list"),ut(18,t1e,2,1,"mat-list-item",5),Zt(19,"async"),W()()()),2&i&&(be(6),$e("value",Qt(7,3,r.iconSetName)),be(6),$e("ngForOf",Qt(13,5,r.selectedActors$)),be(6),$e("ngForOf",Qt(19,7,r.selectedWorkobjects$)))},dependencies:[lu,d_,t_,$f,$z,Uz,l0,jp,Jwe,za],styles:[".details[_ngcontent-%COMP%]{display:grid;grid-template-rows:68px auto auto;min-height:100vh;grid-row-gap:1px;overflow-y:scroll;overflow-x:hidden;width:250px;border-left:solid 1px #ccc}.iconSetDetails[_ngcontent-%COMP%]{margin-top:10px}.iconSetDetails[_ngcontent-%COMP%] .mat-mdc-form-field-infix{border:none;padding-bottom:0!important;padding-top:0!important}.iconSetDetails[_ngcontent-%COMP%] .mdc-text-field{padding-left:0!important}.compactItem[_ngcontent-%COMP%]{height:40px!important}.fullWidth[_ngcontent-%COMP%]{width:100%;padding-left:15px}.inputWidth[_ngcontent-%COMP%]{width:200px;padding-left:15px;height:46px}h3[_ngcontent-%COMP%]{padding-left:15px;margin-bottom:0;font-weight:700}mat-list[_ngcontent-%COMP%]{overflow:auto;padding-top:0}.bottom-border[_ngcontent-%COMP%]{border-bottom:2px solid #ccc}"]})}return e})();function i1e(e,n){if(1&e&&(B(0,"mat-grid-tile",24),ct(1,"app-icon-list-item",25),W()),2&e){const t=n.$implicit;$e("colspan",1)("rowspan",1),be(),$e("iconName",t)}}let r1e=(()=>{class e{constructor(t,i,r,o){this.configurationService=t,this.iconDictionaryService=i,this.iconSetCustomizationService=r,this.elementRegistryService=o,this.filter=new on(Pr.ICON_FILTER_NONE),this.selectedActors=new on([]),this.selectedWorkobjects=new on([]),this.allIconNames=new on([]),this.allFilteredIconNames=new on([]),this.iconSetConfigurationTypes=this.iconSetCustomizationService.getIconSetConfiguration().value,this.allIcons=new on(this.iconDictionaryService.getFullDictionary()),this.allIcons.subscribe(a=>{this.allIconNames.next(a.keysArray().sort(this.sortByName))}),this.selectedActors=this.iconSetCustomizationService.selectedActors$,this.selectedWorkobjects=this.iconSetCustomizationService.selectedWorkobjects$}ngOnInit(){this.filter.subscribe(t=>{let i=this.getFilteredNamesForType(t);this.allFilteredIconNames.next(i.sort(this.sortByName))})}sortByName(t,i){return t.includes("_custom")==i.includes("_custom")?t{if(s.target){const c=s.target.result;this.iconDictionaryService.addIMGToIconDictionary(c,a),this.iconDictionaryService.registerIconForBPMN(a,c,$.ACTOR),this.allIcons.next(this.iconDictionaryService.getFullDictionary()),this.filter.next(this.filter.value),this.iconSetCustomizationService.addNewIcon(a)}},r.readAsDataURL(i)}}startIconSetImport(){document.getElementById("importDomain")?.click()}importIconSet(){const t=document.getElementById("importDomain").files[0],i=new FileReader;i.onloadend=r=>{const a=$p(JSON.parse(r.target?.result));this.configurationService.loadConfiguration(a,!1),this.iconSetCustomizationService.importConfiguration(a)},i.readAsText(t)}filterForActors(){this.filter.next(this.filter.value!==Pr.ICON_FILTER_ACTOR?Pr.ICON_FILTER_ACTOR:Pr.ICON_FILTER_NONE)}filterForWorkobjects(){this.filter.next(this.filter.value!==Pr.ICON_FILTER_WORKOBJECT?Pr.ICON_FILTER_WORKOBJECT:Pr.ICON_FILTER_NONE)}filterForUnassigned(){this.filter.next(this.filter.value!==Pr.ICON_FILTER_UNASSIGNED?Pr.ICON_FILTER_UNASSIGNED:Pr.ICON_FILTER_NONE)}filterByNameAndType(t){const i=this.getFilteredNamesForType(this.filter.value).filter(r=>r.toLowerCase().includes(t.target.value.toLowerCase()));this.allFilteredIconNames.next(i.sort(this.sortByName))}getFilteredNamesForType(t){let i=[];switch(t){case Pr.ICON_FILTER_NONE:i=this.allIconNames.value;break;case Pr.ICON_FILTER_ACTOR:i=this.allIconNames.value.filter(r=>this.iconSetCustomizationService.isIconActor(r));break;case Pr.ICON_FILTER_WORKOBJECT:i=this.allIconNames.value.filter(r=>this.iconSetCustomizationService.isIconWorkObject(r));break;case Pr.ICON_FILTER_UNASSIGNED:i=this.allIconNames.value.filter(r=>!this.iconSetCustomizationService.isIconActor(r)&&!this.iconSetCustomizationService.isIconWorkObject(r))}return i}static#e=this.\u0275fac=function(i){return new(i||e)(T(Ml),T(Es),T(g0),T(la))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-icon-set-configuration"]],decls:49,vars:15,consts:[[1,"content"],[1,"header"],[1,"searchbar"],["mat-button","","title","Unassigned Icons",3,"click"],["mat-button","","title","Actors",3,"click"],["mat-button","","title","Workobjects",3,"click"],["matInput","","type","text","placeholder","Filter by name",1,"textInput",3,"input"],[1,"buttons"],["mat-button","","title","Upload Icon",3,"click"],[1,"material-icons-outlined","materialIconButton"],["type","file","multiple","","accept",".svg, image/png, image/jpeg, image/gif, image/bpmn","id","importIcon","name","file","onclick","this.value=null",2,"display","none",3,"change"],["mat-button","","title","Reset to default icon set",1,"button",3,"click"],["mat-button","","title","Cancel changes",3,"click"],[1,"divider"],["mat-button","","title","Save icon set",3,"click"],["mat-button","","title","Import icon set",3,"click"],["type","file","accept",".domain, .iconset","id","importDomain","name","file","onclick","this.value=null",2,"display","none",3,"change"],["mat-button","","title","Export icon set",3,"click"],[1,"iconSetConfiguration"],[1,"icons"],[1,"iconList","smallScrollbar"],["cols","8","rowHeight","170px"],[3,"colspan","rowspan",4,"ngFor","ngForOf"],[1,"iconSetDetails"],[3,"colspan","rowspan"],[1,"iconListItem",3,"iconName"]],template:function(i,r){1&i&&(B(0,"div",0)(1,"div")(2,"div",1)(3,"div",2)(4,"div"),Oe(5,"Filter by assignment:"),W(),B(6,"button",3),Zt(7,"async"),Pe("click",function(){return r.filterForUnassigned()}),B(8,"span"),Oe(9,"None"),W()(),B(10,"button",4),Zt(11,"async"),Pe("click",function(){return r.filterForActors()}),B(12,"span"),Oe(13,"Actors"),W()(),B(14,"button",5),Zt(15,"async"),Pe("click",function(){return r.filterForWorkobjects()}),B(16,"span"),Oe(17,"Workobjects"),W()(),B(18,"input",6),Pe("input",function(a){return r.filterByNameAndType(a)}),W()(),B(19,"div",7)(20,"button",8),Pe("click",function(){return r.startIconUpload()}),B(21,"span",9),Oe(22,"upload"),W(),B(23,"input",10),Pe("change",function(){return r.importIcon()}),W()(),B(24,"button",11),Pe("click",function(){return r.loadMinimalIconConfigurationWithDefaultIcons()}),B(25,"span",9),Oe(26," home "),W()(),B(27,"button",12),Pe("click",function(){return r.loadInitialConfiguration()}),B(28,"span",9),Oe(29,"close"),W()(),ct(30,"div",13),B(31,"button",14),Pe("click",function(){return r.saveIconSet()}),B(32,"span",9),Oe(33,"save"),W()(),ct(34,"div",13),B(35,"button",15),Pe("click",function(){return r.startIconSetImport()}),B(36,"span",9),Oe(37,"unarchive"),W(),B(38,"input",16),Pe("change",function(){return r.importIconSet()}),W()(),B(39,"button",17),Pe("click",function(){return r.exportIconSet()}),B(40,"span",9),Oe(41,"archive"),W()()()(),B(42,"div",18)(43,"div",19)(44,"div",20)(45,"mat-grid-list",21),ut(46,i1e,2,3,"mat-grid-tile",22),Zt(47,"async"),W()()()()(),ct(48,"app-icon-set-details",23),W()),2&i&&(be(6),wt("activeNone","ICON_FILTER_UNASSIGNED"===Qt(7,7,r.filter)),be(4),wt("activeActor","ICON_FILTER_ACTOR"===Qt(11,9,r.filter)),be(4),wt("activeWorkObject","ICON_FILTER_WORKOBJECT"===Qt(15,11,r.filter)),be(32),$e("ngForOf",Qt(47,13,r.allFilteredIconNames)))},dependencies:[lu,Vs,Gwe,fH,jp,Qwe,n1e,za],styles:[".content[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 250px}.header[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content auto;height:46px;border-bottom:#ccc 2px solid}.searchbar[_ngcontent-%COMP%]{display:inline-flex;margin-left:15px;margin-right:15px;align-self:center;align-items:center;justify-self:left;height:inherit;border-right:#ccc 2px solid}.buttons[_ngcontent-%COMP%]{display:inline-flex;align-self:center;align-items:center;justify-self:right;height:inherit}.buttons[_ngcontent-%COMP%] .mat-button{min-width:36px}.divider[_ngcontent-%COMP%]{border-left:#ccc 2px solid;height:inherit}.button[_ngcontent-%COMP%]{width:36px}.mat-button[_ngcontent-%COMP%]{color:#666}.iconSetConfiguration[_ngcontent-%COMP%]{padding-left:10px;padding-bottom:5px;margin-top:15px;height:100%}.icons[_ngcontent-%COMP%]{display:grid;grid-template-rows:2rem auto;height:100%;grid-row-gap:1px}.activeActor[_ngcontent-%COMP%]{background-color:#42aebb;color:#fff}.activeNone[_ngcontent-%COMP%]{background-color:#e0e0e0;color:#000}.activeWorkObject[_ngcontent-%COMP%]{background-color:#42aebb;color:#fff}.textInput[_ngcontent-%COMP%]{width:300px;margin-left:15px;margin-right:5px;border:#666666 1px solid}.iconList[_ngcontent-%COMP%]{display:grid;overflow-y:scroll;height:calc(100vh - 130px)}.iconSetDetails[_ngcontent-%COMP%]{overflow-y:scroll;width:250px;height:calc(100vh - 65px)} .mat-grid-tile .mat-grid-tile-content{justify-content:inherit}"]})}return e})();function o1e(e,n){1&e&&ct(0,"app-general-settings")}function a1e(e,n){1&e&&ct(0,"app-icon-set-configuration",10)}let s1e=(()=>{class e{constructor(t,i,r){this.settingsService=t,this.modelerService=i,this.iconSetCustomizationService=r,this.showGeneralSettings=new on(!1),this.showIconSetCustomization=new on(!0)}close(){const t=this.iconSetCustomizationService.getAndClearSavedConfiguration();t&&this.modelerService.restart(t),this.settingsService.close()}openGeneralSettings(){this.showGeneralSettings.next(!0),this.showIconSetCustomization.next(!1)}openIconSetCustomization(){this.showGeneralSettings.next(!1),this.showIconSetCustomization.next(!0)}static#e=this.\u0275fac=function(i){return new(i||e)(T(HC),T(ch),T(g0))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-settings"]],decls:19,vars:14,consts:[[1,"settings"],["color","primary",1,"toolbar"],["mat-icon-button","",1,"headerButton","noPadding",3,"click"],[1,"material-icons-outlined","materialIconButton"],[1,"paddedButton"],["mat-button","",1,"headerButton","mr-10",3,"click"],[1,"headline"],["mat-button","",1,"headerButton",3,"click"],[4,"ngIf"],["class","tab",4,"ngIf"],[1,"tab"]],template:function(i,r){1&i&&(B(0,"div",0)(1,"mat-toolbar",1)(2,"mat-toolbar-row")(3,"button",2),Pe("click",function(){return r.close()}),B(4,"span",3),Oe(5," arrow_back"),W()(),B(6,"div",4)(7,"button",5),Zt(8,"async"),Pe("click",function(){return r.openIconSetCustomization()}),B(9,"span",6),Oe(10,"Customize Icons for Your Domain"),W()(),B(11,"button",7),Zt(12,"async"),Pe("click",function(){return r.openGeneralSettings()}),B(13,"span",6),Oe(14,"General Settings"),W()()()()(),ut(15,o1e,1,0,"app-general-settings",8),Zt(16,"async"),ut(17,a1e,1,0,"app-icon-set-configuration",9),Zt(18,"async"),W()),2&i&&(be(7),wt("highlight",Qt(8,6,r.showIconSetCustomization)),be(4),wt("highlight",Qt(12,8,r.showGeneralSettings)),be(4),$e("ngIf",Qt(16,10,r.showGeneralSettings)),be(2),$e("ngIf",Qt(18,12,r.showIconSetCustomization)))},dependencies:[cc,Fwe,r1e,Vs,jye,Yz,RT,za],styles:["mat-toolbar[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{color:#fff}app-general-settings[_ngcontent-%COMP%]{overflow-y:auto}.settings[_ngcontent-%COMP%]{display:grid;grid-template-rows:65px auto;width:100%;height:100%}.settings[_ngcontent-%COMP%] .mat-button{padding:0}.settings[_ngcontent-%COMP%] .materialIconButton[_ngcontent-%COMP%]{margin-top:0;margin-right:5px;padding:0}.highlight[_ngcontent-%COMP%]{border:2px solid white}.tab[_ngcontent-%COMP%]{display:inline-block;height:calc(100% - 10px);width:100%;overflow:hidden} .mat-tab-label, .mat-tab-label-active{height:30px!important}"]})}return e})(),c1e=(()=>{class e{constructor(t,i){this.modelerService=t,this.autosaveService=i}ngOnInit(){this.modelerService.postInit(),this.autosaveService.loadLatestDraft()}static#e=this.\u0275fac=function(i){return new(i||e)(T(ch),T(v0))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-modeler"]],decls:1,vars:0,consts:[["id","canvas"]],template:function(i,r){1&i&&ct(0,"div",0)},styles:["#canvas[_ngcontent-%COMP%], #canvas[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{top:0;width:100%;height:100%;position:relative;bottom:0;overflow:hidden}"]})}return e})();function l1e(e,n){1&e&&ct(0,"app-settings")}let d1e=(()=>{class e{constructor(t,i,r,o,a,s){this.settingsService=t,this.dialogService=i,this.titleService=r,this.exportService=o,this.replayStateService=a,this.version="2.0.0-beta6",this.showSettings$=new on(!1),this.showDescription$=new on(!0),document.addEventListener("keydown",c=>{c.ctrlKey&&"s"===c.key&&(c.preventDefault(),c.stopPropagation(),this.exportService.isDomainStoryExportable()&&this.exportService.downloadDST()),c.ctrlKey&&"l"===c.key&&(c.preventDefault(),c.stopPropagation(),document.getElementById("import")?.click()),("ArrowRight"===c.key||"ArrowUp"===c.key)&&this.replayStateService.getReplayOn()&&(c.preventDefault(),c.stopPropagation(),s.nextSentence()),("ArrowLeft"===c.key||"ArrowDown"===c.key)&&this.replayStateService.getReplayOn()&&(c.preventDefault(),c.stopPropagation(),s.previousSentence())})}ngOnInit(){this.showDescription$=this.titleService.showDescription$,this.showSettings$=this.settingsService.showSettings$}openLinkDialog(t,i,r){const o=new ca;o.disableClose=!1,o.autoFocus=!0,o.data=new U_(i,r,!0,!0,t),this.dialogService.openDialog(G_,o)}static#e=this.\u0275fac=function(i){return new(i||e)(T(HC),T(mm),T(fo),T(m0),T(zp),T(Hp))};static#t=this.\u0275cmp=Rt({type:e,selectors:[["app-root"]],decls:36,vars:36,consts:[["role","main",1,"content"],[4,"ngIf"],["type","color","id","colorPicker",2,"display","none"],["src","./favicon.ico","height","24","alt","Egon Logo"],["href","https://egon.io","target","_blank"],["href","https://github.com/WPS/egon.io/releases/latest","target","_blank"],["src","./assets/logo/wps-icon.ico","height","24","alt","WPS Logo"],["href","https://www.wps.de/","target","_blank"],["href","https://www.wps.de/datenschutz/","target","_blank"],["href","https://www.wps.de/impressum/","target","_blank"]],template:function(i,r){1&i&&(B(0,"div",0),ut(1,l1e,1,0,"app-settings",1),Zt(2,"async"),B(3,"div"),Zt(4,"async"),Zt(5,"async"),Zt(6,"async"),Zt(7,"async"),Zt(8,"async"),ct(9,"input",2)(10,"app-header"),Zt(11,"async"),Zt(12,"async"),ct(13,"app-modeler"),W(),B(14,"div"),Zt(15,"async"),Zt(16,"async"),B(17,"span"),ct(18,"img",3),B(19,"a",4),Oe(20," egon.io"),W(),B(21,"span"),Oe(22,"version: "),W(),B(23,"a",5),Oe(24),W(),B(25,"span"),Oe(26,"by "),W(),ct(27,"img",6),B(28,"a",7),Oe(29,"WPS"),W()(),B(30,"span")(31,"a",8),Oe(32,"Privacy"),W()(),B(33,"span")(34,"a",9),Oe(35,"Imprint"),W()()()()),2&i&&(be(),$e("ngIf",Qt(2,16,r.showSettings$)),be(2),wt("headerAndCanvas",!Qt(4,18,r.showSettings$)&&Qt(5,20,r.showDescription$))("headerAndCanvasCollapsed",!Qt(6,22,r.showSettings$)&&!Qt(7,24,r.showDescription$))("hidden",Qt(8,26,r.showSettings$)),be(7),wt("header",Qt(11,28,r.showDescription$))("headerCollapsed",!Qt(12,30,r.showDescription$)),be(4),wt("logoContainer",!Qt(15,32,r.showSettings$))("hidden",Qt(16,34,r.showSettings$)),be(10),ko(r.version))},dependencies:[cc,uwe,s1e,c1e,za],styles:[".content[_ngcontent-%COMP%]{height:100%;overflow:hidden}.headerAndCanvas[_ngcontent-%COMP%]{height:100%;width:100%;display:grid;grid-template-rows:220px auto;overflow:hidden}.headerAndCanvasCollapsed[_ngcontent-%COMP%]{height:100%;width:100%;display:grid;grid-template-rows:65px auto;overflow:hidden}.settings[_ngcontent-%COMP%]{height:100%}.header[_ngcontent-%COMP%]{display:grid;grid-template-rows:65px 155px}.logoContainer[_ngcontent-%COMP%]{display:flex;position:absolute;bottom:0;right:100px;align-items:flex-end}.logoContainer[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-left:16px;margin-bottom:14px;align-items:center}.hidden[_ngcontent-%COMP%]{height:1px;width:1px}#wrapper[_ngcontent-%COMP%]{padding:16px;min-height:100%;height:100%;box-sizing:border-box}#tab-group[_ngcontent-%COMP%]{height:100%}#tab-group[_ngcontent-%COMP%] mat-tab-body[_ngcontent-%COMP%]{flex-grow:1}.mat-button-toggle-label-content[_ngcontent-%COMP%]{font-size:10pt!important;padding:0 5px!important;line-height:inherit!important} .mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}span[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{vertical-align:middle}span[_ngcontent-%COMP%]{height:24px}"]})}return e})(),jT=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[DT,xH,Wz,c4,v3,d0,pH,Cz,Kz,dH,Rz,Jz,DT,xH,Wz,c4,v3,d0,pH,Cz,Kz,dH,Rz,Jz]})}return e})(),u1e=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[hl,vL,jT]})}return e})(),h1e=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[u1e,hl,vL,jT]})}return e})(),f1e=(()=>{class e{static#e=this.\u0275fac=function(i){return new(i||e)};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({imports:[hl]})}return e})(),m1e=(()=>{class e{constructor(t){this.autosaveService=t}ngDoBootstrap(t){const i=document.createElement("app-root");document.body.append(i),t.bootstrap(d1e)}static#e=this.\u0275fac=function(i){return new(i||e)(F(v0))};static#t=this.\u0275mod=$t({type:e});static#n=this.\u0275inj=Vt({providers:[v0,m0,OT,qz,Es,fo,TT,Hp,la,Ml,ch,Dz,GE,{provide:r4,useValue:{clickAction:"noop"}}],imports:[YP,woe,Wte,h1e,f1e,jT]})}return e})();ree().bootstrapModule(m1e).catch(e=>console.error(e))},149:Te=>{"use strict";var Y=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],K=typeof globalThis>"u"?global:globalThis;Te.exports=function(){for(var he=[],De=0;De{Te(Te.s=765)}]); \ No newline at end of file diff --git a/app-v2/main.js b/app-v2/main.js new file mode 100644 index 0000000..7654276 --- /dev/null +++ b/app-v2/main.js @@ -0,0 +1,10941 @@ +"use strict"; +(self["webpackChunkegon"] = self["webpackChunkegon"] || []).push([["main"],{ + +/***/ 84756: +/*!**********************************!*\ + !*** ./src/app/Modeler/index.js ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DomainStoryModeler) +/* harmony export */ }); +/* harmony import */ var bpmn_js_lib_Modeler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! bpmn-js/lib/Modeler */ 47377); +/* harmony import */ var diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/features/resize */ 40844); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! min-dash */ 81410); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _modeler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modeler */ 77089); +/* harmony import */ var _modeler_labeling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modeler/labeling */ 26400); +/* harmony import */ var _modeler_modeling__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modeler/modeling */ 97225); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Domain/Common/elementTypes */ 30236); + + + + + + + + +function DomainStoryModeler(options) { + bpmn_js_lib_Modeler__WEBPACK_IMPORTED_MODULE_5__["default"].call(this, options); + this._customElements = []; + this._groupElements = []; +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DomainStoryModeler, bpmn_js_lib_Modeler__WEBPACK_IMPORTED_MODULE_5__["default"]); +DomainStoryModeler.prototype._modules = [].concat(DomainStoryModeler.prototype._modules, [_modeler__WEBPACK_IMPORTED_MODULE_1__["default"], _modeler_labeling__WEBPACK_IMPORTED_MODULE_2__["default"], _modeler_modeling__WEBPACK_IMPORTED_MODULE_3__["default"]], [diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_6__["default"]]); +/** + * add a single custom element to the underlying diagram + * + * @param {Object} customElement + */ +DomainStoryModeler.prototype._addCustomShape = function (customElement) { + let parentId = customElement.parent; + delete customElement.children; + delete customElement.parent; + this._customElements.push(customElement); + let canvas = this.get("canvas"), + elementFactory = this.get("elementFactory"); + let customAttrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_7__.assign)({ + businessObject: customElement + }, customElement); + let customShape = elementFactory.create("shape", customAttrs); + if (isGroup(customElement)) { + this._groupElements[customElement.id] = customShape; + } + if (parentId) { + let parentShape = this._groupElements[parentId]; + if (isGroup(parentShape)) { + return canvas.addShape(customShape, parentShape, parentShape.id); + } + } + return canvas.addShape(customShape); +}; +DomainStoryModeler.prototype._addCustomConnection = function (customElement) { + this._customElements.push(customElement); + let canvas = this.get("canvas"), + elementFactory = this.get("elementFactory"), + elementRegistry = this.get("elementRegistry"); + let customAttrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_7__.assign)({ + businessObject: customElement + }, customElement); + let connection = elementFactory.create("connection", (0,min_dash__WEBPACK_IMPORTED_MODULE_7__.assign)(customAttrs, { + source: elementRegistry.get(customElement.source), + target: elementRegistry.get(customElement.target) + }), elementRegistry.get(customElement.source).parent); + return canvas.addConnection(connection); +}; +//** We import BusinessObjects, not the whole Canvas Object!!!!!!!! +DomainStoryModeler.prototype.importCustomElements = function (elements) { + this.get("eventBus").fire("diagram.clear", {}); + this._customElements = []; + this._groupElements = []; + this.addCustomElements(elements); +}; +/** + * add a number of custom elements and connections to the underlying diagram. + * + * @param {Array} customElements + */ +DomainStoryModeler.prototype.addCustomElements = function (customElements) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_7__.isArray)(customElements)) { + throw new Error("argument must be an array"); + } + let shapes = [], + connections = [], + groups = []; + customElements.forEach(function (customElement) { + if (isConnection(customElement)) { + connections.push(customElement); + } else if (isGroup(customElement)) { + groups.push(customElement); + } else { + shapes.push(customElement); + } + }); + // add groups before shapes and shapes before connections so that connections + // can already rely on the shapes being part of the diagram + groups.forEach(this._addCustomShape, this); + shapes.forEach(this._addCustomShape, this); + connections.forEach(this._addCustomConnection, this); +}; +/** + * get custom elements with their current status. + * + * @return {Array} custom elements on the diagram + */ +DomainStoryModeler.prototype.getCustomElements = function () { + return this._customElements; +}; +// override standard function to prevent default elements on canvas +DomainStoryModeler.prototype.createDiagram = function (done) {}; +function isConnection(element) { + return element.type === _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_4__.elementTypes.ACTIVITY || element.type === _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_4__.elementTypes.CONNECTION; +} +function isGroup(element) { + return element && element.type === _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_4__.elementTypes.GROUP; +} + +/***/ }), + +/***/ 7612: +/*!********************************************************!*\ + !*** ./src/app/Modeler/modeler/change-icon/replace.js ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Replace) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 81410); + + + +/** + * service that allow replacing of elements. + */ +function Replace(modeling) { + this._modeling = modeling; +} +/** + * @param {Element} oldElement - element to be replaced + * @param {Object} newElementData - containing information about the new Element, for example height, width, type. + * @param modeling + */ +function replaceElement(oldElement, newElementData, modeling) { + // let modeling = this._modeling; + let newElement = setCenterOfElement(newElementData, oldElement, modeling); + let outgoingActivities = newElement.outgoing; + let incomingActivities = newElement.incoming; + outgoingActivities.forEach(element => { + element.businessObject.source = newElement.id; + }); + incomingActivities.forEach(element => { + element.businessObject.target = newElement.id; + }); + return newElement; +} +function setCenterOfElement(newElementData, oldElement, modeling) { + newElementData.x = Math.ceil(oldElement.x + (newElementData.width || oldElement.width) / 2); + newElementData.y = Math.ceil(oldElement.y + (newElementData.height || oldElement.height) / 2); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(newElementData, { + name: oldElement.businessObject.name + }); + return modeling.replaceShape(oldElement, newElementData, {}); +} +Replace.prototype.replaceElement = replaceElement; + +/***/ }), + +/***/ 41214: +/*!********************************************************************!*\ + !*** ./src/app/Modeler/modeler/change-icon/replaceMenuProvider.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ReplaceMenuProvider) +/* harmony export */ }); +/* harmony import */ var _replace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./replace */ 7612); +/* harmony import */ var _replaceOptions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./replaceOptions */ 71656); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 81410); + + + + + +/** + * This module is an element agnostic replace menu provider for the popup menu. + */ +function ReplaceMenuProvider(modeling) { + this._dsReplace = new _replace__WEBPACK_IMPORTED_MODULE_0__["default"](modeling); + this._modeling = modeling; +} +ReplaceMenuProvider.$inject = ["modeling"]; +/** + * Get all entries from replaceOptions for the given element and apply filters + * on them. Get for example only elements, which are different from the current one. + * + * @param {djs.model.Base} element + * + * @return {Array} a list of menu entry items + */ +ReplaceMenuProvider.prototype.getEntries = function (element) { + let entries; + if (element.type.includes("actor")) { + entries = _replaceOptions__WEBPACK_IMPORTED_MODULE_1__.actorReplaceOptions(element.type); + } else if (element.type.includes("workObject")) { + entries = _replaceOptions__WEBPACK_IMPORTED_MODULE_1__.workObjectReplaceOptions(element.type); + } + return this._createEntries(element, entries); +}; +/** + * Creates an array of menu entry objects for a given element and filters the replaceOptions + * according to a filter function. + * + * @param {djs.model.Base} element + * @param {Object} replaceOptions + * + * @return {Array} a list of menu items + */ +ReplaceMenuProvider.prototype._createEntries = function (element, replaceOptions) { + let menuEntries = []; + let self = this; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(replaceOptions, function (definition) { + let entry = self._createMenuEntry(definition, element); + menuEntries.push(entry); + }); + return menuEntries; +}; +/** + * Creates and returns a single menu entry item. + * + * @param {Object} definition a single replace options definition object + * @param {djs.model.Base} element + * @param {Function} [action] an action callback function which gets called when + * the menu entry is being triggered. + * + * @return {Object} menu entry item + */ +ReplaceMenuProvider.prototype._createMenuEntry = function (definition, element, action) { + let replaceElement = this._dsReplace.replaceElement; + let modeling = this._modeling; + let replaceAction = function () { + return replaceElement(element, definition.target, modeling); + }; + action = action || replaceAction; + return { + label: definition.label, + className: definition.className, + id: definition.actionName, + action: action + }; +}; + +/***/ }), + +/***/ 71656: +/*!***************************************************************!*\ + !*** ./src/app/Modeler/modeler/change-icon/replaceOptions.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ actorReplaceOptions: () => (/* binding */ actorReplaceOptions), +/* harmony export */ initializeReplaceOptions: () => (/* binding */ initializeReplaceOptions), +/* harmony export */ workObjectReplaceOptions: () => (/* binding */ workObjectReplaceOptions) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); + +let iconDictionaryService; +function initializeReplaceOptions(iconDictionary) { + iconDictionaryService = iconDictionary; +} +function actorReplaceOptions(name) { + const actorTypes = iconDictionaryService.getTypeDictionary(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR); + let replaceOption = {}; + let i = 0; + actorTypes.keysArray().forEach(actorType => { + if (!name.includes(actorType)) { + const typeName = actorType; + replaceOption[i] = { + label: "Change to " + typeName, + actionName: "replace-with-actor-" + typeName.toLowerCase(), + className: iconDictionaryService.getIconForBPMN(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR, actorType), + target: { + type: `${src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR}${actorType}` + } + }; + i++; + } + }); + return replaceOption; +} +function workObjectReplaceOptions(name) { + const workObjectTypes = iconDictionaryService.getTypeDictionary(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT); + let replaceOption = {}; + let i = 0; + workObjectTypes.keysArray().forEach(workObjectType => { + if (!name.includes(workObjectType)) { + const typeName = workObjectType; + replaceOption[i] = { + label: "Change to " + typeName, + actionName: "replace-with-actor-" + typeName, + className: iconDictionaryService.getIconForBPMN(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT, workObjectType), + target: { + type: `${src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT}${workObjectType}` + } + }; + } + i++; + }); + return replaceOption; +} + +/***/ }), + +/***/ 68065: +/*!******************************************************************************!*\ + !*** ./src/app/Modeler/modeler/context-pad/domainStoryContextPadProvider.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DomainStoryContextPadProvider), +/* harmony export */ initializeContextPadProvider: () => (/* binding */ initializeContextPadProvider) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var bpmn_js_lib_features_context_pad_ContextPadProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! bpmn-js/lib/features/context-pad/ContextPadProvider */ 30862); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! min-dash */ 81410); +/* harmony import */ var _numbering_numbering__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numbering/numbering */ 91490); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Domain/Icon-Set-Configuration/allIcons */ 57488); + + + + + + + + +let dirtyFlagService; +let iconDictionaryService; +function initializeContextPadProvider(dirtyFlag, iconDictionary) { + dirtyFlagService = dirtyFlag; + iconDictionaryService = iconDictionary; +} +function DomainStoryContextPadProvider(injector, connect, translate, elementFactory, create, canvas, contextPad, popupMenu, replaceMenuProvider, commandStack, eventBus, modeling) { + let startConnect; + let selectedElement; + injector.invoke(bpmn_js_lib_features_context_pad_ContextPadProvider__WEBPACK_IMPORTED_MODULE_4__["default"], this); + let autoPlace = injector.get("autoPlace", false); + let cached = (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.bind)(this.getContextPadEntries, this); + const colorPicker = document.getElementById("colorPicker"); + colorPicker.onchange = ev => { + const context = { + businessObject: selectedElement.businessObject, + newColor: ev.target.value, + element: selectedElement + }; + commandStack.execute("element.colorChange", context); + dirtyFlagService.makeDirty(); + }; + popupMenu.registerProvider("ds-replace", replaceMenuProvider); + popupMenu.registerProvider("bpmn-replace", replaceMenuProvider); + this.getContextPadEntries = function (element) { + const allStandardIconKeys = (0,src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.getAllStandardIconKeys)(); + let actions = cached(element); + startConnect = function (event, element, autoActivate) { + connect.start(event, element, autoActivate); + }; + if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT)) { + if (allStandardIconKeys.includes(element.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT, ""))) { + addColorChange(actions); + } + addConnectWithActivity(actions, startConnect); + addTextAnnotation(actions); + addActors(appendAction, actions); + addWorkObjects(appendAction, actions); + addChangeWorkObjectTypeMenu(actions); + } else if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR)) { + if (allStandardIconKeys.includes(element.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR, ""))) { + addColorChange(actions); + } + addConnectWithActivity(actions, startConnect); + addTextAnnotation(actions); + addWorkObjects(appendAction, actions); + addChangeActorTypeMenu(actions); + } else if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.GROUP)) { + delete actions.delete; + addTextAnnotation(actions); + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(actions, { + deleteGroup: { + group: "edit", + className: "bpmn-icon-trash", + title: "Remove Group without Child-Elements", + action: { + click: function (event, element) { + modeling.removeGroup(element); + dirtyFlagService.makeDirty(); + } + } + } + }); + addColorChange(actions); + } else if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTIVITY)) { + moveDeleteActionToEndOfArray(actions); + addColorChange(actions); + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(actions, { + delete: { + group: "edit", + className: "bpmn-icon-trash", + title: "Remove", + action: { + click: function (event, element) { + modeling.removeElements({ + element + }); + dirtyFlagService.makeDirty(); + } + } + } + }); + } + return actions; + }; + function moveDeleteActionToEndOfArray(actions) { + delete actions.delete; + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(actions, { + changeDirection: { + group: "edit", + className: "icon-domain-story-changeDirection", + title: translate("Change direction"), + action: { + // event needs to be addressed + click: function (event, element) { + changeDirection(element); + } + } + } + }); + } + function addChangeActorTypeMenu(actions) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(actions, { + replace: { + group: "edit", + className: "bpmn-icon-screw-wrench", + title: translate("Change type"), + action: { + click: function (event, element) { + let position = (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(getReplaceMenuPosition(element), { + cursor: { + x: event.x, + y: event.y + } + }); + popupMenu.open(element, "ds-replace", position); + } + } + } + }); + } + function addColorChange(actions) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(actions, { + colorChange: { + group: "edit", + className: "icon-domain-story-color-picker", + title: translate("Change color"), + action: { + click: function (event, element) { + selectedElement = element; + colorPicker.click(); + } + } + } + }); + } + function addTextAnnotation(actions) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(actions, { + "append.text-annotation": appendAction(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.TEXTANNOTATION, "bpmn-icon-text-annotation", "textannotation", "connect") + }); + } + function addConnectWithActivity(actions, startConnect) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(actions, { + connect: { + group: "connect", + className: "bpmn-icon-connection", + title: translate("Connect with activity"), + action: { + click: startConnect, + dragstart: startConnect + } + } + }); + } + function addWorkObjects(appendAction, actions) { + let workObjectTypes = iconDictionaryService.getTypeDictionary(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT); + workObjectTypes.keysArray().forEach(workObjectType => { + let name = workObjectType; + let icon = iconDictionaryService.getIconForBPMN(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT, workObjectType); + let action = []; + action["append.workObject" + name] = appendAction(`${src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT}${workObjectType}`, icon, name, "workObjects"); + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(actions, action); + }); + } + function addActors(appendAction, actions) { + let actorTypes = iconDictionaryService.getTypeDictionary(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR); + actorTypes.keysArray().forEach(actorType => { + let name = actorType; + let icon = iconDictionaryService.getIconForBPMN(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR, actorType); + let action = []; + action["append.actor" + name] = appendAction(`${src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR}${actorType}`, icon, name, "actors"); + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(actions, action); + }); + } + function addChangeWorkObjectTypeMenu(actions) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(actions, { + replace: { + group: "edit", + className: "bpmn-icon-screw-wrench", + title: translate("Change type"), + action: { + click: function (event, element) { + let position = (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(getReplaceMenuPosition(element), { + cursor: { + x: event.x, + y: event.y + } + }); + popupMenu.open(element, "ds-replace", position); + } + } + } + }); + } + function changeDirection(element) { + let context; + let businessObject = element.businessObject; + let newNumber; + if (element.source.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR)) { + newNumber = 0; + } else { + newNumber = (0,_numbering_numbering__WEBPACK_IMPORTED_MODULE_1__.generateAutomaticNumber)(element, commandStack); + } + context = { + businessObject: businessObject, + newNumber: newNumber, + element: element + }; + commandStack.execute("activity.directionChange", context); + } + function getReplaceMenuPosition(element) { + let Y_OFFSET = 5; + let diagramContainer = canvas.getContainer(), + pad = contextPad.getPad(element).html; + let diagramRect = diagramContainer.getBoundingClientRect(), + padRect = pad.getBoundingClientRect(); + let top = padRect.top - diagramRect.top; + let left = padRect.left - diagramRect.left; + return { + x: left, + y: top + padRect.height + Y_OFFSET + }; + } + /** + * create an append action + * + * @param {String} type + * @param {String} className + * @param {String} [title] + * @param {String} group + * @param {Object} [options] + * + * @return {Object} descriptor + */ + function appendAction(type, className, title, group, options) { + if (typeof title !== "string") { + options = title; + title = translate("{type}", { + type: type.replace(/^domainStory:/, "") + }); + } + function appendStart(event, element) { + let shape = elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)({ + type: type + }, options)); + let context = { + elements: [shape], + hints: {}, + source: element + }; + create.start(event, shape, context); + } + return { + group: group, + className: className, + title: "Append " + title, + action: { + dragstart: startConnect, + click: appendStart + } + }; + } +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DomainStoryContextPadProvider, bpmn_js_lib_features_context_pad_ContextPadProvider__WEBPACK_IMPORTED_MODULE_4__["default"]); +DomainStoryContextPadProvider.$inject = ["injector", "connect", "translate", "elementFactory", "create", "canvas", "contextPad", "popupMenu", "replaceMenuProvider", "commandStack", "eventBus", "modeling"]; + +/***/ }), + +/***/ 75702: +/*!**************************************************************!*\ + !*** ./src/app/Modeler/modeler/domainStoryElementFactory.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DomainStoryElementFactory) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 81410); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var bpmn_js_lib_features_modeling_ElementFactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! bpmn-js/lib/features/modeling/ElementFactory */ 5557); +/* harmony import */ var bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! bpmn-js/lib/util/LabelUtil */ 81454); +/* harmony import */ var _domainStoryIdFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./domainStoryIdFactory */ 51839); + + + + + + + +/** + * A custom factory that knows how to create BPMN _and_ custom elements. + */ +function DomainStoryElementFactory(bpmnFactory, moddle) { + bpmn_js_lib_features_modeling_ElementFactory__WEBPACK_IMPORTED_MODULE_2__["default"].call(this, bpmnFactory, moddle); + let self = this; + let domainStoryIdFactory = new _domainStoryIdFactory__WEBPACK_IMPORTED_MODULE_1__["default"](); + /** + * create a diagram-js element with the given type (any of shape, connection, label). + * + * @param {String} elementType + * @param {Object} attrs + * + * @return {djs.model.Base} + */ + this.create = function (elementType, attrs) { + let type = attrs.type; + if (elementType === "label") { + return self.baseCreate(elementType, (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({ + type: "label" + }, bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.DEFAULT_LABEL_SIZE, attrs)); + } + // add type to businessObject if custom + if (/^domainStory:/.test(type)) { + if (!attrs.businessObject) { + attrs.businessObject = { + type: type, + name: attrs.name ? attrs.name : "" + }; + } + if (attrs.id) { + domainStoryIdFactory.registerId(attrs.id); + } else { + attrs.id = domainStoryIdFactory.getId(elementType); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(attrs.businessObject, { + id: attrs.id + }); + let id = attrs.id; + attrs.businessObject.get = function (key) { + if (key === "id") { + return id; + } + }; + attrs.businessObject.set = function (key, value) { + if (key === "id") { + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(attrs.businessObject, { + id: value + }); + } + }; + if (!attrs.businessObject.$type) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(attrs.businessObject, { + $type: "Element" + }); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(attrs.businessObject, { + di: {} + }); + if (!attrs.businessObject.$descriptor) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(attrs.businessObject, { + $descriptor: {} + }); + } + // add width and height if shape + if ((!/:activity$/.test(type) || !/:connection$/.test(type)) && !(/:group$/.test(type) && attrs.height || attrs.width)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(attrs, self._getCustomElementSize(type)); + } + if (!("$instanceOf" in attrs.businessObject)) { + // ensure we can use ModelUtil#is for type checks + Object.defineProperty(attrs.businessObject, "$instanceOf", { + value: function (type) { + return this.type === type; + } + }); + } + return self.baseCreate(elementType, attrs); + } + return self.createBpmnElement(elementType, attrs); + }; +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DomainStoryElementFactory, bpmn_js_lib_features_modeling_ElementFactory__WEBPACK_IMPORTED_MODULE_2__["default"]); +DomainStoryElementFactory.$inject = ["bpmnFactory", "moddle"]; +/** + * returns the default size of custom shapes. + * + * the following example shows an interface on how + * to setup the custom shape's dimensions. + * * + * @param {String} type + * + * @return {Dimensions} a {width, height} object representing the size of the element + */ +DomainStoryElementFactory.prototype._getCustomElementSize = function (type) { + let shapes = { + __default: { + width: 75, + height: 75 + }, + "domainStory:textAnnotation": { + width: 100, + height: 30 + }, + "domainStory:group": { + width: 525, + height: 275 + } + }; + return shapes[type] || shapes.__default; +}; +class Dimensions {} + +/***/ }), + +/***/ 51839: +/*!*********************************************************!*\ + !*** ./src/app/Modeler/modeler/domainStoryIdFactory.js ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ containsId: () => (/* binding */ containsId), +/* harmony export */ "default": () => (/* binding */ DomainStoryIdFactory) +/* harmony export */ }); + + +let idList = []; +function DomainStoryIdFactory() {} +DomainStoryIdFactory.prototype.getId = function (type) { + return generateId(type); +}; +DomainStoryIdFactory.prototype.registerId = function (id) { + idList.push(id); +}; +function generateId(type) { + let idNumber = fourDigitsId(); + let id = type + "_" + idSuffix(idNumber); + while (containsId(id)) { + idNumber++; + id = type + "_" + idSuffix(idNumber); + } + idList.push(id); + return id; +} +function idSuffix(idNumber) { + let id; + if (idNumber > 9999) { + id = 0; + } else if (idNumber < 10) { + id = "000" + idNumber; + } else if (idNumber < 100) { + id = "00" + idNumber; + } else if (idNumber < 1000) { + id = "0" + idNumber; + } else { + id = "" + idNumber; + } + return id; +} +function fourDigitsId() { + return Math.floor(Math.random() * 10000); +} +function containsId(id) { + let same = false; + idList.forEach(element => { + if (id === element) { + same = true; + } + }); + return same; +} + +/***/ }), + +/***/ 76867: +/*!********************************************************!*\ + !*** ./src/app/Modeler/modeler/domainStoryRenderer.js ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DomainStoryRenderer), +/* harmony export */ initializeRenderer: () => (/* binding */ initializeRenderer) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_draw_BaseRenderer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! diagram-js/lib/draw/BaseRenderer */ 14694); +/* harmony import */ var ids__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ids */ 70678); +/* harmony import */ var _labeling_dsLabelEditingPreview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./labeling/dsLabelEditingPreview */ 14901); +/* harmony import */ var diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! diagram-js/lib/util/RenderUtil */ 96546); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! min-dash */ 81410); +/* harmony import */ var _labeling_dsLabelEditingProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./labeling/dsLabelEditingProvider */ 28712); +/* harmony import */ var _numbering_numbering__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./numbering/numbering */ 91490); +/* harmony import */ var _labeling_dsLabelUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./labeling/dsLabelUtil */ 60125); +/* harmony import */ var _labeling_position__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./labeling/position */ 12957); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Utils_mathExtensions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Utils/mathExtensions */ 114); +/* harmony import */ var _Utils_naming__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Utils/naming */ 28714); + + + + + + + + + + + + + + + + + +let RENDERER_IDS = new ids__WEBPACK_IMPORTED_MODULE_1__["default"](); +let numbers = []; +const DEFAULT_COLOR = "black"; +/** + * a renderer that knows how to render custom elements. + */ +let iconDictionary; +let elementRegistry; +let dirtyFlag; +function initializeRenderer(iconDictionaryService, elementRegistryService, dirtyFlagService) { + iconDictionary = iconDictionaryService; + elementRegistry = elementRegistryService; + dirtyFlag = dirtyFlagService; +} +function DomainStoryRenderer(eventBus, styles, canvas, textRenderer, pathMap, commandStack) { + diagram_js_lib_draw_BaseRenderer__WEBPACK_IMPORTED_MODULE_10__["default"].call(this, eventBus, 2000); + let rendererId = RENDERER_IDS.next(); + let markers = {}; + let computeStyle = styles.computeStyle; + // generate the automatic Number for an activity originating from an actor + function generateActivityNumber(parentGfx, element, box) { + // whenever we want to edit an activity, it gets redrawn as a new object + // and the custom information is lost, + // so we stash it before the editing occurs and set the value here + let numberStash = (0,_labeling_dsLabelEditingProvider__WEBPACK_IMPORTED_MODULE_3__.getNumberStash)(); + let semantic = element.businessObject; + if (numberStash.use) { + semantic.number = numberStash.number; + } + // !IMPORTANT! + // When converting svg-files via Inkscape or Photoshop the svg-circle is converted to a black dot that obscures the number. + // To circumvent this, we draw a . as the white background and an o as the circle around the number. + // There is a minor Bug, that in some Programs the used Font is not supported, which defaults to Arial, where the o is not round but oval. + // Unit 3rd Party Tools update their svg-version to 1.2 we should keep this workaround. + box.x -= 65; + box.y -= 12; + renderNumber(parentGfx, ".", backgroundDotStyle(box), element.type); + box.x += 30; + box.y += 3; + renderNumber(parentGfx, "o", backgroundBoxStyle(box), element.type); + numbers[semantic.number] = true; + box.x += 9; + box.y -= 7; + if (semantic.number < 10) { + box.x += 3; + } + let newRenderedNumber = renderNumber(parentGfx, semantic.number, numberStyle(box), element.type); + (0,_numbering_numbering__WEBPACK_IMPORTED_MODULE_4__.addNumberToRegistry)(newRenderedNumber, semantic.number); + } + // style functions + function numberStyle(box) { + return { + box: box, + fitBox: true, + style: (0,min_dash__WEBPACK_IMPORTED_MODULE_11__.assign)({}, textRenderer.getExternalStyle(), { + fill: "black", + position: "absolute" + }) + }; + } + function backgroundBoxStyle(box) { + return { + box: box, + fitBox: true, + style: (0,min_dash__WEBPACK_IMPORTED_MODULE_11__.assign)({}, textRenderer.getExternalStyle(), { + fill: "black", + fontSize: 50, + position: "absolute", + fontFamily: "Courier New" + }) + }; + } + function backgroundDotStyle(box) { + return { + box: box, + fitBox: true, + style: (0,min_dash__WEBPACK_IMPORTED_MODULE_11__.assign)({}, textRenderer.getExternalStyle(), { + fill: "white", + fontSize: 150, + position: "absolute", + fontFamily: "Courier" + }) + }; + } + // render functions + // render label associated with actors and workobjects + function renderEmbeddedLabel(parentGfx, element, align, padding) { + let businessObject = element.businessObject; + return renderLabel(parentGfx, businessObject.name, { + box: element, + align: align, + padding: padding ? padding : 0, + style: { + fill: "#000000" + } + }, element.type); + } + // render label associated with activities + function renderExternalLabel(parentGfx, element) { + let semantic = element.businessObject; + let waypoints = element.waypoints; + let lines = (0,_labeling_position__WEBPACK_IMPORTED_MODULE_6__.countLines)(semantic.name); + if (element.waypoints != null) { + let position = (0,_labeling_position__WEBPACK_IMPORTED_MODULE_6__.labelPosition)(waypoints, lines); + let startPoint = element.waypoints[position.selected]; + let endPoint = element.waypoints[position.selected + 1]; + let angle = (0,_Utils_mathExtensions__WEBPACK_IMPORTED_MODULE_8__.angleBetween)(startPoint, endPoint); + let alignment = "left"; + let boxWidth = 500; + let xStart = position.x; + // if the activity is horizontal, we want to center the label + if (angle === 0 || angle === 180) { + boxWidth = Math.abs(startPoint.x - endPoint.x); + alignment = "center"; + xStart = (startPoint.x + endPoint.x) / 2 - (0,_labeling_dsLabelUtil__WEBPACK_IMPORTED_MODULE_5__.calculateTextWidth)(semantic.name); + } + let box = { + textAlign: alignment, + width: boxWidth, + height: 30, + x: xStart, + y: position.y + }; + if (semantic.name && semantic.name.length) { + return renderLabel(parentGfx, semantic.name, { + box: box, + fitBox: true, + style: (0,min_dash__WEBPACK_IMPORTED_MODULE_11__.assign)({}, textRenderer.getExternalStyle(), { + fill: "black", + wordWrap: "break-word", + overflowWrap: "break-word", + hyphens: "auto" + }) + }, element.type); + } + } + } + // render the number associated with an activity + function renderExternalNumber(parentGfx, element) { + if (element && element.source) { + let semantic = element.businessObject; + let box = (0,_numbering_numbering__WEBPACK_IMPORTED_MODULE_4__.numberBoxDefinitions)(element); + if (semantic.number == null && element.source.type && element.source.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.ACTOR)) { + (0,_numbering_numbering__WEBPACK_IMPORTED_MODULE_4__.generateAutomaticNumber)(element, commandStack); + } + // render the background for the number + if (semantic.number && element.source.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.ACTOR)) { + generateActivityNumber(parentGfx, element, box); + } else { + semantic.number = null; + } + } + } + // render a number on the canvas + function renderNumber(parentGfx, number, options, type) { + if (number < 10) { + number = String(number); + } + number = String(number); + let text = textRenderer.createText(number || "", options); + let height = 0; + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.classes)(text).add("djs-labelNumber"); + setCoordinates(type, text, options, height, parentGfx); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(parentGfx, text); + return text; + } + // the coordinates of the activity label must be set directly and will not be taken from the box + function setCoordinates(type, text, options, height, parentGfx) { + if (/:activity$/.test(type)) { + text.innerHTML = manipulateInnerHTMLXLabel(text.children, options.box.x, 0); + text.innerHTML = manipulateInnerHTMLYLabel(text.children, options.box.y, 0); + } else if (/:actor/.test(type)) { + height = parentGfx.firstChild.attributes.height.nodeValue; + text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 0); + } else if (/:workObject/.test(type)) { + height = parentGfx.firstChild.attributes.height.nodeValue; + text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 26); + } + } + // render a label on the canvas + function renderLabel(parentGfx, label, options, type) { + let text = textRenderer.createText(label || "", options); + let height = 0; + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.classes)(text).add("djs-label"); + setCoordinates(type, text, options, height, parentGfx); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(parentGfx, text); + return text; + } + // determine the Y-coordinate of the label / number to be rendered + function manipulateInnerHTMLYLabel(children, y, offset) { + if (children) { + let result = ""; + for (let i = 0; i < children.length; i++) { + result += children[i].outerHTML.replace(/y="-?\d*.\d*"/, 'y="' + (Number(y) + offset + 14 * i) + '"'); + } + return result; + } + } + // determine the X-coordinate of the label / number to be rendered + function manipulateInnerHTMLXLabel(children, x, offset) { + if (children) { + let result = ""; + for (let i = 0; i < children.length; i++) { + result += children[i].outerHTML.replace(/x="-?\d*.\d*"/, 'x="' + (Number(x) + offset + 14) + '"'); + } + return result; + } + } + // draw functions + this.drawGroup = function (parentGfx, element) { + if (!element.businessObject.pickedColor) { + element.businessObject.pickedColor = DEFAULT_COLOR; + } + let rect = drawRect(parentGfx, element.width, element.height, 0, (0,min_dash__WEBPACK_IMPORTED_MODULE_11__.assign)({ + fill: "none", + stroke: element.businessObject.pickedColor + }, element.attrs)); + renderEmbeddedLabel(parentGfx, element, "left-top", 8); + return rect; + }; + function useColorForElement(element, iconSRC) { + if (!element.businessObject.pickedColor) { + element.businessObject.pickedColor = DEFAULT_COLOR; + } + const match = iconSRC.match(/fill=".*?"/); + if (match && match.length > 1) { + return iconSRC.replace(/fill=".*?"/, 'fill="' + element.businessObject.pickedColor + '"'); + } else { + const index = iconSRC.indexOf("' + ''; + } else { + return useColorForElement(element, iconSRC); + } + } + this.drawActor = function (parent, element) { + let svgDynamicSizeAttributes = { + width: element.width, + height: element.height + }, + actor; + let iconSRC = iconDictionary.getTypeIconSRC(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.ACTOR, (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_9__.getNameFromType)(element.type)); + iconSRC = getIconSrc(iconSRC, element); + actor = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.create)(iconSRC); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.attr)(actor, svgDynamicSizeAttributes); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(parent, actor); + renderEmbeddedLabel(parent, element, "center", -5); + return actor; + }; + this.drawWorkObject = function (parent, element) { + let svgDynamicSizeAttributes = { + width: element.width * 0.65, + height: element.height * 0.65, + x: element.width / 2 - 25, + y: element.height / 2 - 25 + }, + workObject; + let iconSRC = iconDictionary.getTypeIconSRC(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.WORKOBJECT, (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_9__.getNameFromType)(element.type)); + iconSRC = getIconSrc(iconSRC, element); + workObject = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.create)(iconSRC); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.attr)(workObject, svgDynamicSizeAttributes); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(parent, workObject); + renderEmbeddedLabel(parent, element, "center", -5); + return workObject; + }; + function useColorForActivity(element) { + if (!element.businessObject.pickedColor) { + element.businessObject.pickedColor = "black"; + } + let attrs = ""; + return computeStyle(attrs, { + stroke: element.businessObject.pickedColor, + fill: "none", + strokeWidth: 1.5, + strokeLinejoin: "round", + markerEnd: marker("activity", "black", element.businessObject.pickedColor) + }); + } + this.drawActivity = function (p, element) { + adjustForTextOverlap(element); + if (element) { + let attrs = useColorForActivity(element); + let x = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(p, (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_13__.createLine)(element.waypoints, attrs)); + renderExternalLabel(p, element); + renderExternalNumber(p, element); + // just adjusting the start- and endpoint of the connection-element moves only the drawn connection, + // not the interactive line. This can be fixed by manually overriding the points of the interactive polyline + // in the HTMl with the points of the drawn one. + // this however does not adjust the surrounding box of the connection. + fixConnectionInHTML(p.parentElement); + return x; + } + }; + function checkIfPointOverlapsText(point, source) { + if (point.y > source.y + 60) { + if (point.x > source.x + 3 && point.x < source.x + 72) { + let lineOffset = getLineOffset(source); + if (source.y + 75 + lineOffset > point.y) { + point.y += lineOffset; + } + } + } + } + function adjustForTextOverlap(element) { + let source = element.source; + let target = element.target; + let waypoints = element.waypoints; + let startPoint = waypoints[0]; + let endPoint = waypoints[waypoints.length - 1]; + if (startPoint && endPoint && source && target) { + checkIfPointOverlapsText(startPoint, source); + checkIfPointOverlapsText(endPoint, source); + } + } + function getLineOffset(element) { + let id = element.id; + let offset = 0; + let objects = document.getElementsByClassName("djs-element djs-shape"); + for (let i = 0; i < objects.length; i++) { + let data_id = objects.item(i).getAttribute("data-element-id"); + if (data_id === id) { + let object = objects.item(i); + let text = object.getElementsByTagName("text")[0]; + let tspans = text.getElementsByTagName("tspan"); + let tspan = tspans[tspans.length - 1]; + offset = tspan.getAttribute("y"); + } + } + return offset - 70; + } + function fixConnectionInHTML(wantedConnection) { + if (wantedConnection) { + let polylines = wantedConnection.getElementsByTagName("polyline"); + if (polylines.length > 1) { + polylines[1].setAttribute("points", polylines[0].getAttribute("points")); + } + } + } + this.drawDSConnection = function (p, element) { + let attrs = ""; + attrs = computeStyle(attrs, { + stroke: "#000000", + strokeWidth: 1.5, + strokeLinejoin: "round", + strokeDasharray: "5, 5" + }); + return (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(p, (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_13__.createLine)(element.waypoints, attrs)); + }; + this.drawAnnotation = function (parentGfx, element) { + let style = { + fill: "none", + stroke: "none" + }; + let text = element.businessObject.text || ""; + if (element.businessObject.text) { + let height = (0,_labeling_dsLabelEditingPreview__WEBPACK_IMPORTED_MODULE_2__.getAnnotationBoxHeight)(); + if (height === 0 && element.businessObject.number) { + height = element.businessObject.number; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_11__.assign)(element, { + height: height + }); + // for some reason the keyword height is not exported, so we use another, which we know will be exported, + // to ensure persistent annotation heights between sessions + (0,min_dash__WEBPACK_IMPORTED_MODULE_11__.assign)(element.businessObject, { + number: height + }); + } + let textElement = drawRect(parentGfx, element.width, element.height, 0, 0, style); + let textPathData = pathMap.getScaledPath("TEXT_ANNOTATION", { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.0, + my: 0.0 + } + }); + drawPath(parentGfx, textPathData, { + stroke: "black" + }); + renderLabel(parentGfx, text, { + box: element, + align: "left-top", + padding: 5, + style: { + fill: "black" + } + }); + return textElement; + }; + // draw helper functions + function drawPath(parentGfx, d, attrs) { + attrs = computeStyle(attrs, ["no-fill"], { + strokeWidth: 2, + stroke: "black" + }); + let path = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.create)("path"); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.attr)(path, { + d: d + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.attr)(path, attrs); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(parentGfx, path); + return path; + } + function drawRect(parentGfx, width, height, r, offset, attrs) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_11__.isObject)(offset)) { + attrs = offset; + offset = 0; + } + offset = offset || 0; + attrs = computeStyle(attrs, { + stroke: "black", + strokeWidth: 2, + fill: "white" + }); + let rect = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.create)("rect"); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.attr)(rect, { + x: offset, + y: offset, + width: width - offset * 2, + height: height - offset * 2, + rx: r, + ry: r + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.attr)(rect, attrs); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(parentGfx, rect); + return rect; + } + // marker functions + function marker(type, fill, stroke) { + let id = type + "-" + fill + "-" + stroke + "-" + rendererId; + if (!markers[id]) { + createMarker(type, fill, stroke); + } + return "url(#" + id + ")"; + } + function createMarker(type, fill, stroke) { + let id = type + "-" + fill + "-" + stroke + "-" + rendererId; + if (type === "activity") { + let sequenceflowEnd = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.create)("path"); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.attr)(sequenceflowEnd, { + d: "M 1 5 L 11 10 L 1 15 Z" + }); + addMarker(id, { + element: sequenceflowEnd, + ref: { + x: 11, + y: 10 + }, + scale: 0.5, + attrs: { + fill: stroke, + stroke: stroke + } + }); + } + } + function addMarker(id, options) { + let attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_11__.assign)({ + fill: "black", + strokeWidth: 1, + strokeLinecap: "round", + strokeDasharray: "none" + }, options.attrs); + let ref = options.ref || { + x: 0, + y: 0 + }; + let scale = options.scale || 1; + // resetting stroke dash array + if (attrs.strokeDasharray === "none") { + attrs.strokeDasharray = [10000, 1]; + } + let marker = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.create)("marker"); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.attr)(options.element, attrs); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(marker, options.element); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.attr)(marker, { + id: id, + viewBox: "0 0 20 20", + refX: ref.x, + refY: ref.y, + markerWidth: 20 * scale, + markerHeight: 20 * scale, + orient: "auto" + }); + let defs = (0,min_dom__WEBPACK_IMPORTED_MODULE_14__.query)("defs", canvas._svg); + if (!defs) { + defs = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.create)("defs"); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(canvas._svg, defs); + } + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_12__.append)(defs, marker); + markers[id] = marker; + } + // path functions + this.getWorkObjectPath = function (shape) { + let rectangle = getRectPath(shape); + return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_13__.componentsToPath)(rectangle); + }; + this.getGroupPath = function (shape) { + let rectangle = getRectPath(shape); + return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_13__.componentsToPath)(rectangle); + }; + this.getActivityPath = function (connection) { + let waypoints = connection.waypoints.map(function (p) { + return p.original || p; + }); + let activityPath = [["M", waypoints[0].x, waypoints[0].y]]; + waypoints.forEach(function (waypoint, index) { + if (index !== 0) { + activityPath.push(["L", waypoint.x, waypoint.y]); + } + }); + return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_13__.componentsToPath)(activityPath); + }; + this.getActorPath = function (shape) { + let rectangle = getRectPath(shape); + return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_13__.componentsToPath)(rectangle); + }; +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DomainStoryRenderer, diagram_js_lib_draw_BaseRenderer__WEBPACK_IMPORTED_MODULE_10__["default"]); +DomainStoryRenderer.$inject = ["eventBus", "styles", "canvas", "textRenderer", "pathMap", "commandStack"]; +DomainStoryRenderer.prototype.canRender = function (element) { + return /^domainStory:/.test(element.type); +}; +DomainStoryRenderer.prototype.drawShape = function (p, element) { + // polyfill for tests + if (!String.prototype.startsWith) { + Object.defineProperty(String.prototype, "startsWith", { + value: function (search, pos) { + pos = !pos || pos < 0 ? 0 : +pos; + return this.substring(pos, pos + search.length) === search; + } + }); + } + let type = element.type; + element.businessObject.type = type; + elementRegistry.correctInitialize(); + dirtyFlag.makeDirty(); + if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.ACTOR)) { + return this.drawActor(p, element); + } else if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.WORKOBJECT)) { + return this.drawWorkObject(p, element); + } else if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.TEXTANNOTATION)) { + return this.drawAnnotation(p, element); + } else if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.GROUP)) { + return this.drawGroup(p, element); + } +}; +DomainStoryRenderer.prototype.getShapePath = function (shape) { + let type = shape.type; + if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.ACTOR)) { + return this.getActorPath(shape); + } else if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.WORKOBJECT)) { + return this.getWorkObjectPath(shape); + } else if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.GROUP)) { + return this.getGroupPath(shape); + } +}; +DomainStoryRenderer.prototype.drawConnection = function (p, element) { + let type = element.type; + dirtyFlag.makeDirty(); + // fixes activities that were copy-pasted + if (!element.businessObject.type) { + element.businessObject.type = type; + } + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.ACTIVITY) { + return this.drawActivity(p, element); + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_7__.elementTypes.CONNECTION) { + return this.drawDSConnection(p, element); + } +}; +// creates a SVG path that describes a rectangle which encloses the given shape. +function getRectPath(shape) { + let offset = 5; + let x = shape.x, + y = shape.y, + width = shape.width / 2 + offset, + height = shape.height / 2 + offset; + return [["M", x, y], ["l", width, 0], ["l", width, height], ["l", -width, height], ["l", -width, 0], ["z"]]; +} + +/***/ }), + +/***/ 67477: +/*!*****************************************************!*\ + !*** ./src/app/Modeler/modeler/domainStoryRules.js ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DomainStoryRules) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 81410); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/features/rules/RuleProvider */ 19812); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ 80713); + + + + + + + +const HIGH_PRIORITY = 1500; +const MIN_SIZE = 125; +function isDomainStory(element) { + return element && /^domainStory:/.test(element.type); +} +function isDomainStoryGroup(element) { + return element && /^domainStory:group/.test(element.type); +} +function isActor(element) { + return element && /^domainStory:actor\w*/.test(element.type); +} +function isWorkObject(element) { + return element && /^domainStory:workObject/.test(element.type); +} +function isActivity(element) { + return element && /^domainStory:activity/.test(element.type); +} +function isConnection(element) { + return element && /^domainStory:connection/.test(element.type); +} +function isAnnotation(element) { + return element && /^domainStory:textAnnotation/.test(element.type); +} +/** + * can source and target be connected? + */ +function canConnect(source, target) { + // only judge about two custom elements + if (isDomainStoryGroup(target) || !isDomainStory(source) || !isDomainStory(target)) { + return; + } + // do not allow a connection from one element to itself + if (source === target) { + return; + } + // do not allow a connection between two actors + if (isActor(source) && isActor(target)) { + return; + } + // do not allow a connection, where the source or target is an activity + if (isActivity(source) || isActivity(target)) { + return; + } + // do not allow a connection, where the source or target is an annotation connection + if (isConnection(source) || isConnection(target)) { + return; + } + // do not allow a connection to a connection(the special type of connection between an element and a comment box) + // when the target is an annotation, the connection type is an annotation connection instead of an activity + if (isAnnotation(target)) { + return { + type: src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.CONNECTION + }; + } + return { + type: src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTIVITY + }; +} +function canResize(shape, newBounds) { + if ((0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(shape, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.GROUP)) { + if (newBounds) { + let lowerLeft = { + x: shape.x, + y: shape.y + shape.height + }; + let lowerRight = { + x: shape.x + shape.width, + y: shape.y + shape.height + }; + let upperRight = { + x: shape.x + shape.width, + y: shape.y + }; + if (newBounds.x !== shape.x && newBounds.y !== shape.y) { + // upper left + if (newBounds.x > lowerRight.x - MIN_SIZE) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(newBounds, { + x: lowerRight.x - MIN_SIZE + }); + } + if (newBounds.y > lowerRight.y - MIN_SIZE) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(newBounds, { + y: lowerRight.y - MIN_SIZE + }); + } + } + if (newBounds.x !== shape.x && newBounds.y === shape.y) { + // lower left + if (newBounds.x > upperRight.x - MIN_SIZE) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(newBounds, { + x: upperRight.x - MIN_SIZE + }); + } + } + if (newBounds.x === shape.x && newBounds.y !== shape.y) { + // upper right + if (newBounds.y > lowerLeft.y - MIN_SIZE) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(newBounds, { + y: lowerLeft.y - MIN_SIZE + }); + } + } + if (newBounds.height < MIN_SIZE) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(newBounds, { + height: MIN_SIZE + }); + } + if (newBounds.width < MIN_SIZE) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(newBounds, { + width: MIN_SIZE + }); + } + } + return true; + } + return false; +} +function canAttach(elements, target, source) { + if (!Array.isArray(elements)) { + elements = [elements]; + } + // disallow appending as boundary event + if (source) { + return false; + } + // only (re-)attach one element at a time + if (elements.length !== 1) { + return false; + } + // allow default move operation + if (!target) { + return true; + } + // only allow drop on DomainStory Elements + if (!isDomainStory(target)) { + return false; + } + return "attach"; +} +function canConnectToAnnotation(source, target, connection) { + // do not allow an activity connect to an annotation + if (isActivity(connection) && isAnnotation(target)) { + return false; + } + // do not allow an annotation connection between two annotations + if (isConnection(connection) && isAnnotation(source) && isAnnotation(target)) { + return false; + } + // do not allow an annotation connection between an actor or workObject and anything except an annotation + return !(isConnection(connection) && !isAnnotation(target) && (isActor(source) || isWorkObject(source))); +} +/** + * specific rules for custom elements + */ +function DomainStoryRules(eventBus) { + diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_4__["default"].call(this, eventBus); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DomainStoryRules, diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_4__["default"]); +DomainStoryRules.$inject = ["eventBus"]; +DomainStoryRules.prototype.init = function () { + /** + * can shape be created on target container? + */ + function canCreate(shape, target) { + // only judge about custom elements + if (!isDomainStory(shape)) { + return; + } + // allow creation just on groups + return !isDomainStory(target) || isDomainStoryGroup(target); + } + this.addRule("elements.create", function (context) { + const elements = context.elements, + position = context.position, + target = context.target; + return (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.every)(elements, function (element) { + if (isConnection(element)) { + return canConnect(element.source, element.target, element); + } + if (element.host) { + return canAttach(element, element.host, null, position); + } + return canCreate(element, target, null, position); + }); + }); + this.addRule("elements.move", HIGH_PRIORITY, function (context) { + let target = context.target, + shapes = context.shapes; + let type; + // do not allow mixed movements of custom / BPMN shapes + // if any shape cannot be moved, the group cannot be moved, too + // reject, if we have at least one + // custom element that cannot be moved + return (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.reduce)(shapes, function (result, s) { + if (type === undefined) { + type = isDomainStory(s); + } + if (type !== isDomainStory(s) || result === false) { + return false; + } + return canCreate(s, target); + }, undefined); + }); + this.addRule("shape.create", HIGH_PRIORITY, function (context) { + let target = context.target, + shape = context.shape; + return canCreate(shape, target); + }); + this.addRule("connection.create", HIGH_PRIORITY, function (context) { + let source = context.source, + target = context.target; + return canConnect(source, target); + }); + this.addRule("connection.reconnect", HIGH_PRIORITY, function (context) { + let connection = context.connection, + source = context.hover || context.source, + target = context.target; + // -------------------------------------------------------------- + let result = canConnectToAnnotation(source, target, connection); + if (!result) { + return; + } + // -------------------------------------------------------------- + return canConnect(source, target, connection); + }); + this.addRule("shape.resize", function (context) { + let shape = context.shape, + newBounds = context.newBounds; + return canResize(shape, newBounds); + }); +}; +DomainStoryRules.prototype.canConnect = canConnect; +DomainStoryRules.prototype.canAttach = canAttach; +DomainStoryRules.prototype.isDomainStory = isDomainStory; +DomainStoryRules.prototype.canResize = canResize; + +/***/ }), + +/***/ 38495: +/*!*******************************************************!*\ + !*** ./src/app/Modeler/modeler/domainStoryUpdater.js ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DomainStoryUpdater) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! min-dash */ 81410); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ 39233); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util */ 80713); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/elementTypes */ 30236); + + + + + + + + +/** + * a handler responsible for updating the custom element's businessObject + * once changes on the diagram happen. + */ +function DomainStoryUpdater(eventBus, bpmnjs) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_3__["default"].call(this, eventBus); + function updateCustomElement(e) { + let context = e.context, + shape = context.shape, + businessObject = shape.businessObject; + if (!shape || !shape.type.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.DOMAINSTORY)) { + return; + } + let parent = shape.parent; + let customElements = bpmnjs._customElements; + // make sure element is added / removed from bpmnjs.customElements + if (!parent) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_4__.remove)(customElements, businessObject); + } else { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_4__.add)(customElements, businessObject); + } + // save custom element position + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(businessObject, (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.pick)(shape, ["x", "y"])); + // save custom element size if resizable + if (shape.type === _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.GROUP) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(businessObject, (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.pick)(shape, ["height", "width"])); + // rework the child-parent relations if a group was moved, such that all Objects that are visually in the group are also associated with it + // since we do not have access to the standard-canvas object here, we cannot use the function correctGroupChildren() from DSLabelUtil + if (parent != null) { + (0,_util__WEBPACK_IMPORTED_MODULE_1__.reworkGroupElements)(parent, shape); + } + } + if (shape && shape.parent && "type" in shape.parent && shape.parent.type === _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.GROUP) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(businessObject, { + parent: shape.parent.id + }); + } + } + function updateCustomConnection(e) { + let context = e.context, + connection = context.connection, + source = connection.source, + target = connection.target, + businessObject = connection.businessObject; + if (e.newTarget) { + target = e.newTarget; + } + if (e.newSource) { + source = e.newSource; + } + let parent = connection.parent; + let customElements = bpmnjs._customElements; + // make sure element is added / removed from bpmnjs.customElements + if (!parent) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_4__.remove)(customElements, businessObject); + } else { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_4__.add)(customElements, businessObject); + } + // update waypoints + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(businessObject, { + waypoints: copyWaypoints(connection) + }); + if (source) { + if (!businessObject.source) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(businessObject, { + source: source.id + }); + } else { + businessObject.source = source.id; + } + } + if (target) { + if (!businessObject.target) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(businessObject, { + target: target.id + }); + } else { + businessObject.target = target.id; + } + } + } + function copyWaypoints(connection) { + return connection.waypoints.map(function (p) { + if (p.original) { + return { + original: { + x: p.original.x, + y: p.original.y + }, + x: p.x, + y: p.y + }; + } else { + return { + x: p.x, + y: p.y + }; + } + }); + } + this.executed(["shape.create", "shape.move", "shape.delete", "shape.resize", "shape.removeGroupWithChildren"], ifDomainStoryElement(updateCustomElement)); + this.reverted(["shape.create", "shape.move", "shape.delete", "shape.resize", "shape.removeGroupWithChildren"], ifDomainStoryElement(updateCustomElement)); + this.executed(["connection.create", "connection.reconnect", "connection.updateWaypoints", "connection.delete", "connection.layout", "connection.move"], ifDomainStoryElement(updateCustomConnection)); + this.reverted(["connection.create", "connection.reconnect", "connection.updateWaypoints", "connection.delete", "connection.layout", "connection.move"], ifDomainStoryElement(updateCustomConnection)); +} +// check if element in the context of an event is a domainStory element +function ifDomainStoryElement(fn) { + return event => { + const context = event.context; + const element = context.shape || context.connection; + if (isDomainStory(element)) { + fn(event); + } + }; +} +function isDomainStory(element) { + return element && /domainStory:/.test(element.type); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DomainStoryUpdater, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_3__["default"]); +DomainStoryUpdater.$inject = ["eventBus", "bpmnjs"]; + +/***/ }), + +/***/ 77089: +/*!******************************************!*\ + !*** ./src/app/Modeler/modeler/index.js ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _domainStoryElementFactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./domainStoryElementFactory */ 75702); +/* harmony import */ var _domainStoryRenderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./domainStoryRenderer */ 76867); +/* harmony import */ var _palette_domainStoryPalette__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./palette/domainStoryPalette */ 70345); +/* harmony import */ var _domainStoryRules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./domainStoryRules */ 67477); +/* harmony import */ var _domainStoryUpdater__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./domainStoryUpdater */ 38495); +/* harmony import */ var bpmn_js_lib_features_modeling_ElementFactory__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! bpmn-js/lib/features/modeling/ElementFactory */ 5557); +/* harmony import */ var diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! diagram-js/lib/features/create */ 48256); +/* harmony import */ var bpmn_js_lib_draw_PathMap__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! bpmn-js/lib/draw/PathMap */ 56089); +/* harmony import */ var bpmn_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! bpmn-js/lib/features/popup-menu */ 30918); +/* harmony import */ var diagram_js_lib_features_context_pad__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! diagram-js/lib/features/context-pad */ 93331); +/* harmony import */ var diagram_js_lib_command_CommandStack__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! diagram-js/lib/command/CommandStack */ 77738); +/* harmony import */ var _updateHandler_updateLabelHandler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./updateHandler/updateLabelHandler */ 6554); +/* harmony import */ var _updateHandler_headlineAndDescriptionUpdateHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./updateHandler/headlineAndDescriptionUpdateHandler */ 13881); +/* harmony import */ var _context_pad_domainStoryContextPadProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./context-pad/domainStoryContextPadProvider */ 68065); +/* harmony import */ var _change_icon_replaceMenuProvider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./change-icon/replaceMenuProvider */ 41214); +/* harmony import */ var _modeling_dSModeling__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modeling/dSModeling */ 39343); + + + + + + + + + + + + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_10__["default"], diagram_js_lib_features_context_pad__WEBPACK_IMPORTED_MODULE_11__["default"], bpmn_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_12__["default"]], + __init__: ["domainStoryRenderer", "paletteProvider", "domainStoryRules", "domainStoryUpdater", "contextPadProvider", "replaceMenuProvider"], + elementFactory: ["type", _domainStoryElementFactory__WEBPACK_IMPORTED_MODULE_0__["default"]], + domainStoryRenderer: ["type", _domainStoryRenderer__WEBPACK_IMPORTED_MODULE_1__["default"]], + paletteProvider: ["type", _palette_domainStoryPalette__WEBPACK_IMPORTED_MODULE_2__["default"]], + domainStoryRules: ["type", _domainStoryRules__WEBPACK_IMPORTED_MODULE_3__["default"]], + domainStoryUpdater: ["type", _domainStoryUpdater__WEBPACK_IMPORTED_MODULE_4__["default"]], + contextPadProvider: ["type", _context_pad_domainStoryContextPadProvider__WEBPACK_IMPORTED_MODULE_7__["default"]], + elementFactoryBpmn: ["type", bpmn_js_lib_features_modeling_ElementFactory__WEBPACK_IMPORTED_MODULE_13__["default"]], + pathMap: ["type", bpmn_js_lib_draw_PathMap__WEBPACK_IMPORTED_MODULE_14__["default"]], + replaceMenuProvider: ["type", _change_icon_replaceMenuProvider__WEBPACK_IMPORTED_MODULE_8__["default"]], + commandStack: ["type", diagram_js_lib_command_CommandStack__WEBPACK_IMPORTED_MODULE_15__["default"]], + updateLabelHandler: ["type", _updateHandler_updateLabelHandler__WEBPACK_IMPORTED_MODULE_5__["default"]], + headlineAndDescriptionUpdateHandler: ["type", _updateHandler_headlineAndDescriptionUpdateHandler__WEBPACK_IMPORTED_MODULE_6__["default"]], + modeling: ["type", _modeling_dSModeling__WEBPACK_IMPORTED_MODULE_9__["default"]] +}); + +/***/ }), + +/***/ 14901: +/*!*******************************************************************!*\ + !*** ./src/app/Modeler/modeler/labeling/dsLabelEditingPreview.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DSLabelEditingPreview), +/* harmony export */ getAnnotationBoxHeight: () => (/* binding */ getAnnotationBoxHeight) +/* harmony export */ }); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/SvgTransformUtil */ 81384); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Domain/Common/elementTypes */ 30236); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ 80713); + + + + + + +const MARKER_HIDDEN = "djs-element-hidden", + MARKER_LABEL_HIDDEN = "djs-label-hidden"; +let annotationBoxHeight = 0; +function getAnnotationBoxHeight() { + return annotationBoxHeight; +} +function DSLabelEditingPreview(eventBus, canvas, pathMap) { + let self = this; + let defaultLayer = canvas.getDefaultLayer(); + let element, absoluteElementBBox, gfx; + eventBus.on("directEditing.activate", function (context) { + let activeProvider = context.active; + element = activeProvider.element.label || activeProvider.element; + // text annotation + if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.is)(element, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.TEXTANNOTATION)) { + absoluteElementBBox = canvas.getAbsoluteBBox(element); + gfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)("g"); + annotationBoxHeight = element.height; + let textPathData = pathMap.getScaledPath("TEXT_ANNOTATION", { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.0, + my: 0.0 + } + }); + let path = self.path = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)("path"); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(path, { + d: textPathData, + strokeWidth: 2, + stroke: getStrokeColor(element) + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(gfx, path); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(defaultLayer, gfx); + (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(gfx, element.x, element.y); + } + if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.is)(element, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.TEXTANNOTATION) || element.labelTarget) { + canvas.addMarker(element, MARKER_HIDDEN); + } else if (element.type.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR) || element.type.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT) || element.type.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY) || element.type.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { + canvas.addMarker(element, MARKER_LABEL_HIDDEN); + } + }); + eventBus.on("directEditing.resize", function (context) { + // text annotation + if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.is)(element, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.TEXTANNOTATION)) { + let height = context.height, + dy = context.dy; + let newElementHeight = Math.max(element.height / absoluteElementBBox.height * (height + dy), 0); + annotationBoxHeight = newElementHeight; + let textPathData = pathMap.getScaledPath("TEXT_ANNOTATION", { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: newElementHeight, + position: { + mx: 0.0, + my: 0.0 + } + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(self.path, { + d: textPathData + }); + } + }); + eventBus.on(["directEditing.complete", "directEditing.cancel"], function (context) { + let activeProvider = context.active; + if (activeProvider) { + canvas.removeMarker(activeProvider.element.label || activeProvider.element, MARKER_HIDDEN); + canvas.removeMarker(element, MARKER_LABEL_HIDDEN); + } + element = undefined; + absoluteElementBBox = undefined; + if (gfx) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.remove)(gfx); + gfx = undefined; + } + }); +} +DSLabelEditingPreview.$inject = ["eventBus", "canvas", "pathMap"]; +// helpers /////////////////// +function getStrokeColor() { + return "black"; +} + +/***/ }), + +/***/ 28712: +/*!********************************************************************!*\ + !*** ./src/app/Modeler/modeler/labeling/dsLabelEditingProvider.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DSLabelEditingProvider), +/* harmony export */ focusElement: () => (/* binding */ focusElement), +/* harmony export */ getNumberStash: () => (/* binding */ getNumberStash), +/* harmony export */ initializeLabelEditingProvider: () => (/* binding */ initializeLabelEditingProvider), +/* harmony export */ toggleStashUse: () => (/* binding */ toggleStashUse) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ 81410); +/* harmony import */ var _dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsLabelUtil */ 60125); +/* harmony import */ var bpmn_js_lib_features_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! bpmn-js/lib/features/modeling/util/ModelingUtil */ 4525); +/* harmony import */ var bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! bpmn-js/lib/util/LabelUtil */ 81454); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Domain/Common/elementTypes */ 30236); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util */ 80713); + + + + + + + + +let dictionaryService; +let numberStash = 0; +let stashUse = false; +function initializeLabelEditingProvider(labelingDictionary) { + dictionaryService = labelingDictionary; +} +function getNumberStash() { + let number = { + use: stashUse, + number: numberStash + }; + stashUse = false; + return number; +} +function toggleStashUse(use) { + stashUse = use; +} +function focusElement(element) { + // Opening a Angular Dialog seems to mess with the focus logic somehow. + // My guess is that is makes the mousedown event passive, which prevents "preventDefault" from intercepting. + // I am not sure how to fix it, but this seems to be a workaround. + setTimeout(() => element.focus(), 0); +} +function DSLabelEditingProvider(eventBus, canvas, directEditing, modeling, resizeHandles, textRenderer, updateLabelHandler) { + this._canvas = canvas; + this._modeling = modeling; + this._textRenderer = textRenderer; + this._updateLabelHandler = updateLabelHandler; + directEditing.registerProvider(this); + // listen to dblclick on non-root elements + eventBus.on("element.dblclick", function (event) { + activateDirectEdit(event.element, true); + if ((0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(event.element, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTIVITY)) { + // if we edit an activity, we do not want the standard editing box + numberStash = event.element.businessObject.number; + stashUse = true; + directEditing.complete(); + } + }); + // complete on followup canvas operation + eventBus.on(["element.mousedown", "drag.init", "canvas.viewbox.changing", "autoPlace", "popupMenu.open"], function () { + if (directEditing.isActive()) { + directEditing.complete(); + } + }); + // cancel on command stack changes + eventBus.on(["commandStack.changed"], function () { + if (directEditing.isActive()) { + directEditing.cancel(); + } + }); + eventBus.on("directEditing.activate", function (event) { + resizeHandles.removeResizers(); + let element = event.active.element; + createAutocomplete(element); + }); + eventBus.on("create.end", 500, function (event) { + let element = event.shape, + canExecute = event.context.canExecute, + isTouch = event.isTouch; + if (isTouch) { + return; + } + if (!canExecute) { + return; + } + if (!(0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(element, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTIVITY)) { + activateDirectEdit(element); + } + let editingBox = document.getElementsByClassName("djs-direct-editing-content"); + focusElement(editingBox.item(0)); + }); + eventBus.on("autoPlace.end", 500, function (event) { + activateDirectEdit(event.shape); + }); + function activateDirectEdit(element, force) { + if (force || (0,bpmn_js_lib_features_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(element, [_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.TEXTANNOTATION]) || element.businessObject.type.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.DOMAINSTORY)) { + directEditing.activate(element); + } + } + function createAutocomplete(element) { + let editingBox = document.getElementsByClassName("djs-direct-editing-content"); + focusElement(editingBox.item(0)); + (0,_dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__.autocomplete)(editingBox[0], dictionaryService.getUniqueWorkObjectNames(), element, eventBus); + } +} +DSLabelEditingProvider.$inject = ["eventBus", "canvas", "directEditing", "modeling", "resizeHandles", "textRenderer", "updateLabelHandler"]; +/** + * activate direct editing for activities and text annotations. + * + * @param {djs.model.Base} element + * + * @return {Object} an object with properties bounds (position and size), text and options + */ +DSLabelEditingProvider.prototype.activate = function (element) { + // text + if (element.id === "__implicitrootbase") { + return; + } + let text = (0,_dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__.getLabel)(element); + if (text === undefined) { + return; + } + let context = { + text: text + }; + // bounds + let bounds = this.getEditingBBox(element); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(context, bounds); + let options = {}; + // external labels + if ((0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.isLabelExternal)(element)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(options, { + autoResize: true + }); + } + // text annotations + if ((0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(element, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.TEXTANNOTATION)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(options, { + resizable: true, + autoResize: true + }); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(context, { + options: options + }); + return context; +}; +/** + * get the editing bounding box based on the element's size and position + * + * @param {djs.model.Base} element + * + * @return {Object} an object containing information about position + * and size (fixed or minimum and/or maximum) + */ +DSLabelEditingProvider.prototype.getEditingBBox = function (element) { + let canvas = this._canvas; + let target = element.label || element; + let bbox = canvas.getAbsoluteBBox(target); + let mid = { + x: bbox.x + bbox.width / 2, + y: bbox.y + bbox.height / 2 + }; + // default position + let bounds = { + x: bbox.x, + y: bbox.y + }; + /** The cavnas is an Object from BPMN, the IDE might say, that zoom is deprecated, + * because it thinks canvas is the standard HTMLElement. -> Needs to stay toom **/ + let zoom = canvas.zoom(); + let defaultStyle = this._textRenderer.getDefaultStyle(), + externalStyle = this._textRenderer.getExternalStyle(); + // take zoom into account + let externalFontSize = externalStyle.fontSize * zoom, + externalLineHeight = externalStyle.lineHeight, + defaultFontSize = defaultStyle.fontSize * zoom, + defaultLineHeight = defaultStyle.lineHeight; + let style = { + fontFamily: this._textRenderer.getDefaultStyle().fontFamily, + fontWeight: this._textRenderer.getDefaultStyle().fontWeight + }; + // adjust for groups + if ((0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(element, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.GROUP)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(bounds, { + minWidth: bbox.width / 2.5 > 125 ? bbox.width / 2.5 : 125, + maxWidth: bbox.width, + minHeight: 30 * zoom, + x: bbox.x, + y: bbox.y + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(style, { + fontSize: defaultFontSize + "px", + lineHeight: defaultLineHeight, + paddingTop: 7 * zoom + "px", + paddingBottom: 7 * zoom + "px", + paddingLeft: 5 * zoom + "px", + paddingRight: 5 * zoom + "px", + textAlign: "left" + }); + } + // internal labels for tasks and collapsed call activities, + // sub processes and participants + if (/^domainStory:actor\w*/.test(element.type) || /^domainStory:workObject\w*/.test(element.type)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(bounds, { + width: bbox.width, + minHeight: 30, + y: bbox.y + bbox.height - 20, + x: bbox.x + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(style, { + fontSize: defaultFontSize + "px", + lineHeight: defaultLineHeight, + paddingTop: 7 * zoom + "px", + paddingBottom: 7 * zoom + "px", + paddingLeft: 5 * zoom + "px", + paddingRight: 5 * zoom + "px" + }); + } + let width = 90 * zoom, + paddingTop = 7 * zoom, + paddingBottom = 4 * zoom; + // external labels for events, data elements, gateways and connections + if (target.labelTarget) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(bounds, { + width: width, + height: bbox.height + paddingTop + paddingBottom, + x: mid.x - width / 2, + y: bbox.y - paddingTop + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(style, { + fontSize: externalFontSize + "px", + lineHeight: externalLineHeight, + paddingTop: paddingTop + "px", + paddingBottom: paddingBottom + "px" + }); + } + // external label not yet created + if ((0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.isLabelExternal)(target) && !(0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.hasExternalLabel)(target) && !(0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.isLabel)(target)) { + let externalLabelMid = (0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.getExternalLabelMid)(element); + let absoluteBBox = canvas.getAbsoluteBBox({ + x: externalLabelMid.x, + y: externalLabelMid.y, + width: 0, + height: 0 + }); + let height = externalFontSize + paddingTop + paddingBottom; + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(bounds, { + width: width, + height: height, + x: absoluteBBox.x - width / 2, + y: absoluteBBox.y - height / 2 + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(style, { + fontSize: externalFontSize + "px", + lineHeight: externalLineHeight, + paddingTop: paddingTop + "px", + paddingBottom: paddingBottom + "px" + }); + } + // text annotations + if ((0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(element, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.TEXTANNOTATION)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(bounds, { + width: bbox.width, + height: bbox.height, + minWidth: 30 * zoom, + minHeight: 10 * zoom + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(style, { + textAlign: "left", + paddingTop: 7 * zoom + "px", + paddingBottom: 7 * zoom + "px", + paddingLeft: 5 * zoom + "px", + paddingRight: 5 * zoom + "px", + fontSize: defaultFontSize + "px", + lineHeight: defaultLineHeight + }); + } + return { + bounds: bounds, + style: style + }; +}; +DSLabelEditingProvider.prototype.update = function (element, newLabel, activeContextText, bounds) { + let newBounds, bbox; + if ((0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(element, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.TEXTANNOTATION)) { + bbox = this._canvas.getAbsoluteBBox(element); + newBounds = { + x: element.x, + y: element.y, + width: element.width / bbox.width * bounds.width, + height: element.height / bbox.height * bounds.height + }; + } + this._modeling.updateLabel(element, newLabel, newBounds); +}; + +/***/ }), + +/***/ 60125: +/*!*********************************************************!*\ + !*** ./src/app/Modeler/modeler/labeling/dsLabelUtil.js ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ autocomplete: () => (/* binding */ autocomplete), +/* harmony export */ calculateTextWidth: () => (/* binding */ calculateTextWidth), +/* harmony export */ getLabel: () => (/* binding */ getLabel), +/* harmony export */ getNumber: () => (/* binding */ getNumber), +/* harmony export */ selectPartOfActivity: () => (/* binding */ selectPartOfActivity), +/* harmony export */ setLabel: () => (/* binding */ setLabel), +/* harmony export */ setNumber: () => (/* binding */ setNumber) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util */ 80713); + + + + +function getLabelAttr(semantic) { + if (semantic.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR) || semantic.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT) || semantic.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY) || semantic.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { + return "name"; + } + if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.TEXTANNOTATION)) { + return "text"; + } +} +function getNumberAttr(semantic) { + if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.is)(semantic, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY)) { + return "number"; + } +} +function getLabel(element) { + let semantic; + if (element.businessObject) { + semantic = element.businessObject; + } else { + semantic = element; + } + let attr = getLabelAttr(semantic); + if (attr && semantic) { + return semantic[attr] || ""; + } +} +function getNumber(element) { + let semantic = element.businessObject, + attr = getNumberAttr(semantic); + if (attr) { + return semantic[attr] || ""; + } +} +function setLabel(element, text) { + let semantic; + if (element.businessObject) { + semantic = element.businessObject; + } else { + semantic = element; + } + let attr = getLabelAttr(semantic); + if (attr) { + semantic[attr] = text; + } + return element; +} +function setNumber(element, textNumber) { + let semantic = element.businessObject, + attr = getNumberAttr(semantic); + if (attr) { + semantic[attr] = textNumber; + } + return element; +} +// select at which part of the activity the label should be attached to +function selectPartOfActivity(waypoints, angleActivity) { + let selectedActivity = 0; + let linelength = 49; + for (let i = 0; i < waypoints.length; i++) { + if (angleActivity[i] === 0 || angleActivity[i] === 180) { + let length = Math.abs(waypoints[i].x - waypoints[i + 1].x); + if (length > linelength) { + selectedActivity = i; + } + } + } + return selectedActivity; +} +// approximate the width of the label text, standard fontsize: 11 +function calculateTextWidth(text) { + if (!text) { + return 0; + } + let fontsize = text.length * 5.1; + fontsize = fontsize / 2; + // add an initial offset to the absolute middle of the activity + fontsize += 20; + return fontsize; +} +/** + * copied from https://www.w3schools.com/howto/howto_js_autocomplete.asp on 18.09.2018 + */ +function autocomplete(input, workObjectNames, element, eventBus) { + closeAllLists(); + /* the autocomplete function takes three arguments, + the text field element and an array of possible autocompleted values and an optional element to which it is appended:*/ + let currentFocus, filteredWorkObjectNames; + /* execute a function when someone writes in the text field:*/ + input.addEventListener("input", function () { + if (workObjectNames.length === 0) { + return; + } + /* the direct editing field of actors and workobjects is a recycled html-element and has old values that need to be overridden*/ + if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT)) { + this.value = this.innerHTML; + } + let autocompleteList, + autocompleteItem, + val = this.value; + /* close any already open lists of autocompleted values*/ + closeAllLists(); + currentFocus = -1; + /* create a DIV element that will contain the items (values):*/ + autocompleteList = document.createElement("DIV"); + autocompleteList.setAttribute("id", "autocomplete-list"); + autocompleteList.setAttribute("class", "autocomplete-items"); + /* append the DIV element as a child of the autocomplete container:*/ + this.parentNode.appendChild(autocompleteList); + /* for each item in the array...*/ + filteredWorkObjectNames = []; + for (const name of workObjectNames) { + /* check if the item starts with the same letters as the text field value:*/ + if (val) { + if (name.substring(0, val.length).toUpperCase() === val.toUpperCase()) { + /* create a DIV element for each matching element:*/ + autocompleteItem = document.createElement("DIV"); + /* make the matching letters bold:*/ + autocompleteItem.innerHTML = "" + name.substring(0, val.length) + "" + name.substring(val.length); + /* insert an input field that will hold the current name:*/ + autocompleteItem.innerHTML += ""; + autocompleteList.appendChild(autocompleteItem); + filteredWorkObjectNames.push(name); + } + } + } + // if we edit an actor, we do not want auto-complete, since actors generally are unique + if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR)) { + autocompleteList.style.visibility = "hidden"; + } + }); + /* execute a function presses a key on the keyboard:*/ + input.onkeydown = function (e) { + let autocompleteList = document.getElementById("autocomplete-list"); + if (autocompleteList) { + autocompleteList = autocompleteList.getElementsByTagName("div"); + } + if (e.keyCode === 40) { + /* If the arrow DOWN key is pressed, + increase the currentFocus letiable:*/ + currentFocus++; + /* and and make the current item more visible:*/ + addActive(autocompleteList); + } else if (e.keyCode === 38) { + // up + /* If the arrow UP key is pressed, + decrease the currentFocus letiable:*/ + currentFocus--; + /* and and make the current item more visible:*/ + addActive(autocompleteList); + } else if (e.keyCode === 13) { + e.preventDefault(); + /* If the ENTER key is pressed, prevent the form from being submitted,*/ + if (currentFocus > -1) { + element.businessObject.name = filteredWorkObjectNames[currentFocus]; + eventBus.fire("element.changed", { + element + }); + } + } + }; + function addActive(autocompleteList) { + /* a function to classify an item as "active":*/ + if (!autocompleteList || autocompleteList.length < 1) return false; + /* start by removing the "active" class on all items:*/ + removeActive(autocompleteList); + if (currentFocus >= autocompleteList.length) currentFocus = 0; + if (currentFocus < 0) currentFocus = autocompleteList.length - 1; + /* add class "autocomplete-active":*/ + autocompleteList[currentFocus].classList.add("autocomplete-active"); + } + function removeActive(autocompleteList) { + /* a function to remove the "active" class from all autocomplete items:*/ + if (autocompleteList.length > 1) { + for (const item of autocompleteList) { + item.classList.remove("autocomplete-active"); + } + } + } + function closeAllLists(survivor) { + /* close all autocomplete lists in the document, + except the one passed as an argument:*/ + let autocompleteList = document.getElementsByClassName("autocomplete-items"); + for (const item of autocompleteList) { + if (survivor != item && survivor != input) { + item.parentNode.removeChild(item); + } + } + } + /* execute a function when someone clicks in the document:*/ + document.addEventListener("click", function (e) { + closeAllLists(e.target); + }); +} + +/***/ }), + +/***/ 26400: +/*!***************************************************!*\ + !*** ./src/app/Modeler/modeler/labeling/index.js ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/features/change-support */ 46242); +/* harmony import */ var diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/features/resize */ 40844); +/* harmony import */ var diagram_js_direct_editing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js-direct-editing */ 32110); +/* harmony import */ var diagram_js_lib_command_CommandStack__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! diagram-js/lib/command/CommandStack */ 77738); +/* harmony import */ var _updateHandler_updateLabelHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../updateHandler/updateLabelHandler */ 6554); +/* harmony import */ var _dsLabelEditingPreview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dsLabelEditingPreview */ 14901); +/* harmony import */ var _dsLabelEditingProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dsLabelEditingProvider */ 28712); +/* harmony import */ var _modeling_dSModeling__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modeling/dSModeling */ 39343); + + + + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_5__["default"], diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_6__["default"], diagram_js_direct_editing__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ["dSlabelEditingProvider", "dSlabelEditingPreview"], + dSlabelEditingProvider: ["type", _dsLabelEditingProvider__WEBPACK_IMPORTED_MODULE_3__["default"]], + dSlabelEditingPreview: ["type", _dsLabelEditingPreview__WEBPACK_IMPORTED_MODULE_2__["default"]], + updateLabelHandler: ["type", _updateHandler_updateLabelHandler__WEBPACK_IMPORTED_MODULE_1__["default"]], + commandStack: ["type", diagram_js_lib_command_CommandStack__WEBPACK_IMPORTED_MODULE_7__["default"]], + modeling: ["type ", _modeling_dSModeling__WEBPACK_IMPORTED_MODULE_4__["default"]] +}); + +/***/ }), + +/***/ 12957: +/*!******************************************************!*\ + !*** ./src/app/Modeler/modeler/labeling/position.js ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ countLines: () => (/* binding */ countLines), +/* harmony export */ labelPosition: () => (/* binding */ labelPosition), +/* harmony export */ labelPositionX: () => (/* binding */ labelPositionX), +/* harmony export */ labelPositionY: () => (/* binding */ labelPositionY) +/* harmony export */ }); +/* harmony import */ var _dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsLabelUtil */ 60125); +/* harmony import */ var _Utils_mathExtensions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/mathExtensions */ 114); + + + + +function countLines(str) { + return str.split(/\r\n|\r|\n/).length; +} +// determine the position of the label at the activity +function labelPosition(waypoints, lines = 1) { + let amountWaypoints = waypoints.length; + let determinedPosition; + let xPos; + let yPos; + if (amountWaypoints > 2) { + let angleActivity = new Array(amountWaypoints - 1); + for (let i = 0; i < amountWaypoints - 1; i++) { + // calculate the angles of the activities + angleActivity[i] = (0,_Utils_mathExtensions__WEBPACK_IMPORTED_MODULE_1__.angleBetween)(waypoints[i], waypoints[i + 1]); + } + let selectedActivity = (0,_dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__.selectPartOfActivity)(waypoints, angleActivity); + xPos = labelPositionX(waypoints[selectedActivity], waypoints[selectedActivity + 1]); + yPos = labelPositionY(waypoints[selectedActivity], waypoints[selectedActivity + 1], lines); + determinedPosition = { + x: xPos, + y: yPos, + selected: selectedActivity + }; + return determinedPosition; + } else { + xPos = labelPositionX(waypoints[0], waypoints[1]); + yPos = labelPositionY(waypoints[0], waypoints[1], lines); + determinedPosition = { + x: xPos, + y: yPos, + selected: 0 + }; + return determinedPosition; + } +} +// calculate the X position of the label +function labelPositionX(startPoint, endPoint) { + let angle = (0,_Utils_mathExtensions__WEBPACK_IMPORTED_MODULE_1__.angleBetween)(startPoint, endPoint); + let offsetX = 0; + let scaledAngle = 0; + if (angle === 0 || angle === 180 || angle === 90 || angle === 270) { + offsetX = 0; + } else if (angle > 0 && angle < 90) { + // endpoint in upper right quadrant + offsetX = 5 - angle / 6; + } else if (angle > 90 && angle < 180) { + // endpoint in upper left quadrant + scaledAngle = angle - 90; + offsetX = 5 - scaledAngle / 18; + } else if (angle > 180 && angle < 270) { + // endpoint in lower left quadrant + scaledAngle = angle - 180; + offsetX = scaledAngle / 18; + } else if (angle > 270) { + // endpoint in lower right quadrant + scaledAngle = angle - 270; + offsetX = 5 - scaledAngle / 6; + } + return offsetX + (startPoint.x + endPoint.x) / 2; +} +// calculate the Y position of the label +function labelPositionY(startPoint, endPoint, lines = 1) { + let angle = (0,_Utils_mathExtensions__WEBPACK_IMPORTED_MODULE_1__.angleBetween)(startPoint, endPoint); + let offsetY = 0; + let scaledAngle = 0; + if (angle === 0 || angle === 180) { + offsetY = 15; + } else if (angle === 90 || angle === 270) { + offsetY = 0; + } else if (angle > 0 && angle < 90) { + // endpoint in upper right quadrant + offsetY = 15 - angle / 6; + } else if (angle > 90 && angle < 180) { + // endpoint in upper left quadrant + scaledAngle = angle - 90; + offsetY = -scaledAngle / 9 * lines; + } else if (angle > 180 && angle < 270) { + // endpoint in lower left quadrant + scaledAngle = angle - 180; + offsetY = 15 - scaledAngle / 3; + } else if (angle > 270) { + // endpoint in lower right quadrant + scaledAngle = angle - 270; + offsetY = -scaledAngle / 9 * lines; + } + return offsetY + (startPoint.y + endPoint.y) / 2; +} + +/***/ }), + +/***/ 39343: +/*!********************************************************!*\ + !*** ./src/app/Modeler/modeler/modeling/dSModeling.js ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DSModeling) +/* harmony export */ }); +/* harmony import */ var bpmn_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bpmn-js/lib/features/modeling/Modeling */ 53548); +/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! util */ 22122); +/* harmony import */ var util__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(util__WEBPACK_IMPORTED_MODULE_0__); + + + + +function DSModeling(eventBus, elementFactory, commandStack, domainStoryRules) { + bpmn_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus, elementFactory, commandStack, domainStoryRules); +} +bpmn_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.updateLabel = function (element, newLabel, newBounds) { + if (element.businessObject ? newLabel !== element.businessObject.name : newLabel !== element.name) { + if (/^domainStory:/.test(element.type)) { + this._commandStack.execute("element.updateCustomLabel", { + element: element, + newLabel: newLabel, + newBounds: newBounds + }); + } else { + this._commandStack.execute("element.updateLabel", { + element: element, + newLabel: newLabel, + newBounds: newBounds + }); + } + } +}; +bpmn_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.updateNumber = function (element, newNumber, newBounds) { + if (element.businessObject ? newNumber !== element.businessObject.number : newNumber !== element.number) { + if (/^domainStory:/.test(element.type)) { + this._commandStack.execute("element.updateCustomLabel", { + element: element, + newNumber: newNumber, + newBounds: newBounds + }); + } else { + this._commandStack.execute("element.updateLabel", { + element: element, + newNumber: newNumber, + newBounds: newBounds + }); + } + } +}; +bpmn_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.replaceShape = function (oldShape, newShape, hints) { + let context = { + oldShape: oldShape, + newData: newShape, + hints: hints || {} + }; + this._commandStack.execute("shape.replace", context); + return context.newShape; +}; +bpmn_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.removeGroup = function (element) { + this._commandStack.execute("shape.removeGroupWithoutChildren", { + element: element + }); + this.removeElements({ + element + }); +}; +(0,util__WEBPACK_IMPORTED_MODULE_0__.inherits)(DSModeling, bpmn_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__["default"]); +DSModeling.$inject = ["eventBus", "elementFactory", "commandStack", "domainStoryRules"]; + +/***/ }), + +/***/ 97225: +/*!***************************************************!*\ + !*** ./src/app/Modeler/modeler/modeling/index.js ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _palette_domainStoryPalette__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../palette/domainStoryPalette */ 70345); +/* harmony import */ var bpmn_js_lib_features_modeling_ElementFactory__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! bpmn-js/lib/features/modeling/ElementFactory */ 5557); +/* harmony import */ var diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! diagram-js/lib/features/create */ 48256); +/* harmony import */ var bpmn_js_lib_draw_PathMap__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! bpmn-js/lib/draw/PathMap */ 56089); +/* harmony import */ var bpmn_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! bpmn-js/lib/features/popup-menu */ 30918); +/* harmony import */ var diagram_js_lib_features_context_pad__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! diagram-js/lib/features/context-pad */ 93331); +/* harmony import */ var diagram_js_lib_command_CommandStack__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! diagram-js/lib/command/CommandStack */ 77738); +/* harmony import */ var _updateHandler_updateLabelHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../updateHandler/updateLabelHandler */ 6554); +/* harmony import */ var _domainStoryUpdater__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../domainStoryUpdater */ 38495); +/* harmony import */ var _domainStoryElementFactory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../domainStoryElementFactory */ 75702); +/* harmony import */ var _updateHandler_headlineAndDescriptionUpdateHandler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../updateHandler/headlineAndDescriptionUpdateHandler */ 13881); +/* harmony import */ var _domainStoryRenderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../domainStoryRenderer */ 76867); +/* harmony import */ var _dSModeling__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./dSModeling */ 39343); +/* harmony import */ var _domainStoryRules__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../domainStoryRules */ 67477); +/* harmony import */ var _change_icon_replaceMenuProvider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../change-icon/replaceMenuProvider */ 41214); +/* harmony import */ var _context_pad_domainStoryContextPadProvider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../context-pad/domainStoryContextPadProvider */ 68065); + + + + + + + + + + + + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_10__["default"], diagram_js_lib_features_context_pad__WEBPACK_IMPORTED_MODULE_11__["default"], bpmn_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_12__["default"]], + __init__: ["domainStoryRenderer", "paletteProvider", "domainStoryRules", "domainStoryUpdater", "contextPadProvider", "replaceMenuProvider"], + elementFactory: ["type", _domainStoryElementFactory__WEBPACK_IMPORTED_MODULE_3__["default"]], + domainStoryRenderer: ["type", _domainStoryRenderer__WEBPACK_IMPORTED_MODULE_5__["default"]], + paletteProvider: ["type", _palette_domainStoryPalette__WEBPACK_IMPORTED_MODULE_0__["default"]], + domainStoryRules: ["type", _domainStoryRules__WEBPACK_IMPORTED_MODULE_7__["default"]], + domainStoryUpdater: ["type", _domainStoryUpdater__WEBPACK_IMPORTED_MODULE_2__["default"]], + contextPadProvider: ["type", _context_pad_domainStoryContextPadProvider__WEBPACK_IMPORTED_MODULE_9__["default"]], + elementFactoryBpmn: ["type", bpmn_js_lib_features_modeling_ElementFactory__WEBPACK_IMPORTED_MODULE_13__["default"]], + pathMap: ["type", bpmn_js_lib_draw_PathMap__WEBPACK_IMPORTED_MODULE_14__["default"]], + replaceMenuProvider: ["type", _change_icon_replaceMenuProvider__WEBPACK_IMPORTED_MODULE_8__["default"]], + commandStack: ["type", diagram_js_lib_command_CommandStack__WEBPACK_IMPORTED_MODULE_15__["default"]], + updateLabelHandler: ["type", _updateHandler_updateLabelHandler__WEBPACK_IMPORTED_MODULE_1__["default"]], + headlineAndDescriptionUpdateHandler: ["type", _updateHandler_headlineAndDescriptionUpdateHandler__WEBPACK_IMPORTED_MODULE_4__["default"]], + modeling: ["type", _dSModeling__WEBPACK_IMPORTED_MODULE_6__["default"]] +}); + +/***/ }), + +/***/ 91490: +/*!********************************************************!*\ + !*** ./src/app/Modeler/modeler/numbering/numbering.js ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ addNumberToRegistry: () => (/* binding */ addNumberToRegistry), +/* harmony export */ generateAutomaticNumber: () => (/* binding */ generateAutomaticNumber), +/* harmony export */ getMultipleNumberRegistry: () => (/* binding */ getMultipleNumberRegistry), +/* harmony export */ getNumberRegistry: () => (/* binding */ getNumberRegistry), +/* harmony export */ getNumbersAndIDs: () => (/* binding */ getNumbersAndIDs), +/* harmony export */ initializeNumbering: () => (/* binding */ initializeNumbering), +/* harmony export */ numberBoxDefinitions: () => (/* binding */ numberBoxDefinitions), +/* harmony export */ setNumberIsMultiple: () => (/* binding */ setNumberIsMultiple), +/* harmony export */ updateExistingNumbersAtEditing: () => (/* binding */ updateExistingNumbersAtEditing), +/* harmony export */ updateExistingNumbersAtGeneration: () => (/* binding */ updateExistingNumbersAtGeneration) +/* harmony export */ }); +/* harmony import */ var _Utils_mathExtensions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/mathExtensions */ 114); + + + +let numberRegistry = []; +let multipleNumberRegistry = [false]; +let canvasElementRegistry; +function initializeNumbering(canvasElementRegistryService) { + canvasElementRegistry = canvasElementRegistryService; +} +// defines the box for activity numbers +function numberBoxDefinitions(element) { + let alignment = "center"; + let boxWidth = 30; + let boxHeight = 30; + let angle = 0; + if (element.waypoints.length > 1) { + angle = (0,_Utils_mathExtensions__WEBPACK_IMPORTED_MODULE_0__.angleBetween)( + // Start of first arrow segment + element.waypoints[0], + // End of first arrow segment + element.waypoints[1]); + } + let x = element.waypoints[0].x; + let y = element.waypoints[0].y; + let fixedOffsetX = 0; + let fixedOffsetY = 0; + let angleDependantOffsetX = 0; + let angleDependantOffsetY = 0; + // Fine tune positioning of sequence number above beginning of first arrow segment + if (angle >= 0 && angle <= 45) { + fixedOffsetX = 25; + angleDependantOffsetY = 20 * (1 - angle / 45); + } else if (angle <= 90) { + fixedOffsetX = 5; + angleDependantOffsetX = 15 * (1 - (angle - 45) / 45); + } else if (angle <= 135) { + fixedOffsetX = 5; + angleDependantOffsetX = -20 * ((angle - 90) / 45); + } else if (angle <= 180) { + fixedOffsetX = -15; + angleDependantOffsetY = 20 * ((angle - 135) / 45); + } else if (angle <= 225) { + fixedOffsetX = -15; + fixedOffsetY = 15; + angleDependantOffsetY = 25 * ((angle - 180) / 45); + } else if (angle <= 270) { + fixedOffsetX = 5; + angleDependantOffsetX = -20 * (1 - (angle - 225) / 45); + fixedOffsetY = 40; + } else if (angle <= 315) { + fixedOffsetX = 5; + angleDependantOffsetX = 25 * ((angle - 270) / 45); + fixedOffsetY = 40; + } else { + fixedOffsetX = 25; + fixedOffsetY = 20; + angleDependantOffsetY = 15 * (1 - (angle - 315) / 45); + } + x = x + fixedOffsetX + angleDependantOffsetX; + y = y + fixedOffsetY + angleDependantOffsetY; + return { + textAlign: alignment, + width: boxWidth, + height: boxHeight, + x: x, + y: y + }; +} +// determine the next available number that is not yet used +function generateAutomaticNumber(elementActivity, commandStack) { + const semantic = elementActivity.businessObject; + const usedNumbers = [0]; + let wantedNumber = -1; + const activitiesFromActors = canvasElementRegistry.getActivitiesFromActors(); + activitiesFromActors.forEach(element => { + if (element.businessObject.number) { + usedNumbers.push(+element.businessObject.number); + } + }); + for (let i = 0; i < usedNumbers.length; i++) { + if (!usedNumbers.includes(i)) { + if (!usedNumbers.includes(i)) { + wantedNumber = i; + i = usedNumbers.length; + } + } + } + if (wantedNumber === -1) { + wantedNumber = usedNumbers.length; + } + updateExistingNumbersAtGeneration(activitiesFromActors, wantedNumber, commandStack); + semantic.number = wantedNumber; + return wantedNumber; +} +// update the numbers at the activities when generating a new activity +function updateExistingNumbersAtGeneration(activitiesFromActors, wantedNumber, commandStack) { + activitiesFromActors.forEach(element => { + let number = +element.businessObject.number; + if (number >= wantedNumber) { + wantedNumber++; + setTimeout(function () { + commandStack.execute("activity.changed", { + businessObject: element.businessObject, + newLabel: element.businessObject.name, + newNumber: number, + element: element + }); + }, 10); + } + }); +} +// update the numbers at the activities when editing an activity +function updateExistingNumbersAtEditing(activitiesFromActors, wantedNumber, eventBus) { + // get a sorted list of all activities that could need changing + let sortedActivities = [[]]; + activitiesFromActors.forEach(activity => { + if (!sortedActivities[activity.businessObject.number]) { + sortedActivities[activity.businessObject.number] = []; + } + sortedActivities[activity.businessObject.number].push(activity); + }); + // set the number of each activity to the next highest number, starting from the number, we overrode + let currentNumber = wantedNumber; + for (currentNumber; currentNumber < sortedActivities.length; currentNumber++) { + if (sortedActivities[currentNumber]) { + wantedNumber++; + setNumberOfActivity(sortedActivities[currentNumber], wantedNumber, eventBus); + } + } +} +// get the IDs of activities with their associated number, only returns activities that are originating from an actor +function getNumbersAndIDs() { + let iDWithNumber = []; + let activities = canvasElementRegistry.getActivitiesFromActors(); + for (let i = activities.length - 1; i >= 0; i--) { + let id = activities[i].businessObject.id; + let number = activities[i].businessObject.number; + iDWithNumber.push({ + id: id, + number: number + }); + } + return iDWithNumber; +} +function addNumberToRegistry(renderedNumber, number) { + numberRegistry[number] = renderedNumber; +} +function setNumberIsMultiple(number, multi) { + multipleNumberRegistry[number] = multi; +} +/** + * @returns copy of registry + */ +function getNumberRegistry() { + return numberRegistry.slice(0); +} +function getMultipleNumberRegistry() { + return multipleNumberRegistry.slice(0); +} +function setNumberOfActivity(elementArray, wantedNumber, eventBus) { + if (elementArray) { + elementArray.forEach(element => { + if (element) { + let businessObject = element.businessObject; + if (businessObject) { + businessObject.number = wantedNumber; + } + eventBus.fire("element.changed", { + element + }); + } + }); + } +} + +/***/ }), + +/***/ 70345: +/*!***************************************************************!*\ + !*** ./src/app/Modeler/modeler/palette/domainStoryPalette.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ PaletteProvider), +/* harmony export */ initializePalette: () => (/* binding */ initializePalette) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ 81410); +/* harmony import */ var src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Icon-Set-Configuration/allIcons */ 57488); +/* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Domain/Common/constants */ 90816); + + + + + + + +/** + * A palette that allows you to create BPMN _and_ custom elements. + */ +let iconDictionary; +let configuration; +function initializePalette(iconDictionaryService, configurationService) { + iconDictionary = iconDictionaryService; + configuration = configurationService; +} +function PaletteProvider(palette, create, elementFactory, spaceTool, lassoTool) { + this._create = create; + this._elementFactory = elementFactory; + this._spaceTool = spaceTool; + this._lassoTool = lassoTool; + palette.registerProvider(this); +} +PaletteProvider.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "modeling"]; +PaletteProvider.prototype.getPaletteEntries = function () { + let actions = {}, + create = this._create, + elementFactory = this._elementFactory, + spaceTool = this._spaceTool, + lassoTool = this._lassoTool; + function createAction(type, group, className, title, options) { + function createListener(event) { + let shape = elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)({ + type: type + }, options)); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(shape.businessObject, { + id: shape.id + }); + if (options) { + shape.businessObject.di.isExpanded = options.isExpanded; + } + create.start(event, shape); + } + let shortType = type.replace(/^domainStory:/, ""); + return { + group: group, + className: className, + title: "Create " + title || 0, + action: { + dragstart: createListener, + click: createListener + } + }; + } + return initPalette(actions, spaceTool, lassoTool, createAction); +}; +function appendCSSStyleCheat(customIcons) { + const sheetEl = document.createElement("style"); + document.head.appendChild(sheetEl); + let customIconDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + customIconDict.appendDict(customIcons); + let customIconDictKeys = customIconDict.keysArray(); + customIconDictKeys.forEach(name => { + if (iconDictionary.getAppendedIconDictionary().has(name)) { + let src = customIconDict.get(name); + const iconStyle = ".icon-domain-story-" + name.toLowerCase() + "::before{" + " display: block;" + ' content: url("data:image/svg+xml;utf8,' + wrapSRCInSVG(src) + '");' + " margin: 3px;}"; + sheetEl.sheet.insertRule(iconStyle, sheetEl.sheet.cssRules.length); + } + }); +} +function initPalette(actions, spaceTool, lassoTool, createAction) { + let config = iconDictionary?.getCurrentIconConfigurationForBPMN(); + let customIcons = localStorage.getItem(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__.APPENDED_ICONS_TAG); + if (customIcons) { + customIcons = JSON.parse(customIcons); + if (customIconsLegacy(customIcons)) { + customIcons = convertLegacyAppendedIconsToDict(customIcons); + } + if (customIcons.entries && customIcons.entries.forEach) { + const customIconsDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + customIcons.entries.forEach(entry => { + customIconsDict.putEntry(entry); + }); + (0,src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_0__.overrideAppendedIcons)(customIconsDict); + appendCSSStyleCheat(customIcons); + } + } + iconDictionary?.initTypeDictionaries(config.actors, config.workObjects); + let actorTypes = iconDictionary?.getTypeDictionary(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR); + actorTypes?.keysArray().forEach(name => { + addCanvasObjectTypes(name, createAction, actions, "actor", src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR); + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(actions, { + "actor-separator": { + group: "actor", + separator: true + } + }); + let workObjectTypes = iconDictionary?.getTypeDictionary(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT); + workObjectTypes?.keysArray().forEach(name => { + addCanvasObjectTypes(name, createAction, actions, "actor", src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT); + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(actions, { + "workObject-separator": { + group: "workObject", + separator: true + }, + "domainStory-group": createAction(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.GROUP, "group", "icon-domain-story-tool-group", "group"), + "group-separator": { + group: "group", + separator: true + }, + "lasso-tool": { + group: "tools", + className: "bpmn-icon-lasso-tool", + title: "Activate the lasso tool", + action: { + click: function (event) { + lassoTool.activateSelection(event); + } + } + }, + "space-tool": { + group: "tools", + className: "bpmn-icon-space-tool", + title: "Activate the create/remove space tool", + action: { + click: function (event) { + spaceTool.activateSelection(event); + } + } + } + }); + return actions; +} +function addCanvasObjectTypes(name, createAction, actions, className, elementType) { + let icon = iconDictionary.getIconForBPMN(elementType, name); + let action = []; + action["domainStory-" + className + name] = createAction(`${elementType}${name}`, className, icon, name); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)(actions, action); +} +function customIconsLegacy(customIcons) { + return !(Object.keys(customIcons).length === 1 && Object.keys(customIcons)[0] === "entries"); +} +function convertLegacyAppendedIconsToDict(customIcons) { + let dict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + Object.keys(customIcons).forEach(key => { + dict.set(key, customIcons[key]); + }); + return dict; +} +// For some reason its important to use ' in the content for the Palette and ContextPad +// Do not change! +function wrapSRCInSVG(src) { + return "" + ""; +} + +/***/ }), + +/***/ 19800: +/*!*************************************************************************!*\ + !*** ./src/app/Modeler/modeler/updateHandler/activityUpdateHandlers.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ activityUpdateHandler), +/* harmony export */ initializeActivityUpdateHandler: () => (/* binding */ initializeActivityUpdateHandler) +/* harmony export */ }); +/* harmony import */ var _numbering_numbering__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../numbering/numbering */ 91490); + + + +/** + * commandStack Handler for changes at activities + */ +let canvasElementRegistry; +function initializeActivityUpdateHandler(canvasElementRegistryService) { + canvasElementRegistry = canvasElementRegistryService; +} +function activityUpdateHandler(commandStack, eventBus) { + commandStack.registerHandler("activity.directionChange", activity_directionChange); + commandStack.registerHandler("activity.changed", activity_changed); + // update the activity from the activity-dialog, either with or without number + // and change other activities too, to keep the numbers consistent + function activity_changed(modeling) { + this.preExecute = function (context) { + context.oldLabel = context.businessObject.name || " "; + let oldNumbersWithIDs = (0,_numbering_numbering__WEBPACK_IMPORTED_MODULE_0__.getNumbersAndIDs)(); + modeling.updateLabel(context.businessObject, context.newLabel); + modeling.updateNumber(context.businessObject, context.newNumber); + context.oldNumber = context.businessObject.number; + context.oldNumbersWithIDs = oldNumbersWithIDs; + }; + this.execute = function (context) { + let businessObject = context.businessObject; + let element = context.element; + if (context.newLabel && context.newLabel.length < 1) { + context.newLabel = " "; + } + businessObject.name = context.newLabel; + businessObject.number = context.newNumber; + eventBus.fire("element.changed", { + element + }); + }; + this.revert = function (context) { + let semantic = context.businessObject; + let element = context.element; + semantic.name = context.oldLabel; + semantic.number = context.oldNumber; + revertAutomaticNumberGenerationChange(context.oldNumbersWithIDs, eventBus); + eventBus.fire("element.changed", { + element + }); + }; + } + // change the direction of a single activity without affecting other activities + function activity_directionChange(modeling) { + this.preExecute = function (context) { + context.oldNumber = context.businessObject.number; + context.oldWaypoints = context.element.waypoints; + context.name = context.businessObject.name; + if (!context.oldNumber) { + context.oldNumber = 0; + } + modeling.updateNumber(context.businessObject, context.newNumber); + }; + this.execute = function (context) { + let businessObject = context.businessObject; + let element = context.element; + let swapSource = element.source; + let newWaypoints = []; + let waypoints = element.waypoints; + for (let i = waypoints.length - 1; i >= 0; i--) { + newWaypoints.push(waypoints[i]); + } + element.source = element.target; + businessObject.source = businessObject.target; + element.target = swapSource; + businessObject.target = swapSource.id; + businessObject.name = context.name; + businessObject.number = context.newNumber; + element.waypoints = newWaypoints; + eventBus.fire("element.changed", { + element + }); + }; + this.revert = function (context) { + let semantic = context.businessObject; + let element = context.element; + let swapSource = element.source; + element.source = element.target; + semantic.source = semantic.target; + element.target = swapSource; + semantic.target = swapSource.id; + semantic.name = context.name; + semantic.number = context.oldNumber; + element.waypoints = context.oldWaypoints; + eventBus.fire("element.changed", { + element + }); + }; + } +} +// reverts the automatic changed done by the automatic number-generation at editing +function revertAutomaticNumberGenerationChange(iDWithNumber, eventBus) { + let activities = canvasElementRegistry?.getActivitesFromActors(); + for (let i = activities.length - 1; i >= 0; i--) { + for (let j = iDWithNumber.length - 1; j >= 0; j--) { + if (iDWithNumber[j].id.includes(activities[i].businessObject.id)) { + let element = activities[i]; + element.businessObject.number = iDWithNumber[j].number; + j = -5; + eventBus.fire("element.changed", { + element + }); + iDWithNumber.splice(j, 1); + } + } + } +} + +/***/ }), + +/***/ 88298: +/*!***********************************************************************!*\ + !*** ./src/app/Modeler/modeler/updateHandler/elementUpdateHandler.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ elementUpdateHandler) +/* harmony export */ }); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util */ 80713); + + + +function elementUpdateHandler(commandStack, eventBus) { + commandStack.registerHandler("element.colorChange", element_colorChange); + commandStack.registerHandler("shape.removeGroupWithoutChildren", removeGroupWithoutChildren); + function element_colorChange() { + this.preExecute = function (context) { + context.oldColor = context.businessObject.pickedColor; + }; + this.execute = function (context) { + let semantic = context.businessObject; + let element = context.element; + semantic.pickedColor = context.newColor; + eventBus.fire("element.changed", { + element + }); + }; + this.revert = function (context) { + let semantic = context.businessObject; + let element = context.element; + semantic.pickedColor = context.oldColor; + eventBus.fire("element.changed", { + element + }); + }; + } + function removeGroupWithoutChildren() { + this.preExecute = function (ctx) { + ctx.parent = ctx.element.parent; + ctx.children = ctx.element.children.slice(); + }; + this.execute = function (ctx) { + let element = ctx.element; + ctx.children.forEach(child => { + (0,_util__WEBPACK_IMPORTED_MODULE_0__.undoGroupRework)(element, child); + eventBus.fire("element.changed", { + element: child + }); + }); + eventBus.fire("shape.remove", { + element + }); + }; + this.revert = function (ctx) { + let element = ctx.element; + eventBus.fire("shape.added", { + element + }); + ctx.element.children.forEach(child => { + reworkGroupElements(element, child); + }); + }; + } +} + +/***/ }), + +/***/ 13881: +/*!**************************************************************************************!*\ + !*** ./src/app/Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler.js ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ headlineAndDescriptionUpdateHandler) +/* harmony export */ }); +/** + * a handler that updates the text of a BPMN element. + */ +function headlineAndDescriptionUpdateHandler(commandStack, titleService) { + commandStack.registerHandler("story.updateHeadlineAndDescription", handlerFunction); + function handlerFunction() { + this.execute = function (ctx) { + ctx.oldTitle = titleService.getTitle(); + ctx.oldDescription = titleService.getDescription(); + titleService.updateTitleAndDescription(ctx.newTitle, ctx.newDescription, false); + }; + this.revert = function (ctx) { + titleService.updateTitleAndDescription(ctx.oldTitle, ctx.oldDescription, false); + }; + } +} + +/***/ }), + +/***/ 69587: +/*!********************************************************************!*\ + !*** ./src/app/Modeler/modeler/updateHandler/massRenameHandler.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DSMassRenameHandler) +/* harmony export */ }); + + +function DSMassRenameHandler(commandStack, eventBus) { + commandStack.registerHandler("domainStoryObjects.massRename", massRename); + function massRename(modeling) { + this.preExecute = function (context) { + let relevantElements = context.elements; + context.oldLabel = relevantElements[0].businessObject.name; + relevantElements.forEach(element => { + modeling.updateLabel(element.businessObject, confirm.newValue); + }); + }; + this.execute = function (context) { + let relevantElements = context.elements; + relevantElements.forEach(element => { + let semantic = element.businessObject; + semantic.name = context.newValue; + eventBus.fire("element.changed", { + element + }); + }); + }; + this.revert = function (context) { + let relevantElements = context.elements; + relevantElements.forEach(element => { + let semantic = element.businessObject; + semantic.name = context.oldLabel; + eventBus.fire("element.changed", { + element + }); + }); + }; + } +} + +/***/ }), + +/***/ 6554: +/*!*********************************************************************!*\ + !*** ./src/app/Modeler/modeler/updateHandler/updateLabelHandler.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UpdateLabelHandler) +/* harmony export */ }); +/* harmony import */ var _labeling_dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../labeling/dsLabelUtil */ 60125); +/* harmony import */ var bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! bpmn-js/lib/util/LabelUtil */ 81454); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util */ 80713); + + + + + + +const NULL_DIMENSIONS = { + width: 0, + height: 0 +}; +/** + * a handler that updates the text of a BPMN element. + */ +function UpdateLabelHandler(modeling, textRenderer, commandStack) { + commandStack.registerHandler("element.updateCustomLabel", handlerFunction); + function handlerFunction() { + /** + * Set the label and return the changed elements. + * + * Element parameter can be label itself or connection (i.e. sequence flow). + * + * @param {djs.model.Base} element + * @param {String} text + */ + this.preExecute = function (ctx) { + let element = ctx.element, + businessObject = element.businessObject, + newLabel = ctx.newLabel, + newNumber = ctx.newNumber; + if (!(0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabel)(element) && (0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabelExternal)(element) && !(0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.hasExternalLabel)(element) && (newLabel !== "" || newNumber !== "")) { + // create label + let paddingTop = 7; + let labelCenter = (0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.getExternalLabelMid)(element); + labelCenter = { + x: labelCenter.x, + y: labelCenter.y + paddingTop + }; + modeling.createLabel(element, labelCenter, { + id: businessObject.id + "_label", + businessObject: businessObject + }); + } + }; + this.execute = function (ctx) { + ctx.oldLabel = (0,_labeling_dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__.getLabel)(ctx.element); + ctx.oldNumber = (0,_labeling_dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__.getNumber)(ctx.element); + return setText(ctx.element, ctx.newLabel, ctx.newNumber); + }; + this.revert = function (ctx) { + return setText(ctx.element, ctx.oldLabel, ctx.oldNumber); + }; + this.postExecute = function (ctx) { + let element = ctx.element, + label = element.label || element, + newLabel = ctx.newLabel, + newBounds = ctx.newBounds; + if ((0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabel)(label) && newLabel.trim() === "") { + modeling.removeShape(label); + return; + } + // ignore internal labels for elements except text annotations + if (!(0,bpmn_js_lib_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabelExternal)(element) && !(0,_util__WEBPACK_IMPORTED_MODULE_2__.is)(element, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.TEXTANNOTATION)) { + return; + } + let bo = (0,_util__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(label); + let text = bo.name || bo.text; + // don't resize without text + if (!text) { + return; + } + // resize element based on label _or_ pre-defined bounds + if (typeof newBounds === "undefined") { + newBounds = textRenderer.getLayoutedBounds(label, text); + } + // setting newBounds to false or _null_ will + // disable the postExecute resize operation + if (newBounds) { + modeling.resizeShape(label, newBounds, NULL_DIMENSIONS); + } + }; + } +} +function setText(element, text, textNumber) { + // external label if present + let label = element.label || element; + let number = element.number || element; + let labelTarget = element.labelTarget || element; + let numberTarget = element.numberTarget || element; + (0,_labeling_dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__.setLabel)(label, text); + (0,_labeling_dsLabelUtil__WEBPACK_IMPORTED_MODULE_0__.setNumber)(number, textNumber); + return [label, labelTarget, number, numberTarget]; +} +UpdateLabelHandler.$inject = ["modeling", "textRenderer", "commandStack"]; + +/***/ }), + +/***/ 80713: +/*!*****************************************!*\ + !*** ./src/app/Modeler/modeler/util.js ***! + \*****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getBusinessObject: () => (/* binding */ getBusinessObject), +/* harmony export */ is: () => (/* binding */ is), +/* harmony export */ isAny: () => (/* binding */ isAny), +/* harmony export */ reworkGroupElements: () => (/* binding */ reworkGroupElements), +/* harmony export */ undoGroupRework: () => (/* binding */ undoGroupRework) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 81410); + +function is(element, type) { + const bo = getBusinessObject(element); + return bo && typeof bo.$instanceOf == "function" && bo.$instanceOf(type); +} +function getBusinessObject(element) { + return element && element.businessObject || element; +} +function isAny(element, types) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.some)(types, function (t) { + return is(element, t); + }); +} +function reworkGroupElements(parent, shape) { + parent.children.slice().forEach(innerShape => { + if (innerShape.id !== shape.id) { + if (innerShape.x >= shape.x && innerShape.x <= shape.x + shape.width) { + if (innerShape.y >= shape.y && innerShape.y <= shape.y + shape.height) { + innerShape.parent = shape; + if (!shape.children.includes(innerShape)) { + shape.children.push(innerShape); + } + } + } + } + }); +} +function undoGroupRework(parent, shape) { + const superParent = parent.parent; + parent.children.remove(shape); + superParent.children.add(shape); + shape.parent = superParent; + const svgShape = document.querySelector("[data-element-id=" + shape.id + "]").parentElement; + const svgGroup = svgShape.parentElement; + const svgGroupParent = svgGroup.parentElement.parentElement; + svgGroup.removeChild(svgShape); + svgGroupParent.appendChild(svgShape); +} + +/***/ }), + +/***/ 70908: +/*!**********************************************!*\ + !*** ./src/app/Service/Export/exportUtil.js ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ createTitleAndDescriptionSVGElement: () => (/* binding */ createTitleAndDescriptionSVGElement) +/* harmony export */ }); +/* harmony import */ var _Domain_Export_exportConstants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Export/exportConstants */ 27901); + +let extraHeight = 0; +// Has to be js File so we can access te correct non-standard HTML-Properties without excessive usage of ts-ignore +function createTitleAndDescriptionSVGElement(title, description, xLeft, yUp, width) { + title = title.replace("<", "").replace(">", ""); + let titleElement = createTitle(title, width); + let descriptionElement = createDescription(description, width); + // to display the title and description in the SVG-file, we need to add a container for our text-elements + let insertText = '' + titleElement + descriptionElement + ""; + return { + insertText, + extraHeight + }; +} +function createTitle(text, width) { + let tempCanvas = document.createElement("canvas"); + let ctx = tempCanvas.getContext("2d"); + ctx.font = "30px Arial"; + return createTextSpans(text, width, ctx, 10, _Domain_Export_exportConstants__WEBPACK_IMPORTED_MODULE_0__.TEXTSPAN_TITLE_HEIGHT, 30); +} +function createDescription(text, width) { + let description = ""; + let descriptionParts = text.split("
"); + let tempCanvas = document.createElement("canvas"); + let ctx = tempCanvas.getContext("2d"); + ctx.font = "12px Arial"; + for (let i = 0; i < descriptionParts.length; i++) { + description += createTextSpans(descriptionParts[i], width, ctx, 0, _Domain_Export_exportConstants__WEBPACK_IMPORTED_MODULE_0__.TEXTSPAN_DESCRIPTION_HEIGHT, 12); + } + return description; +} +function createTextSpans(text, width, ctx, yOffset, heightOffset, fontSize) { + let textSpans = ""; + let words = text.split(" "); + let textTag = ''; + let textSpan = document.createElementNS(_Domain_Export_exportConstants__WEBPACK_IMPORTED_MODULE_0__.SVG_LINK, "tspan"); + let textNode = document.createTextNode(words[0]); + textSpan.setAttribute("x", _Domain_Export_exportConstants__WEBPACK_IMPORTED_MODULE_0__.X_OFFSET_UTIL); + textSpan.setAttribute("y", yOffset + extraHeight); + textSpan.setAttribute("font-size", fontSize); + textSpan.appendChild(textNode); + for (let j = 1; j < words.length; j++) { + if (textSpan.firstChild && textSpan.firstChild.data) { + let len = textSpan.firstChild.data.length; + textNode.data += " " + words[j]; + if (ctx.measureText(textNode.data).width > width - 16) { + extraHeight += heightOffset; + textSpan.firstChild.data = textSpan.firstChild.data.slice(0, len); // remove overflow word + textSpans += textTag + textSpan.outerHTML + ""; // append line + // create new textspan for line break + textSpan = document.createElementNS(_Domain_Export_exportConstants__WEBPACK_IMPORTED_MODULE_0__.SVG_LINK, "tspan"); + textNode = document.createTextNode(words[j]); + textSpan.setAttribute("x", _Domain_Export_exportConstants__WEBPACK_IMPORTED_MODULE_0__.X_OFFSET_UTIL); + textSpan.setAttribute("y", yOffset + extraHeight); + textSpan.appendChild(textNode); + } + } + } + extraHeight += heightOffset; + textSpans += textTag + textSpan.outerHTML + ""; + return textSpans; +} + +/***/ }), + +/***/ 78828: +/*!*************************************************!*\ + !*** ./src/app/Domain/Common/businessObject.ts ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ testBusinessObject: () => (/* binding */ testBusinessObject) +/* harmony export */ }); +/* harmony import */ var _elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./elementTypes */ 30236); + +const testBusinessObject = { + $descriptor: undefined, + $type: undefined, + di: undefined, + get: undefined, + set: undefined, + id: 'test', + name: 'test', + type: _elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT, + x: 0, + y: 0, + height: 38, + width: 38, + pickedColor: undefined +}; + +/***/ }), + +/***/ 80775: +/*!************************************************!*\ + !*** ./src/app/Domain/Common/configuration.ts ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Configuration: () => (/* binding */ Configuration) +/* harmony export */ }); +class Configuration { + constructor(actors, workObjects) { + this.actors = actors; + this.workObjects = workObjects; + } +} + +/***/ }), + +/***/ 90816: +/*!********************************************!*\ + !*** ./src/app/Domain/Common/constants.ts ***! + \********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ APPENDED_ICONS_TAG: () => (/* binding */ APPENDED_ICONS_TAG), +/* harmony export */ DEFAULT_AUTOSAVES_ENABLED: () => (/* binding */ DEFAULT_AUTOSAVES_ENABLED), +/* harmony export */ DEFAULT_AUTOSAVES_INTERVAL: () => (/* binding */ DEFAULT_AUTOSAVES_INTERVAL), +/* harmony export */ DEFAULT_AUTOSAVES_MAX_DRAFTS: () => (/* binding */ DEFAULT_AUTOSAVES_MAX_DRAFTS), +/* harmony export */ ICON_SET_CONFIGURATION_TAG: () => (/* binding */ ICON_SET_CONFIGURATION_TAG), +/* harmony export */ IMPLICIT_ROOT_ID: () => (/* binding */ IMPLICIT_ROOT_ID), +/* harmony export */ INITIAL_DESCRIPTION: () => (/* binding */ INITIAL_DESCRIPTION), +/* harmony export */ INITIAL_ICON_SET_NAME: () => (/* binding */ INITIAL_ICON_SET_NAME), +/* harmony export */ INITIAL_TITLE: () => (/* binding */ INITIAL_TITLE), +/* harmony export */ SNACKBAR_DURATION: () => (/* binding */ SNACKBAR_DURATION), +/* harmony export */ SNACKBAR_ERROR: () => (/* binding */ SNACKBAR_ERROR), +/* harmony export */ SNACKBAR_INFO: () => (/* binding */ SNACKBAR_INFO), +/* harmony export */ SNACKBAR_SUCCESS: () => (/* binding */ SNACKBAR_SUCCESS) +/* harmony export */ }); +/** DEFAULT VALUES **/ +const INITIAL_TITLE = '< title >'; +const INITIAL_DESCRIPTION = ''; +const INITIAL_ICON_SET_NAME = 'default'; +/** LocalStorageTags **/ +const APPENDED_ICONS_TAG = 'appendedIcons'; +// String value of tag should not be renamed, because existing configurations would not load +const ICON_SET_CONFIGURATION_TAG = 'domainConfigurationTag'; +/** AUTOSAVE DEFAULTS **/ +const DEFAULT_AUTOSAVES_ENABLED = true; +const DEFAULT_AUTOSAVES_MAX_DRAFTS = 5; +const DEFAULT_AUTOSAVES_INTERVAL = 30; +/** SNACKBAR **/ +const SNACKBAR_DURATION = 2000; +const SNACKBAR_SUCCESS = 'snackbar_success'; +const SNACKBAR_ERROR = 'snackbar_error'; +const SNACKBAR_INFO = 'snackbar_info'; +/** BPMN_RELEVANT_CONSTANTS **/ +const IMPLICIT_ROOT_ID = '__implicitroot'; + +/***/ }), + +/***/ 54972: +/*!********************************************************!*\ + !*** ./src/app/Domain/Common/dictionary/dictionary.ts ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Dictionary: () => (/* binding */ Dictionary), +/* harmony export */ Entry: () => (/* binding */ Entry) +/* harmony export */ }); +class Dictionary { + constructor() { + this.entries = []; + } + get length() { + return this.entries.length; + } + all() { + return this.entries; + } + size() { + return this.entries.length; + } + isEmpty() { + return this.entries.length <= 0; + } + has(key) { + return this.entries.some(entry => entry.key === key); + } + set(key, value) { + if (!this.has(key)) { + this.entries.push(new Entry(value, key)); + } + } + add(value, key) { + this.set(key, value); + } + putEntry(entry) { + if (!this.has(entry.key)) { + this.entries.push(new Entry(entry.value, entry.key)); + } + } + keysArray() { + return this.entries.map(entry => entry.key); + } + addEach(object) { + Object.keys(object).forEach(key => { + this.set(key, object[key]); + }); + } + appendDict(dict) { + dict.entries.forEach(entry => this.putEntry(entry)); + } + clear() { + this.entries = []; + } + delete(key) { + this.entries = this.entries.filter(entry => entry.key !== key); + } + get(key) { + const found = this.entries.filter(entry => entry.key === key); + return found[0] ? found[0].value : null; + } + sort(fn) { + this.entries.sort(fn); + } + sortByName() { + this.entries.sort((a, b) => { + if (a.key.includes('_custom') == b.key.includes('_custom')) { + if (a.key < b.key) return -1;else { + return 1; + } + } else { + if (a.key.includes('_custom')) { + return -1; + } else { + return 1; + } + } + }); + } +} +class Entry { + constructor(value, key) { + this.value = value; + this.key = key; + } +} + +/***/ }), + +/***/ 30236: +/*!***********************************************!*\ + !*** ./src/app/Domain/Common/elementTypes.ts ***! + \***********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ elementTypes: () => (/* binding */ elementTypes) +/* harmony export */ }); +var elementTypes; +(function (elementTypes) { + elementTypes["ACTIVITY"] = "domainStory:activity"; + elementTypes["CONNECTION"] = "domainStory:connection"; + elementTypes["ACTOR"] = "domainStory:actor"; + elementTypes["WORKOBJECT"] = "domainStory:workObject"; + elementTypes["GROUP"] = "domainStory:group"; + elementTypes["TEXTANNOTATION"] = "domainStory:textAnnotation"; + elementTypes["DOMAINSTORY"] = "domainStory:"; +})(elementTypes || (elementTypes = {})); + +/***/ }), + +/***/ 34752: +/*!****************************************************!*\ + !*** ./src/app/Domain/Common/iconConfiguration.ts ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IconConfiguration: () => (/* binding */ IconConfiguration), +/* harmony export */ defaultConf: () => (/* binding */ defaultConf) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); +/* harmony import */ var src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Icon-Set-Configuration/allIcons */ 57488); +/* harmony import */ var src_app_Domain_Common_configuration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/configuration */ 80775); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ 90816); + + + + +class IconConfiguration { + constructor(allIconDictionary) { + this.domainName = _constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_ICON_SET_NAME; + this.allIconDictionary = allIconDictionary; + } + /** + * Select the Iconset which you want to use + */ + getDefaultConf() { + return defaultConf; + } + updateAllIconRegistry(allIconDictionary) { + this.allIconDictionary = allIconDictionary; + } + appendSRCFile(actors, actorsDict, workObjects, workObjectsDict) { + const newAppendedIcons = {}; + actors.forEach(name => { + if (!this.allIconDictionary.has(name)) { + newAppendedIcons[name] = actorsDict.get(name); + } + }); + workObjects.forEach(name => { + if (!this.allIconDictionary.has(name)) { + newAppendedIcons[name] = workObjectsDict.get(name); + } + }); + const appen = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + Object.keys(newAppendedIcons).forEach(key => { + appen.set(key, newAppendedIcons[key]); + }); + (0,src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_1__.overrideAppendedIcons)(appen); + } + createCustomConf(iconSetConfiguration) { + this.domainName = iconSetConfiguration.name; + let actors = iconSetConfiguration.actors; + let workObjects = iconSetConfiguration.workObjects; + this.appendSRCFile(actors.keysArray(), actors, workObjects.keysArray(), workObjects); + return new src_app_Domain_Common_configuration__WEBPACK_IMPORTED_MODULE_2__.Configuration(actors.keysArray(), workObjects.keysArray()); + } +} +/* eslint no-unused-vars: 0*/ +/** + * All Icons as one Set + * There are more Icons than fit in the palette. + * This is just for reference + */ +const allIconsConf = { + actors: ['Person', 'Group', 'System', 'Pet'], + workObjects: ['Place', 'Flag', 'World', 'Water', 'Store', 'Theater', 'Business', 'Meeting-room', 'Hotel', 'Dining', 'Courthouse', 'Gas-station', 'Car', 'Bus', 'Train', 'Truck', 'Taxi', 'Bike', 'Boat', 'Motorcycle', 'Plane', 'Flight-takeoff', 'Flight-landing', 'Shuttle', 'Walking', 'Traffic', 'Commute', 'Document', 'Folder', 'Call', 'Email', 'Copyright', 'Briefcase', 'Attach', 'Ruler', 'Sum', 'Conversation', 'Update', 'Cellphone', 'Speaker-phone', 'Signal', 'Key', 'Pencil', 'How-To-Reg', 'Settings', 'Grid', 'Label', 'Receipt', 'Calendar', 'Wrench', 'Headset', 'Keyboard', 'Mouse', 'Microphone', 'Router', 'Scanner', 'Printer', 'DNS', 'Security', 'Cloud', 'Desktop', 'Tablet', 'Assessment', 'Dashboard', 'Pie-chart', 'View-List', 'Euro', 'Dollar', 'Info', 'Alarm', 'Problem', 'Circle-Arrows', 'Picture-as-PDF', 'Credit-Card', 'Shopping', 'Favorite', 'Gavel', 'Blind', 'Hourglass', 'Time', 'Search', 'Thumb-up', 'Thumb-down', 'Thumb-up-down', 'Couch', 'Education', 'Watch'] +}; +/** + * Default Iconset + */ +const defaultConf = { + actors: ['Person', 'Group', 'System'], + workObjects: ['Document', 'Folder', 'Call', 'Email', 'Conversation', 'Info'] +}; + +/***/ }), + +/***/ 84738: +/*!*******************************************************!*\ + !*** ./src/app/Domain/Common/iconSetConfiguration.ts ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ fromConfigurationFromFile: () => (/* binding */ fromConfigurationFromFile), +/* harmony export */ testCustomIconSetConfiguration: () => (/* binding */ testCustomIconSetConfiguration) +/* harmony export */ }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ 90816); +/* harmony import */ var _businessObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./businessObject */ 78828); +/* harmony import */ var _elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./elementTypes */ 30236); +/* harmony import */ var _dictionary_dictionary__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dictionary/dictionary */ 54972); + + + + +const actor = structuredClone(_businessObject__WEBPACK_IMPORTED_MODULE_1__.testBusinessObject); +actor.type = _elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR; +const testCustomIconSetConfiguration = { + name: _constants__WEBPACK_IMPORTED_MODULE_0__.INITIAL_ICON_SET_NAME, + actors: ['Person'], + workObjects: ['Document'] +}; +function fromConfigurationFromFile(configFromFile) { + const actorsDict = new _dictionary_dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary(); + const workObjectsDict = new _dictionary_dictionary__WEBPACK_IMPORTED_MODULE_3__.Dictionary(); + Object.keys(configFromFile.actors).forEach(key => { + actorsDict.add(configFromFile.actors[key], key); + }); + Object.keys(configFromFile.workObjects).forEach(key => { + workObjectsDict.add(configFromFile.workObjects[key], key); + }); + return { + name: configFromFile.name, + actors: actorsDict, + workObjects: workObjectsDict + }; +} + +/***/ }), + +/***/ 93703: +/*!*****************************************************!*\ + !*** ./src/app/Domain/Dialog/activityDialogData.ts ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ActivityDialogData: () => (/* binding */ ActivityDialogData) +/* harmony export */ }); +class ActivityDialogData { + constructor(activity, numberIsAllowedMultipleTimes, showNumberFields, saveFN) { + this.activity = activity; + this.numberIsAllowedMultipleTimes = numberIsAllowedMultipleTimes; + this.showNumberFields = showNumberFields; + this.saveFN = saveFN; + } +} + +/***/ }), + +/***/ 83064: +/*!***************************************************!*\ + !*** ./src/app/Domain/Dialog/exportDialogData.ts ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ExportDialogData: () => (/* binding */ ExportDialogData), +/* harmony export */ ExportOption: () => (/* binding */ ExportOption) +/* harmony export */ }); +class ExportDialogData { + constructor(title, options) { + this.title = title; + this.options = options; + } +} +class ExportOption { + constructor(text, tooltip, fn) { + this.text = text; + this.tooltip = tooltip; + this.fn = fn; + } +} + +/***/ }), + +/***/ 45574: +/*!*************************************************!*\ + !*** ./src/app/Domain/Dialog/infoDialogData.ts ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ InfoDialogData: () => (/* binding */ InfoDialogData) +/* harmony export */ }); +class InfoDialogData { + constructor(title, infoText, isInfo, isLink = false, linkText) { + this.title = title; + this.infoText = infoText; + this.isInfo = isInfo; + this.isLink = isLink; + this.linkText = linkText; + } +} + +/***/ }), + +/***/ 90173: +/*!***********************************************************!*\ + !*** ./src/app/Domain/DomManipulation/replayConstants.ts ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ HIGHLIGHT_COLOR: () => (/* binding */ HIGHLIGHT_COLOR), +/* harmony export */ HIGHLIGHT_NUMBER_BACKGROUNG_COLOR: () => (/* binding */ HIGHLIGHT_NUMBER_BACKGROUNG_COLOR), +/* harmony export */ HIGHLIGHT_NUMBER_COLOR: () => (/* binding */ HIGHLIGHT_NUMBER_COLOR), +/* harmony export */ HIGHLIGHT_STROKE_WIDTH: () => (/* binding */ HIGHLIGHT_STROKE_WIDTH), +/* harmony export */ NUMBER_BACKGROUND_COLOR: () => (/* binding */ NUMBER_BACKGROUND_COLOR), +/* harmony export */ NUMBER_COLOR: () => (/* binding */ NUMBER_COLOR), +/* harmony export */ STROKE_WIDTH: () => (/* binding */ STROKE_WIDTH) +/* harmony export */ }); +const NUMBER_BACKGROUND_COLOR = 'white'; +const NUMBER_COLOR = 'black'; +const STROKE_WIDTH = '1.5'; +const HIGHLIGHT_NUMBER_BACKGROUNG_COLOR = '#43acbf'; +const HIGHLIGHT_NUMBER_COLOR = 'black'; +const HIGHLIGHT_COLOR = 'black'; +const HIGHLIGHT_STROKE_WIDTH = '4'; + +/***/ }), + +/***/ 74306: +/*!***********************************************!*\ + !*** ./src/app/Domain/Export/configAndDst.ts ***! + \***********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ConfigAndDST: () => (/* binding */ ConfigAndDST), +/* harmony export */ testConfigAndDst: () => (/* binding */ testConfigAndDst) +/* harmony export */ }); +class ConfigAndDST { + constructor(domain, dst) { + this.domain = domain; + this.dst = dst; + } +} +const testConfigAndDst = { + domain: JSON.parse('{"name":"",' + '"actors":{"Person":"' + '' + '",' + '"Group":"' + '' + '",' + '"System":"' + '"},' + '"workObjects":{"Document":"' + '",' + '"Folder":"' + '' + '",' + '"Call":"' + '",' + '"Email":"' + '",' + '"Conversation":"' + '",' + '"Info":"' + '' + '"}}'), + dst: '[' + '{"type":"domainStory:workObjectDocument","name":"","id":"shape_3792","$type":"Element","di":{},"$descriptor":{},"pickedColor":"black","x":302,"y":102},' + '{"type":"domainStory:actorPerson","name":"","id":"shape_4666","$type":"Element","di":{},"$descriptor":{},"pickedColor":"black","x":103,"y":93},' + '{"type":"domainStory:activity","name":"","id":"connection_4884","$type":"Element","di":{},"$descriptor":{},"pickedColor":"black","number":1,' + '"waypoints":[{"original":{"x":141,"y":131},"x":186,"y":133},{"original":{"x":340,"y":140},"x":302,"y":138}],' + '"source":"shape_4666","target":"shape_3792"}]' +}; + +/***/ }), + +/***/ 27901: +/*!**************************************************!*\ + !*** ./src/app/Domain/Export/exportConstants.ts ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SVG_LINK: () => (/* binding */ SVG_LINK), +/* harmony export */ TEXTSPAN_DESCRIPTION_HEIGHT: () => (/* binding */ TEXTSPAN_DESCRIPTION_HEIGHT), +/* harmony export */ TEXTSPAN_TITLE_HEIGHT: () => (/* binding */ TEXTSPAN_TITLE_HEIGHT), +/* harmony export */ X_OFFSET_UTIL: () => (/* binding */ X_OFFSET_UTIL) +/* harmony export */ }); +const SVG_LINK = 'http://www.w3.org/2000/svg'; +const X_OFFSET_UTIL = '8'; +const TEXTSPAN_TITLE_HEIGHT = 30; +const TEXTSPAN_DESCRIPTION_HEIGHT = 15; + +/***/ }), + +/***/ 57488: +/*!***********************************************************!*\ + !*** ./src/app/Domain/Icon-Set-Configuration/allIcons.ts ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ allIcons: () => (/* binding */ allIcons), +/* harmony export */ appendedIcons: () => (/* binding */ appendedIcons), +/* harmony export */ getAllStandardIconKeys: () => (/* binding */ getAllStandardIconKeys), +/* harmony export */ overrideAppendedIcons: () => (/* binding */ overrideAppendedIcons) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); + +let appendedIcons = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); +const allIcons = { + Person: '', + Group: '', + Pet: '', + Conversation: '', + World: '', + Store: '', + Theater: '', + Business: '', + Water: '', + Hotel: '', + Dining: '', + 'Gas-station': '', + 'Meeting-room': '', + Courthouse: '', + Flag: '', + Place: '', + Car: '', + Bus: '', + Train: '', + Truck: '', + Taxi: '', + Bike: '', + Boat: '', + Motorcycle: '', + Plane: '', + 'Flight-takeoff': '', + 'Flight-landing': '', + Shuttle: '', + Walking: '', + Traffic: '', + Commute: '', + System: '', + Printer: '', + Document: '', + Folder: '', + Call: '', + Email: '', + Copyright: '', + DNS: '', + Settings: '', + Cellphone: '', + Update: '', + Briefcase: '', + Microphone: '', + Signal: '', + Key: '', + Pencil: '', + Sum: '', + Headset: '', + Keyboard: '', + Mouse: '', + Router: '', + Scanner: '', + Security: '', + Desktop: '', + 'Speaker-phone': '', + Tablet: '', + Label: '', + Receipt: '', + Calendar: '', + Cloud: '', + Assessment: '', + Dashboard: '', + 'Pie-chart': '', + Problem: '', + 'Picture-as-PDF': '', + Grid: '', + Watch: '', + Euro: '', + Dollar: '', + Info: '', + Alarm: '', + Wrench: '', + 'Circle-Arrows': '', + 'Credit-Card': '', + Favorite: '', + Gavel: '', + Blind: '', + Hourglass: '', + Time: '', + Search: '', + Shopping: '', + 'Thumb-up': '', + 'Thumb-down': '', + 'Thumb-up-down': '', + Couch: '', + Attach: '', + Ruler: '', + Education: '', + 'How-To-Reg': '', + 'View-List': '' +}; +function getAllStandardIconKeys() { + const allIconsDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + allIconsDict.addEach(allIcons); + return allIconsDict.keysArray(); +} +function overrideAppendedIcons(newIcons) { + appendedIcons = newIcons; +} + +/***/ }), + +/***/ 36105: +/*!*****************************************************************!*\ + !*** ./src/app/Domain/Icon-Set-Configuration/iconFilterEnum.ts ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IconFilterEnum: () => (/* binding */ IconFilterEnum) +/* harmony export */ }); +var IconFilterEnum; +(function (IconFilterEnum) { + IconFilterEnum["ICON_FILTER_ACTOR"] = "ICON_FILTER_ACTOR"; + IconFilterEnum["ICON_FILTER_WORKOBJECT"] = "ICON_FILTER_WORKOBJECT"; + IconFilterEnum["ICON_FILTER_UNASSIGNED"] = "ICON_FILTER_UNASSIGNED"; + IconFilterEnum["ICON_FILTER_NONE"] = "ICON_FILTER_NONE"; +})(IconFilterEnum || (IconFilterEnum = {})); + +/***/ }), + +/***/ 90684: +/*!*****************************************************!*\ + !*** ./src/app/Modules/autosave-settings.module.ts ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AutosaveSettingsModule: () => (/* binding */ AutosaveSettingsModule) +/* harmony export */ }); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _Presentation_Autosave_AutosaveSettings_autosave_settings_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Presentation/Autosave/AutosaveSettings/autosave-settings.component */ 94709); +/* harmony import */ var _Presentation_Autosave_AutosaveOptions_autosave_options_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Presentation/Autosave/AutosaveOptions/autosave-options.component */ 47893); +/* harmony import */ var _Presentation_Autosave_AutosavedDrafts_autosaved_drafts_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component */ 39083); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/forms */ 48015); +/* harmony import */ var _material_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../material.module */ 89439); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 96623); + + + + + + + +class AutosaveSettingsModule { + static #_ = this.ɵfac = function AutosaveSettingsModule_Factory(t) { + return new (t || AutosaveSettingsModule)(); + }; + static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineNgModule"]({ + type: AutosaveSettingsModule + }); + static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjector"]({ + imports: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.CommonModule, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.FormsModule, _material_module__WEBPACK_IMPORTED_MODULE_3__.MaterialModule] + }); +} +(function () { + (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵsetNgModuleScope"](AutosaveSettingsModule, { + declarations: [_Presentation_Autosave_AutosaveSettings_autosave_settings_component__WEBPACK_IMPORTED_MODULE_0__.AutosaveSettingsComponent, _Presentation_Autosave_AutosaveOptions_autosave_options_component__WEBPACK_IMPORTED_MODULE_1__.AutosaveOptionsComponent, _Presentation_Autosave_AutosavedDrafts_autosaved_drafts_component__WEBPACK_IMPORTED_MODULE_2__.AutosavedDraftsComponent], + imports: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.CommonModule, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.FormsModule, _material_module__WEBPACK_IMPORTED_MODULE_3__.MaterialModule], + exports: [_Presentation_Autosave_AutosaveSettings_autosave_settings_component__WEBPACK_IMPORTED_MODULE_0__.AutosaveSettingsComponent] + }); +})(); + +/***/ }), + +/***/ 76330: +/*!***************************************************************!*\ + !*** ./src/app/Modules/domain-story-modeler-module.module.ts ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DomainStoryModelerModuleModule: () => (/* binding */ DomainStoryModelerModuleModule) +/* harmony export */ }); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _Presentation_Header_header_buttons_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Presentation/Header/header-buttons.component */ 20409); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); + + + +class DomainStoryModelerModuleModule { + static #_ = this.ɵfac = function DomainStoryModelerModuleModule_Factory(t) { + return new (t || DomainStoryModelerModuleModule)(); + }; + static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ + type: DomainStoryModelerModuleModule + }); + static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({ + imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__.CommonModule] + }); +} +(function () { + (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](DomainStoryModelerModuleModule, { + declarations: [_Presentation_Header_header_buttons_component__WEBPACK_IMPORTED_MODULE_0__.HeaderButtonsComponent], + imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__.CommonModule], + exports: [_Presentation_Header_header_buttons_component__WEBPACK_IMPORTED_MODULE_0__.HeaderButtonsComponent] + }); +})(); + +/***/ }), + +/***/ 47261: +/*!********************************************!*\ + !*** ./src/app/Modules/settings.module.ts ***! + \********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SettingsModule: () => (/* binding */ SettingsModule) +/* harmony export */ }); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var src_app_Presentation_DomainConfiguration_icon_set_configuration_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Presentation/DomainConfiguration/icon-set-configuration.component */ 38574); +/* harmony import */ var _Presentation_DomainConfiguration_icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Presentation/DomainConfiguration/icon-list-item/icon-list-item.component */ 58414); +/* harmony import */ var _Presentation_DomainConfiguration_details_list_item_details_list_item_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Presentation/DomainConfiguration/details-list-item/details-list-item.component */ 62748); +/* harmony import */ var _Presentation_DomainConfiguration_icon_set_details_icon_set_details_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Presentation/DomainConfiguration/icon-set-details/icon-set-details.component */ 79052); +/* harmony import */ var _Presentation_Settings_General_general_settings_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Presentation/Settings/General/general-settings.component */ 423); +/* harmony import */ var _Presentation_LabelDictionary_label_dictionary_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Presentation/LabelDictionary/label-dictionary.component */ 86328); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/forms */ 48015); +/* harmony import */ var _material_module__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../material.module */ 89439); +/* harmony import */ var _autosave_settings_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./autosave-settings.module */ 90684); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/core */ 96623); + + + + + + + + + + + +class SettingsModule { + static #_ = this.ɵfac = function SettingsModule_Factory(t) { + return new (t || SettingsModule)(); + }; + static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵdefineNgModule"]({ + type: SettingsModule + }); + static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵdefineInjector"]({ + imports: [_autosave_settings_module__WEBPACK_IMPORTED_MODULE_7__.AutosaveSettingsModule, _angular_common__WEBPACK_IMPORTED_MODULE_9__.CommonModule, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormsModule, _material_module__WEBPACK_IMPORTED_MODULE_6__.MaterialModule] + }); +} +(function () { + (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵsetNgModuleScope"](SettingsModule, { + declarations: [src_app_Presentation_DomainConfiguration_icon_set_configuration_component__WEBPACK_IMPORTED_MODULE_0__.IconSetConfigurationComponent, _Presentation_Settings_General_general_settings_component__WEBPACK_IMPORTED_MODULE_4__.GeneralSettingsComponent, _Presentation_LabelDictionary_label_dictionary_component__WEBPACK_IMPORTED_MODULE_5__.LabelDictionaryComponent, _Presentation_DomainConfiguration_icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_1__.IconListItemComponent, _Presentation_DomainConfiguration_details_list_item_details_list_item_component__WEBPACK_IMPORTED_MODULE_2__.DetailsListItemComponent, _Presentation_DomainConfiguration_icon_set_details_icon_set_details_component__WEBPACK_IMPORTED_MODULE_3__.IconSetDetailsComponent], + imports: [_autosave_settings_module__WEBPACK_IMPORTED_MODULE_7__.AutosaveSettingsModule, _angular_common__WEBPACK_IMPORTED_MODULE_9__.CommonModule, _angular_forms__WEBPACK_IMPORTED_MODULE_10__.FormsModule, _material_module__WEBPACK_IMPORTED_MODULE_6__.MaterialModule], + exports: [_Presentation_Settings_General_general_settings_component__WEBPACK_IMPORTED_MODULE_4__.GeneralSettingsComponent, src_app_Presentation_DomainConfiguration_icon_set_configuration_component__WEBPACK_IMPORTED_MODULE_0__.IconSetConfigurationComponent, _Presentation_LabelDictionary_label_dictionary_component__WEBPACK_IMPORTED_MODULE_5__.LabelDictionaryComponent] + }); +})(); + +/***/ }), + +/***/ 47893: +/*!*************************************************************************************!*\ + !*** ./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.ts ***! + \*************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AutosaveOptionsComponent: () => (/* binding */ AutosaveOptionsComponent) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/constants */ 90816); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Service_Autosave_autosave_configuration_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Service/Autosave/autosave-configuration.service */ 97237); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/button */ 95912); +/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/form-field */ 48913); +/* harmony import */ var _angular_material_card__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/card */ 34294); + + + + + + + + +function AutosaveOptionsComponent_mat_card_0_Template(rf, ctx) { + if (rf & 1) { + const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "mat-card")(1, "mat-card-header")(2, "mat-card-title"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](3, "Autosave Options"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](4, "mat-card-content", 4)(5, "div", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](6, "input", 6, 0); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](8, "mat-label"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](9, "Enabled"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](10, "div", 7)(11, "mat-label"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](12, "Interval [sec]"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](13, "input", 8, 1); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](15, "div", 7)(16, "mat-label"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](17, "Max. Drafts"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](18, "input", 8, 2); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](20, "button", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("click", function AutosaveOptionsComponent_mat_card_0_Template_button_click_20_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵrestoreView"](_r1); + const activated_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵreference"](7); + const interval_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵreference"](14); + const drafts_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵreference"](19); + const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵresetView"](ctx_r4.save(activated_r2.checked, +drafts_r4.value, +interval_r3.value)); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](21, " Apply "); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()()(); + } + if (rf & 2) { + const configuration_r6 = ctx.ngIf; + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](6); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("checked", configuration_r6.activated); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](7); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", configuration_r6.interval); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", configuration_r6.maxDrafts); + } +} +class AutosaveOptionsComponent { + constructor(autosaveConfiguration, snackbar) { + this.autosaveConfiguration = autosaveConfiguration; + this.snackbar = snackbar; + } + save(activated, maxDrafts, interval) { + if (this.autosaveConfiguration.setConfiguration({ + activated, + maxDrafts, + interval + })) { + this.snackbar.open('Settings for Autosave saved', undefined, { + duration: src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION, + panelClass: src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_SUCCESS + }); + } else { + this.snackbar.open('Unable to save settings for Autosave - please try again', undefined, { + duration: 2 * src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION, + panelClass: src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_ERROR + }); + } + } + static #_ = this.ɵfac = function AutosaveOptionsComponent_Factory(t) { + return new (t || AutosaveOptionsComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_Service_Autosave_autosave_configuration_service__WEBPACK_IMPORTED_MODULE_1__.AutosaveConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_3__.MatSnackBar)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineComponent"]({ + type: AutosaveOptionsComponent, + selectors: [["app-autosave-options"]], + decls: 2, + vars: 3, + consts: [["activated", ""], ["interval", ""], ["drafts", ""], [4, "ngIf"], [1, "cardContent"], [1, "alignSelfCenter"], ["type", "checkbox", 3, "checked"], [1, "inputContainer"], ["min", "1", "type", "number", 1, "numberInput", 3, "value"], ["mat-raised-button", "", "color", "primary", 1, "saveButton", 3, "click"]], + template: function AutosaveOptionsComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](0, AutosaveOptionsComponent_mat_card_0_Template, 22, 3, "mat-card", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵpipe"](1, "async"); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵpipeBind1"](1, 1, ctx.autosaveConfiguration.configuration$)); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_4__.NgIf, _angular_material_button__WEBPACK_IMPORTED_MODULE_5__.MatButton, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_6__.MatLabel, _angular_material_card__WEBPACK_IMPORTED_MODULE_7__.MatCard, _angular_material_card__WEBPACK_IMPORTED_MODULE_7__.MatCardContent, _angular_material_card__WEBPACK_IMPORTED_MODULE_7__.MatCardHeader, _angular_material_card__WEBPACK_IMPORTED_MODULE_7__.MatCardTitle, _angular_common__WEBPACK_IMPORTED_MODULE_4__.AsyncPipe], + styles: [".autosaveEnabled[_ngcontent-%COMP%], .autosaveInterval[_ngcontent-%COMP%] {\n display: inline-grid;\n grid-template-columns: 120px auto;\n width: 300px;\n grid-row-gap: 5px;\n height: 20px;\n}\n\n.enableButton[_ngcontent-%COMP%] {\n justify-self: start;\n}\n\n.autosaveEnabled[_ngcontent-%COMP%] {\n padding-bottom: 2px;\n}\n\n.autosaveInterval[_ngcontent-%COMP%] {\n padding-bottom: 10px;\n}\n\n.autosaveIntervalSpan[_ngcontent-%COMP%] {\n padding-top: 2px;\n justify-self: start;\n}\n\n.saveButton[_ngcontent-%COMP%] {\n align-self: end;\n right: 0;\n margin-left: -5px;\n}\n\n.cardContent[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n}\n\n.inputContainer[_ngcontent-%COMP%] {\n display: inline-grid;\n width: -moz-fit-content;\n width: fit-content;\n}\n\n.numberInput[_ngcontent-%COMP%] {\n justify-self: end;\n width: 64px;\n}\n\n.alignSelfCenter[_ngcontent-%COMP%] {\n align-self: center;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF1dG9zYXZlLW9wdGlvbnMuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0VBRUUsb0JBQUE7RUFDQSxpQ0FBQTtFQUNBLFlBQUE7RUFDQSxpQkFBQTtFQUNBLFlBQUE7QUFDRjs7QUFFQTtFQUNFLG1CQUFBO0FBQ0Y7O0FBRUE7RUFDRSxtQkFBQTtBQUNGOztBQUVBO0VBQ0Usb0JBQUE7QUFDRjs7QUFFQTtFQUNFLGdCQUFBO0VBQ0EsbUJBQUE7QUFDRjs7QUFFQTtFQUNFLGVBQUE7RUFDQSxRQUFBO0VBQ0EsaUJBQUE7QUFDRjs7QUFFQTtFQUNFLGFBQUE7RUFDQSw4QkFBQTtBQUNGOztBQUVBO0VBQ0Usb0JBQUE7RUFDQSx1QkFBQTtFQUFBLGtCQUFBO0FBQ0Y7O0FBRUE7RUFDRSxpQkFBQTtFQUNBLFdBQUE7QUFDRjs7QUFFQTtFQUNFLGtCQUFBO0FBQ0YiLCJmaWxlIjoiYXV0b3NhdmUtb3B0aW9ucy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5hdXRvc2F2ZUVuYWJsZWQsXG4uYXV0b3NhdmVJbnRlcnZhbCB7XG4gIGRpc3BsYXk6IGlubGluZS1ncmlkO1xuICBncmlkLXRlbXB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xuICBhbGlnbi1zZWxmOiBlbmQ7XG4gIHJpZ2h0OiAwO1xuICBtYXJnaW4tbGVmdDogLTVweDtcbn1cblxuLmNhcmRDb250ZW50IHtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xufVxuXG4uaW5wdXRDb250YWluZXIge1xuICBkaXNwbGF5OiBpbmxpbmUtZ3JpZDtcbiAgd2lkdGg6IGZpdC1jb250ZW50O1xufVxuXG4ubnVtYmVySW5wdXQge1xuICBqdXN0aWZ5LXNlbGY6IGVuZDtcbiAgd2lkdGg6IDY0cHg7XG59XG5cbi5hbGlnblNlbGZDZW50ZXIge1xuICBhbGlnbi1zZWxmOiBjZW50ZXI7XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 */"] + }); +} + +/***/ }), + +/***/ 94709: +/*!***************************************************************************************!*\ + !*** ./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.ts ***! + \***************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AutosaveSettingsComponent: () => (/* binding */ AutosaveSettingsComponent) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _AutosaveOptions_autosave_options_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../AutosaveOptions/autosave-options.component */ 47893); +/* harmony import */ var _AutosavedDrafts_autosaved_drafts_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../AutosavedDrafts/autosaved-drafts.component */ 39083); + + + +class AutosaveSettingsComponent { + static #_ = this.ɵfac = function AutosaveSettingsComponent_Factory(t) { + return new (t || AutosaveSettingsComponent)(); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineComponent"]({ + type: AutosaveSettingsComponent, + selectors: [["app-autosave-settings"]], + decls: 2, + vars: 0, + template: function AutosaveSettingsComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](0, "app-autosave-options")(1, "app-autosaved-drafts"); + } + }, + dependencies: [_AutosaveOptions_autosave_options_component__WEBPACK_IMPORTED_MODULE_0__.AutosaveOptionsComponent, _AutosavedDrafts_autosaved_drafts_component__WEBPACK_IMPORTED_MODULE_1__.AutosavedDraftsComponent], + styles: ["/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJhdXRvc2F2ZS1zZXR0aW5ncy5jb21wb25lbnQuc2NzcyJ9 */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL0F1dG9zYXZlL0F1dG9zYXZlU2V0dGluZ3MvYXV0b3NhdmUtc2V0dGluZ3MuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLGdMQUFnTCIsInNvdXJjZVJvb3QiOiIifQ== */"] + }); +} + +/***/ }), + +/***/ 39083: +/*!*************************************************************************************!*\ + !*** ./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.ts ***! + \*************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AutosavedDraftsComponent: () => (/* binding */ AutosavedDraftsComponent) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/constants */ 90816); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Service_Autosave_autosave_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Service/Autosave/autosave.service */ 30534); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/button */ 95912); +/* harmony import */ var _angular_material_expansion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/expansion */ 3695); + + + + + + + +function AutosavedDraftsComponent_div_7_div_1_Template(rf, ctx) { + if (rf & 1) { + const _r2 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 6)(1, "div")(2, "div", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](4, "div", 8); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](6, "button", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("click", function AutosavedDraftsComponent_div_7_div_1_Template_button_click_6_listener() { + const draft_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵrestoreView"](_r2).$implicit; + const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵnextContext"](2); + return _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵresetView"](ctx_r3.loadDraft(draft_r3)); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](7, " Load Draft "); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + } + if (rf & 2) { + const draft_r3 = ctx.$implicit; + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtextInterpolate"](draft_r3.title); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtextInterpolate"](draft_r3.date); + } +} +function AutosavedDraftsComponent_div_7_Template(rf, ctx) { + if (rf & 1) { + const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](1, AutosavedDraftsComponent_div_7_div_1_Template, 8, 2, "div", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](2, "div", 4); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](3, "div"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](4, "button", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("click", function AutosavedDraftsComponent_div_7_Template_button_click_4_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵrestoreView"](_r1); + const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵresetView"](ctx_r3.removeAllDrafts()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](5, " Remove All Drafts "); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()()(); + } + if (rf & 2) { + const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵnextContext"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("ngForOf", ctx_r3.drafts); + } +} +function AutosavedDraftsComponent_ng_template_8_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](0, "No drafts found."); + } +} +class AutosavedDraftsComponent { + constructor(autosaveService, snackbar) { + this.autosaveService = autosaveService; + this.snackbar = snackbar; + this.drafts = []; + this.subscription = this.autosaveService.autosavedDraftsChanged$.subscribe(() => this.initDrafts()); + } + ngOnInit() { + this.initDrafts(); + } + initDrafts() { + this.drafts = this.autosaveService.loadCurrentDrafts(); + } + loadDraft(draft) { + this.autosaveService.loadDraft(draft); + this.snackbar.open('Draft loaded', undefined, { + duration: src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION, + panelClass: src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_SUCCESS + }); + } + removeAllDrafts() { + this.autosaveService.removeAllDrafts(); + } + static #_ = this.ɵfac = function AutosavedDraftsComponent_Factory(t) { + return new (t || AutosavedDraftsComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_Service_Autosave_autosave_service__WEBPACK_IMPORTED_MODULE_1__.AutosaveService), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_3__.MatSnackBar)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineComponent"]({ + type: AutosavedDraftsComponent, + selectors: [["app-autosaved-drafts"]], + decls: 10, + vars: 4, + consts: [["noDrafts", ""], ["class", "items", 4, "ngIf", "ngIfElse"], [1, "items"], ["class", "item border-bottom", 4, "ngFor", "ngForOf"], [1, "item"], ["mat-raised-button", "", "color", "primary", 1, "item-button", 3, "click"], [1, "item", "border-bottom"], [1, "item-title"], [1, "item-date"]], + template: function AutosavedDraftsComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "mat-accordion")(1, "mat-expansion-panel")(2, "mat-expansion-panel-header")(3, "mat-panel-title"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](4, "History"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](5, "mat-panel-description"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](6); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](7, AutosavedDraftsComponent_div_7_Template, 6, 1, "div", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplate"](8, AutosavedDraftsComponent_ng_template_8_Template, 1, 0, "ng-template", null, 0, _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtemplateRefExtractor"]); + } + if (rf & 2) { + const noDrafts_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵreference"](9); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](6); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtextInterpolate2"](" ", ctx.drafts.length ? ctx.drafts.length : "no", " ", ctx.drafts.length > 1 ? "drafts" : "draft", " available "); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("ngIf", ctx.drafts.length)("ngIfElse", noDrafts_r5); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_4__.NgForOf, _angular_common__WEBPACK_IMPORTED_MODULE_4__.NgIf, _angular_material_button__WEBPACK_IMPORTED_MODULE_5__.MatButton, _angular_material_expansion__WEBPACK_IMPORTED_MODULE_6__.MatAccordion, _angular_material_expansion__WEBPACK_IMPORTED_MODULE_6__.MatExpansionPanel, _angular_material_expansion__WEBPACK_IMPORTED_MODULE_6__.MatExpansionPanelHeader, _angular_material_expansion__WEBPACK_IMPORTED_MODULE_6__.MatExpansionPanelTitle, _angular_material_expansion__WEBPACK_IMPORTED_MODULE_6__.MatExpansionPanelDescription], + styles: [".items[_ngcontent-%COMP%] {\n padding-top: 0 !important;\n}\n.items[_ngcontent-%COMP%] .mat-list-item-content {\n padding: 0;\n}\n\n.item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 8px 0;\n width: 400px;\n}\n\n.border-bottom[_ngcontent-%COMP%] {\n border-bottom: 1px solid darkgray;\n}\n\n.item-title[_ngcontent-%COMP%] {\n font-weight: bold;\n width: 270px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n\n.item-date[_ngcontent-%COMP%] {\n font-weight: normal;\n}\n\n.item-button[_ngcontent-%COMP%] {\n margin-left: 1rem;\n}\n\nmat-list-item[_ngcontent-%COMP%] {\n border-bottom: 1px solid darkgray;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF1dG9zYXZlZC1kcmFmdHMuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFJRSx5QkFBQTtBQUZGO0FBREU7RUFDRSxVQUFBO0FBR0o7O0FBRUE7RUFDRSxhQUFBO0VBQ0EsbUJBQUE7RUFDQSw4QkFBQTtFQUNBLGNBQUE7RUFDQSxZQUFBO0FBQ0Y7O0FBRUE7RUFDRSxpQ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bG93OiBlbGxpcHNpcztcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbn1cblxuLml0ZW0tZGF0ZSB7XG4gIGZvbnQtd2VpZ2h0OiBub3JtYWw7XG59XG5cbi5pdGVtLWJ1dHRvbiB7XG4gIG1hcmdpbi1sZWZ0OiAxcmVtO1xufVxuXG5tYXQtbGlzdC1pdGVtIHtcbiAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIGRhcmtncmF5O1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */"] + }); +} + +/***/ }), + +/***/ 29383: +/*!**********************************************************!*\ + !*** ./src/app/Presentation/Canvas/modeler.component.ts ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ModelerComponent: () => (/* binding */ ModelerComponent) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Service/Modeler/modeler.service */ 74676); +/* harmony import */ var _Service_Autosave_autosave_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Service/Autosave/autosave.service */ 30534); + + + +class ModelerComponent { + constructor(modelerService, autosaveService) { + this.modelerService = modelerService; + this.autosaveService = autosaveService; + } + ngOnInit() { + this.modelerService.postInit(); + this.autosaveService.loadLatestDraft(); + } + static #_ = this.ɵfac = function ModelerComponent_Factory(t) { + return new (t || ModelerComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_0__.ModelerService), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_Service_Autosave_autosave_service__WEBPACK_IMPORTED_MODULE_1__.AutosaveService)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineComponent"]({ + type: ModelerComponent, + selectors: [["app-modeler"]], + decls: 1, + vars: 0, + consts: [["id", "canvas"]], + template: function ModelerComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](0, "div", 0); + } + }, + styles: ["#canvas[_ngcontent-%COMP%], #canvas[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n top: 0;\n width: 100%;\n height: 100%;\n position: relative;\n bottom: 0;\n overflow: hidden;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1vZGVsZXIuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0VBRUUsTUFBQTtFQUNBLFdBQUE7RUFDQSxZQUFBO0VBQ0Esa0JBQUE7RUFDQSxTQUFBO0VBQ0EsZ0JBQUE7QUFDRiIsImZpbGUiOiJtb2RlbGVyLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiI2NhbnZhcyxcbiNjYW52YXMgPiBkaXYge1xuICB0b3A6IDA7XG4gIHdpZHRoOiAxMDAlO1xuICBoZWlnaHQ6IDEwMCU7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgYm90dG9tOiAwO1xuICBvdmVyZmxvdzogaGlkZGVuO1xufVxuIl19 */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL0NhbnZhcy9tb2RlbGVyLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztFQUVFLE1BQUE7RUFDQSxXQUFBO0VBQ0EsWUFBQTtFQUNBLGtCQUFBO0VBQ0EsU0FBQTtFQUNBLGdCQUFBO0FBQ0Y7QUFDQSxnZkFBZ2YiLCJzb3VyY2VzQ29udGVudCI6WyIjY2FudmFzLFxuI2NhbnZhcyA+IGRpdiB7XG4gIHRvcDogMDtcbiAgd2lkdGg6IDEwMCU7XG4gIGhlaWdodDogMTAwJTtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBib3R0b206IDA7XG4gIG92ZXJmbG93OiBoaWRkZW47XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 */"] + }); +} + +/***/ }), + +/***/ 63954: +/*!**********************************************************************************!*\ + !*** ./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.ts ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ActivityDialogComponent: () => (/* binding */ ActivityDialogComponent) +/* harmony export */ }); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ 48015); +/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/button */ 95912); +/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/form-field */ 48913); +/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/input */ 29836); +/* harmony import */ var src_app_Domain_Dialog_activityDialogData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Dialog/activityDialogData */ 93703); + + + + + + + + +class ActivityDialogComponent { + constructor(fb, dialogRef, data) { + this.fb = fb; + this.dialogRef = dialogRef; + this.activity = data.activity; + this.activityLabel = data.activity.businessObject.name; + this.numberIsAllowedMultipleTimes = data.numberIsAllowedMultipleTimes; + this.activityNumber = data.activity.businessObject.number; + this.showNumberFields = data.showNumberFields; + this.saveFN = data.saveFN; + this.form = this.fb.group({ + activityLabel: [this.activityLabel, []], + activityNumber: [this.activityNumber, []], + multipleNumbers: [this.numberIsAllowedMultipleTimes, []] + }); + } + onSubmit() { + this.numberIsAllowedMultipleTimes = !this.numberIsAllowedMultipleTimes; + this.form.patchValue({ + multipleNumbers: this.numberIsAllowedMultipleTimes + }); + } + save() { + this.saveFN({ + activity: this.activity, + ...this.form.value + }); + this.dialogRef.close(); + } + close() { + this.dialogRef.close(); + } + preventDefault(event) { + event.preventDefault(); + } + static #_ = this.ɵfac = function ActivityDialogComponent_Factory(t) { + return new (t || ActivityDialogComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_2__.UntypedFormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogRef), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MAT_DIALOG_DATA)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ + type: ActivityDialogComponent, + selectors: [["app-activity-dialog"]], + decls: 20, + vars: 2, + consts: [[3, "formGroup"], [3, "hidden"], [1, "shortWidth"], ["matInput", "", "type", "number", "formControlName", "activityNumber"], ["type", "checkbox", "formControlName", "multipleNumbers", 3, "change"], [1, "fullWidth"], ["matInput", "", "type", "text", "formControlName", "activityLabel", "autofocus", "", "cdkFocusInitial", "", 3, "keydown.enter", "keyup.enter", "keyup.escape"], ["mat-flat-button", "", 3, "click"], ["mat-flat-button", "", "color", "primary", 3, "click"]], + template: function ActivityDialogComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "mat-dialog-content")(1, "h2"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](2, "Edit Activity"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](3, "form", 0)(4, "div", 1)(5, "mat-form-field", 2)(6, "mat-label"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](7, "Number"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](8, "input", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](9, "input", 4); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("change", function ActivityDialogComponent_Template_input_change_9_listener() { + return ctx.onSubmit(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](10, " multiple "); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](11, "mat-form-field", 5)(12, "mat-label"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](13, "Label"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](14, "textarea", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("keydown.enter", function ActivityDialogComponent_Template_textarea_keydown_enter_14_listener($event) { + return ctx.preventDefault($event); + })("keyup.enter", function ActivityDialogComponent_Template_textarea_keyup_enter_14_listener() { + return ctx.save(); + })("keyup.escape", function ActivityDialogComponent_Template_textarea_keyup_escape_14_listener() { + return ctx.close(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()()(); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](15, "mat-dialog-actions")(16, "button", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function ActivityDialogComponent_Template_button_click_16_listener() { + return ctx.close(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](17, "Cancel"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](18, "button", 8); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function ActivityDialogComponent_Template_button_click_18_listener() { + return ctx.save(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](19, "Save"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()(); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("formGroup", ctx.form); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("hidden", !ctx.showNumberFields); + } + }, + dependencies: [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_2__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.NumberValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.CheckboxControlValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.FormControlName, _angular_material_button__WEBPACK_IMPORTED_MODULE_4__.MatButton, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogActions, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogContent, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_5__.MatFormField, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_5__.MatLabel, _angular_material_input__WEBPACK_IMPORTED_MODULE_6__.MatInput], + styles: [".shortWidth[_ngcontent-%COMP%] {\n width: 200px;\n}\n\n.fullWidth[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n .mat-form-field-label {\n font-size: 12pt !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFjdGl2aXR5LWRpYWxvZy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLFlBQUE7QUFDRjs7QUFFQTtFQUNFLFdBQUE7QUFDRjs7QUFDQTtFQUNFLDBCQUFBO0FBRUYiLCJmaWxlIjoiYWN0aXZpdHktZGlhbG9nLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLnNob3J0V2lkdGgge1xuICB3aWR0aDogMjAwcHg7XG59XG5cbi5mdWxsV2lkdGgge1xuICB3aWR0aDogMTAwJTtcbn1cbjo6bmctZGVlcC5tYXQtZm9ybS1maWVsZC1sYWJlbCB7XG4gIGZvbnQtc2l6ZTogMTJwdCAhaW1wb3J0YW50O1xufVxuIl19 */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL0RpYWxvZy9hY3Rpdml0eS1kaWFsb2cvYWN0aXZpdHktZGlhbG9nLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsWUFBQTtBQUNGOztBQUVBO0VBQ0UsV0FBQTtBQUNGOztBQUNBO0VBQ0UsMEJBQUE7QUFFRjtBQUNBLGdnQkFBZ2dCIiwic291cmNlc0NvbnRlbnQiOlsiLnNob3J0V2lkdGgge1xuICB3aWR0aDogMjAwcHg7XG59XG5cbi5mdWxsV2lkdGgge1xuICB3aWR0aDogMTAwJTtcbn1cbjo6bmctZGVlcC5tYXQtZm9ybS1maWVsZC1sYWJlbCB7XG4gIGZvbnQtc2l6ZTogMTJwdCAhaW1wb3J0YW50O1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */"] + }); +} + +/***/ }), + +/***/ 97218: +/*!******************************************************************************!*\ + !*** ./src/app/Presentation/Dialog/export-dialog/export-dialog.component.ts ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ExportDialogComponent: () => (/* binding */ ExportDialogComponent) +/* harmony export */ }); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var rxjs_internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/internal/BehaviorSubject */ 95536); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/button */ 95912); +/* harmony import */ var src_app_Domain_Dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Dialog/exportDialogData */ 83064); + + + + + + + +function ExportDialogComponent_button_17_Template(rf, ctx) { + if (rf & 1) { + const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "button", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function ExportDialogComponent_button_17_Template_button_click_0_listener() { + const i_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r1).index; + const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r2.doOption(i_r2)); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + } + if (rf & 2) { + const option_r4 = ctx.$implicit; + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("title", option_r4.tooltip); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", option_r4.text, " "); + } +} +class ExportDialogComponent { + constructor(dialogRef, data) { + this.dialogRef = dialogRef; + this.withTitle = new rxjs_internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_2__.BehaviorSubject(true); + this.useWhiteBackground = new rxjs_internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_2__.BehaviorSubject(true); + this.title = data.title; + this.options = data.options; + } + ngOnInit() {} + doOption(i) { + this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value); + this.close(); + } + close() { + this.dialogRef.close(); + } + updateWithTitle($event) { + // @ts-ignore + this.withTitle.next($event.target.checked); + } + updateUseWhiteBackground($event) { + // @ts-ignore + this.useWhiteBackground.next($event.target.checked); + } + static #_ = this.ɵfac = function ExportDialogComponent_Factory(t) { + return new (t || ExportDialogComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogRef), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MAT_DIALOG_DATA)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ + type: ExportDialogComponent, + selectors: [["app-export-dialog"]], + decls: 18, + vars: 8, + consts: [["type", "checkbox", 3, "change", "checked"], ["mat-flat-button", "", 3, "click"], ["mat-stroked-button", "", "class", "mr-1", 3, "title", "click", 4, "ngFor", "ngForOf"], ["mat-stroked-button", "", 1, "mr-1", 3, "click", "title"]], + template: function ExportDialogComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "mat-dialog-content")(1, "h2"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](3, "label")(4, "input", 0); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](5, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("change", function ExportDialogComponent_Template_input_change_4_listener($event) { + return ctx.updateWithTitle($event); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](6, " Add title and description to image "); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](7, "br"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](8, "label")(9, "input", 0); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](10, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("change", function ExportDialogComponent_Template_input_change_9_listener($event) { + return ctx.updateUseWhiteBackground($event); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](11, " Add white background to SVG (default: transparent) "); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](12, "mat-dialog-actions"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](13, "br"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](14, "div")(15, "button", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function ExportDialogComponent_Template_button_click_15_listener() { + return ctx.close(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](16, "Cancel"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](17, ExportDialogComponent_button_17_Template, 2, 2, "button", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()(); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](ctx.title); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("checked", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](5, 4, ctx.withTitle)); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](5); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("checked", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](10, 6, ctx.useWhiteBackground)); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](8); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", ctx.options); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_4__.NgForOf, _angular_material_button__WEBPACK_IMPORTED_MODULE_5__.MatButton, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogActions, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogContent, _angular_common__WEBPACK_IMPORTED_MODULE_4__.AsyncPipe], + styles: ["/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJleHBvcnQtZGlhbG9nLmNvbXBvbmVudC5zY3NzIn0= */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL0RpYWxvZy9leHBvcnQtZGlhbG9nL2V4cG9ydC1kaWFsb2cuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLDRLQUE0SyIsInNvdXJjZVJvb3QiOiIifQ== */"] + }); +} + +/***/ }), + +/***/ 21270: +/*!******************************************************************************!*\ + !*** ./src/app/Presentation/Dialog/header-dialog/header-dialog.component.ts ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ HeaderDialogComponent: () => (/* binding */ HeaderDialogComponent) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/forms */ 48015); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/Title/title.service */ 69672); +/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/button */ 95912); +/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/form-field */ 48913); +/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/input */ 29836); + + + + + + + +class HeaderDialogComponent { + constructor(fb, dialogRef, titleService) { + this.fb = fb; + this.dialogRef = dialogRef; + this.titleService = titleService; + this.title = this.titleService.getTitle() === '< name of this Domain Story >' ? '' : this.titleService.getTitle(); + this.description = this.titleService.getDescription(); + this.form = this.fb.group({ + title: [this.title, []], + description: [this.description, []] + }); + } + ngOnInit() {} + save() { + this.titleService.updateTitleAndDescription(this.form.get('title')?.value, this.form.get('description')?.value, true); + this.dialogRef.close(); + } + close() { + this.dialogRef.close(); + } + preventDefault(event) { + event.preventDefault(); + } + static #_ = this.ɵfac = function HeaderDialogComponent_Factory(t) { + return new (t || HeaderDialogComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_2__.UntypedFormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogRef), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_0__.TitleService)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ + type: HeaderDialogComponent, + selectors: [["app-header-dialog"]], + decls: 16, + vars: 1, + consts: [[3, "formGroup"], [1, "dialogWidth"], ["matInput", "", "type", "text", "formControlName", "title"], ["maxlength", "2000", "matInput", "", "formControlName", "description", 1, "descriptionInput", 3, "keydown.enter", "keyup.enter", "keyup.escape"], ["mat-flat-button", "", 3, "click"], ["mat-flat-button", "", "color", "primary", 3, "click"]], + template: function HeaderDialogComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "mat-dialog-content")(1, "form", 0)(2, "mat-form-field", 1)(3, "mat-label"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](4, "Title"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](5, "input", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](6, "br"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](7, "mat-form-field", 1)(8, "mat-label"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](9, "Description"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](10, "textarea", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("keydown.enter", function HeaderDialogComponent_Template_textarea_keydown_enter_10_listener($event) { + return ctx.preventDefault($event); + })("keyup.enter", function HeaderDialogComponent_Template_textarea_keyup_enter_10_listener() { + return ctx.save(); + })("keyup.escape", function HeaderDialogComponent_Template_textarea_keyup_escape_10_listener() { + return ctx.close(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()()(); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](11, "mat-dialog-actions")(12, "button", 4); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function HeaderDialogComponent_Template_button_click_12_listener() { + return ctx.close(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](13, "Cancel"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](14, "button", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function HeaderDialogComponent_Template_button_click_14_listener() { + return ctx.save(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](15, "Save"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()(); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("formGroup", ctx.form); + } + }, + dependencies: [_angular_forms__WEBPACK_IMPORTED_MODULE_2__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_2__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.MaxLengthValidator, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_2__.FormControlName, _angular_material_button__WEBPACK_IMPORTED_MODULE_4__.MatButton, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogActions, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_3__.MatDialogContent, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_5__.MatFormField, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_5__.MatLabel, _angular_material_input__WEBPACK_IMPORTED_MODULE_6__.MatInput], + styles: [".dialogWidth[_ngcontent-%COMP%] {\n width: 50vw;\n}\n.dialogWidth[_ngcontent-%COMP%] mat-label[_ngcontent-%COMP%] {\n font-size: 12pt;\n}\n\n.descriptionInput[_ngcontent-%COMP%] {\n min-height: 75px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhlYWRlci1kaWFsb2cuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxXQUFBO0FBQ0Y7QUFBRTtFQUNFLGVBQUE7QUFFSjs7QUFFQTtFQUNFLGdCQUFBO0FBQ0YiLCJmaWxlIjoiaGVhZGVyLWRpYWxvZy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5kaWFsb2dXaWR0aCB7XG4gIHdpZHRoOiA1MHZ3O1xuICBtYXQtbGFiZWwge1xuICAgIGZvbnQtc2l6ZTogMTJwdDtcbiAgfVxufVxuXG4uZGVzY3JpcHRpb25JbnB1dCB7XG4gIG1pbi1oZWlnaHQ6IDc1cHg7XG59XG4iXX0= */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL0RpYWxvZy9oZWFkZXItZGlhbG9nL2hlYWRlci1kaWFsb2cuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxXQUFBO0FBQ0Y7QUFBRTtFQUNFLGVBQUE7QUFFSjs7QUFFQTtFQUNFLGdCQUFBO0FBQ0Y7QUFDQSx3ZUFBd2UiLCJzb3VyY2VzQ29udGVudCI6WyIuZGlhbG9nV2lkdGgge1xuICB3aWR0aDogNTB2dztcbiAgbWF0LWxhYmVsIHtcbiAgICBmb250LXNpemU6IDEycHQ7XG4gIH1cbn1cblxuLmRlc2NyaXB0aW9uSW5wdXQge1xuICBtaW4taGVpZ2h0OiA3NXB4O1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */"] + }); +} + +/***/ }), + +/***/ 16266: +/*!**************************************************************************!*\ + !*** ./src/app/Presentation/Dialog/info-dialog/info-dialog.component.ts ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ InfoDialogComponent: () => (/* binding */ InfoDialogComponent) +/* harmony export */ }); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var src_app_Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Dialog/infoDialogData */ 45574); + + + + + +function InfoDialogComponent_span_3_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "span", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + } + if (rf & 2) { + const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"]("", ctx_r0.infoText, " "); + } +} +function InfoDialogComponent_a_4_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "a", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](1); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + } + if (rf & 2) { + const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpropertyInterpolate"]("href", ctx_r0.linkText, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsanitizeUrl"]); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](ctx_r0.linkText); + } +} +function InfoDialogComponent_mat_dialog_actions_5_Template(rf, ctx) { + if (rf & 1) { + const _r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "mat-dialog-actions")(1, "button", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function InfoDialogComponent_mat_dialog_actions_5_Template_button_click_1_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r2); + const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r0.close()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](2, "Close"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()(); + } +} +class InfoDialogComponent { + constructor(dialogRef, data) { + this.dialogRef = dialogRef; + this.title = data.title; + this.infoText = data.infoText; + this.showConfirmButton = !data.isInfo; + this.hasLink = data.isLink; + this.linkText = data.linkText || ''; + } + ngAfterViewInit() { + const span = document.getElementsByClassName('readOnlyText')[0]; + span.style.height = span.scrollHeight + 'px'; + } + close() { + this.dialogRef.close(); + } + static #_ = this.ɵfac = function InfoDialogComponent_Factory(t) { + return new (t || InfoDialogComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_material_dialog__WEBPACK_IMPORTED_MODULE_2__.MatDialogRef), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_material_dialog__WEBPACK_IMPORTED_MODULE_2__.MAT_DIALOG_DATA)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ + type: InfoDialogComponent, + selectors: [["app-info-dialog"]], + decls: 6, + vars: 4, + consts: [[1, "content"], ["id", "info-dialog-title"], ["class", "readOnlyText", 4, "ngIf"], [3, "href", 4, "ngIf"], [4, "ngIf"], [1, "readOnlyText"], [3, "href"], [1, "mat-raised-button", 3, "click"]], + template: function InfoDialogComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "mat-dialog-content", 0)(1, "h2", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](3, InfoDialogComponent_span_3_Template, 2, 1, "span", 2)(4, InfoDialogComponent_a_4_Template, 2, 2, "a", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](5, InfoDialogComponent_mat_dialog_actions_5_Template, 3, 0, "mat-dialog-actions", 4); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](ctx.title); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx.infoText != ""); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx.hasLink); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngIf", ctx.showConfirmButton); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_3__.NgIf, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_2__.MatDialogActions, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_2__.MatDialogContent], + styles: [".readOnlyText[_ngcontent-%COMP%] {\n display: block;\n border: none;\n resize: none;\n width: 100%;\n overflow: hidden;\n white-space: pre-wrap;\n}\n\n.content[_ngcontent-%COMP%] {\n height: -moz-fit-content;\n height: fit-content;\n width: 30vw;\n overflow: hidden;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZm8tZGlhbG9nLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsY0FBQTtFQUNBLFlBQUE7RUFDQSxZQUFBO0VBQ0EsV0FBQTtFQUNBLGdCQUFBO0VBQ0EscUJBQUE7QUFDRjs7QUFFQTtFQUNFLHdCQUFBO0VBQUEsbUJBQUE7RUFDQSxXQUFBO0VBQ0EsZ0JBQUE7QUFDRiIsImZpbGUiOiJpbmZvLWRpYWxvZy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5yZWFkT25seVRleHQge1xuICBkaXNwbGF5OiBibG9jaztcbiAgYm9yZGVyOiBub25lO1xuICByZXNpemU6IG5vbmU7XG4gIHdpZHRoOiAxMDAlO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICB3aGl0ZS1zcGFjZTogcHJlLXdyYXA7XG59XG5cbi5jb250ZW50IHtcbiAgaGVpZ2h0OiBmaXQtY29udGVudDtcbiAgd2lkdGg6IDMwdnc7XG4gIG92ZXJmbG93OiBoaWRkZW47XG59XG4iXX0= */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL0RpYWxvZy9pbmZvLWRpYWxvZy9pbmZvLWRpYWxvZy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGNBQUE7RUFDQSxZQUFBO0VBQ0EsWUFBQTtFQUNBLFdBQUE7RUFDQSxnQkFBQTtFQUNBLHFCQUFBO0FBQ0Y7O0FBRUE7RUFDRSx3QkFBQTtFQUFBLG1CQUFBO0VBQ0EsV0FBQTtFQUNBLGdCQUFBO0FBQ0Y7QUFFQSxnckJBQWdyQiIsInNvdXJjZXNDb250ZW50IjpbIi5yZWFkT25seVRleHQge1xuICBkaXNwbGF5OiBibG9jaztcbiAgYm9yZGVyOiBub25lO1xuICByZXNpemU6IG5vbmU7XG4gIHdpZHRoOiAxMDAlO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICB3aGl0ZS1zcGFjZTogcHJlLXdyYXA7XG59XG5cbi5jb250ZW50IHtcbiAgaGVpZ2h0OiBmaXQtY29udGVudDtcbiAgd2lkdGg6IDMwdnc7XG4gIG92ZXJmbG93OiBoaWRkZW47XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 */"] + }); +} + +/***/ }), + +/***/ 23958: +/*!**************************************************************************************************!*\ + !*** ./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.ts ***! + \**************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LabelDictionaryDialogComponent: () => (/* binding */ LabelDictionaryDialogComponent) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _LabelDictionary_label_dictionary_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../LabelDictionary/label-dictionary.component */ 86328); + + + +class LabelDictionaryDialogComponent { + constructor(dialogRef) { + this.dialogRef = dialogRef; + } + close() { + this.dialogRef.close(); + } + static #_ = this.ɵfac = function LabelDictionaryDialogComponent_Factory(t) { + return new (t || LabelDictionaryDialogComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_material_dialog__WEBPACK_IMPORTED_MODULE_2__.MatDialogRef)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ + type: LabelDictionaryDialogComponent, + selectors: [["app-label-dictionary-dialog"]], + decls: 4, + vars: 0, + consts: [[3, "closeEmitter"]], + template: function LabelDictionaryDialogComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "mat-dialog-content")(1, "h2"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](2, "Label Dictionary"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](3, "app-label-dictionary", 0); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("closeEmitter", function LabelDictionaryDialogComponent_Template_app_label_dictionary_closeEmitter_3_listener() { + return ctx.close(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()(); + } + }, + dependencies: [_LabelDictionary_label_dictionary_component__WEBPACK_IMPORTED_MODULE_0__.LabelDictionaryComponent, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_2__.MatDialogContent], + styles: ["/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJsYWJlbC1kaWN0aW9uYXJ5LWRpYWxvZy5jb21wb25lbnQuc2NzcyJ9 */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL0RpYWxvZy9sYWJlbC1kaWN0aW9uYXJ5LWRpYWxvZy9sYWJlbC1kaWN0aW9uYXJ5LWRpYWxvZy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0Esd0xBQXdMIiwic291cmNlUm9vdCI6IiJ9 */"] + }); +} + +/***/ }), + +/***/ 62748: +/*!***************************************************************************************************!*\ + !*** ./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.ts ***! + \***************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DetailsListItemComponent: () => (/* binding */ DetailsListItemComponent) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/material/form-field */ 48913); + + +class DetailsListItemComponent { + constructor() { + this.iconInitiated = false; + } + get id() { + return 'domain-configuration-details-icon-' + this.icon.name.toLowerCase() + '-' + (this.icon.isWorkObject ? 'workobject' : 'actor'); + } + get name() { + return this.icon.name; + } + ngAfterViewChecked() { + this.createIcon(); + } + createIcon() { + const img = document.getElementById(this.id); + if (img && !this.iconInitiated) { + img.src = '' + this.icon.svg; + this.iconInitiated = true; + } + } + static #_ = this.ɵfac = function DetailsListItemComponent_Factory(t) { + return new (t || DetailsListItemComponent)(); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ + type: DetailsListItemComponent, + selectors: [["app-details-list-item"]], + inputs: { + icon: "icon" + }, + decls: 4, + vars: 4, + consts: [[1, "detailsListItem"], [1, "icon", 3, "id", "alt", "src"], [1, "iconName"]], + template: function DetailsListItemComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](1, "img", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](2, "mat-label", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()(); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpropertyInterpolate"]("id", ctx.id); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpropertyInterpolate"]("alt", ctx.name); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("src", ctx.icon.svg, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsanitizeUrl"]); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](ctx.icon.name); + } + }, + dependencies: [_angular_material_form_field__WEBPACK_IMPORTED_MODULE_1__.MatLabel], + styles: [".icon[_ngcontent-%COMP%] {\n width: 20px;\n height: 20px;\n padding-right: 3px;\n}\n\n.detailsListItem[_ngcontent-%COMP%] {\n display: flex;\n justify-items: center;\n align-items: center;\n width: 250px;\n}\n\n.iconName[_ngcontent-%COMP%] {\n max-width: 225px;\n word-wrap: anywhere;\n white-space: pre-wrap !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRldGFpbHMtbGlzdC1pdGVtLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsV0FBQTtFQUNBLFlBQUE7RUFDQSxrQkFBQTtBQUNGOztBQUVBO0VBQ0UsYUFBQTtFQUNBLHFCQUFBO0VBQ0EsbUJBQUE7RUFDQSxZQUFBO0FBQ0Y7O0FBRUE7RUFDRSxnQkFBQTtFQUNBLG1CQUFBO0VBQ0EsZ0NBQUE7QUFDRiIsImZpbGUiOiJkZXRhaWxzLWxpc3QtaXRlbS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5pY29uIHtcbiAgd2lkdGg6IDIwcHg7XG4gIGhlaWdodDogMjBweDtcbiAgcGFkZGluZy1yaWdodDogM3B4O1xufVxuXG4uZGV0YWlsc0xpc3RJdGVtIHtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1pdGVtczogY2VudGVyO1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICB3aWR0aDogMjUwcHg7XG59XG5cbi5pY29uTmFtZSB7XG4gIG1heC13aWR0aDogMjI1cHg7XG4gIHdvcmQtd3JhcDogYW55d2hlcmU7XG4gIHdoaXRlLXNwYWNlOiBwcmUtd3JhcCAhaW1wb3J0YW50O1xufVxuIl19 */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL0RvbWFpbkNvbmZpZ3VyYXRpb24vZGV0YWlscy1saXN0LWl0ZW0vZGV0YWlscy1saXN0LWl0ZW0uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxXQUFBO0VBQ0EsWUFBQTtFQUNBLGtCQUFBO0FBQ0Y7O0FBRUE7RUFDRSxhQUFBO0VBQ0EscUJBQUE7RUFDQSxtQkFBQTtFQUNBLFlBQUE7QUFDRjs7QUFFQTtFQUNFLGdCQUFBO0VBQ0EsbUJBQUE7RUFDQSxnQ0FBQTtBQUNGO0FBQ0Esb3lCQUFveUIiLCJzb3VyY2VzQ29udGVudCI6WyIuaWNvbiB7XG4gIHdpZHRoOiAyMHB4O1xuICBoZWlnaHQ6IDIwcHg7XG4gIHBhZGRpbmctcmlnaHQ6IDNweDtcbn1cblxuLmRldGFpbHNMaXN0SXRlbSB7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGp1c3RpZnktaXRlbXM6IGNlbnRlcjtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgd2lkdGg6IDI1MHB4O1xufVxuXG4uaWNvbk5hbWUge1xuICBtYXgtd2lkdGg6IDIyNXB4O1xuICB3b3JkLXdyYXA6IGFueXdoZXJlO1xuICB3aGl0ZS1zcGFjZTogcHJlLXdyYXAgIWltcG9ydGFudDtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= */"] + }); +} + +/***/ }), + +/***/ 58414: +/*!*********************************************************************************************!*\ + !*** ./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.ts ***! + \*********************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IconListItemComponent: () => (/* binding */ IconListItemComponent) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Service/IconSetConfiguration/icon-set-customization.service */ 87007); +/* harmony import */ var _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/button-toggle */ 68529); + + + + +class IconListItemComponent { + get name() { + return this.iconName; + } + get id() { + return 'domain-configuration-icon-' + this.iconName; + } + constructor(iconSetCustomizationService) { + this.iconSetCustomizationService = iconSetCustomizationService; + this.iconName = ''; + this.iconInitiated = false; + // @ts-ignore + this.icon = new rxjs__WEBPACK_IMPORTED_MODULE_1__.BehaviorSubject({}); + this.isActor = false; + this.isWorkobject = false; + this.isNone = true; + } + ngOnInit() { + this.icon = this.iconSetCustomizationService.getIconForName(this.iconName); + if (!this.icon) { + return; + } + this.icon.subscribe(value => { + this.isActor = value.isActor; + this.isWorkobject = value.isWorkObject; + this.isNone = !(value.isActor || value.isWorkObject); + }); + this.isActor = this.icon.value.isActor; + this.isWorkobject = this.icon.value.isWorkObject; + this.isNone = !(this.icon.value.isActor || this.icon.value.isWorkObject); + } + ngAfterViewChecked() { + this.createIcon(); + } + createIcon() { + const img = document.getElementById(this.id); + if (img && !this.iconInitiated) { + img.src = '' + this.icon.value?.svg; + this.iconInitiated = true; + } + } + toggleNone() { + this.iconSetCustomizationService.setAsUnassigned(this.iconName, this.icon.value.isActor); + } + toggleActor() { + this.iconSetCustomizationService.setAsActor(true, this.iconName); + } + toggleWorkobject() { + this.iconSetCustomizationService.setAsWorkobject(true, this.iconName); + } + static #_ = this.ɵfac = function IconListItemComponent_Factory(t) { + return new (t || IconListItemComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdirectiveInject"](_Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_0__.IconSetCustomizationService)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineComponent"]({ + type: IconListItemComponent, + selectors: [["app-icon-list-item"]], + inputs: { + iconName: "iconName" + }, + decls: 16, + vars: 13, + consts: [[1, "IconContainer"], [1, "content"], ["src", "", 1, "icon", 3, "id", "alt"], [1, "name"], [1, "footer"], [3, "change", "value", "checked"], [1, "toggleButtonTitle"]], + template: function IconListItemComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](0, "div", 0)(1, "div", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelement"](2, "img", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](3, "div", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](4); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](5, "div", 4)(6, "mat-button-toggle-group")(7, "mat-button-toggle", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("change", function IconListItemComponent_Template_mat_button_toggle_change_7_listener() { + return ctx.toggleNone(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](8, "span", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](9, "None"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](10, "mat-button-toggle", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("change", function IconListItemComponent_Template_mat_button_toggle_change_10_listener() { + return ctx.toggleActor(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](11, "span", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](12, "Actor"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](13, "mat-button-toggle", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵlistener"]("change", function IconListItemComponent_Template_mat_button_toggle_change_13_listener() { + return ctx.toggleWorkobject(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementStart"](14, "span", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtext"](15, "Workobject"); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵelementEnd"]()()()()(); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵpropertyInterpolate"]("id", ctx.id); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵpropertyInterpolate"]("alt", ctx.name); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵtextInterpolate"](ctx.name); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", ctx.isNone)("checked", ctx.isNone); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵclassProp"]("activeMatButtonActor", ctx.isActor); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", ctx.isActor)("checked", ctx.isActor); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵadvance"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵclassProp"]("activeMatButtonWorkObject", ctx.isWorkobject); + _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵproperty"]("value", ctx.isWorkobject)("checked", ctx.isWorkobject); + } + }, + dependencies: [_angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_3__.MatButtonToggleGroup, _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_3__.MatButtonToggle], + styles: [".IconContainer[_ngcontent-%COMP%] {\n width: 170px;\n height: 170px;\n}\n\n.content[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: auto auto;\n justify-items: center;\n}\n\n.icon[_ngcontent-%COMP%] {\n width: 50px;\n height: 50px;\n}\n\n.name[_ngcontent-%COMP%] {\n word-wrap: anywhere;\n max-height: 75px;\n overflow: hidden;\n padding-bottom: 2px;\n}\n\n.footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n}\n.footer[_ngcontent-%COMP%] .mat-button-toggle-label-content {\n font-size: 10pt !important;\n padding: 0 5px !important;\n line-height: inherit !important;\n}\n.footer[_ngcontent-%COMP%] .activeMatButtonActor button {\n background-color: #43acbf;\n color: #ffffff;\n}\n.footer[_ngcontent-%COMP%] .activeMatButtonWorkObject button {\n background-color: #0168b7;\n color: #ffffff;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImljb24tbGlzdC1pdGVtLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsWUFBQTtFQUNBLGFBQUE7QUFDRjs7QUFFQTtFQUNFLGFBQUE7RUFDQSw2QkFBQTtFQUNBLHFCQUFBO0FBQ0Y7O0FBRUE7RUFDRSxXQUFBO0VBQ0EsWUFBQTtBQUNGOztBQUVBO0VBQ0UsbUJBQUE7RUFDQSxnQkFBQTtFQUNBLGdCQUFBO0VBQ0EsbUJBQUE7QUFDRjs7QUFFQTtFQUNFLGFBQUE7RUFDQSx1QkFBQTtBQUNGO0FBQ0U7RUFDRSwwQkFBQTtFQUNBLHlCQUFBO0VBQ0EsK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XJlO1xuICBtYXgtaGVpZ2h0OiA3NXB4O1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBwYWRkaW5nLWJvdHRvbTogMnB4O1xufVxuXG4uZm9vdGVyIHtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cbiAgOjpuZy1kZWVwLm1hdC1idXR0b24tdG9nZ2xlLWxhYmVsLWNvbnRlbnQge1xuICAgIGZvbnQtc2l6ZTogMTBwdCAhaW1wb3J0YW50O1xuICAgIHBhZGRpbmc6IDAgNXB4ICFpbXBvcnRhbnQ7XG4gICAgbGluZS1oZWlnaHQ6IGluaGVyaXQgIWltcG9ydGFudDtcbiAgfVxuXG4gIDo6bmctZGVlcC5hY3RpdmVNYXRCdXR0b25BY3RvciBidXR0b24ge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICM0M2FjYmY7XG4gICAgY29sb3I6ICNmZmZmZmY7XG4gIH1cblxuICA6Om5nLWRlZXAuYWN0aXZlTWF0QnV0dG9uV29ya09iamVjdCBidXR0b24ge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICMwMTY4Yjc7XG4gICAgY29sb3I6ICNmZmZmZmY7XG4gIH1cbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= */"] + }); +} + +/***/ }), + +/***/ 38574: +/*!**************************************************************************************!*\ + !*** ./src/app/Presentation/DomainConfiguration/icon-set-configuration.component.ts ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IconSetConfigurationComponent: () => (/* binding */ IconSetConfigurationComponent) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var src_app_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/iconSetConfiguration */ 84738); +/* harmony import */ var src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Utils/sanitizer */ 66107); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Domain/Icon-Set-Configuration/iconFilterEnum */ 36105); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-set-configuration.service */ 10200); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-dictionary.service */ 93689); +/* harmony import */ var _Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Service/IconSetConfiguration/icon-set-customization.service */ 87007); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/material/button */ 95912); +/* harmony import */ var _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/material/grid-list */ 84533); +/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/material/input */ 29836); +/* harmony import */ var _icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./icon-list-item/icon-list-item.component */ 58414); +/* harmony import */ var _icon_set_details_icon_set_details_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./icon-set-details/icon-set-details.component */ 79052); + + + + + + + + + + + + + + + + +function IconSetConfigurationComponent_mat_grid_tile_46_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](0, "mat-grid-tile", 24); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](1, "app-icon-list-item", 25); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); + } + if (rf & 2) { + const iconName_r1 = ctx.$implicit; + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵproperty"]("colspan", 1)("rowspan", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵproperty"]("iconName", iconName_r1); + } +} +class IconSetConfigurationComponent { + constructor(configurationService, iconDictionaryService, iconSetCustomizationService, elementRegistryService) { + this.configurationService = configurationService; + this.iconDictionaryService = iconDictionaryService; + this.iconSetCustomizationService = iconSetCustomizationService; + this.elementRegistryService = elementRegistryService; + this.filter = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); + this.selectedActors = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); + this.selectedWorkobjects = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); + this.allIconNames = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); + this.allFilteredIconNames = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject([]); + this.iconSetConfigurationTypes = this.iconSetCustomizationService.getIconSetConfiguration().value; + this.allIcons = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject(this.iconDictionaryService.getFullDictionary()); + this.allIcons.subscribe(allIcons => { + this.allIconNames.next(allIcons.keysArray().sort(this.sortByName)); + }); + this.selectedActors = this.iconSetCustomizationService.selectedActors$; + this.selectedWorkobjects = this.iconSetCustomizationService.selectedWorkobjects$; + } + ngOnInit() { + this.filter.subscribe(type => { + let allFiltered = this.getFilteredNamesForType(type); + this.allFilteredIconNames.next(allFiltered.sort(this.sortByName)); + }); + } + sortByName(a, b) { + if (a.includes('_custom') == b.includes('_custom')) { + if (a < b) return -1;else { + return 1; + } + } else { + if (a.includes('_custom')) { + return -1; + } else { + return 1; + } + } + } + /** Default Icon Set **/ + loadMinimalIconConfigurationWithDefaultIcons() { + this.iconSetCustomizationService.resetIconSet(); + } + loadInitialConfiguration() { + this.iconSetCustomizationService.cancel(); + } + /** Persist Icon Set **/ + saveIconSet() { + this.iconSetCustomizationService.saveIconSet(this.elementRegistryService.getUsedIcons()); + } + exportIconSet() { + this.iconSetCustomizationService.exportIconSet(); + } + /** Add Custom Icon **/ + startIconUpload() { + document.getElementById('importIcon')?.click(); + } + importIcon() { + // @ts-ignore + const files = document.getElementById('importIcon').files; + for (let iconInputFile of files) { + const reader = new FileReader(); + const name = (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_1__.sanitizeIconName)(iconInputFile.name); + const iconName = name + '_custom'; + reader.onloadend = e => { + if (e.target) { + const src = e.target.result; + this.iconDictionaryService.addIMGToIconDictionary(src, iconName); + // TODO: td: What kind of type is it here? + this.iconDictionaryService.registerIconForBPMN(iconName, src, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR); + this.allIcons.next(this.iconDictionaryService.getFullDictionary()); + this.filter.next(this.filter.value); + this.iconSetCustomizationService.addNewIcon(iconName); + } + }; + reader.readAsDataURL(iconInputFile); + } + } + /** Import Icon Set **/ + startIconSetImport() { + document.getElementById('importDomain')?.click(); + } + importIconSet() { + // @ts-ignore + const iconSetInputFile = document.getElementById('importDomain').files[0]; + const reader = new FileReader(); + reader.onloadend = e => { + const configFromFile = JSON.parse(e.target?.result); + const config = (0,src_app_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_0__.fromConfigurationFromFile)(configFromFile); + this.configurationService.loadConfiguration(config, false); + this.iconSetCustomizationService.importConfiguration(config); + }; + reader.readAsText(iconSetInputFile); + } + /** Filter **/ + filterForActors() { + if (this.filter.value !== _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_ACTOR) { + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_ACTOR); + } else { + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); + } + } + filterForWorkobjects() { + if (this.filter.value !== _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_WORKOBJECT) { + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_WORKOBJECT); + } else { + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); + } + } + filterForUnassigned() { + if (this.filter.value !== _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_UNASSIGNED) { + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_UNASSIGNED); + } else { + this.filter.next(_Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE); + } + } + filterByNameAndType($event) { + const filteredByNameAndType = this.getFilteredNamesForType(this.filter.value).filter(name => name.toLowerCase().includes($event.target.value.toLowerCase())); + this.allFilteredIconNames.next(filteredByNameAndType.sort(this.sortByName)); + } + getFilteredNamesForType(type) { + let allFiltered = []; + switch (type) { + case _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_NONE: + allFiltered = this.allIconNames.value; + break; + case _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_ACTOR: + allFiltered = this.allIconNames.value.filter(name => this.iconSetCustomizationService.isIconActor(name)); + break; + case _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_WORKOBJECT: + allFiltered = this.allIconNames.value.filter(name => this.iconSetCustomizationService.isIconWorkObject(name)); + break; + case _Domain_Icon_Set_Configuration_iconFilterEnum__WEBPACK_IMPORTED_MODULE_3__.IconFilterEnum.ICON_FILTER_UNASSIGNED: + allFiltered = this.allIconNames.value.filter(name => !this.iconSetCustomizationService.isIconActor(name) && !this.iconSetCustomizationService.isIconWorkObject(name)); + break; + } + return allFiltered; + } + static #_ = this.ɵfac = function IconSetConfigurationComponent_Factory(t) { + return new (t || IconSetConfigurationComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_4__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](_Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_6__.IconSetCustomizationService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdirectiveInject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_7__.ElementRegistryService)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdefineComponent"]({ + type: IconSetConfigurationComponent, + selectors: [["app-icon-set-configuration"]], + decls: 49, + vars: 15, + consts: [[1, "content"], [1, "header"], [1, "searchbar"], ["mat-button", "", "title", "Unassigned Icons", 3, "click"], ["mat-button", "", "title", "Actors", 3, "click"], ["mat-button", "", "title", "Workobjects", 3, "click"], ["matInput", "", "type", "text", "placeholder", "Filter by name", 1, "textInput", 3, "input"], [1, "buttons"], ["mat-button", "", "title", "Upload Icon", 3, "click"], [1, "material-icons-outlined", "materialIconButton"], ["type", "file", "multiple", "", "accept", ".svg, image/png, image/jpeg, image/gif, image/bpmn", "id", "importIcon", "name", "file", "onclick", "this.value=null", 2, "display", "none", 3, "change"], ["mat-button", "", "title", "Reset to default icon set", 1, "button", 3, "click"], ["mat-button", "", "title", "Cancel changes", 3, "click"], [1, "divider"], ["mat-button", "", "title", "Save icon set", 3, "click"], ["mat-button", "", "title", "Import icon set", 3, "click"], ["type", "file", "accept", ".domain, .iconset", "id", "importDomain", "name", "file", "onclick", "this.value=null", 2, "display", "none", 3, "change"], ["mat-button", "", "title", "Export icon set", 3, "click"], [1, "iconSetConfiguration"], [1, "icons"], [1, "iconList", "smallScrollbar"], ["cols", "8", "rowHeight", "170px"], [3, "colspan", "rowspan", 4, "ngFor", "ngForOf"], [1, "iconSetDetails"], [3, "colspan", "rowspan"], [1, "iconListItem", 3, "iconName"]], + template: function IconSetConfigurationComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](0, "div", 0)(1, "div")(2, "div", 1)(3, "div", 2)(4, "div"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](5, "Filter by assignment:"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](6, "button", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](7, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_6_listener() { + return ctx.filterForUnassigned(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](8, "span"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](9, "None"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](10, "button", 4); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](11, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_10_listener() { + return ctx.filterForActors(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](12, "span"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](13, "Actors"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](14, "button", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](15, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_14_listener() { + return ctx.filterForWorkobjects(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](16, "span"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](17, "Workobjects"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](18, "input", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("input", function IconSetConfigurationComponent_Template_input_input_18_listener($event) { + return ctx.filterByNameAndType($event); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](19, "div", 7)(20, "button", 8); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_20_listener() { + return ctx.startIconUpload(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](21, "span", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](22, "upload"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](23, "input", 10); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("change", function IconSetConfigurationComponent_Template_input_change_23_listener() { + return ctx.importIcon(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](24, "button", 11); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_24_listener() { + return ctx.loadMinimalIconConfigurationWithDefaultIcons(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](25, "span", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](26, " home "); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](27, "button", 12); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_27_listener() { + return ctx.loadInitialConfiguration(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](28, "span", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](29, "close"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](30, "div", 13); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](31, "button", 14); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_31_listener() { + return ctx.saveIconSet(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](32, "span", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](33, "save"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](34, "div", 13); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](35, "button", 15); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_35_listener() { + return ctx.startIconSetImport(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](36, "span", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](37, "unarchive"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](38, "input", 16); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("change", function IconSetConfigurationComponent_Template_input_change_38_listener() { + return ctx.importIconSet(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](39, "button", 17); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵlistener"]("click", function IconSetConfigurationComponent_Template_button_click_39_listener() { + return ctx.exportIconSet(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](40, "span", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtext"](41, "archive"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()()()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementStart"](42, "div", 18)(43, "div", 19)(44, "div", 20)(45, "mat-grid-list", 21); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵtemplate"](46, IconSetConfigurationComponent_mat_grid_tile_46_Template, 2, 3, "mat-grid-tile", 22); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipe"](47, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"]()()()()(); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelement"](48, "app-icon-set-details", 23); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵelementEnd"](); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](6); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵclassProp"]("activeNone", _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](7, 7, ctx.filter) === "ICON_FILTER_UNASSIGNED"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](4); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵclassProp"]("activeActor", _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](11, 9, ctx.filter) === "ICON_FILTER_ACTOR"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](4); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵclassProp"]("activeWorkObject", _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](15, 11, ctx.filter) === "ICON_FILTER_WORKOBJECT"); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵadvance"](32); + _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵproperty"]("ngForOf", _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵpipeBind1"](47, 13, ctx.allFilteredIconNames)); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_12__.NgForOf, _angular_material_button__WEBPACK_IMPORTED_MODULE_13__.MatButton, _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_14__.MatGridList, _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_14__.MatGridTile, _angular_material_input__WEBPACK_IMPORTED_MODULE_15__.MatInput, _icon_list_item_icon_list_item_component__WEBPACK_IMPORTED_MODULE_8__.IconListItemComponent, _icon_set_details_icon_set_details_component__WEBPACK_IMPORTED_MODULE_9__.IconSetDetailsComponent, _angular_common__WEBPACK_IMPORTED_MODULE_12__.AsyncPipe], + styles: [".content[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: auto 250px;\n}\n\n.header[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: max-content auto;\n height: 46px;\n border-bottom: #ccc 2px solid;\n}\n\n.searchbar[_ngcontent-%COMP%] {\n display: inline-flex;\n margin-left: 15px;\n margin-right: 15px;\n align-self: center;\n align-items: center;\n justify-self: left;\n height: inherit;\n border-right: #ccc 2px solid;\n}\n\n.buttons[_ngcontent-%COMP%] {\n display: inline-flex;\n align-self: center;\n align-items: center;\n justify-self: right;\n height: inherit;\n}\n.buttons[_ngcontent-%COMP%] .mat-button {\n min-width: 36px;\n}\n\n.divider[_ngcontent-%COMP%] {\n border-left: #ccc 2px solid;\n height: inherit;\n}\n\n.button[_ngcontent-%COMP%] {\n width: 36px;\n}\n\n.mat-button[_ngcontent-%COMP%] {\n color: #666666;\n}\n\n.iconSetConfiguration[_ngcontent-%COMP%] {\n padding-left: 10px;\n padding-bottom: 5px;\n margin-top: 15px;\n height: 100%;\n}\n\n.icons[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: 2rem auto;\n height: 100%;\n grid-row-gap: 1px;\n}\n\n.activeActor[_ngcontent-%COMP%] {\n background-color: #42aebb;\n color: white;\n}\n\n.activeNone[_ngcontent-%COMP%] {\n background-color: #e0e0e0;\n color: black;\n}\n\n.activeWorkObject[_ngcontent-%COMP%] {\n background-color: #42aebb;\n color: white;\n}\n\n.textInput[_ngcontent-%COMP%] {\n width: 300px;\n margin-left: 15px;\n margin-right: 5px;\n border: #666666 1px solid;\n}\n\n.iconList[_ngcontent-%COMP%] {\n display: grid;\n overflow-y: scroll;\n height: calc(100vh - 130px);\n}\n\n.iconSetDetails[_ngcontent-%COMP%] {\n overflow-y: scroll;\n width: 250px;\n height: calc(100vh - 65px);\n}\n\n .mat-grid-tile .mat-grid-tile-content {\n justify-content: inherit;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImljb24tc2V0LWNvbmZpZ3VyYXRpb24uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxhQUFBO0VBQ0EsaUNBQUE7QUFDRjs7QUFFQTtFQUNFLGFBQUE7RUFDQSx1Q0FBQTtFQUNBLFlBQUE7RUFDQSw2QkFBQTtBQUNGOztBQUVBO0VBQ0Usb0JBQUE7RUFDQSxpQkFBQTtFQUNBLGtCQUFBO0VBQ0Esa0JBQUE7RUFDQSxtQkFBQTtFQUNBLGtCQUFBO0VBQ0EsZUFBQTtFQUNBLDRCQUFBO0FBQ0Y7O0FBRUE7RUFDRSxvQkFBQTtFQUNBLGtCQUFBO0VBQ0EsbUJBQUE7RUFDQSxtQkFBQTtFQUNBLGVBQUE7QUFDRjtBQUNFO0VBQ0UsZUFBQTtBQUNKOztBQUdBO0VBQ0UsMkJBQUE7RUFDQSxlQUFBO0FBQUY7O0FBR0E7RUFDRSxXQUFBO0FBQUY7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mFja2dyb3VuZC1jb2xvcjogI2UwZTBlMDtcbiAgY29sb3I6IGJsYWNrO1xufVxuXG4uYWN0aXZlV29ya09iamVjdCB7XG4gIGJhY2tncm91bmQtY29sb3I6ICM0MmFlYmI7XG4gIGNvbG9yOiB3aGl0ZTtcbn1cblxuLnRleHRJbnB1dCB7XG4gIHdpZHRoOiAzMDBweDtcbiAgbWFyZ2luLWxlZnQ6IDE1cHg7XG4gIG1hcmdpbi1yaWdodDogNXB4O1xuICBib3JkZXI6ICM2NjY2NjYgMXB4IHNvbGlkO1xufVxuXG4uaWNvbkxpc3Qge1xuICBkaXNwbGF5OiBncmlkO1xuICBvdmVyZmxvdy15OiBzY3JvbGw7XG4gIGhlaWdodDogY2FsYygxMDB2aCAtIDEzMHB4KTtcbn1cblxuLmljb25TZXREZXRhaWxzIHtcbiAgb3ZlcmZsb3cteTogc2Nyb2xsO1xuICB3aWR0aDogMjUwcHg7XG4gIGhlaWdodDogY2FsYygxMDB2aCAtIDY1cHgpO1xufVxuXG46Om5nLWRlZXAubWF0LWdyaWQtdGlsZSB7XG4gIC5tYXQtZ3JpZC10aWxlLWNvbnRlbnQge1xuICAgIGp1c3RpZnktY29udGVudDogaW5oZXJpdDtcbiAgfVxufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */"] + }); +} + +/***/ }), + +/***/ 79052: +/*!*************************************************************************************************!*\ + !*** ./src/app/Presentation/DomainConfiguration/icon-set-details/icon-set-details.component.ts ***! + \*************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IconSetDetailsComponent: () => (/* binding */ IconSetDetailsComponent) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-set-customization.service */ 87007); +/* harmony import */ var src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Service/Title/title.service */ 69672); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/forms */ 48015); +/* harmony import */ var _angular_material_list__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/list */ 68708); +/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/form-field */ 48913); +/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/material/input */ 29836); +/* harmony import */ var _details_list_item_details_list_item_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../details-list-item/details-list-item.component */ 62748); + + + + + + + + + +function IconSetDetailsComponent_mat_list_item_12_Template(rf, ctx) { + if (rf & 1) { + const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "mat-list-item", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("dragover", function IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_dragover_0_listener($event) { + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r1); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r1.allowDrop($event, "actorList")); + })("dragstart", function IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_dragstart_0_listener() { + const i_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r1).index; + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r1.onDragStart(i_r3, "actorList")); + })("drop", function IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_drop_0_listener($event) { + const ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r1); + const iconName_r5 = ctx_r3.$implicit; + const i_r3 = ctx_r3.index; + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r1.onDrop($event, iconName_r5, true, i_r3)); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](1, "app-details-list-item", 8); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); + } + if (rf & 2) { + const iconName_r5 = ctx.$implicit; + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("icon", ctx_r1.getIconForName(iconName_r5)); + } +} +function IconSetDetailsComponent_mat_list_item_18_Template(rf, ctx) { + if (rf & 1) { + const _r6 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "mat-list-item", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("dragover", function IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_dragover_0_listener($event) { + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r6); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r1.allowDrop($event, "workobjectList")); + })("dragstart", function IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_dragstart_0_listener() { + const i_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r6).index; + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r1.onDragStart(i_r7, "workobjectList")); + })("drop", function IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_drop_0_listener($event) { + const ctx_r7 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵrestoreView"](_r6); + const iconName_r9 = ctx_r7.$implicit; + const i_r7 = ctx_r7.index; + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵresetView"](ctx_r1.onDrop($event, iconName_r9, false, i_r7)); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelement"](1, "app-details-list-item", 8); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); + } + if (rf & 2) { + const iconName_r9 = ctx.$implicit; + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵnextContext"](); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("icon", ctx_r1.getIconForName(iconName_r9)); + } +} +class IconSetDetailsComponent { + constructor(customizationService, titleService) { + this.customizationService = customizationService; + this.draggedList = ''; + this.draggedIndex = 0; + this.selectedActors$ = this.customizationService.selectedActors$; + this.selectedWorkobjects$ = this.customizationService.selectedWorkobjects$; + this.iconSetName = titleService.iconSetName$; + } + ngOnInit() {} + changeName(event) { + // @ts-ignore + this.customizationService.changeName(event.target.value); + } + getIconForName(iconName) { + return this.customizationService.getIconForName(iconName).value; + } + allowDrop($event, listName) { + if (this.draggedList === listName) { + $event.preventDefault(); + } + } + onDrop($event, iconName, actors, index) { + let list; + if (actors) { + list = this.selectedActors$; + } else { + list = this.selectedWorkobjects$; + } + const sortedList = list.value; + const item = sortedList[this.draggedIndex]; + sortedList.splice(this.draggedIndex, 1); + sortedList.splice(index, 0, item); + list.next(sortedList); + if (actors) { + this.customizationService.setSelectedActors(sortedList); + } else { + this.customizationService.setSelectedWorkObject(sortedList); + } + } + onDragStart(index, draggedList) { + this.draggedList = draggedList; + this.draggedIndex = index; + } + static #_ = this.ɵfac = function IconSetDetailsComponent_Factory(t) { + return new (t || IconSetDetailsComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](src_app_Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_0__.IconSetCustomizationService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdirectiveInject"](src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_1__.TitleService)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineComponent"]({ + type: IconSetDetailsComponent, + selectors: [["app-icon-set-details"]], + decls: 20, + vars: 9, + consts: [[1, "details", "smallScrollbar"], [1, "iconSetDetails", "bottom-border"], [1, "inputWidth"], ["matInput", "", "type", "text", 3, "input", "value"], [1, "actorList", "bottom-border"], ["class", "compactItem", "draggable", "true", 3, "dragover", "dragstart", "drop", 4, "ngFor", "ngForOf"], [1, "workobjectList"], ["draggable", "true", 1, "compactItem", 3, "dragover", "dragstart", "drop"], [3, "icon"]], + template: function IconSetDetailsComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](0, "div", 0)(1, "div", 1)(2, "h3"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](3, "Icon Set Name"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](4, "form")(5, "mat-form-field", 2)(6, "input", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](7, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵlistener"]("input", function IconSetDetailsComponent_Template_input_input_6_listener($event) { + return ctx.changeName($event); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()()(); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](8, "div", 4)(9, "h3"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](10, "Order of Actors"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](11, "mat-list"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](12, IconSetDetailsComponent_mat_list_item_12_Template, 2, 1, "mat-list-item", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](13, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](14, "div", 6)(15, "h3"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtext"](16, "Order of Work Objects"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementStart"](17, "mat-list"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵtemplate"](18, IconSetDetailsComponent_mat_list_item_18_Template, 2, 1, "mat-list-item", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipe"](19, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵelementEnd"]()()(); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](6); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("value", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](7, 3, ctx.iconSetName)); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](6); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngForOf", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](13, 5, ctx.selectedActors$)); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵadvance"](6); + _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵproperty"]("ngForOf", _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵpipeBind1"](19, 7, ctx.selectedWorkobjects$)); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_4__.NgForOf, _angular_forms__WEBPACK_IMPORTED_MODULE_5__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_5__.NgForm, _angular_material_list__WEBPACK_IMPORTED_MODULE_6__.MatList, _angular_material_list__WEBPACK_IMPORTED_MODULE_6__.MatListItem, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_7__.MatFormField, _angular_material_input__WEBPACK_IMPORTED_MODULE_8__.MatInput, _details_list_item_details_list_item_component__WEBPACK_IMPORTED_MODULE_2__.DetailsListItemComponent, _angular_common__WEBPACK_IMPORTED_MODULE_4__.AsyncPipe], + styles: [".details[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: 68px auto auto;\n min-height: 100vh;\n grid-row-gap: 1px;\n overflow-y: scroll;\n overflow-x: hidden;\n width: 250px;\n border-left: solid 1px #ccc;\n}\n\n.iconSetDetails[_ngcontent-%COMP%] {\n margin-top: 10px;\n}\n.iconSetDetails[_ngcontent-%COMP%] .mat-mdc-form-field-infix {\n border: none;\n padding-bottom: 0 !important;\n padding-top: 0 !important;\n}\n.iconSetDetails[_ngcontent-%COMP%] .mdc-text-field {\n padding-left: 0 !important;\n}\n\n.compactItem[_ngcontent-%COMP%] {\n height: 40px !important;\n}\n\n.fullWidth[_ngcontent-%COMP%] {\n width: 100%;\n padding-left: 15px;\n}\n\n.inputWidth[_ngcontent-%COMP%] {\n width: 200px;\n padding-left: 15px;\n height: 46px;\n}\n\nh3[_ngcontent-%COMP%] {\n padding-left: 15px;\n margin-bottom: 0;\n font-weight: bold;\n}\n\nmat-list[_ngcontent-%COMP%] {\n overflow: auto;\n padding-top: 0;\n}\n\n.bottom-border[_ngcontent-%COMP%] {\n border-bottom: 2px solid #ccc;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImljb24tc2V0LWRldGFpbHMuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxhQUFBO0VBQ0Esa0NBQUE7RUFDQSxpQkFBQTtFQUNBLGlCQUFBO0VBQ0Esa0JBQUE7RUFDQSxrQkFBQTtFQUNBLFlBQUE7RUFDQSwyQkFBQTtBQUNGOztBQUVBO0VBQ0UsZ0JBQUE7QUFDRjtBQUNFO0VBQ0UsWUFBQTtFQUNBLDRCQUFBO0VBQ0EseUJBQUE7QUFDSjtBQUVFO0VBQ0UsMEJBQUE7QUFBSjs7QUFJQTtFQUNFLHVCQUFBO0FBREY7O0FBSUE7RUFDRSxXQUFBO0VBQ0Esa0JBQUE7QUFERjs7QUFJQTtFQUNFLFlBQUE7RUFDQSxrQkFBQTtFQUNBLFlBQUE7QUFERjs7QUFJQTtFQUNFLGtCQUFBO0VBQ0EsZ0JBQUE7RUFDQSxpQkFBQTtBQURGOztBQUlBO0VBQ0UsY0FBQTtFQUNBLGNBQUE7QUFERjs7QUFJQTtFQUNFLDZCQUFBO0FBREYiLCJmaWxlIjoiaWNvbi1zZXQtZGV0YW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sO1xuICBvdmVyZmxvdy14OiBoaWRkZW47XG4gIHdpZHRoOiAyNTBweDtcbiAgYm9yZGVyLWxlZnQ6IHNvbGlkIDFweCAjY2NjO1xufVxuXG4uaWNvblNldERldGFpbHMge1xuICBtYXJnaW4tdG9wOiAxMHB4O1xuXG4gIDo6bmctZGVlcC5tYXQtbWRjLWZvcm0tZmllbGQtaW5maXgge1xuICAgIGJvcmRlcjogbm9uZTtcbiAgICBwYWRkaW5nLWJvdHRvbTogMCAhaW1wb3J0YW50O1xuICAgIHBhZGRpbmctdG9wOiAwICFpbXBvcnRhbnQ7XG4gIH1cblxuICA6Om5nLWRlZXAubWRjLXRleHQtZmllbGQge1xuICAgIHBhZGRpbmctbGVmdDogMCAhaW1wb3J0YW50O1xuICB9XG59XG5cbi5jb21wYWN0SXRlbSB7XG4gIGhlaWdodDogNDBweCAhaW1wb3J0YW50O1xufVxuXG4uZnVsbFdpZHRoIHtcbiAgd2lkdGg6IDEwMCU7XG4gIHBhZGRpbmctbGVmdDogMTVweDtcbn1cblxuLmlucHV0V2lkdGgge1xuICB3aWR0aDogMjAwcHg7XG4gIHBhZGRpbmctbGVmdDogMTVweDtcbiAgaGVpZ2h0OiA0NnB4O1xufVxuXG5oMyB7XG4gIHBhZGRpbmctbGVmdDogMTVweDtcbiAgbWFyZ2luLWJvdHRvbTogMDtcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XG59XG5cbm1hdC1saXN0IHtcbiAgb3ZlcmZsb3c6IGF1dG87XG4gIHBhZGRpbmctdG9wOiAwO1xufVxuXG4uYm90dG9tLWJvcmRlciB7XG4gIGJvcmRlci1ib3R0b206IDJweCBzb2xpZCAjY2NjO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */"] + }); +} + +/***/ }), + +/***/ 20409: +/*!*****************************************************************!*\ + !*** ./src/app/Presentation/Header/header-buttons.component.ts ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ HeaderButtonsComponent: () => (/* binding */ HeaderButtonsComponent) +/* harmony export */ }); +/* harmony import */ var _Domain_Dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Dialog/exportDialogData */ 83064); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _Dialog_export_dialog_export_dialog_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Dialog/export-dialog/export-dialog.component */ 97218); +/* harmony import */ var _Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Dialog/infoDialogData */ 45574); +/* harmony import */ var _Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Dialog/info-dialog/info-dialog.component */ 16266); +/* harmony import */ var _Dialog_label_dictionary_dialog_label_dictionary_dialog_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Dialog/label-dictionary-dialog/label-dictionary-dialog.component */ 23958); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Service/Settings/settings.service */ 58124); +/* harmony import */ var _Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Service/Modeler/modeler.service */ 74676); +/* harmony import */ var _Service_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Service/Replay/replay-state.service */ 67820); +/* harmony import */ var _Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Service/DirtyFlag/dirty-flag.service */ 89791); +/* harmony import */ var _Service_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Service/Dialog/dialog.service */ 4730); +/* harmony import */ var _Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Service/Replay/replay.service */ 94788); +/* harmony import */ var _Service_Export_export_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Service/Export/export.service */ 98106); +/* harmony import */ var _Service_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Service/Import/import-domain-story.service */ 23779); +/* harmony import */ var _Service_Title_title_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Service/Title/title.service */ 69672); +/* harmony import */ var _Service_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Service/Renderer/renderer.service */ 94896); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @angular/common */ 39191); + + + + + + + + + + + + + + + + + + + + +function HeaderButtonsComponent_div_0_span_9_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "span", 14); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](1, " archive "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"](); + } +} +function HeaderButtonsComponent_div_0_span_11_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "span", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](1, " archive "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"](); + } +} +function HeaderButtonsComponent_div_0_Template(rf, ctx) { + if (rf & 1) { + const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "div")(1, "button", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_0_Template_button_click_1_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r1); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.startReplay()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](2, "span", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](3, " play_arrow "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](4, "button", 3)(5, "span", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](6, " unarchive "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](7, "input", 4); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("change", function HeaderButtonsComponent_div_0_Template_input_change_7_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r1); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.import()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](8, "button", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_0_Template_button_click_8_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r1); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.openDownloadDialog()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtemplate"](9, HeaderButtonsComponent_div_0_span_9_Template, 2, 0, "span", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipe"](10, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtemplate"](11, HeaderButtonsComponent_div_0_span_11_Template, 2, 0, "span", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipe"](12, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](13, "button", 8); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_0_Template_button_click_13_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r1); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.openLabelDictionary()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](14, "span", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](15, " spellcheck "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](16, "button", 10); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_0_Template_button_click_16_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r1); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.openSettings()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](17, "span", 11); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](18, " settings "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](19, "button", 12); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_0_Template_button_click_19_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r1); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.openKeyboardShortcutsDialog()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](20, "span", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](21, " keyboard "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](22, "button", 13); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_0_Template_button_click_22_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r1); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.createNewDomainStory()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](23, "span", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](24, " note_add "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()()(); + } + if (rf & 2) { + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵclassProp"]("disabled", !ctx_r1.replayService.isReplayable()); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("disabled", !ctx_r1.replayService.isReplayable()); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](7); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵclassProp"]("disabled", !ctx_r1.isExportable()); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("disabled", !ctx_r1.isExportable()); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngIf", !_angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipeBind1"](10, 11, ctx_r1.isDirty$)); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipeBind1"](12, 13, ctx_r1.isDirty$)); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵclassProp"]("disabled", !ctx_r1.exportService.isDomainStoryExportable()); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("disabled", !ctx_r1.exportService.isDomainStoryExportable()); + } +} +function HeaderButtonsComponent_div_2_Template(rf, ctx) { + if (rf & 1) { + const _r3 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](0, "div")(1, "button", 15); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_2_Template_button_click_1_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r3); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.previousSentence()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](2, "span", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](3, " skip_previous "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](4, "button", 16); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_2_Template_button_click_4_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r3); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.nextSentence()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](5, "span", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](6, " skip_next "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](7, "button", 17); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵlistener"]("click", function HeaderButtonsComponent_div_2_Template_button_click_7_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵrestoreView"](_r3); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵresetView"](ctx_r1.stopReplay()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementStart"](8, "span", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtext"](9, " stop "); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵelementEnd"]()()(); + } +} +class HeaderButtonsComponent { + constructor(settingsService, modelerService, replayStateService, dirtyFlagService, dialogService, replayService, exportService, importService, titleService, renderService, snackbar) { + this.settingsService = settingsService; + this.modelerService = modelerService; + this.replayStateService = replayStateService; + this.dirtyFlagService = dirtyFlagService; + this.dialogService = dialogService; + this.replayService = replayService; + this.exportService = exportService; + this.importService = importService; + this.titleService = titleService; + this.renderService = renderService; + this.snackbar = snackbar; + this.isReplay$ = this.replayStateService.replayOn$; + this.isDirty$ = this.dirtyFlagService.dirty$; + } + import() { + // @ts-ignore + const filename = document.getElementById('import').files[0].name; + if (filename.endsWith('.dst')) { + this.importService.importDST( + // @ts-ignore + document.getElementById('import').files[0], filename, false); + } else if (filename.endsWith('.dst.svg')) { + this.importService.importDST( + // @ts-ignore + document.getElementById('import').files[0], filename, true); + } else if (filename.endsWith('.egn')) { + this.importService.importEGN( + // @ts-ignore + document.getElementById('import').files[0], filename, false); + } else if (filename.endsWith('.egn.svg')) { + this.importService.importEGN( + // @ts-ignore + document.getElementById('import').files[0], filename, true); + } + this.modelerService.commandStackChanged(); + } + openSettings() { + this.settingsService.open(); + } + /** Open Dialogs **/ + openDownloadDialog() { + if (this.exportService.isDomainStoryExportable()) { + const SVGDownloadOption = new _Domain_Dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_0__.ExportOption('SVG', 'Download an SVG-Image with the Domain-Story embedded. Can be used to save and share your Domain-Story.', (withTitle, useWhiteBackground) => this.exportService.downloadSVG(withTitle, useWhiteBackground)); + const EGNDownloadOption = new _Domain_Dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_0__.ExportOption('EGN', 'Download an EGN-File with the Domain-Story. Can be used to save and share your Domain-Story.', () => this.exportService.downloadDST()); + const PNGDownloadOption = new _Domain_Dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_0__.ExportOption('PNG', 'Download a PNG-Image of the Domain-Story. This does not include the Domain-Story!', withTitle => this.exportService.downloadPNG(withTitle)); + const HTMLDownloadOption = new _Domain_Dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_0__.ExportOption('HTML-Presentation', 'Download an HTML-Presentation. This does not include the Domain-Story!', () => this.exportService.downloadHTMLPresentation()); + const config = new _angular_material_dialog__WEBPACK_IMPORTED_MODULE_17__.MatDialogConfig(); + config.disableClose = false; + config.autoFocus = true; + config.data = new _Domain_Dialog_exportDialogData__WEBPACK_IMPORTED_MODULE_0__.ExportDialogData('Export', [SVGDownloadOption, EGNDownloadOption, PNGDownloadOption, HTMLDownloadOption]); + this.dialogService.openDialog(_Dialog_export_dialog_export_dialog_component__WEBPACK_IMPORTED_MODULE_1__.ExportDialogComponent, config); + } else { + this.snackbar.open('No Domain Story to be exported', undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_5__.SNACKBAR_DURATION, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_5__.SNACKBAR_INFO + }); + } + } + openKeyboardShortcutsDialog() { + const title = 'Keyboard Shortcuts'; + const shortCutText = 'Undo:\t\t\t\t\tctrl + Z \n' + 'Redo:\t\t\t\t\tctrl + Y OR ctrl + shift + Z\n' + 'Select All:\t\t\t\tctrl + A\n' + 'Export as EGN:\t\t\tctrl + S\n' + 'Import Domain Story: \t\tctrl + L\n' + 'Search for text:\t\t\tctrl + F\n' + 'Direct editing:\t\t\tE\n' + 'Hand tool:\t\t\t\tH\n' + 'Lasso tool:\t\t\t\tL\n' + 'Space tool:\t\t\t\tS'; + const config = new _angular_material_dialog__WEBPACK_IMPORTED_MODULE_17__.MatDialogConfig(); + config.disableClose = false; + config.autoFocus = true; + config.data = new _Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_2__.InfoDialogData(title, shortCutText, true); + this.dialogService.openDialog(_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_3__.InfoDialogComponent, config); + } + openLabelDictionary() { + if (this.exportService.isDomainStoryExportable()) { + const config = new _angular_material_dialog__WEBPACK_IMPORTED_MODULE_17__.MatDialogConfig(); + config.disableClose = false; + config.autoFocus = true; + this.dialogService.openDialog(_Dialog_label_dictionary_dialog_label_dictionary_dialog_component__WEBPACK_IMPORTED_MODULE_4__.LabelDictionaryDialogComponent, config); + } else { + this.snackbar.open('There are currently no Elements on the canvas', undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_5__.SNACKBAR_DURATION, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_5__.SNACKBAR_INFO + }); + } + } + createNewDomainStory() { + this.titleService.reset(); + this.renderService.reset(); + this.dirtyFlagService.makeClean(); + } + /** Replay functions **/ + startReplay() { + this.replayService.startReplay(); + } + stopReplay() { + this.replayService.stopReplay(); + } + previousSentence() { + this.replayService.previousSentence(); + } + nextSentence() { + this.replayService.nextSentence(); + } + isExportable() { + return this.titleService.hasTitleOrDescription() || this.exportService.isDomainStoryExportable(); + } + static #_ = this.ɵfac = function HeaderButtonsComponent_Factory(t) { + return new (t || HeaderButtonsComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_6__.SettingsService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_7__.ModelerService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_Service_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_8__.ReplayStateService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_9__.DirtyFlagService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_Service_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_10__.DialogService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_11__.ReplayService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_Service_Export_export_service__WEBPACK_IMPORTED_MODULE_12__.ExportService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_Service_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_13__.ImportDomainStoryService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_14__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_Service_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_15__.RendererService), _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdirectiveInject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_18__.MatSnackBar)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵdefineComponent"]({ + type: HeaderButtonsComponent, + selectors: [["app-header-buttons"]], + decls: 4, + vars: 6, + consts: [[4, "ngIf"], ["id", "buttonStartReplay", "title", "Start replay", 1, "headerButton", 3, "click", "disabled"], [1, "material-icons", "materialIconButton"], ["id", "buttonImport", "title", "Import story from file", "onclick", "document.getElementById('import').click();", 1, "headerButton"], ["type", "file", "accept", ".dst, .dst.svg, .egn, .egn.svg", "id", "import", "onclick", "this.value=null;", "name", "file", 2, "display", "none", 3, "change"], ["id", "export", "title", "Export story as .egn, .svg or .png file", 1, "headerButton", 3, "click", "disabled"], ["class", "material-icons-outlined materialIconButton", 4, "ngIf"], ["class", "material-icons materialIconButton", 4, "ngIf"], ["title", "Label Dictionary", 1, "headerButton", 3, "click", "disabled"], ["title", "Label Dictionary", 1, "material-icons", "materialIconButton"], ["title", "Settings", 1, "headerButton", 3, "click"], ["title", "Change Icons and Settings", 1, "material-icons", "materialIconButton"], ["title", "Show keyboard shortcuts", 1, "headerButton", 3, "click"], ["title", "Create a new domain story", 1, "headerButton", 3, "click"], [1, "material-icons-outlined", "materialIconButton"], ["title", "Previous sentence", 1, "headerButton", 3, "click"], ["title", "Next sentence", 1, "headerButton", 3, "click"], ["title", "Stop replay", 1, "headerButton", 3, "click"]], + template: function HeaderButtonsComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtemplate"](0, HeaderButtonsComponent_div_0_Template, 25, 15, "div", 0); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipe"](1, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵtemplate"](2, HeaderButtonsComponent_div_2_Template, 10, 0, "div", 0); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipe"](3, "async"); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngIf", !_angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipeBind1"](1, 2, ctx.isReplay$)); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_16__["ɵɵpipeBind1"](3, 4, ctx.isReplay$)); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_19__.NgIf, _angular_common__WEBPACK_IMPORTED_MODULE_19__.AsyncPipe], + styles: ["span[_ngcontent-%COMP%] {\n font-size: 15pt;\n color: white;\n}\n\n#dictionaryButton[_ngcontent-%COMP%] {\n opacity: 0.2;\n pointer-events: none;\n}\n\n.headerButton[_ngcontent-%COMP%]:hover {\n cursor: pointer;\n}\n.headerButton[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%] {\n color: white;\n}\n\n.disabled[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .disabled[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%] {\n cursor: initial;\n color: gray;\n}\n\n.materialIconButton[_ngcontent-%COMP%]:hover {\n color: lightgrey;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhlYWRlci1idXR0b25zLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZUFBQTtFQUNBLFlBQUE7QUFDRjs7QUFFQTtFQUNFLFlBQUE7RUFDQSxvQkFBQTtBQUNGOztBQUVBO0VBQ0UsZUFBQTtBQUNGO0FBQ0U7RUFDRSxZQUFBO0FBQ0o7O0FBR0E7O0VBRUUsZUFBQTtFQUNBLFdBQUE7QUFBRjs7QUFHQTtFQUNFLGdCQUFBO0FBQUYiLCJmaWxlIjoiaGVhZGVyLWJ1dHRvbnMuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyJzcGFuIHtcbiAgZm9udC1zaXplOiAxNXB0O1xuICBjb2xvcjogd2hpdGU7XG59XG5cbiNkaWN0aW9uYXJ5QnV0dG9uIHtcbiAgb3BhY2l0eTogMC4yO1xuICBwb2ludGVyLWV2ZW50czogbm9uZTtcbn1cblxuLmhlYWRlckJ1dHRvbjpob3ZlciB7XG4gIGN1cnNvcjogcG9pbnRlcjtcblxuICBzcGFuIHtcbiAgICBjb2xvcjogd2hpdGU7XG4gIH1cbn1cblxuLmRpc2FibGVkIHNwYW4sXG4uZGlzYWJsZWQ6aG92ZXIgc3BhbiB7XG4gIGN1cnNvcjogaW5pdGlhbDtcbiAgY29sb3I6IGdyYXk7XG59XG5cbi5tYXRlcmlhbEljb25CdXR0b246aG92ZXIge1xuICBjb2xvcjogbGlnaHRncmV5O1xufVxuIl19 */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL0hlYWRlci9oZWFkZXItYnV0dG9ucy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGVBQUE7RUFDQSxZQUFBO0FBQ0Y7O0FBRUE7RUFDRSxZQUFBO0VBQ0Esb0JBQUE7QUFDRjs7QUFFQTtFQUNFLGVBQUE7QUFDRjtBQUNFO0VBQ0UsWUFBQTtBQUNKOztBQUdBOztFQUVFLGVBQUE7RUFDQSxXQUFBO0FBQUY7O0FBR0E7RUFDRSxnQkFBQTtBQUFGO0FBQ0EsbzRCQUFvNEIiLCJzb3VyY2VzQ29udGVudCI6WyJzcGFuIHtcbiAgZm9udC1zaXplOiAxNXB0O1xuICBjb2xvcjogd2hpdGU7XG59XG5cbiNkaWN0aW9uYXJ5QnV0dG9uIHtcbiAgb3BhY2l0eTogMC4yO1xuICBwb2ludGVyLWV2ZW50czogbm9uZTtcbn1cblxuLmhlYWRlckJ1dHRvbjpob3ZlciB7XG4gIGN1cnNvcjogcG9pbnRlcjtcblxuICBzcGFuIHtcbiAgICBjb2xvcjogd2hpdGU7XG4gIH1cbn1cblxuLmRpc2FibGVkIHNwYW4sXG4uZGlzYWJsZWQ6aG92ZXIgc3BhbiB7XG4gIGN1cnNvcjogaW5pdGlhbDtcbiAgY29sb3I6IGdyYXk7XG59XG5cbi5tYXRlcmlhbEljb25CdXR0b246aG92ZXIge1xuICBjb2xvcjogbGlnaHRncmV5O1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */"] + }); +} + +/***/ }), + +/***/ 91729: +/*!*********************************************************!*\ + !*** ./src/app/Presentation/Header/header.component.ts ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ HeaderComponent: () => (/* binding */ HeaderComponent) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ 11640); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs */ 24406); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _Dialog_header_dialog_header_dialog_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Dialog/header-dialog/header-dialog.component */ 21270); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Service_Title_title_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Service/Title/title.service */ 69672); +/* harmony import */ var _Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Service/Replay/replay.service */ 94788); +/* harmony import */ var _Service_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Service/Replay/replay-state.service */ 67820); +/* harmony import */ var _Service_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Service/Dialog/dialog.service */ 4730); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _header_buttons_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./header-buttons.component */ 20409); +/* harmony import */ var _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/material/toolbar */ 31165); +/* harmony import */ var _angular_material_card__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/material/card */ 34294); + + + + + + + + + + + + +function HeaderComponent_button_2_Template(rf, ctx) { + if (rf & 1) { + const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "button", 10); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function HeaderComponent_button_2_Template_button_click_0_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r1); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r1.setShowDescription(false)); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](1, "span", 11); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2, " expand_less "); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()(); + } +} +function HeaderComponent_button_4_Template(rf, ctx) { + if (rf & 1) { + const _r3 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "button", 12); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function HeaderComponent_button_4_Template_button_click_0_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵrestoreView"](_r3); + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵresetView"](ctx_r1.setShowDescription(true)); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](1, "span", 11); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2, " expand_more"); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()(); + } +} +function HeaderComponent_span_13_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "span", 13); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](1); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](2, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"](); + } + if (rf & 2) { + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtextInterpolate1"](" Sentence: ", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](2, 1, ctx_r1.sentenceDescription$), ""); + } +} +function HeaderComponent_mat_card_17_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "mat-card", 14)(1, "span", 15); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](3, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()(); + } + if (rf & 2) { + const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵnextContext"](); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](3, 1, ctx_r1.description$)); + } +} +class HeaderComponent { + constructor(titleService, replayService, replayStateService, dialogService) { + this.titleService = titleService; + this.replayService = replayService; + this.replayStateService = replayStateService; + this.dialogService = dialogService; + this.title$ = this.titleService.title$; + this.description$ = this.titleService.description$; + this.showDescription$ = this.titleService.showDescription$; + this.isReplay$ = this.replayStateService.replayOn$; + this.sentenceDescription$ = (0,rxjs__WEBPACK_IMPORTED_MODULE_7__.combineLatest)([this.replayService.currentSentence$, this.replayService.maxSentenceNumber$]).pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_8__.map)(([sentence, count]) => `${sentence}/${count}`)); + this.showDescription = this.titleService.showDescription$; + } + openHeaderDialog() { + const config = new _angular_material_dialog__WEBPACK_IMPORTED_MODULE_9__.MatDialogConfig(); + config.disableClose = false; + config.autoFocus = true; + this.dialogService.openDialog(_Dialog_header_dialog_header_dialog_component__WEBPACK_IMPORTED_MODULE_0__.HeaderDialogComponent, config); + } + setShowDescription(show) { + this.titleService.setShowDescription(show); + } + static #_ = this.ɵfac = function HeaderComponent_Factory(t) { + return new (t || HeaderComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_1__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_2__.ReplayService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_Service_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_3__.ReplayStateService), _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdirectiveInject"](_Service_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_4__.DialogService)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineComponent"]({ + type: HeaderComponent, + selectors: [["app-header"]], + decls: 19, + vars: 15, + consts: [["color", "primary", 1, "toolbar"], ["class", "headerButton", "title", "Hide Description", 3, "click", 4, "ngIf"], ["class", "headerButton", "title", "Show Description", 3, "click", 4, "ngIf"], [1, "mr-10"], ["title", "Edit Title and Description", 1, "headline", 3, "click"], [1, "material-icons", "materialIconButton", "editIcon"], [1, "titleSpacer"], ["title", "Replay Sentence", 4, "ngIf"], [1, "buttonSpacer"], ["class", "smallScrollbar description", 4, "ngIf"], ["title", "Hide Description", 1, "headerButton", 3, "click"], [1, "material-icons", "materialIconButton", "toggle"], ["title", "Show Description", 1, "headerButton", 3, "click"], ["title", "Replay Sentence"], [1, "smallScrollbar", "description"], [1, "descriptionText"]], + template: function HeaderComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](0, "mat-toolbar", 0)(1, "mat-toolbar-row"); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](2, HeaderComponent_button_2_Template, 3, 0, "button", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](3, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](4, HeaderComponent_button_4_Template, 3, 0, "button", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](5, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](6, "span", 3)(7, "span", 4); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵlistener"]("click", function HeaderComponent_Template_span_click_7_listener() { + return ctx.openHeaderDialog(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](8); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](9, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementStart"](10, "span", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtext"](11, " edit "); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()()(); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](12, "span", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](13, HeaderComponent_span_13_Template, 3, 3, "span", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](14, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelement"](15, "span", 8)(16, "app-header-buttons"); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtemplate"](17, HeaderComponent_mat_card_17_Template, 4, 3, "mat-card", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipe"](18, "async"); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](3, 5, ctx.showDescription)); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", !_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](5, 7, ctx.showDescription)); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](9, 9, ctx.title$), " "); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](5); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](14, 11, ctx.isReplay$)); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵadvance"](4); + _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵpipeBind1"](18, 13, ctx.showDescription$)); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_10__.NgIf, _header_buttons_component__WEBPACK_IMPORTED_MODULE_5__.HeaderButtonsComponent, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_11__.MatToolbar, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_11__.MatToolbarRow, _angular_material_card__WEBPACK_IMPORTED_MODULE_12__.MatCard, _angular_common__WEBPACK_IMPORTED_MODULE_10__.AsyncPipe], + styles: [".noPointer[_ngcontent-%COMP%] {\n cursor: default !important;\n}\n\n.description[_ngcontent-%COMP%] {\n top: 0;\n max-width: 100vw;\n overflow-y: scroll;\n display: grid;\n}\n\n.descriptionText[_ngcontent-%COMP%] {\n position: relative;\n font-size: 10pt;\n overflow-wrap: anywhere;\n word-wrap: anywhere;\n white-space: pre-wrap;\n padding-top: 15px;\n padding-left: 15px;\n padding-right: 15px;\n line-height: 12pt;\n}\n\n.description[_ngcontent-%COMP%]:hover {\n cursor: default;\n}\n\n.titleSpacer[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n}\n\n.buttonSpacer[_ngcontent-%COMP%] {\n margin-right: 15px;\n}\n\n.headline[_ngcontent-%COMP%]:hover > .editIcon[_ngcontent-%COMP%] {\n display: contents;\n}\n\n.headline[_ngcontent-%COMP%] > .editIcon[_ngcontent-%COMP%] {\n display: none;\n}\n\n.headerButton[_ngcontent-%COMP%] {\n color: white;\n}\n\n.headerButton[_ngcontent-%COMP%]:hover {\n cursor: pointer;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhlYWRlci5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLDBCQUFBO0FBQ0Y7O0FBRUE7RUFDRSxNQUFBO0VBQ0EsZ0JBQUE7RUFDQSxrQkFBQTtFQUNBLGFBQUE7QUFDRjs7QUFFQTtFQUNFLGtCQUFBO0VBQ0EsZUFBQTtFQUNBLHVCQUFBO0VBQ0EsbUJBQUE7RUFDQSxxQkFB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Zmxvdy15OiBzY3JvbGw7XG4gIGRpc3BsYXk6IGdyaWQ7XG59XG5cbi5kZXNjcmlwdGlvblRleHQge1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gIGZvbnQtc2l6ZTogMTBwdDtcbiAgb3ZlcmZsb3ctd3JhcDogYW55d2hlcmU7XG4gIHdvcmQtd3JhcDogYW55d2hlcmU7XG4gIHdoaXRlLXNwYWNlOiBwcmUtd3JhcDtcbiAgcGFkZGluZy10b3A6IDE1cHg7XG4gIHBhZGRpbmctbGVmdDogMTVweDtcbiAgcGFkZGluZy1yaWdodDogMTVweDtcbiAgbGluZS1oZWlnaHQ6IDEycHQ7XG59XG5cbi5kZXNjcmlwdGlvbjpob3ZlciB7XG4gIGN1cnNvcjogZGVmYXVsdDtcbn1cblxuLnRpdGxlU3BhY2VyIHtcbiAgZmxleDogMSAxIGF1dG87XG59XG5cbi5idXR0b25TcGFjZXIge1xuICBtYXJnaW4tcmlnaHQ6IDE1cHg7XG59XG5cbi5oZWFkbGluZTpob3ZlciA+IC5lZGl0SWNvbiB7XG4gIGRpc3BsYXk6IGNvbnRlbnRzO1xufVxuXG4uaGVhZGxpbmUgPiAuZWRpdEljb24ge1xuICBkaXNwbGF5OiBub25lO1xufVxuXG4uaGVhZGVyQnV0dG9uIHtcbiAgY29sb3I6IHdoaXRlO1xufVxuXG4uaGVhZGVyQnV0dG9uOmhvdmVyIHtcbiAgY3Vyc29yOiBwb2ludGVyO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ== */"] + }); +} + +/***/ }), + +/***/ 86328: +/*!****************************************************************************!*\ + !*** ./src/app/Presentation/LabelDictionary/label-dictionary.component.ts ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LabelDictionaryComponent: () => (/* binding */ LabelDictionaryComponent) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _Service_LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Service/LabelDictionary/label-dictionary.service */ 59783); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/button */ 95912); +/* harmony import */ var _angular_material_list__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/list */ 68708); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/form-field */ 48913); +/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/material/input */ 29836); +/* harmony import */ var _angular_cdk_text_field__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/text-field */ 79401); + + + + + + + + + + + +function LabelDictionaryComponent_mat_list_item_5_Template(rf, ctx) { + if (rf & 1) { + const _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "mat-list-item")(1, "mat-form-field", 6)(2, "input", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("change", function LabelDictionaryComponent_mat_list_item_5_Template_input_change_2_listener($event) { + const workobjectEntry_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r1).$implicit; + const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r2.updateWorkobjectEntry($event, workobjectEntry_r2)); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()(); + } + if (rf & 2) { + const workobjectEntry_r2 = ctx.$implicit; + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("value", workobjectEntry_r2.name); + } +} +function LabelDictionaryComponent_mat_list_item_11_Template(rf, ctx) { + if (rf & 1) { + const _r4 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetCurrentView"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "mat-list-item")(1, "mat-form-field", 6)(2, "textarea", 8); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("change", function LabelDictionaryComponent_mat_list_item_11_Template_textarea_change_2_listener($event) { + const activityEntry_r5 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r4).$implicit; + const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r2.updateActivityEntry($event, activityEntry_r5)); + })("keydown.enter", function LabelDictionaryComponent_mat_list_item_11_Template_textarea_keydown_enter_2_listener($event) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r4); + const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r2.preventDefault($event)); + })("keyup.enter", function LabelDictionaryComponent_mat_list_item_11_Template_textarea_keyup_enter_2_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r4); + const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r2.save()); + })("keyup.escape", function LabelDictionaryComponent_mat_list_item_11_Template_textarea_keyup_escape_2_listener() { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵrestoreView"](_r4); + const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵnextContext"](); + return _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵresetView"](ctx_r2.close()); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()(); + } + if (rf & 2) { + const activityEntry_r5 = ctx.$implicit; + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("value", activityEntry_r5.name); + } +} +class LabelDictionaryComponent { + constructor(labelDictionaryService) { + this.labelDictionaryService = labelDictionaryService; + this.closeEmitter = new _angular_core__WEBPACK_IMPORTED_MODULE_1__.EventEmitter(); + this.labelDictionaryService.createLabelDictionaries(); + this.workObjectEntries = this.labelDictionaryService.getWorkObjectLabels(); + this.activityEntries = this.labelDictionaryService.getActivityLabels(); + this.workobjectEntriesSubject = new rxjs__WEBPACK_IMPORTED_MODULE_2__.BehaviorSubject(this.workObjectEntries); + this.activityEntriesSubject = new rxjs__WEBPACK_IMPORTED_MODULE_2__.BehaviorSubject(this.activityEntries); + } + ngAfterViewInit() { + this.labelDictionaryService.createLabelDictionaries(); + this.workobjectEntriesSubject.next(this.labelDictionaryService.getWorkObjectLabels()); + this.activityEntriesSubject.next(this.labelDictionaryService.getActivityLabels()); + } + save() { + this.workObjectEntries = this.workobjectEntriesSubject.value; + this.activityEntries = this.activityEntriesSubject.value; + const activityNames = []; + const originalActivityNames = []; + const workObjectNames = []; + const originalWorkObjectNames = []; + this.activityEntries.filter(a => a.name !== a.originalName).forEach(activity => { + activityNames.push(activity.name); + originalActivityNames.push(activity.originalName); + }); + this.workObjectEntries.filter(w => w.name !== w.originalName).forEach(workobject => { + workObjectNames.push(workobject.name); + originalWorkObjectNames.push(workobject.originalName); + }); + this.labelDictionaryService.massRenameLabels(activityNames, originalActivityNames, workObjectNames, originalWorkObjectNames); + this.closeEmitter.emit(); + } + cancel() { + this.workObjectEntries.forEach(w => { + w.name = w.originalName; + }); + this.activityEntries.forEach(a => { + a.name = a.originalName; + }); + this.workobjectEntriesSubject.next(this.workObjectEntries); + this.activityEntriesSubject.next(this.activityEntries); + } + updateActivityEntry($event, activityEntry) { + let entries = this.activityEntriesSubject.value; + entries.filter(e => e.originalName === activityEntry.originalName)[0].name = $event.target.value; + this.activityEntriesSubject.next(entries); + } + updateWorkobjectEntry($event, workobjectEntry) { + let entries = this.workobjectEntriesSubject.value; + entries.filter(e => e.originalName === workobjectEntry.originalName)[0].name = $event.target.value; + this.workobjectEntriesSubject.next(entries); + } + preventDefault(event) { + event.preventDefault(); + } + close() { + this.closeEmitter.emit(); + } + static #_ = this.ɵfac = function LabelDictionaryComponent_Factory(t) { + return new (t || LabelDictionaryComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_Service_LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_0__.LabelDictionaryService)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ + type: LabelDictionaryComponent, + selectors: [["app-label-dictionary"]], + outputs: { + closeEmitter: "closeEmitter" + }, + decls: 18, + vars: 6, + consts: [[1, "workobjectList"], [4, "ngFor", "ngForOf"], [1, "activityList"], [1, "activityListTitle"], ["mat-flat-button", "", 3, "click"], ["mat-flat-button", "", "color", "primary", 3, "click"], [1, "inputText"], ["matInput", "", 1, "inputText", 3, "change", "value"], ["matInput", "", "cdkTextareaAutosize", "", "cdkAutosizeMinRows", "1", "cdkAutosizeMaxRows", "3", 1, "inputText", "activity", 3, "change", "keydown.enter", "keyup.enter", "keyup.escape", "value"]], + template: function LabelDictionaryComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "mat-dialog-content")(1, "div", 0)(2, "h3"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](3, "Workobjects"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](4, "mat-list"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](5, LabelDictionaryComponent_mat_list_item_5_Template, 3, 1, "mat-list-item", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](6, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](7, "div", 2)(8, "h3", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](9, "Activities"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](10, "mat-list"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](11, LabelDictionaryComponent_mat_list_item_11_Template, 3, 1, "mat-list-item", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](12, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()(); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](13, "mat-dialog-actions")(14, "button", 4); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function LabelDictionaryComponent_Template_button_click_14_listener() { + return ctx.close(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](15, "Cancel"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](16, "button", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function LabelDictionaryComponent_Template_button_click_16_listener() { + return ctx.save(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](17, "Save"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()(); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](5); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](6, 2, ctx.workobjectEntriesSubject)); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](6); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](12, 4, ctx.activityEntriesSubject)); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_3__.NgForOf, _angular_material_button__WEBPACK_IMPORTED_MODULE_4__.MatButton, _angular_material_list__WEBPACK_IMPORTED_MODULE_5__.MatList, _angular_material_list__WEBPACK_IMPORTED_MODULE_5__.MatListItem, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_6__.MatDialogActions, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_6__.MatDialogContent, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_7__.MatFormField, _angular_material_input__WEBPACK_IMPORTED_MODULE_8__.MatInput, _angular_cdk_text_field__WEBPACK_IMPORTED_MODULE_9__.CdkTextareaAutosize, _angular_common__WEBPACK_IMPORTED_MODULE_3__.AsyncPipe], + styles: ["mat-dialog-content[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: auto auto;\n top: 0;\n bottom: 0;\n max-height: 75vh;\n grid-column-gap: 5px;\n width: 75vw;\n}\nmat-dialog-content[_ngcontent-%COMP%] mat-list-item[_ngcontent-%COMP%] {\n height: unset !important;\n}\nmat-dialog-content[_ngcontent-%COMP%] mat-list-item-content[_ngcontent-%COMP%] {\n padding: 0 !important;\n}\n\nh3[_ngcontent-%COMP%] {\n font-weight: bold;\n}\n\n.icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n}\n\n.inputText[_ngcontent-%COMP%] {\n width: 98%;\n resize: none;\n font-family: sans-serif;\n font-size: small;\n padding-top: 1px;\n padding-bottom: 1px;\n margin: 0;\n}\n\n.activityListHeader[_ngcontent-%COMP%] {\n display: inline-grid;\n grid-template-columns: auto auto auto;\n width: 100%;\n}\n\n.activityListTitle[_ngcontent-%COMP%] {\n justify-self: left;\n}\n\n.saveButton[_ngcontent-%COMP%] {\n justify-self: end;\n padding-right: 0 !important;\n}\n\n.saveButtonSpan[_ngcontent-%COMP%] {\n margin-left: 2px;\n}\n\n.activity[_ngcontent-%COMP%] {\n max-height: 3rem;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLWRpY3Rpb25hcnkuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxhQUFBO0VBQ0EsZ0NBQUE7RUFDQSxNQUFBO0VBQ0EsU0FBQTtFQUNBLGdCQUFBO0VBQ0Esb0JBQUE7RUFDQSxXQUFBO0FBQ0Y7QUFDRTtFQUNFLHdCQUFBO0FBQ0o7QUFHRTtFQUNFLHFCQUFBO0FBREo7O0FBS0E7RUFDRSxpQkFBQTtBQUZGOztBQUtBO0VBQ0UsV0FBQTtFQUNBLFlBQUE7QUFGRjs7QUFLQTtFQUNFLFVBQUE7RUFDQSxZQUFBO0VBQ0EsdUJBQUE7RUFDQSxnQkFBQTtFQUNBLGdCQUFBO0VBQ0EsbUJBQUE7RUFDQSxTQUFBO0FBRkY7O0FBS0E7R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xlZnQ7XG59XG5cbi5zYXZlQnV0dG9uIHtcbiAganVzdGlmeS1zZWxmOiBlbmQ7XG4gIHBhZGRpbmctcmlnaHQ6IDAgIWltcG9ydGFudDtcbn1cblxuLnNhdmVCdXR0b25TcGFuIHtcbiAgbWFyZ2luLWxlZnQ6IDJweDtcbn1cblxuLmFjdGl2aXR5IHtcbiAgbWF4LWhlaWdodDogM3JlbTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= */"] + }); +} + +/***/ }), + +/***/ 423: +/*!*****************************************************************************!*\ + !*** ./src/app/Presentation/Settings/General/general-settings.component.ts ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ GeneralSettingsComponent: () => (/* binding */ GeneralSettingsComponent) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Autosave_AutosaveSettings_autosave_settings_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Autosave/AutosaveSettings/autosave-settings.component */ 94709); + + +class GeneralSettingsComponent { + static #_ = this.ɵfac = function GeneralSettingsComponent_Factory(t) { + return new (t || GeneralSettingsComponent)(); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ + type: GeneralSettingsComponent, + selectors: [["app-general-settings"]], + decls: 2, + vars: 0, + consts: [[1, "content"]], + template: function GeneralSettingsComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "div", 0); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](1, "app-autosave-settings"); + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"](); + } + }, + dependencies: [_Autosave_AutosaveSettings_autosave_settings_component__WEBPACK_IMPORTED_MODULE_0__.AutosaveSettingsComponent], + styles: [".content[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 450px auto;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImdlbmVyYWwtc2V0dGluZ3MuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxhQUFBO0VBQ0EsaUNBQUE7QUFDRiIsImZpbGUiOiJnZW5lcmFsLXNldHRpbmdzLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmNvbnRlbnQge1xuICBkaXNwbGF5OiBncmlkO1xuICBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IDQ1MHB4IGF1dG87XG59XG4iXX0= */\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy9hcHAvUHJlc2VudGF0aW9uL1NldHRpbmdzL0dlbmVyYWwvZ2VuZXJhbC1zZXR0aW5ncy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGFBQUE7RUFDQSxpQ0FBQTtBQUNGO0FBQ0EsZ1lBQWdZIiwic291cmNlc0NvbnRlbnQiOlsiLmNvbnRlbnQge1xuICBkaXNwbGF5OiBncmlkO1xuICBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IDQ1MHB4IGF1dG87XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 */"] + }); +} + +/***/ }), + +/***/ 1261: +/*!*************************************************************!*\ + !*** ./src/app/Presentation/Settings/settings.component.ts ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SettingsComponent: () => (/* binding */ SettingsComponent) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/Settings/settings.service */ 58124); +/* harmony import */ var src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Service/Modeler/modeler.service */ 74676); +/* harmony import */ var _Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Service/IconSetConfiguration/icon-set-customization.service */ 87007); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _General_general_settings_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./General/general-settings.component */ 423); +/* harmony import */ var src_app_Presentation_DomainConfiguration_icon_set_configuration_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Presentation/DomainConfiguration/icon-set-configuration.component */ 38574); +/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/material/button */ 95912); +/* harmony import */ var _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/material/toolbar */ 31165); + + + + + + + + + + +function SettingsComponent_app_general_settings_15_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](0, "app-general-settings"); + } +} +function SettingsComponent_app_icon_set_configuration_17_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelement"](0, "app-icon-set-configuration", 10); + } +} +class SettingsComponent { + constructor(settingsService, modelerService, iconSetCustomizationService) { + this.settingsService = settingsService; + this.modelerService = modelerService; + this.iconSetCustomizationService = iconSetCustomizationService; + this.showGeneralSettings = new rxjs__WEBPACK_IMPORTED_MODULE_6__.BehaviorSubject(false); + this.showIconSetCustomization = new rxjs__WEBPACK_IMPORTED_MODULE_6__.BehaviorSubject(true); + } + close() { + const savedConfiguration = this.iconSetCustomizationService.getAndClearSavedConfiguration(); + if (savedConfiguration) { + this.modelerService.restart(savedConfiguration); + } + this.settingsService.close(); + } + openGeneralSettings() { + this.showGeneralSettings.next(true); + this.showIconSetCustomization.next(false); + } + openIconSetCustomization() { + this.showGeneralSettings.next(false); + this.showIconSetCustomization.next(true); + } + static #_ = this.ɵfac = function SettingsComponent_Factory(t) { + return new (t || SettingsComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_0__.SettingsService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__.ModelerService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdirectiveInject"](_Service_IconSetConfiguration_icon_set_customization_service__WEBPACK_IMPORTED_MODULE_2__.IconSetCustomizationService)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineComponent"]({ + type: SettingsComponent, + selectors: [["app-settings"]], + decls: 19, + vars: 14, + consts: [[1, "settings"], ["color", "primary", 1, "toolbar"], ["mat-icon-button", "", 1, "headerButton", "noPadding", 3, "click"], [1, "material-icons-outlined", "materialIconButton"], [1, "paddedButton"], ["mat-button", "", 1, "headerButton", "mr-10", 3, "click"], [1, "headline"], ["mat-button", "", 1, "headerButton", 3, "click"], [4, "ngIf"], ["class", "tab", 4, "ngIf"], [1, "tab"]], + template: function SettingsComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](0, "div", 0)(1, "mat-toolbar", 1)(2, "mat-toolbar-row")(3, "button", 2); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("click", function SettingsComponent_Template_button_click_3_listener() { + return ctx.close(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](4, "span", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](5, " arrow_back"); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](6, "div", 4)(7, "button", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](8, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("click", function SettingsComponent_Template_button_click_7_listener() { + return ctx.openIconSetCustomization(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](9, "span", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](10, "Customize Icons for Your Domain"); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](11, "button", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](12, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵlistener"]("click", function SettingsComponent_Template_button_click_11_listener() { + return ctx.openGeneralSettings(); + }); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementStart"](13, "span", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtext"](14, "General Settings"); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"]()()()()(); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](15, SettingsComponent_app_general_settings_15_Template, 1, 0, "app-general-settings", 8); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](16, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵtemplate"](17, SettingsComponent_app_icon_set_configuration_17_Template, 1, 0, "app-icon-set-configuration", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipe"](18, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵelementEnd"](); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](7); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵclassProp"]("highlight", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBind1"](8, 6, ctx.showIconSetCustomization)); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](4); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵclassProp"]("highlight", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBind1"](12, 8, ctx.showGeneralSettings)); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](4); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBind1"](16, 10, ctx.showGeneralSettings)); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵpipeBind1"](18, 12, ctx.showIconSetCustomization)); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_7__.NgIf, _General_general_settings_component__WEBPACK_IMPORTED_MODULE_3__.GeneralSettingsComponent, src_app_Presentation_DomainConfiguration_icon_set_configuration_component__WEBPACK_IMPORTED_MODULE_4__.IconSetConfigurationComponent, _angular_material_button__WEBPACK_IMPORTED_MODULE_8__.MatButton, _angular_material_button__WEBPACK_IMPORTED_MODULE_8__.MatIconButton, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__.MatToolbar, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__.MatToolbarRow, _angular_common__WEBPACK_IMPORTED_MODULE_7__.AsyncPipe], + styles: ["mat-toolbar[_ngcontent-%COMP%] *[_ngcontent-%COMP%] {\n color: white;\n}\n\napp-general-settings[_ngcontent-%COMP%] {\n overflow-y: auto;\n}\n\n.settings[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: 65px auto;\n width: 100%;\n height: 100%;\n}\n.settings[_ngcontent-%COMP%] .mat-button {\n padding: 0;\n}\n.settings[_ngcontent-%COMP%] .materialIconButton[_ngcontent-%COMP%] {\n margin-top: 0;\n margin-right: 5px;\n padding: 0;\n}\n\n.highlight[_ngcontent-%COMP%] {\n border: 2px solid white;\n}\n\n.tab[_ngcontent-%COMP%] {\n display: inline-block;\n height: calc(100% - 10px);\n width: 100%;\n overflow: hidden;\n}\n\n .mat-tab-label, .mat-tab-label-active {\n height: 30px !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNldHRpbmdzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsWUFBQTtBQUNGOztBQUVBO0VBQ0UsZ0JBQUE7QUFDRjs7QUFFQTtFQUNFLGFBQUE7RUFDQSw2QkFBQTtFQUNBLFdBQUE7RUFDQSxZQUFBO0FBQ0Y7QUFDRTtFQUNFLFVBQUE7QUFDSjtBQUVFO0VBQ0UsYUFBQTtFQUNBLGlCQUFBO0VBQ0EsVUFBQTtBQUFKOztBQUlBO0VBQ0UsdUJBQUE7QUFERjs7QUFJQTtFQUNFLHFCQUFBO0VBQ0EseUJBQUE7RUFDQSxXQUFBO0VBQ0EsZ0JBQUE7QUFERjs7QUFJQTs7RUFFRSx1QkFBQTtBQURGIiwiZmlsZSI6InNldHRpbmdzLmNvbXBvbmVudC5z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4ICFpbXBvcnRhbnQ7XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 */"] + }); +} + +/***/ }), + +/***/ 97237: +/*!********************************************************************!*\ + !*** ./src/app/Service/Autosave/autosave-configuration.service.ts ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AutosaveConfigurationService: () => (/* binding */ AutosaveConfigurationService) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ 61151); +/* harmony import */ var src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/constants */ 90816); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BrowserStorage/storage.service */ 59298); + + + + +const AUTOSAVE_CONFIGURATION_TAG = 'autosaveConfiguration'; +const defaultConfiguration = { + activated: src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_AUTOSAVES_ENABLED, + interval: src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_AUTOSAVES_INTERVAL, + maxDrafts: src_app_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_AUTOSAVES_MAX_DRAFTS +}; +class AutosaveConfigurationService { + constructor(storageService) { + this.storageService = storageService; + this.configuration = defaultConfiguration; + this.configurationSubject = new rxjs__WEBPACK_IMPORTED_MODULE_2__.ReplaySubject(1); + this.configuration$ = this.configurationSubject.asObservable(); + this.initializeConfiguration(); + } + initializeConfiguration() { + this.loadConfiguration(); + this.configurationSubject.next(this.configuration); + } + setConfiguration(configuration) { + try { + this.configuration = configuration; + this.saveConfiguration(); + this.configurationSubject.next(configuration); + return true; + } catch { + return false; + } + } + loadConfiguration() { + this.configuration = this.storageService.get(AUTOSAVE_CONFIGURATION_TAG) ?? defaultConfiguration; + } + saveConfiguration() { + this.storageService.set(AUTOSAVE_CONFIGURATION_TAG, this.configuration); + } + static #_ = this.ɵfac = function AutosaveConfigurationService_Factory(t) { + return new (t || AutosaveConfigurationService)(_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵinject"](_BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_1__.StorageService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineInjectable"]({ + token: AutosaveConfigurationService, + factory: AutosaveConfigurationService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 30534: +/*!******************************************************!*\ + !*** ./src/app/Service/Autosave/autosave.service.ts ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AutosaveService: () => (/* binding */ AutosaveService), +/* harmony export */ DRAFTS_TAG: () => (/* binding */ DRAFTS_TAG) +/* harmony export */ }); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/Common/iconSetConfiguration */ 84738); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _autosave_configuration_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autosave-configuration.service */ 97237); +/* harmony import */ var _Export_export_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Export/export.service */ 98106); +/* harmony import */ var _IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../IconSetConfiguration/icon-dictionary.service */ 93689); +/* harmony import */ var _Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Renderer/renderer.service */ 94896); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); +/* harmony import */ var _BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../BrowserStorage/storage.service */ 59298); +/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Title/title.service */ 69672); + + + + + + + + + + + + +const DRAFTS_TAG = 'autosaveDrafts'; +class AutosaveService { + constructor(autosaveConfiguration, exportService, iconDictionaryService, rendererService, snackbar, storageService, titleService) { + this.autosaveConfiguration = autosaveConfiguration; + this.exportService = exportService; + this.iconDictionaryService = iconDictionaryService; + this.rendererService = rendererService; + this.snackbar = snackbar; + this.storageService = storageService; + this.titleService = titleService; + this.autosavedDraftsChanged$ = new rxjs__WEBPACK_IMPORTED_MODULE_9__.Subject(); + this.autosaveConfiguration.configuration$.subscribe(configuration => this.updateConfiguration(configuration)); + } + loadCurrentDrafts() { + const drafts = this.readDrafts(); + this.sortDrafts(drafts); + return drafts; + } + loadDraft(draft) { + const configFromFile = draft.configAndDST.domain; + const config = (0,_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_1__.fromConfigurationFromFile)(configFromFile); + const story = JSON.parse(draft.configAndDST.dst); + this.titleService.updateTitleAndDescription(draft.title, draft.description, false); + const actorIcons = this.iconDictionaryService.getElementsOfType(story, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR); + const workObjectIcons = this.iconDictionaryService.getElementsOfType(story, _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT); + this.iconDictionaryService.updateIconRegistries(actorIcons, workObjectIcons, config); + this.rendererService.importStory(story, true, config, false); + } + removeAllDrafts() { + this.storageService.set(DRAFTS_TAG, []); + this.autosavedDraftsChanged$.next(); + } + loadLatestDraft() { + const drafts = this.readDrafts(); + if (drafts.length === 0) { + return; + } + this.loadDraft(drafts[0]); + } + updateConfiguration(configuration) { + this.stopTimer(); + if (configuration.activated) { + this.startTimer(configuration.interval, configuration.maxDrafts); + } + } + stopTimer() { + if (this.autosaveTimer) { + clearInterval(this.autosaveTimer); + this.autosaveTimer = undefined; + } + } + startTimer(interval, maxDrafts) { + this.autosaveTimer = setInterval(() => { + const savedDrafts = this.loadCurrentDrafts(); + const newDraft = this.createDraft(); + let isChanged = maxDrafts > 0; + if (savedDrafts.length > 0) { + isChanged = isChanged && !this.isSame(newDraft, savedDrafts[0]); + } + if (isChanged && !this.isDraftEmpty(newDraft)) { + savedDrafts.unshift(newDraft); + while (savedDrafts.length > maxDrafts) { + savedDrafts.pop(); + } + this.writeDrafts(savedDrafts); + this.snackbar.open('Draft Saved', undefined, { + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_2__.SNACKBAR_INFO, + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_2__.SNACKBAR_DURATION + }); + this.autosavedDraftsChanged$.next(); + } + }, interval * 1000); + } + isDraftEmpty(draft) { + return draft.title === _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_2__.INITIAL_TITLE && draft.description === _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_2__.INITIAL_DESCRIPTION && JSON.parse(draft.configAndDST.dst).length === 0; + } + isSame(a, b) { + return a.title === b.title && a.description === b.description && JSON.stringify(a.configAndDST) === JSON.stringify(b.configAndDST); + } + writeDrafts(drafts) { + this.storageService.set(DRAFTS_TAG, drafts); + } + readDrafts() { + return this.storageService.get(DRAFTS_TAG) ?? []; + } + createDraft() { + const dst = JSON.stringify(this.rendererService.getStory(), null, 2); + const configAndDST = this.exportService.createConfigAndDST(dst); + const date = new Date().toString().slice(0, 25); + return { + title: this.titleService.getTitle(), + description: this.titleService.getDescription(), + configAndDST, + date + }; + } + sortDrafts(drafts) { + drafts.sort((a, b) => { + const aDate = Date.parse(a.date); + const bDate = Date.parse(b.date); + return aDate > bDate ? 0 : 1; + }); + } + static #_ = this.ɵfac = function AutosaveService_Factory(t) { + return new (t || AutosaveService)(_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_autosave_configuration_service__WEBPACK_IMPORTED_MODULE_3__.AutosaveConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_Export_export_service__WEBPACK_IMPORTED_MODULE_4__.ExportService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_6__.RendererService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_11__.MatSnackBar), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_7__.StorageService), _angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_8__.TitleService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_10__["ɵɵdefineInjectable"]({ + token: AutosaveService, + factory: AutosaveService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 59298: +/*!***********************************************************!*\ + !*** ./src/app/Service/BrowserStorage/storage.service.ts ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ StorageService: () => (/* binding */ StorageService) +/* harmony export */ }); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var _Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/Common/iconSetConfiguration */ 84738); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); + + + +class StorageService { + set(key, value) { + localStorage.setItem(key, JSON.stringify(value)); + } + get(key) { + const json = localStorage.getItem(key); + if (json) { + return JSON.parse(json); + } + return null; + } + removeItem(key) { + localStorage.removeItem(key); + } + checkValidityOfConfiguration(configuratioFromFile) { + return configuratioFromFile.actors.keysArray().length > 1 && configuratioFromFile.workObjects.keysArray().length > 1 && !configuratioFromFile.actors.all().some(e => typeof e.value !== 'string') && !configuratioFromFile.workObjects.all().some(e => typeof e.value !== 'string'); + } + getStoredIconSetConfiguration() { + const iconSetString = localStorage.getItem(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.ICON_SET_CONFIGURATION_TAG); + if (!iconSetString) { + return; + } else { + const configurationFromFile = (0,_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_1__.fromConfigurationFromFile)(JSON.parse(iconSetString)); + if (this.checkValidityOfConfiguration(configurationFromFile)) { + return configurationFromFile; + } + } + return; + } + setStoredIconSetConfiguration(config) { + const actors = {}; + config.actors.keysArray().forEach(key => { + actors[key] = config.actors.get(key); + }); + const workObjects = {}; + config.workObjects.keysArray().forEach(key => { + workObjects[key] = config.workObjects.get(key); + }); + const configForStorage = { + name: config.name, + actors: actors, + workObjects: workObjects + }; + localStorage.setItem(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.ICON_SET_CONFIGURATION_TAG, JSON.stringify(configForStorage, null, 2)); + } + static #_ = this.ɵfac = function StorageService_Factory(t) { + return new (t || StorageService)(); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjectable"]({ + token: StorageService, + factory: StorageService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 19381: +/*!***************************************************************!*\ + !*** ./src/app/Service/CommandStack/command-stack.service.ts ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ CommandStackService: () => (/* binding */ CommandStackService) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); + +class CommandStackService { + constructor() {} + setCommandStack(commandStack) { + this.commandStack = commandStack; + } + execute(action, payload) { + this.commandStack.execute(action, payload); + } + static #_ = this.ɵfac = function CommandStackService_Factory(t) { + return new (t || CommandStackService)(); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: CommandStackService, + factory: CommandStackService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 4730: +/*!**************************************************!*\ + !*** ./src/app/Service/Dialog/dialog.service.ts ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DialogService: () => (/* binding */ DialogService) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/material/dialog */ 72768); + + +class DialogService { + constructor(matDialog) { + this.matDialog = matDialog; + } + openDialog(dialog, config) { + this.matDialog.open(dialog, config); + } + static #_ = this.ɵfac = function DialogService_Factory(t) { + return new (t || DialogService)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_material_dialog__WEBPACK_IMPORTED_MODULE_1__.MatDialog)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: DialogService, + factory: DialogService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 89791: +/*!*********************************************************!*\ + !*** ./src/app/Service/DirtyFlag/dirty-flag.service.ts ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DirtyFlagService: () => (/* binding */ DirtyFlagService) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); + + +class DirtyFlagService { + constructor() { + this.isDirtySubject = new rxjs__WEBPACK_IMPORTED_MODULE_0__.BehaviorSubject(false); + this.dirty$ = this.isDirtySubject.asObservable(); + } + makeDirty() { + this.isDirtySubject.next(true); + } + makeClean() { + this.isDirtySubject.next(false); + } + get dirty() { + return this.isDirtySubject.value; + } + static #_ = this.ɵfac = function DirtyFlagService_Factory(t) { + return new (t || DirtyFlagService)(); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ + token: DirtyFlagService, + factory: DirtyFlagService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 63149: +/*!*********************************************************************!*\ + !*** ./src/app/Service/DomManipulation/dom-manipulation.service.ts ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DomManipulationService: () => (/* binding */ DomManipulationService) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Domain_DomManipulation_replayConstants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/DomManipulation/replayConstants */ 90173); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); + + + + +/** + * Manipulates the DOM during replay to only show the elements of the current Sentence + */ +class DomManipulationService { + constructor(elementRegistryService) { + this.elementRegistryService = elementRegistryService; + } + showAll() { + this.removeHighlights(); + this.elementRegistryService.getAllCanvasObjects().slice().concat(this.elementRegistryService.getAllGroups().slice()).map(e => e.businessObject).forEach(element => { + const domObject = document.querySelector('[data-element-id=' + element.id + ']'); + // @ts-ignore + domObject.style.display = 'block'; + }); + } + showSentence(replaySentence, previousSentence) { + this.removeHighlights(); + const notShown = this.getAllNotShown(replaySentence.objects); + notShown.forEach(element => { + const domObject = document.querySelector('[data-element-id=' + element.id + ']'); + if (domObject) { + // @ts-ignore + domObject.style.display = 'none'; + } + }); + this.highlightSentence(previousSentence ? replaySentence.objects.filter(o => !previousSentence.objects.includes(o)) : replaySentence.objects); + replaySentence.objects.forEach(element => { + const domObject = document.querySelector('[data-element-id=' + element.id + ']'); + if (domObject) { + // @ts-ignore + domObject.style.display = 'block'; + } + }); + } + getNumberDomForActivity(activity) { + const numberDOMS = activity.parentElement?.getElementsByClassName('djs-labelNumber') || ['', '']; + return { + numberBackgroundDom: numberDOMS[0], + numberTextDom: numberDOMS[1] + }; + } + removeHighlights() { + const allActivities = this.elementRegistryService.getAllActivities(); + const allConnections = this.elementRegistryService.getAllConnections(); + allActivities.forEach(activity => { + const querySelector = document.querySelector('[data-element-id=' + activity.id + ']'); + if (querySelector) { + const activityDomObject = querySelector.getElementsByTagName('polyline')[0]; + activityDomObject.style.stroke = activity.businessObject.pickedColor || 'black'; + activityDomObject.style.strokeWidth = _Domain_DomManipulation_replayConstants__WEBPACK_IMPORTED_MODULE_1__.STROKE_WIDTH; + const { + numberBackgroundDom, + numberTextDom + } = this.getNumberDomForActivity(activityDomObject); + if (numberBackgroundDom && numberTextDom) { + numberBackgroundDom.style.fill = _Domain_DomManipulation_replayConstants__WEBPACK_IMPORTED_MODULE_1__.NUMBER_BACKGROUND_COLOR; + numberTextDom.style.fill = _Domain_DomManipulation_replayConstants__WEBPACK_IMPORTED_MODULE_1__.NUMBER_COLOR; + } + } + }); + allConnections.forEach(connection => { + // @ts-ignore + const connectionDomObject = document.querySelector('[data-element-id=' + connection.id + ']').getElementsByTagName('polyline')[0]; + connectionDomObject.style.stroke = connection.businessObject.pickedColor || 'black'; + connectionDomObject.style.strokeWidth = '1.5'; + }); + } + highlightSentence(sentenceObjects) { + sentenceObjects.filter(e => e.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY).forEach(activity => { + const querySelector = document.querySelector('[data-element-id=' + activity.id + ']'); + if (querySelector) { + const activityDomObject = querySelector.getElementsByTagName('polyline')[0]; + activityDomObject.style.stroke = _Domain_DomManipulation_replayConstants__WEBPACK_IMPORTED_MODULE_1__.HIGHLIGHT_COLOR; + activityDomObject.style.strokeWidth = _Domain_DomManipulation_replayConstants__WEBPACK_IMPORTED_MODULE_1__.HIGHLIGHT_STROKE_WIDTH; + const { + numberBackgroundDom, + numberTextDom + } = this.getNumberDomForActivity(activityDomObject); + if (numberTextDom && numberBackgroundDom) { + numberBackgroundDom.style.fill = _Domain_DomManipulation_replayConstants__WEBPACK_IMPORTED_MODULE_1__.HIGHLIGHT_NUMBER_BACKGROUNG_COLOR; + numberTextDom.style.fill = _Domain_DomManipulation_replayConstants__WEBPACK_IMPORTED_MODULE_1__.HIGHLIGHT_NUMBER_COLOR; + } + } + }); + } + getAllNotShown(shownElements) { + const notShownElements = []; + const allObjects = this.elementRegistryService.getAllCanvasObjects().concat(this.elementRegistryService.getAllGroups()); + allObjects.forEach(element => { + if (!shownElements.includes(element.businessObject)) { + if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.CONNECTION)) { + // @ts-ignore + if (!element.source.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { + notShownElements.push(element.businessObject); + } else { + // @ts-ignore + shownElements.push(element.target); + } + } else { + notShownElements.push(element.businessObject); + } + } + }); + return notShownElements; + } + static #_ = this.ɵfac = function DomManipulationService_Factory(t) { + return new (t || DomManipulationService)(_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_2__.ElementRegistryService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineInjectable"]({ + token: DomManipulationService, + factory: DomManipulationService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 67613: +/*!*********************************************************************!*\ + !*** ./src/app/Service/ElementRegistry/element-registry.service.ts ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ElementRegistryService: () => (/* binding */ ElementRegistryService) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); + + +class ElementRegistryService { + constructor() { + this.fullyInitialized = false; + } + /** + * Initially the registry has only the root-Element. + * Once the canvas has bees initialized, we adjust the reference to point to the elements on the canvas for convenience + */ + correctInitialize() { + if (!this.fullyInitialized) { + if (this.registry.__implicitroot) { + this.registry = this.registry.__implicitroot.element.children; + this.fullyInitialized = true; + } + } + } + setElementRegistry(registry) { + this.registry = registry._elements; + } + clear() { + this.registry = null; + this.fullyInitialized = false; + } + createObjectListForDSTDownload() { + if (this.registry) { + const allObjectsFromCanvas = this.getAllCanvasObjects(); + const groups = this.getAllGroups(); + const objectList = []; + this.fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups); + return objectList; + } + return []; + } + fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups) { + allObjectsFromCanvas.forEach(canvasElement => { + if (canvasElement.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY) { + objectList.push(canvasElement); + } + // ensure that Activities are always after Actors, Workobjects and Groups in .dst files + else { + if (canvasElement.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.TEXTANNOTATION) { + canvasElement.businessObject.width = canvasElement.width; + canvasElement.businessObject.height = canvasElement.height; + } + if (!objectList.includes(canvasElement)) { + objectList.unshift(canvasElement); + } + } + }); + groups.forEach(group => { + objectList.push(group); + }); + } + getAllActivities() { + const activities = []; + this.getAllCanvasObjects().forEach(element => { + if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY)) { + activities.push(element); + } + }); + return activities; + } + getAllConnections() { + const connections = []; + this.getAllCanvasObjects().forEach(element => { + const type = element.type; + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.CONNECTION) { + connections.push(element); + } + }); + return connections; + } + getAllCanvasObjects() { + const allObjects = []; + const groupObjects = []; + this.checkChildForGroup(groupObjects, allObjects); + // for each memorized group, remove it from the group-array and check its children, whether they are groups or not + // if a child is a group, memorize it in the group-array + // other children should already be in the allObjects list + let i = groupObjects.length - 1; + while (groupObjects.length >= 1) { + const currentGroup = groupObjects.pop(); + // @ts-ignore + currentGroup.children.forEach(child => { + const type = child.type; + if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { + groupObjects.push(child); + } + }); + i = groupObjects.length - 1; + } + return allObjects; + } + // returns all groups on the canvas and inside other groups + getAllGroups() { + const groupObjects = []; + const allObjects = []; + this.checkChildForGroup(groupObjects, allObjects); + for (const group of groupObjects) { + group.children?.forEach(child => { + if (child.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { + groupObjects.push(child); + } + }); + } + return groupObjects; + } + checkChildForGroup(groupObjects, allObjects) { + const registryElementNames = Object.keys(this.registry); + for (let name of registryElementNames) { + const entry = this.registry[name].element; + if (entry.businessObject) { + const type = entry.type; + if (type && type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.GROUP)) { + // if it is a group, memorize this for later + groupObjects.push(entry); + } else if (type) { + allObjects.push(entry); + } + } + } + } + // get a list of activities, that originate from an actor-type + getActivitiesFromActors() { + const activitiesFromActors = []; + const activities = this.getAllActivities(); + activities.forEach(activity => { + if (activity.source?.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR)) { + activitiesFromActors.push(activity); + } + }); + return activitiesFromActors; + } + getUsedIcons() { + const actors = this.getAllActors(); + const workobjects = this.getAllWorkobjects(); + return { + actors: actors.map(a => a.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR, '')), + workobjects: workobjects.map(w => w.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT, '')) + }; + } + getAllActors() { + return this.getAllCanvasObjects().filter(co => co.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR)); + } + getAllWorkobjects() { + return this.getAllCanvasObjects().filter(co => co.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT)); + } + static #_ = this.ɵfac = function ElementRegistryService_Factory(t) { + return new (t || ElementRegistryService)(); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ + token: ElementRegistryService, + factory: ElementRegistryService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 98106: +/*!**************************************************!*\ + !*** ./src/app/Service/Export/export.service.ts ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ExportService: () => (/* binding */ ExportService) +/* harmony export */ }); +/* harmony import */ var src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Utils/sanitizer */ 66107); +/* harmony import */ var src_app_Domain_Export_configAndDst__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Export/configAndDst */ 74306); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../environments/environment */ 45312); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-set-configuration.service */ 10200); +/* harmony import */ var src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Service/Title/title.service */ 69672); +/* harmony import */ var src_app_Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/Service/DirtyFlag/dirty-flag.service */ 89791); +/* harmony import */ var src_app_Service_Export_png_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/Service/Export/png.service */ 11503); +/* harmony import */ var src_app_Service_Export_svg_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Service/Export/svg.service */ 29298); +/* harmony import */ var _html_presentation_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./html-presentation.service */ 72680); +/* harmony import */ var _Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Renderer/renderer.service */ 94896); + + + + + + + + + + + + +class ExportService { + constructor(configurationService, titleService, dirtyFlagService, pngService, svgService, htmlPresentationService, rendererService) { + this.configurationService = configurationService; + this.titleService = titleService; + this.dirtyFlagService = dirtyFlagService; + this.pngService = pngService; + this.svgService = svgService; + this.htmlPresentationService = htmlPresentationService; + this.rendererService = rendererService; + this.title = ''; + this.description = ''; + this.titleSubscription = this.titleService.title$.subscribe(title => { + this.title = title; + }); + this.descriptionSubscription = this.titleService.description$.subscribe(description => { + this.description = description; + }); + } + ngOnDestroy() { + this.titleSubscription.unsubscribe(); + this.descriptionSubscription.unsubscribe(); + } + isDomainStoryExportable() { + return this.rendererService.getStory().length >= 1; + } + createConfigAndDST(DomainStory) { + return new src_app_Domain_Export_configAndDst__WEBPACK_IMPORTED_MODULE_1__.ConfigAndDST(this.configurationService.getCurrentConfigurationForExport(), DomainStory); + } + downloadDST() { + const dst = this.getStoryForDownload(); + const configAndDST = this.createConfigAndDST(dst); + const json = JSON.stringify(configAndDST, null, 2); + const filename = (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title + '_' + this.getCurrentDateString()); + this.downloadFile(json, 'data:text/plain;charset=utf-8,', filename, '.egn', true); + } + downloadFile(data, datatype, filename, fileEnding, makeClean) { + const element = document.createElement('a'); + element.setAttribute('href', datatype + encodeURIComponent(data)); + element.setAttribute('download', filename + fileEnding); + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + if (makeClean) { + this.dirtyFlagService.makeClean(); + } + document.body.removeChild(element); + } + downloadSVG(withTitle, useWhiteBackground) { + const story = this.getStoryForDownload(); + const dst = this.createConfigAndDST(story); + const svgData = this.svgService.createSVGData(this.title, this.description, dst, withTitle, useWhiteBackground); + this.downloadFile(svgData, 'data:application/bpmn20-xml;charset=UTF-8,', (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title + '_' + this.getCurrentDateString()), '.egn.svg', true); + } + downloadPNG(withTitle) { + const canvas = document.getElementById('canvas'); + if (canvas) { + const container = canvas.getElementsByClassName('djs-container'); + const svgElements = container[0].getElementsByTagName('svg'); + const outerSVGElement = svgElements[0]; + const viewport = outerSVGElement.getElementsByClassName('viewport')[0]; + const layerBase = viewport.getElementsByClassName('layer-base')[0]; + const image = document.createElement('img'); + // removes unwanted black dots in image + let svg = this.pngService.extractSVG(viewport, outerSVGElement); + svg = this.pngService.prepareSVG(svg, layerBase, this.description, this.title, withTitle); + image.onload = () => { + const tempCanvas = document.createElement('canvas'); + // add a 10px buffer to the right and lower boundary + tempCanvas.width = this.pngService.getWidth() + 10; + tempCanvas.height = this.pngService.getHeight() + 10; + const ctx = tempCanvas.getContext('2d'); + if (ctx) { + // fill with white background + ctx.rect(0, 0, tempCanvas.width, tempCanvas.height); + ctx.fillStyle = 'white'; + ctx.fill(); + ctx.drawImage(image, 0, 0); + } + const png64 = tempCanvas.toDataURL('image/png'); + const ele = document.createElement('a'); + ele.setAttribute('download', (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title) + '_' + this.getCurrentDateString() + '.png'); + ele.setAttribute('href', png64); + document.body.appendChild(ele); + ele.click(); + document.body.removeChild(ele); + // image source has to be removed to circumvent browser caching + image.src = ''; + }; + image.onchange = image.onload; + image.width = this.pngService.getWidth(); + image.height = this.pngService.getHeight(); + image.src = 'data:image/svg+xml,' + svg; + } + } + downloadHTMLPresentation() { + const filename = (0,src_app_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_0__.sanitizeForDesktop)(this.title + '_' + this.getCurrentDateString()); + this.htmlPresentationService.downloadHTMLPresentation(filename).then(); + } + getStoryForDownload() { + const story = this.rendererService.getStory(); + story.push({ + info: this.titleService.getDescription() + }); + story.push({ + version: _environments_environment__WEBPACK_IMPORTED_MODULE_2__.environment.version + }); + return story; + } + getCurrentDateString() { + return (0,_angular_common__WEBPACK_IMPORTED_MODULE_10__.formatDate)(new Date(), 'YYYY-MM-dd', 'en-GB'); + } + static #_ = this.ɵfac = function ExportService_Factory(t) { + return new (t || ExportService)(_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_3__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_4__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_5__.DirtyFlagService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_Export_png_service__WEBPACK_IMPORTED_MODULE_6__.PngService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_Export_svg_service__WEBPACK_IMPORTED_MODULE_7__.SvgService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_html_presentation_service__WEBPACK_IMPORTED_MODULE_8__.HtmlPresentationService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_9__.RendererService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdefineInjectable"]({ + token: ExportService, + factory: ExportService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 72680: +/*!*************************************************************!*\ + !*** ./src/app/Service/Export/html-presentation.service.ts ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ HtmlPresentationService: () => (/* binding */ HtmlPresentationService) +/* harmony export */ }); +/* harmony import */ var _home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 56207); +/* harmony import */ var _Utils_sanitizer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/sanitizer */ 66107); +/* harmony import */ var dot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dot */ 13280); +/* harmony import */ var dot__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(dot__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Replay_replay_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Replay/replay.service */ 94788); +/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Title/title.service */ 69672); + + +// @ts-ignore + + + + +/** + * Initial idea and PR from https://github.com/indika-dev + */ +class HtmlPresentationService { + constructor(replayService, titleService) { + this.replayService = replayService; + this.titleService = titleService; + } + setModelerClasses(canvas, selection, modeler) { + this.modeler = modeler; + } + static viewBoxCoordinates(svg) { + const ViewBoxCoordinate = /width="([^"]+)"\s+height="([^"]+)"\s+viewBox="([^"]+)"/; + const match = svg.match(ViewBoxCoordinate); + return match[3]; + } + /* + --------------------------- + SVG handling starts here + ---------------------------- + */ + downloadHTMLPresentation(filename) { + var _this = this; + return (0,_home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + const svgData = []; + // export all sentences of domain story + _this.replayService.startReplay(); + try { + const result = yield _this.modeler.saveSVG({}); + _this.fixActivityMarkersForEachSentence(result, _this.replayService.getCurrentSentenceNumber()); + svgData.push({ + content: HtmlPresentationService.createSVGData(result.svg), + transition: 'slide' + }); + } catch (err) { + alert('There was an error exporting the SVG.\n' + err); + } + while (_this.replayService.getCurrentSentenceNumber() < _this.replayService.getMaxSentenceNumber()) { + _this.replayService.nextSentence(); + try { + const result = yield _this.modeler.saveSVG({}); + _this.fixActivityMarkersForEachSentence(result, _this.replayService.getCurrentSentenceNumber()); + svgData.push({ + content: HtmlPresentationService.createSVGData(result.svg), + transition: 'slide' + }); + } catch (err) { + alert('There was an error exporting the SVG.\n' + err); + } + } + _this.replayService.stopReplay(); + // create download for presentation + const revealjsTemplate = document.getElementById('revealjs-template'); + const dots = dot__WEBPACK_IMPORTED_MODULE_2___default().template(revealjsTemplate?.innerHTML); + const revealjsData = { + script: 'script', + title: _this.titleService.getTitle(), + description: _this.titleService.getDescription(), + sentences: svgData, + multiplexSecret: _this.multiplexSecret, + multiplexId: _this.multiplexId + }; + const element = document.createElement('a'); + element.setAttribute('href', 'data:text/html;charset=UTF-8,' + _this.fixMalformedHtmlScript(dots, revealjsData)); + element.setAttribute('download', (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_1__.sanitizeForDesktop)(filename) + '.html'); + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + document.body.removeChild(element); + })(); + } + fixMalformedHtmlScript(dots, revealjsData) { + return dots(revealjsData).replace(''), result.svg.indexOf('') + 7); + const split = defs.split(' { + const idToReplace = id.substring(4, id.length - 1); + const newId = idToReplace.slice(0, id.length - 5) + 'customId' + sectionIndex + idToReplace.slice(idToReplace.length - 2); + // @ts-ignore + result.svg = result.svg.replaceAll(idToReplace, newId); + }); + newDefs += ' { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ PngService: () => (/* binding */ PngService) +/* harmony export */ }); +/* harmony import */ var src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/Export/exportUtil */ 70908); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); + + +class PngService { + constructor() { + this.width = 0; + this.height = 0; + } + browserSpecs() { + const ua = navigator.userAgent; + let tem; + let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; + if (/trident/i.test(M[1])) { + tem = /\brv[ :]+(\d+)/g.exec(ua) || []; + return { + name: 'IE', + version: tem[1] || '' + }; + } + if (M[1] === 'Chrome') { + tem = ua.match(/\b(OPR|Edge)\/(\d+)/); + if (tem != null) { + return { + name: tem[1].replace('OPR', 'Opera'), + version: tem[2] + }; + } + } + M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?']; + // tslint:disable-next-line:no-conditional-assignment + if ((tem = ua.match(/version\/(\d+)/i)) != null) { + M.splice(1, 1, tem[1]); + } + return { + name: M[0], + version: M[1] + }; + } + /** Needed for an SVG-Fix in CHrome where the # needs to be replaced by %23 **/ + URIHashtagFix(svg) { + let fix = false; + const browser = this.browserSpecs(); + const name = browser.name; + const version = parseInt(browser.version); + // only implemented in chrome and firefox at the moment + if (name.includes('Chrome')) { + if (version >= 72) { + fix = true; + // https://www.chromestatus.com/features/5656049583390720 + } + } else if (name.includes('Firefox')) { + fix = true; + // versionNumber of implementation unknown + } + + if (fix) { + while (svg.includes('#')) { + svg = svg.replace('#', '%23'); + } + } + return svg; + } + findMostOuterElements(svg) { + let xLeft = 0; + let xRight = 0; + let yUp = 0; + let yDown = 0; + const elements = svg.getElementsByClassName('djs-group'); + // tslint:disable-next-line:prefer-for-of + for (let i = 0; i < elements.length; i++) { + const element = elements[i]; + const sub = element.children; + let elXLeft; + let elXRight; + let elYUp; + let elYDown; + const transform = sub[0].getAttribute('transform'); + if (transform) { + let nums; + if (transform.includes('matrix')) { + transform.replace('matrix(', ''); + transform.replace(')', ''); + nums = transform.split(' '); + elXLeft = parseInt(nums[4]); + elYUp = parseInt(nums[5]); + } else { + transform.replace('translate(', ''); + transform.replace(')', ''); + nums = transform.split(' '); + elXLeft = parseInt(nums[0]); + elYUp = parseInt(nums[1]); + } + const rects = sub[0].getElementsByTagName('rect'); + const outerRect = rects[rects.length - 1]; + const width = outerRect.getAttribute('width'); + elXRight = elXLeft + parseInt(width != null ? width : '0'); + elYDown = elYUp + sub[0].getBoundingClientRect().height; + } else { + const rects = element.getElementsByTagName('rect'); + const outerRect = rects[rects.length - 1]; + const x = outerRect.getAttribute('x'); + const y = outerRect.getAttribute('y'); + elXLeft = parseInt(x != null ? x : '0'); + elYUp = parseInt(y != null ? y : '0'); + const width = outerRect.getAttribute('width'); + const height = outerRect.getAttribute('height'); + elXRight = elXLeft + parseInt(width != null ? width : '0'); + elYDown = elYUp + parseInt(height != null ? height : '0') + 20; // Add 20 px as Padding for text at the bottom + } + + if (elXLeft < xLeft) { + xLeft = elXLeft; + } + if (elXRight > xRight) { + xRight = elXRight; + } + if (elYUp < yUp) { + yUp = elYUp; + } + if (elYDown > yDown) { + yDown = elYDown; + } + } + yUp -= 75; // we need to adjust yUp to have space for the title and description + return { + xLeft, + xRight, + yUp, + yDown + }; + } + prepareSVG(svg, layerBase, description, title, withTitle) { + const box = this.findMostOuterElements(layerBase); + let viewBoxIndex = svg.indexOf('width="'); + this.calculateWidthAndHeight(box); + const { + insertText, + extraHeight + } = (0,src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__.createTitleAndDescriptionSVGElement)(title, description, box.xLeft + 10, box.yUp + 20, this.width); + if (withTitle) { + this.height += extraHeight; + } + const bounds = this.createBounds(box, extraHeight); + const dataStart = svg.substring(0, viewBoxIndex); + viewBoxIndex = svg.indexOf('style="'); + const dataEnd = svg.substring(viewBoxIndex); + dataEnd.substring(viewBoxIndex); + svg = dataStart + bounds + dataEnd; + const insertIndex = svg.indexOf('') + 20; + if (withTitle) { + svg = [svg.slice(0, insertIndex), insertText, svg.slice(insertIndex)].join(''); + } + svg = this.URIHashtagFix(svg); + return svg; + } + createBounds(box, extraHeight) { + return 'width="' + this.width + '" height="' + this.height + '" viewBox=" ' + box.xLeft + ' ' + (box.yUp - extraHeight) + ' ' + this.width + ' ' + this.height + '" '; + } + /** + * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off + */ + calculateWidthAndHeight(box) { + if (box.xLeft < 0) { + if (box.xRight < 0) { + this.width = Math.abs(box.xLeft - box.xRight); + } else { + this.width = Math.abs(box.xLeft) + box.xRight; + } + } else { + this.width = box.xRight - box.xLeft; + } + if (box.yUp < 0) { + if (box.yDown < 0) { + this.height = Math.abs(box.yUp - box.yDown); + } else { + this.height = Math.abs(box.yUp) + box.yDown; + } + } else { + this.height = box.yDown - box.yUp; + } + // if the domain-Story is smaller than 300px in width or height, increase its dimensions + if (this.height < 300) { + this.height += 300; + box.yUp -= 150; + box.yDown += 150; + } + if (this.width < 300) { + this.width += 300; + box.xLeft -= 150; + box.xRight += 150; + } + return [this.height, this.width]; + } + extractSVG(viewport, outerSVGElement) { + const layerResizers = viewport.getElementsByClassName('layer-resizers'); + const layerOverlays = viewport.getElementsByClassName('layer-overlays'); + const transform = viewport.getAttribute('transform'); + const translate = viewport.getAttribute('translate'); + if (layerResizers[0]) { + layerResizers[0].parentNode.removeChild(layerResizers[0]); + } + if (layerOverlays[0]) { + layerOverlays[0].parentNode.removeChild(layerOverlays[0]); + } + // remove canvas scrolling and scaling before serializeToString of SVG + if (transform) { + viewport.removeAttribute('transform'); + } + if (translate) { + viewport.removeAttribute('translate'); + } + const svg = new XMLSerializer().serializeToString(outerSVGElement); + // re-add canvas scrolling and scaling + if (transform) { + viewport.setAttribute('transform', transform); + } + if (translate) { + viewport.setAttribute('translate', translate); + } + return svg; + } + getWidth() { + return this.width; + } + getHeight() { + return this.height; + } + static #_ = this.ɵfac = function PngService_Factory(t) { + return new (t || PngService)(); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ + token: PngService, + factory: PngService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 29298: +/*!***********************************************!*\ + !*** ./src/app/Service/Export/svg.service.ts ***! + \***********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SvgService: () => (/* binding */ SvgService) +/* harmony export */ }); +/* harmony import */ var src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/Export/exportUtil */ 70908); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Modeler/modeler.service */ 74676); + + + +class SvgService { + constructor(modelerService) { + this.modelerService = modelerService; + this.cacheData = ''; + } + createSVGData(title, description, dst, withTitle, useWhiteBackground) { + this.cacheData = this.modelerService.getEncoded(); + let data = structuredClone(this.cacheData); + let viewBoxIndex = data.indexOf('width="'); + let { + width, + height, + viewBox + } = this.viewBoxCoordinates(data); + let xLeft; + let xRight; + let yUp; + let yDown; + const splitViewBox = viewBox.split(/\s/); + xLeft = +splitViewBox[0]; + yUp = +splitViewBox[1]; + xRight = +splitViewBox[2]; + yDown = +splitViewBox[3]; + if (xRight < 300) { + xRight += 300; + width += 300; + } + const { + insertText + } = (0,src_app_Service_Export_exportUtil__WEBPACK_IMPORTED_MODULE_0__.createTitleAndDescriptionSVGElement)(title, description, xLeft, yUp, width); + const bounds = this.createBounds(width, height, xLeft, yUp, xRight, yDown, withTitle); + const dataStart = data.substring(0, viewBoxIndex); + viewBoxIndex = data.indexOf('" version'); + const dataEnd = data.substring(viewBoxIndex); + dataEnd.substring(viewBoxIndex); + data = dataStart + bounds + dataEnd; + const insertIndex = this.findIndexToInsertData(data); + if (withTitle) { + data = data.slice(0, insertIndex) + insertText + data.slice(insertIndex); + } + if (useWhiteBackground) { + const svgIndex = data.indexOf('width="'); + const backgroundColorWhite = 'style="background-color:white" '; + data = data.slice(0, svgIndex) + backgroundColorWhite + data.slice(svgIndex); + } + return this.appendDST(data, dst); + } + findIndexToInsertData(data) { + let insertIndex = data.indexOf(''); + if (insertIndex < 0) { + insertIndex = data.indexOf('version="1.2">') + 14; + } else { + insertIndex += 7; + } + return insertIndex; + } + createBounds(width, height, xLeft, yUp, xRight, yDown, withTitle) { + return 'width="' + width + '" height=" ' + height + '" viewBox="' + xLeft + ' ' + (withTitle ? yUp - 80 : yUp) + ' ' + xRight + ' ' + (yDown + 30); + } + viewBoxCoordinates(svg) { + const ViewBoxCoordinate = /width="([^"]+)"\s+height="([^"]+)"\s+viewBox="([^"]+)"/; + const match = svg.match(ViewBoxCoordinate); + if (match) { + return { + width: +match[1], + height: +match[2], + viewBox: match[3] + }; + } + return { + width: 0, + height: 0, + viewBox: '' + }; + } + appendDST(data, dst) { + data += '\n'; + return data; + } + static #_ = this.ɵfac = function SvgService_Factory(t) { + return new (t || SvgService)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵinject"](_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_1__.ModelerService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjectable"]({ + token: SvgService, + factory: SvgService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 93689: +/*!*************************************************************************!*\ + !*** ./src/app/Service/IconSetConfiguration/icon-dictionary.service.ts ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ICON_PREFIX: () => (/* binding */ ICON_PREFIX), +/* harmony export */ IconDictionaryService: () => (/* binding */ IconDictionaryService) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/iconConfiguration */ 34752); +/* harmony import */ var src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Domain/Icon-Set-Configuration/allIcons */ 57488); +/* harmony import */ var _Utils_naming__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Utils/naming */ 28714); +/* harmony import */ var _Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Utils/sanitizer */ 66107); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 96623); + + + + + + + +const ICON_PREFIX = 'icon-domain-story-'; +class IconDictionaryService { + constructor() { + this.actorIconDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + this.workObjectDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + this.allIconDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + this.iconDictionaryForBPMN = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + this.allIconDictionary.addEach(src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.allIcons); + this.iconConfig = new src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.IconConfiguration(this.allIconDictionary); + } + initTypeDictionaries(actors, workObjects) { + if (!actors || actors.length == 0) { + actors = src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.actors; + } + if (!workObjects || workObjects.length == 0) { + workObjects = src_app_Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.workObjects; + } + const allTypes = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + allTypes.addEach(src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.allIcons); + allTypes.appendDict(this.getAppendedIconDictionary()); + this.initDictionary(actors, allTypes, this.actorIconDictionary, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR); + this.initDictionary(workObjects, allTypes, this.workObjectDictionary, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT); + } + initDictionary(keys, allTypes, dictionary, elementType) { + dictionary.clear(); + for (const key of keys) { + dictionary.add(allTypes.get(key), key); + } + dictionary.keysArray().forEach(name => { + this.registerIconForBPMN(name, ICON_PREFIX + (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(name.toLowerCase()), elementType); + }); + } + getCurrentIconConfigurationForBPMN() { + if (this.customConfiguration) { + return this.iconConfig.createCustomConf(this.customConfiguration); + } + return this.iconConfig.getDefaultConf(); + } + allInTypeDictionary(type, elements) { + let collection; + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + collection = this.actorIconDictionary; + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + collection = this.workObjectDictionary; + } + let allIn = true; + if (elements) { + elements.forEach(element => { + if (!collection.has((0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type))) { + allIn = false; + } + }); + } else { + return false; + } + return allIn; + } + /** Load Icons from Configuration **/ + addIconsFromIconSetConfiguration(dictionaryType, iconTypes) { + let collection; + if (dictionaryType === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + collection = this.actorIconDictionary; + } else if (dictionaryType === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + collection = this.workObjectDictionary; + } + const allTypes = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + allTypes.addEach(src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.allIcons); + allTypes.appendDict(src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons); + iconTypes.forEach(name => { + if (!collection.has(name)) { + const src = allTypes.get(name); + if (src) { + this.registerIconForType(dictionaryType, name, src); + this.registerIconForBPMN(name, (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(ICON_PREFIX + name.toLowerCase()), dictionaryType); + } + } + }); + } + /** Add Icon(s) to Dictionary **/ + registerIconForBPMN(name, src, elementType) { + if (name.includes(elementType)) { + throw new Error('Should not include elementType'); + } + this.iconDictionaryForBPMN.set(`${elementType}${name}`, src); + } + addIconsToTypeDictionary(actorIcons, workObjectIcons) { + if (!this.allInTypeDictionary(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, actorIcons)) { + this.addIconsFromIconSetConfiguration(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, actorIcons.map(element => (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type))); + } + if (!this.allInTypeDictionary(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, workObjectIcons)) { + this.addIconsFromIconSetConfiguration(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, workObjectIcons.map(element => (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type))); + } + } + registerIconForType(type, name, src) { + if (name.includes(type)) { + throw new Error('Name should not include type!'); + } + let collection = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + collection = this.actorIconDictionary; + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + collection = this.workObjectDictionary; + } + collection.add(src, name); + } + unregisterIconForType(type, name) { + if (name.includes(type)) { + throw new Error('Name should not include type!'); + } + let collection = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + collection = this.actorIconDictionary; + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + collection = this.workObjectDictionary; + } + collection.delete(name); + } + updateIconRegistries(actors, workObjects, config) { + const elements = []; + actors.forEach(a => elements.push(a)); + workObjects.forEach(w => elements.push(w)); + const customIcons = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + const actorsDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + const workObjectsDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + config.actors.keysArray().forEach(key => { + actorsDict.set(key, config.actors.get(key)); + }); + config.workObjects.keysArray().forEach(key => { + workObjectsDict.set(key, config.workObjects.get(key)); + }); + this.extractCustomIconsFromDictionary(actorsDict, customIcons); + this.extractCustomIconsFromDictionary(workObjectsDict, customIcons); + elements.forEach(element => { + const name = (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(element.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '').replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, '')); + if ((element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) || element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT)) && !this.getFullDictionary().has(name)) { + let elementType; + if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR)) { + elementType = src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR; + } else { + elementType = src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT; + } + this.registerIconForBPMN(ICON_PREFIX + name.toLowerCase(), (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_4__.getNameFromType)(element.type), elementType); + } + }); + this.addNewIconsToDictionary(customIcons); + this.addIconsToTypeDictionary(actors, workObjects); + } + extractCustomIconsFromDictionary(elementDictionary, customIcons) { + elementDictionary.keysArray().forEach(name => { + const sanitizedName = (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(name); + if (!this.getFullDictionary().has(sanitizedName)) { + customIcons.add(elementDictionary.get(name), sanitizedName); + } + }); + } + /** Add new Icon(s) **/ + addNewIconsToDictionary(customIcons) { + customIcons.keysArray().forEach(key => { + const custom = customIcons.get(key); + this.addIMGToIconDictionary(custom.src, key); + }); + this.addIconsToCss(customIcons); + } + addIMGToIconDictionary(input, name) { + src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.set(name, input); + } + addIconsToCss(customIcons) { + const sheetEl = document.getElementById('iconsCss'); + customIcons.keysArray().forEach(key => { + const src = customIcons.get(key); + const iconStyle = '.' + ICON_PREFIX + (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.sanitizeIconName)(key.toLowerCase()) + '::before{ content: url("data:image/svg+xml;utf8,' + this.wrapSRCInSVG(src) + '"); margin: 3px;}'; + // @ts-ignore + sheetEl?.sheet?.insertRule(iconStyle, sheetEl.sheet.cssRules.length); + }); + } + wrapSRCInSVG(src) { + return ""; + } + /** Getter & Setter **/ + getFullDictionary() { + const fullDictionary = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + fullDictionary.appendDict(this.allIconDictionary); + fullDictionary.appendDict(this.getAppendedIconDictionary()); + return fullDictionary; + } + getAppendedIconDictionary() { + const appendedDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.keysArray().forEach(key => { + if (!this.allIconDictionary.has(key)) { + appendedDict.set(key, src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.get(key)); + } + }); + return appendedDict; + } + getTypeDictionary(type) { + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + return this.actorIconDictionary; + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + return this.workObjectDictionary; + } + return new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + } + getTypeDictionaryKeys(type) { + return this.getTypeDictionary(type).keysArray(); + } + getTypeIconSRC(type, name) { + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR) { + return this.actorIconDictionary.get(name); + } else if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT) { + return this.workObjectDictionary.get(name); + } + return null; + } + getIconForBPMN(elementType, name) { + return this.iconDictionaryForBPMN.get(`${elementType}${name}`); + } + getIconSource(name) { + if (this.allIconDictionary.has(name)) { + return this.allIconDictionary.get(name); + } else if (src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.has(name)) { + return src_app_Domain_Icon_Set_Configuration_allIcons__WEBPACK_IMPORTED_MODULE_3__.appendedIcons.get(name); + } + return null; + } + getElementsOfType(elements, type) { + const elementOfType = []; + elements.forEach(element => { + if (element.type.includes(type)) { + elementOfType.push(element); + } + }); + return elementOfType; + } + getAllIconDictionary() { + return this.allIconDictionary; + } + getActorsDictionary() { + return this.actorIconDictionary; + } + getWorkObjectsDictionary() { + return this.workObjectDictionary; + } + getIconConfiguration() { + return this.iconConfig; + } + setCustomConfiguration(customConfiguration) { + this.customConfiguration = customConfiguration; + } + static #_ = this.ɵfac = function IconDictionaryService_Factory(t) { + return new (t || IconDictionaryService)(); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineInjectable"]({ + token: IconDictionaryService, + factory: IconDictionaryService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 10200: +/*!********************************************************************************!*\ + !*** ./src/app/Service/IconSetConfiguration/icon-set-configuration.service.ts ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IconSetConfigurationService: () => (/* binding */ IconSetConfigurationService) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/iconConfiguration */ 34752); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-dictionary.service */ 93689); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Title/title.service */ 69672); + + + + + + + + +class IconSetConfigurationService { + constructor(iconDictionaryService, elementRegistryService, titleService) { + this.iconDictionaryService = iconDictionaryService; + this.elementRegistryService = elementRegistryService; + this.titleService = titleService; + } + setIconSetName(iconSetName) { + this.titleService.setIconSetName(iconSetName ? iconSetName : _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_ICON_SET_NAME); + } + exportConfiguration() { + const iconSetConfiguration = this.getCurrentConfigurationForExport(); + if (!iconSetConfiguration) { + return; + } + const configJSONString = JSON.stringify(iconSetConfiguration, null, 2); + const filename = this.titleService.getIconSetName(); + const element = document.createElement('a'); + element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(configJSONString)); + element.setAttribute('download', filename + '.iconset'); + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + document.body.removeChild(element); + } + loadConfiguration(customConfig, updateIconSetName = true) { + let actorDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + let workObjectDict = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + if (customConfig.actors.keysArray()) { + actorDict = customConfig.actors; + workObjectDict = customConfig.workObjects; + } else { + actorDict.addEach(customConfig.actors); + workObjectDict.addEach(customConfig.workObjects); + } + const actorKeys = actorDict.keysArray(); + const workObjectKeys = workObjectDict.keysArray(); + this.iconDictionaryService.updateIconRegistries([], [], customConfig); + this.iconDictionaryService.getIconConfiguration().appendSRCFile(actorKeys, actorDict, workObjectKeys, workObjectDict); + this.iconDictionaryService.addIconsFromIconSetConfiguration(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, actorKeys.map(a => src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR + a)); + this.iconDictionaryService.addIconsFromIconSetConfiguration(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, workObjectKeys.map(w => src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT + w)); + if (updateIconSetName) { + const configurationName = customConfig.name; + this.setIconSetName(configurationName); + } + } + getCurrentConfiguration() { + const actors = this.iconDictionaryService.getActorsDictionary(); + const workObjects = this.iconDictionaryService.getWorkObjectsDictionary(); + let iconSetConfiguration; + if (actors.size() > 0 && workObjects.size() > 0) { + iconSetConfiguration = this.createConfigFromDictionaries(actors, workObjects); + } + return iconSetConfiguration; + } + getCurrentConfigurationForExport() { + const currentConfiguration = this.getCurrentConfiguration(); + if (currentConfiguration) { + const actors = {}; + const workObjects = {}; + currentConfiguration.actors.all().forEach(entry => { + actors[entry.key] = entry.value; + }); + currentConfiguration.workObjects.all().forEach(entry => { + workObjects[entry.key] = entry.value; + }); + return { + name: currentConfiguration.name, + actors: actors, + workObjects: workObjects + }; + } + return; + } + getCurrentConfigurationNamesWithoutPrefix() { + return { + name: this.titleService.getIconSetName() || _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_ICON_SET_NAME, + actors: this.iconDictionaryService.getActorsDictionary().keysArray().map(a => a.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '')), + workObjects: this.iconDictionaryService.getWorkObjectsDictionary().keysArray().map(w => w.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, '')) + }; + } + createMinimalConfigurationWithDefaultIcons() { + const minimalConfig = this.createConfigFromCanvas(); + _Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.actors.forEach(iconName => { + minimalConfig.actors.add(this.iconDictionaryService.getIconSource(iconName), iconName); + }); + _Domain_Common_iconConfiguration__WEBPACK_IMPORTED_MODULE_2__.defaultConf.workObjects.forEach(iconName => { + minimalConfig.workObjects.add(this.iconDictionaryService.getIconSource(iconName), iconName); + }); + return minimalConfig; + } + createConfigFromDictionaries(actorsDict, workObjectsDict) { + const actorNames = actorsDict.keysArray(); + const workobjectNames = workObjectsDict.keysArray(); + const newActors = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + const newWorkobjects = new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(); + // Fill Configuration from Canvas-Objects + actorNames.forEach(actor => { + newActors.add(actorsDict.get(actor), actor.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '')); + }); + workobjectNames.forEach(workObject => { + newWorkobjects.add(workObjectsDict.get(workObject), workObject.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, '')); + }); + return { + name: this.titleService.getIconSetName(), + actors: newActors, + workObjects: newWorkobjects + }; + } + createConfigFromCanvas() { + const config = { + name: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_3__.INITIAL_ICON_SET_NAME, + actors: new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(), + workObjects: new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary() + }; + let allCanvasObjects = this.elementRegistryService.getAllCanvasObjects(); + allCanvasObjects.map(e => e.businessObject).forEach(element => { + const type = element.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '').replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, ''); + if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR)) { + let src = this.iconDictionaryService.getIconSource(type) || ''; + config.actors.add(src, type); + } else if (element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT)) { + let src = this.iconDictionaryService.getIconSource(type) || ''; + config.workObjects.add(src, type); + } + }); + return config; + } + static #_ = this.ɵfac = function IconSetConfigurationService_Factory(t) { + return new (t || IconSetConfigurationService)(_angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵinject"](src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_5__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_6__.TitleService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_7__["ɵɵdefineInjectable"]({ + token: IconSetConfigurationService, + factory: IconSetConfigurationService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 87007: +/*!********************************************************************************!*\ + !*** ./src/app/Service/IconSetConfiguration/icon-set-customization.service.ts ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IconSetCustomizationService: () => (/* binding */ IconSetCustomizationService) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/Common/dictionary/dictionary */ 54972); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Utils_naming__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Utils/naming */ 28714); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./icon-set-configuration.service */ 10200); +/* harmony import */ var _icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./icon-dictionary.service */ 93689); +/* harmony import */ var _Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Import/import-domain-story.service */ 23779); +/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Title/title.service */ 69672); +/* harmony import */ var _BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../BrowserStorage/storage.service */ 59298); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); + + + + + + + + + + + + + +class IconSetCustomizationService { + constructor(configurationService, iconDictionaryService, importService, titleService, storageService, elementRegistryService, snackbar) { + this.configurationService = configurationService; + this.iconDictionaryService = iconDictionaryService; + this.importService = importService; + this.titleService = titleService; + this.storageService = storageService; + this.elementRegistryService = elementRegistryService; + this.snackbar = snackbar; + this.allIconListItems = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + this.configurationHasChanged = false; + this.selectedActors$ = new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject([]); + this.selectedWorkobjects$ = new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject([]); + this.iconSetConfigurationTypes = new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject(this.configurationService.getCurrentConfigurationNamesWithoutPrefix()); + this.selectedWorkobjects$.next(this.iconSetConfigurationTypes.value.workObjects); + this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors); + iconDictionaryService.getAllIconDictionary().keysArray().forEach(iconName => { + this.addIconToAllIconList(iconName); + }); + importService.importedConfigurationEvent.subscribe(config => { + this.importConfiguration(config); + }); + const storedIconSetConfiguration = this.storageService.getStoredIconSetConfiguration(); + if (storedIconSetConfiguration) { + this.importConfiguration(storedIconSetConfiguration, false); + } + const importedConfiguration = this.importService.getImportedConfiguration(); + if (importedConfiguration) { + this.importConfiguration(importedConfiguration, false); + } + } + importConfiguration(customConfig, saveIconSet = true) { + const actorKeys = customConfig.actors.keysArray(); + const workObjectKeys = customConfig.workObjects.keysArray(); + this.changeName(customConfig.name); + actorKeys.forEach(iconName => { + if (!this.allIconListItems.has(iconName)) { + this.addIconToAllIconList(iconName); + } + const selectedActorNames = this.selectedActors$.value; + if (!selectedActorNames.includes(iconName)) { + this.selectActor(iconName); + } + }); + workObjectKeys.forEach(iconName => { + if (!this.allIconListItems.has(iconName)) { + this.addIconToAllIconList(iconName); + } + const selectedWorkobjectNames = this.selectedWorkobjects$.value; + if (!selectedWorkobjectNames.includes(iconName)) { + this.selectWorkObject(iconName); + } + }); + if (saveIconSet) { + this.saveIconSet(this.elementRegistryService.getUsedIcons(), true); + } + } + /** Getter & Setter **/ + getIconSetConfiguration() { + return this.iconSetConfigurationTypes; + } + getIconForName(iconName) { + return this.allIconListItems.get(iconName); + } + isIconActor(iconName) { + return this.iconSetConfigurationTypes.value.actors.filter(actor => actor === iconName).length > 0; + } + isIconWorkObject(iconName) { + return this.iconSetConfigurationTypes.value.workObjects.filter(workObject => workObject === iconName).length > 0; + } + changeName(iconSetName) { + this.titleService.setIconSetName(iconSetName); + const changedIconSet = this.iconSetConfigurationTypes.value; + changedIconSet.name = iconSetName; + this.iconSetConfigurationTypes.next(changedIconSet); + } + /** Selected Icons **/ + setAsUnassigned(iconName, isActor) { + if (isActor) { + this.deselectActor(iconName); + } else { + this.deselectWorkobject(iconName); + } + this.updateIcon(false, false, iconName); + } + setAsActor(isActor, actor) { + if (isActor) { + this.updateIcon(true, false, actor); + this.selectActor(actor); + this.deselectWorkobject(actor); + } else { + this.deselectActor(actor); + this.updateIcon(false, false, actor); + } + } + setAsWorkobject(isWorkobject, workobject) { + if (isWorkobject) { + this.updateIcon(false, true, workobject); + this.selectWorkObject(workobject); + this.deselectActor(workobject); + } else { + this.deselectWorkobject(workobject); + this.updateIcon(false, false, workobject); + } + } + selectActor(actor) { + const value = this.iconSetConfigurationTypes.value; + if (!value.actors.includes(actor)) { + value.actors.push(actor); + this.iconSetConfigurationTypes.next(value); + this.updateActorSubject(); + } + } + selectWorkObject(workObject) { + const value = this.iconSetConfigurationTypes.value; + if (!value.workObjects.includes(workObject)) { + value.workObjects.push(workObject); + this.iconSetConfigurationTypes.next(value); + this.updateWorkObjectSubject(); + } + } + deselectActor(actor) { + if (this.iconSetConfigurationTypes) { + this.iconSetConfigurationTypes.next({ + name: this.iconSetConfigurationTypes.value.name, + actors: this.iconSetConfigurationTypes.value.actors.filter(a => !a.includes(actor)), + workObjects: this.iconSetConfigurationTypes.value.workObjects + }); + } + this.updateActorSubject(); + } + deselectWorkobject(workobject) { + if (this.iconSetConfigurationTypes) { + this.iconSetConfigurationTypes.next({ + name: this.iconSetConfigurationTypes.value.name, + actors: this.iconSetConfigurationTypes.value.actors, + workObjects: this.iconSetConfigurationTypes.value.workObjects.filter(w => !w.includes(workobject)) + }); + } + this.updateWorkObjectSubject(); + } + setSelectedWorkObject(sortedList) { + const value = this.iconSetConfigurationTypes.value; + value.workObjects = sortedList; + this.iconSetConfigurationTypes.next(value); + this.updateWorkObjectSubject(); + } + setSelectedActors(sortedList) { + const value = this.iconSetConfigurationTypes.value; + value.actors = sortedList; + this.iconSetConfigurationTypes.next(value); + this.updateActorSubject(); + } + updateActorSubject() { + this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors); + this.configurationHasChanged = true; + } + updateWorkObjectSubject() { + this.selectedWorkobjects$.next(this.iconSetConfigurationTypes.value.workObjects); + this.configurationHasChanged = true; + } + /** Revert Icon Set **/ + resetIconSet() { + const defaultConfig = this.configurationService.createMinimalConfigurationWithDefaultIcons(); + this.selectedWorkobjects$.value.forEach(workObjectName => { + if (!defaultConfig.workObjects.has(workObjectName)) { + this.deselectWorkobject(workObjectName); + } + }); + this.selectedActors$.value.forEach(actorName => { + if (!defaultConfig.actors.has(actorName)) { + this.deselectActor(actorName); + } + }); + this.iconSetConfigurationTypes.next({ + name: defaultConfig.name, + actors: defaultConfig.actors.keysArray(), + workObjects: defaultConfig.workObjects.keysArray() + }); + this.updateAllIconBehaviourSubjects(); + } + cancel() { + this.iconSetConfigurationTypes.next(this.configurationService.getCurrentConfigurationNamesWithoutPrefix()); + this.updateAllIconBehaviourSubjects(); + this.resetToInitialConfiguration(); + } + resetToInitialConfiguration() { + this.updateActorSubject(); + this.updateWorkObjectSubject(); + } + /** Persist Icon Set **/ + saveIconSet(usedIcons, imported = false) { + const changedActors = []; + const changedWorkobjects = []; + if (this.configurationHasChanged) { + const changedIconSet = this.createIconSetConfiguration(); + const configurationActors = changedIconSet.actors.keysArray(); + usedIcons?.actors.forEach(actor => { + if (!configurationActors?.includes(actor) && !changedActors.includes(actor)) { + changedActors.push(actor); + } + }); + const configurationWorkobjects = changedIconSet.workObjects.keysArray(); + usedIcons?.workobjects.forEach(workobject => { + if (!configurationWorkobjects?.includes(workobject) && !changedWorkobjects.includes(workobject)) { + changedWorkobjects.push(workobject); + } + }); + if (!changedActors.length && !changedWorkobjects.length) { + this.changedIconSetConfiguration = changedIconSet; + this.updateIcons(changedIconSet); + this.storageService.setStoredIconSetConfiguration(this.changedIconSetConfiguration); + this.snackbar.open(imported ? 'Configuration imported successfully' : 'Configuration saved successfully', undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_SUCCESS + }); + } + } else { + this.snackbar.open(imported ? 'No configuration to be imported' : 'No configuration to be saved', undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO + }); + } + if (changedActors.length || changedWorkobjects.length) { + if (changedActors.length) { + const actors = changedActors.join(', '); + this.snackbar.open(`The following icons are already in use as actors and cannot be changed: ${actors}`, undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION * 3, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO + }); + } + if (changedWorkobjects.length) { + const workobjects = changedWorkobjects.join(', '); + this.snackbar.open(`The following icons are already in use as workobjects and cannot be changed: ${workobjects}`, undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION * 3, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO + }); + } + } + } + exportIconSet() { + this.configurationService.exportConfiguration(); + } + getAndClearSavedConfiguration() { + const temp = this.changedIconSetConfiguration; + this.changedIconSetConfiguration = undefined; + return temp; + } + createIconSetConfiguration() { + const actors = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + const workObjects = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + this.iconSetConfigurationTypes.value.actors.forEach(name => { + actors.add(this.iconDictionaryService.getIconSource(name), name); + }); + this.iconSetConfigurationTypes.value.workObjects.forEach(name => { + workObjects.add(this.iconDictionaryService.getIconSource(name), name); + }); + return { + name: this.iconSetConfigurationTypes.value.name || '', + actors, + workObjects + }; + } + /** Update Icons **/ + addNewIcon(iconName) { + const iconDict = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + iconDict.add(this.getSrcForIcon(iconName), iconName); + this.iconDictionaryService.addIconsToCss(iconDict); + this.addIconToAllIconList(iconName); + } + addIconToAllIconList(iconName) { + this.allIconListItems.add(new rxjs__WEBPACK_IMPORTED_MODULE_10__.BehaviorSubject({ + name: iconName, + svg: this.getSrcForIcon(iconName), + isActor: this.isIconActor(iconName), + isWorkObject: this.isIconWorkObject(iconName) + }), iconName); + } + updateIcon(isActor, isWorkobject, iconName) { + const iconBehaviourSubject = this.getIconForName(iconName); + const icon = iconBehaviourSubject.value; + icon.isActor = isActor; + icon.isWorkObject = isWorkobject; + iconBehaviourSubject.next(icon); + } + updateAllIconBehaviourSubjects() { + const customIconSetConfiguration = this.iconSetConfigurationTypes.value; + this.allIconListItems.keysArray().forEach(iconName => { + if (customIconSetConfiguration.actors.includes(iconName)) { + this.updateIcon(true, false, iconName); + } else if (customIconSetConfiguration.workObjects.includes(iconName)) { + this.updateIcon(false, true, iconName); + } else { + this.updateIcon(false, false, iconName); + } + }); + } + getSrcForIcon(name) { + let iconName; + if (name.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.DOMAINSTORY)) { + // TODO: td: This returns empty every time! + iconName = (0,_Utils_naming__WEBPACK_IMPORTED_MODULE_3__.getNameFromType)(name); + } else { + iconName = name; + } + const rawSrc = this.iconDictionaryService.getIconSource(iconName); + if (!rawSrc) { + return ''; + } + if (rawSrc.startsWith('data')) { + return rawSrc; + } else { + return 'data:image/svg+xml,' + rawSrc; + } + } + updateIcons(changedIconSet) { + this.allIconListItems.keysArray().forEach(item => this.setAsUnassigned(item, this.isIconActor(item))); + changedIconSet.actors.keysArray().forEach(actor => { + this.iconDictionaryService.registerIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR, actor, this.iconDictionaryService.getFullDictionary().get(actor)); + this.iconDictionaryService.unregisterIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT, actor); + this.setAsActor(true, actor); + }); + changedIconSet.workObjects.keysArray().forEach(workObject => { + this.iconDictionaryService.registerIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.WORKOBJECT, workObject, this.iconDictionaryService.getFullDictionary().get(workObject)); + this.iconDictionaryService.unregisterIconForType(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_2__.elementTypes.ACTOR, workObject); + this.setAsWorkobject(true, workObject); + }); + } + static #_ = this.ɵfac = function IconSetCustomizationService_Factory(t) { + return new (t || IconSetCustomizationService)(_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_4__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_5__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_6__.ImportDomainStoryService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_7__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_8__.StorageService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_9__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵinject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_12__.MatSnackBar)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_11__["ɵɵdefineInjectable"]({ + token: IconSetCustomizationService, + factory: IconSetCustomizationService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 23779: +/*!***************************************************************!*\ + !*** ./src/app/Service/Import/import-domain-story.service.ts ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ImportDomainStoryService: () => (/* binding */ ImportDomainStoryService) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/dictionary/dictionary */ 54972); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var src_app_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Domain/Common/iconSetConfiguration */ 84738); +/* harmony import */ var _Presentation_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Presentation/Dialog/info-dialog/info-dialog.component */ 16266); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Domain/Dialog/infoDialogData */ 45574); +/* harmony import */ var _Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Utils/sanitizer */ 66107); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-dictionary.service */ 93689); +/* harmony import */ var src_app_Service_Import_import_repair_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/Service/Import/import-repair.service */ 75158); +/* harmony import */ var src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/Service/Title/title.service */ 69672); +/* harmony import */ var src_app_Service_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/Service/Renderer/renderer.service */ 94896); +/* harmony import */ var _Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Dialog/dialog.service */ 4730); +/* harmony import */ var _IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../IconSetConfiguration/icon-set-configuration.service */ 10200); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); + + + + + + + + + + + + + + + + + +class ImportDomainStoryService { + constructor(iconDictionaryService, importRepairService, titleService, rendererService, dialogService, iconSetConfigurationService, snackbar) { + this.iconDictionaryService = iconDictionaryService; + this.importRepairService = importRepairService; + this.titleService = titleService; + this.rendererService = rendererService; + this.dialogService = dialogService; + this.iconSetConfigurationService = iconSetConfigurationService; + this.snackbar = snackbar; + this.title = _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_6__.INITIAL_TITLE; + this.description = _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_6__.INITIAL_DESCRIPTION; + this.importedConfiguration = null; + this.importedConfigurationEmitter = new _angular_core__WEBPACK_IMPORTED_MODULE_13__.EventEmitter(); + this.titleSubscription = this.titleService.title$.subscribe(title => { + this.title = title; + }); + this.descriptionSubscription = this.titleService.description$.subscribe(description => { + this.description = description; + }); + } + ngOnDestroy() { + this.titleSubscription.unsubscribe(); + this.descriptionSubscription.unsubscribe(); + } + get importedConfigurationEvent() { + return this.importedConfigurationEmitter.asObservable(); + } + getImportedConfiguration() { + const config = { + name: this.importedConfiguration?.name || '', + actors: this.importedConfiguration?.actors || new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary(), + workObjects: this.importedConfiguration?.workObjects || new src_app_Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_0__.Dictionary() + }; + this.importedConfiguration = null; + return config; + } + importDST(input, filename, isSVG) { + const fileReader = new FileReader(); + const titleText = (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.restoreTitleFromFileName)(filename, isSVG); + // no need to put this on the commandStack + this.titleService.updateTitleAndDescription(titleText, null, false); + fileReader.onloadend = e => { + if (e && e.target) { + this.fileReaderFunction(e.target.result, isSVG, false); + } + }; + fileReader.readAsText(input); + } + importEGN(input, filename, isSVG) { + const fileReader = new FileReader(); + const titleText = (0,_Utils_sanitizer__WEBPACK_IMPORTED_MODULE_5__.restoreTitleFromFileName)(filename, isSVG); + // no need to put this on the commandStack + this.titleService.updateTitleAndDescription(titleText, null, false); + fileReader.onloadend = e => { + if (e && e.target) { + this.fileReaderFunction(e.target.result, isSVG, true); + } + }; + fileReader.readAsText(input); + } + fileReaderFunction(text, isSVG, isEGN) { + let dstText; + if (typeof text === 'string') { + if (isSVG) { + dstText = this.removeXMLComments(text); + } else { + dstText = text; + } + let elements; + let config; + let configFromFile; + let dstAndConfig = this.extractDstAndConfig(dstText, isSVG); + if (dstAndConfig == null) { + return; + } + // current implementation + if (dstAndConfig.domain) { + configFromFile = isEGN ? dstAndConfig.domain : JSON.parse(dstAndConfig.domain); + config = (0,src_app_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_2__.fromConfigurationFromFile)(configFromFile); + elements = isEGN ? dstAndConfig.dst : JSON.parse(dstAndConfig.dst); + } else { + // legacy implementation + if (dstAndConfig.config) { + configFromFile = JSON.parse(dstAndConfig.config); + config = (0,src_app_Domain_Common_iconSetConfiguration__WEBPACK_IMPORTED_MODULE_2__.fromConfigurationFromFile)(configFromFile); + elements = JSON.parse(dstAndConfig.dst); + } else { + // implementation prior to configuration + elements = JSON.parse(dstText); + config = this.iconSetConfigurationService.createMinimalConfigurationWithDefaultIcons(); + } + } + const configChanged = this.checkConfigForChanges(config); + let lastElement = elements[elements.length - 1]; + if (!lastElement.id) { + lastElement = elements.pop(); + let importVersionNumber = lastElement; + // if the last element has the importedVersionNumber has the tag version, + // then there exists another meta tag 'info' for the description + if (importVersionNumber.version) { + lastElement = elements.pop(); + } + if (importVersionNumber.version) { + importVersionNumber = importVersionNumber.version; + } else { + importVersionNumber = '?'; + this.snackbar.open(`The version number is unreadable.`, undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_6__.SNACKBAR_DURATION, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_6__.SNACKBAR_ERROR + }); + } + elements = this.handleVersionNumber(importVersionNumber, elements); + } + if (!this.importRepairService.checkForUnreferencedElementsInActivitiesAndRepair(elements)) { + this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST'); + } + this.titleService.updateTitleAndDescription(this.title, lastElement.info, false); + this.importRepairService.adjustPositions(elements); + this.updateIconRegistries(elements, config); + this.rendererService.importStory(elements, configChanged, config); + } + } + handleVersionNumber(importVersionNumber, elements) { + const versionPrefix = +importVersionNumber.substring(0, importVersionNumber.lastIndexOf('.')); + if (versionPrefix <= 0.5) { + elements = this.importRepairService.updateCustomElementsPreviousV050(elements); + this.showPreviousV050Dialog(versionPrefix); + } + return elements; + } + extractDstAndConfig(dstText, isSVG) { + let dstAndConfig = null; + try { + dstAndConfig = JSON.parse(dstText); + } catch (e) { + this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST'); + } + return dstAndConfig; + } + removeXMLComments(xmlText) { + xmlText = xmlText.substring(xmlText.indexOf('')); + while (xmlText.includes('')) { + xmlText = xmlText.replace('', ''); + } + xmlText = xmlText.replace('', ''); + xmlText = xmlText.replace('', ''); + return xmlText; + } + checkConfigForChanges(iconSetConfiguration) { + const newActorKeys = iconSetConfiguration.actors.keysArray(); + const newWorkObjectKeys = iconSetConfiguration.workObjects.keysArray(); + const currentActorKeys = this.iconDictionaryService.getTypeDictionaryKeys(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR); + const currentWorkobjectKeys = this.iconDictionaryService.getTypeDictionaryKeys(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT); + let changed = false; + if (newActorKeys.length !== currentActorKeys.length || newWorkObjectKeys.length !== currentWorkobjectKeys.length) { + return true; + } + for (let i = 0; i < newActorKeys.length; i++) { + changed = this.clearName(currentActorKeys[i]) !== this.clearName(newActorKeys[i]); + if (changed) { + i = newActorKeys.length; + } + } + if (changed) { + return changed; + } + for (let i = 0; i < newWorkObjectKeys.length; i++) { + changed = this.clearName(currentWorkobjectKeys[i]) !== this.clearName(newWorkObjectKeys[i]); + if (changed) { + i = newWorkObjectKeys.length; + } + } + return changed; + } + clearName(name) { + return name.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR, '').replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT, ''); + } + updateIconRegistries(elements, config) { + const actorIcons = this.iconDictionaryService.getElementsOfType(elements, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.ACTOR); + const workObjectIcons = this.iconDictionaryService.getElementsOfType(elements, src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_1__.elementTypes.WORKOBJECT); + this.iconDictionaryService.updateIconRegistries(actorIcons, workObjectIcons, config); + this.setImportedConfigurationAndEmit(config); + } + showPreviousV050Dialog(version) { + const title = 'Compatability-Warning'; + const text = 'The uploaded Domain-Story is from version ' + version + '. There may be problems with the default actors or workobjects contained in the story.'; + const config = new _angular_material_dialog__WEBPACK_IMPORTED_MODULE_14__.MatDialogConfig(); + config.disableClose = false; + config.autoFocus = true; + config.data = new _Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_4__.InfoDialogData(title, text, true); + this.dialogService.openDialog(_Presentation_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_3__.InfoDialogComponent, config); + } + setImportedConfigurationAndEmit(config) { + this.importedConfiguration = config; + this.importedConfigurationEmitter.emit(config); + } + showBrokenImportDialog(type) { + const config = new _angular_material_dialog__WEBPACK_IMPORTED_MODULE_14__.MatDialogConfig(); + config.disableClose = false; + config.autoFocus = true; + config.data = new _Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_4__.InfoDialogData('Error during import', 'The uploaded ' + type + ' is not complete, there could be elements missing from the canvas.', true, false); + this.dialogService.openDialog(_Presentation_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_3__.InfoDialogComponent, config); + } + static #_ = this.ɵfac = function ImportDomainStoryService_Factory(t) { + return new (t || ImportDomainStoryService)(_angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_7__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_Import_import_repair_service__WEBPACK_IMPORTED_MODULE_8__.ImportRepairService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_9__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](src_app_Service_Renderer_renderer_service__WEBPACK_IMPORTED_MODULE_10__.RendererService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_11__.DialogService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_12__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵinject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_15__.MatSnackBar)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_13__["ɵɵdefineInjectable"]({ + token: ImportDomainStoryService, + factory: ImportDomainStoryService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 75158: +/*!*********************************************************!*\ + !*** ./src/app/Service/Import/import-repair.service.ts ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ImportRepairService: () => (/* binding */ ImportRepairService) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); + + +/** + * Repairs broken Domain Stories so that it can be rendered onto the canvas + * by removing activities and connections that reference elements that don't exists + */ +class ImportRepairService { + checkForUnreferencedElementsInActivitiesAndRepair(elements) { + const activities = []; + const objectIDs = []; + let complete = true; + elements.forEach(element => { + const type = element.type; + if (type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY || type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.CONNECTION) { + activities.push(element); + } else { + objectIDs.push(element.id); + } + }); + activities.forEach(activity => { + const source = activity.source; + const target = activity.target; + if (!objectIDs.includes(source) || !objectIDs.includes(target)) { + complete = false; + const activityIndex = elements.indexOf(activity); + elements = elements.splice(activityIndex, 1); + } + }); + return complete; + } + /** + * Ensure backwards compatibility. + * Previously Document had no special name and was just addressed as workObject + * Bubble was renamed to Conversation + */ + updateCustomElementsPreviousV050(elements) { + for (const element of elements) { + if (element.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT) { + element.type = src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT + 'Document'; + } else if (element.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT + 'Bubble') { + element.type = src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT + 'Conversation'; + } + } + return elements; + } + /** + * Adjusts Positions of Elements to ensure the Domain Story starts in the visible parts of the canvas + */ + adjustPositions(elements) { + let xLeft = 0; + let yUp = 0; + let isFirst = true; + this.findFirstElement(elements, isFirst, xLeft, yUp); + if (xLeft < 75 || xLeft > 150 || yUp < 0 || yUp > 50) { + // add Padding for the Palette and the top + xLeft -= 75; + yUp -= 50; + elements.forEach(element => this.adjustElementPosition(element, xLeft, yUp)); + } + } + adjustElementPosition(element, xLeft, yUp) { + if (element.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY || element.type === src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.CONNECTION) { + const waypoints = element.waypoints; + waypoints.forEach(point => { + point.x -= xLeft; + point.y -= yUp; + if (point.original) { + point.original.x = point.x; + point.original.y = point.y; + } + }); + } else { + element.x -= xLeft; + element.y -= yUp; + } + } + findFirstElement(elements, isFirst, xLeft, yUp) { + elements.forEach(element => { + let elXLeft; + let elYUp; + if (element.type !== src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY && element.type !== src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.CONNECTION) { + if (isFirst) { + xLeft = element.x; + yUp = element.y; + isFirst = false; + } + elXLeft = element.x; + elYUp = element.y; + if (elXLeft < xLeft) { + xLeft = elXLeft; + } + if (elYUp < yUp) { + yUp = elYUp; + } + } + }); + } + static #_ = this.ɵfac = function ImportRepairService_Factory(t) { + return new (t || ImportRepairService)(); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ + token: ImportRepairService, + factory: ImportRepairService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 59783: +/*!*********************************************************************!*\ + !*** ./src/app/Service/LabelDictionary/label-dictionary.service.ts ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LabelDictionaryService: () => (/* binding */ LabelDictionaryService) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_LabelDictionary_mass_naming_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Service/LabelDictionary/mass-naming.service */ 37509); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var _IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IconSetConfiguration/icon-dictionary.service */ 93689); + + + + + +class LabelDictionaryService { + constructor(massNamingService, elementRegistryService, iconDictionaryService) { + this.massNamingService = massNamingService; + this.elementRegistryService = elementRegistryService; + this.iconDictionaryService = iconDictionaryService; + this.activityLabels = []; + this.workObjektLabels = []; + } + createLabelDictionaries() { + this.activityLabels = []; + this.workObjektLabels = []; + const allObjects = this.elementRegistryService.getAllCanvasObjects(); + allObjects.forEach(element => { + const name = element.businessObject.name; + if (name && name.length > 0 && element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY) && !this.activityLabels.map(a => a.name).includes(name)) { + this.activityLabels.push({ + name, + originalName: name + }); + } else if (name && name.length > 0 && element.type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT) && !this.workObjektLabels.map(e => e.name).includes(name)) { + const iconName = element.type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT, ''); + let icon = this.iconDictionaryService.getIconSource(iconName); + if (!icon) { + return; + } + if (!icon.startsWith('data')) { + icon = 'data:image/svg+xml,' + icon; + } + this.workObjektLabels.push({ + name, + originalName: name, + icon + }); + } + }); + this.activityLabels.sort((a, b) => { + return a.name.toLowerCase().localeCompare(b.name.toLowerCase()); + }); + this.workObjektLabels.sort((a, b) => { + return a.name.toLowerCase().localeCompare(b.name.toLowerCase()); + }); + } + getActivityLabels() { + return this.activityLabels.slice(); + } + getWorkObjectLabels() { + return this.workObjektLabels.slice(); + } + getUniqueWorkObjectNames() { + const workObjects = this.elementRegistryService.getAllWorkobjects(); + return [...new Set(workObjects.filter(workObject => { + return !!workObject.businessObject.name; + }).map(workObject => workObject.businessObject.name))]; + } + massRenameLabels(activityNames, originalActivityNames, workObjectNames, originalWorkObjectNames) { + for (let i = 0; i < originalActivityNames.length; i++) { + if (!activityNames[i]) { + activityNames[i] = ''; + } + if (!(activityNames[i] == originalActivityNames[i])) { + this.massNamingService.massChangeNames(originalActivityNames[i], activityNames[i], src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY); + } + } + for (let i = 0; i < originalWorkObjectNames.length; i++) { + if (!workObjectNames[i]) { + workObjectNames[i] = ''; + } + if (!(workObjectNames[i] == originalWorkObjectNames[i])) { + this.massNamingService.massChangeNames(originalWorkObjectNames[i], workObjectNames[i], src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT); + } + } + } + static #_ = this.ɵfac = function LabelDictionaryService_Factory(t) { + return new (t || LabelDictionaryService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_Service_LabelDictionary_mass_naming_service__WEBPACK_IMPORTED_MODULE_1__.MassNamingService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_2__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_3__.IconDictionaryService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: LabelDictionaryService, + factory: LabelDictionaryService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 37509: +/*!****************************************************************!*\ + !*** ./src/app/Service/LabelDictionary/mass-naming.service.ts ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ MassNamingService: () => (/* binding */ MassNamingService) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var _CommandStack_command_stack_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../CommandStack/command-stack.service */ 19381); + + + +class MassNamingService { + constructor(elementRegistryService, commandStackService) { + this.elementRegistryService = elementRegistryService; + this.commandStackService = commandStackService; + } + massChangeNames(oldValue, newValue, type) { + const allRelevantObjects = []; + this.elementRegistryService.getAllCanvasObjects().forEach(element => { + if (element.type.includes(type) && element.businessObject.name === oldValue) { + allRelevantObjects.push(element); + } + }); + const context = { + elements: allRelevantObjects, + newValue + }; + this.commandStackService.execute('domainStoryObjects.massRename', context); + } + static #_ = this.ɵfac = function MassNamingService_Factory(t) { + return new (t || MassNamingService)(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_0__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵinject"](_CommandStack_command_stack_service__WEBPACK_IMPORTED_MODULE_1__.CommandStackService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjectable"]({ + token: MassNamingService, + factory: MassNamingService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 33666: +/*!********************************************************!*\ + !*** ./src/app/Service/Modeler/initializer.service.ts ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ InitializerService: () => (/* binding */ InitializerService) +/* harmony export */ }); +/* harmony import */ var _Modeler_modeler_context_pad_domainStoryContextPadProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Modeler/modeler/context-pad/domainStoryContextPadProvider */ 68065); +/* harmony import */ var _Modeler_modeler_numbering_numbering__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Modeler/modeler/numbering/numbering */ 91490); +/* harmony import */ var _Modeler_modeler_palette_domainStoryPalette__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Modeler/modeler/palette/domainStoryPalette */ 70345); +/* harmony import */ var _Modeler_modeler_domainStoryRenderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Modeler/modeler/domainStoryRenderer */ 76867); +/* harmony import */ var _Modeler_modeler_labeling_dsLabelEditingProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Modeler/modeler/labeling/dsLabelEditingProvider */ 28712); +/* harmony import */ var _Modeler_modeler_change_icon_replaceOptions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Modeler/modeler/change-icon/replaceOptions */ 71656); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Domain/Common/elementTypes */ 30236); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _Domain_Dialog_activityDialogData__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Domain/Dialog/activityDialogData */ 93703); +/* harmony import */ var _Presentation_Dialog_activity_dialog_activity_dialog_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Presentation/Dialog/activity-dialog/activity-dialog.component */ 63954); +/* harmony import */ var _Modeler_modeler_updateHandler_massRenameHandler__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Modeler/modeler/updateHandler/massRenameHandler */ 69587); +/* harmony import */ var _Modeler_modeler_updateHandler_headlineAndDescriptionUpdateHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler */ 13881); +/* harmony import */ var _Utils_mathExtensions__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Utils/mathExtensions */ 114); +/* harmony import */ var _Modeler_modeler_updateHandler_activityUpdateHandlers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Modeler/modeler/updateHandler/activityUpdateHandlers */ 19800); +/* harmony import */ var _Modeler_modeler_updateHandler_elementUpdateHandler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Modeler/modeler/updateHandler/elementUpdateHandler */ 88298); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../DirtyFlag/dirty-flag.service */ 89791); +/* harmony import */ var _IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../IconSetConfiguration/icon-dictionary.service */ 93689); +/* harmony import */ var _ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var _IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../IconSetConfiguration/icon-set-configuration.service */ 10200); +/* harmony import */ var _LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../LabelDictionary/label-dictionary.service */ 59783); +/* harmony import */ var _Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../Replay/replay-state.service */ 67820); +/* harmony import */ var _Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Dialog/dialog.service */ 4730); +/* harmony import */ var _CommandStack_command_stack_service__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../CommandStack/command-stack.service */ 19381); +/* harmony import */ var _Title_title_service__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Title/title.service */ 69672); +/* harmony import */ var _Export_html_presentation_service__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../Export/html-presentation.service */ 72680); + + + + + + + + + + + + + + + + + + + + + + + + + + +class InitializerService { + constructor(dirtyFlagService, iconDictionaryService, elementRegistryService, configurationService, labelDictionaryService, replayStateService, dialogService, commandStackService, titleService, htmlPresentationService) { + this.dirtyFlagService = dirtyFlagService; + this.iconDictionaryService = iconDictionaryService; + this.elementRegistryService = elementRegistryService; + this.configurationService = configurationService; + this.labelDictionaryService = labelDictionaryService; + this.replayStateService = replayStateService; + this.dialogService = dialogService; + this.commandStackService = commandStackService; + this.titleService = titleService; + this.htmlPresentationService = htmlPresentationService; + } + initializeDomainStoryModelerClasses() { + (0,_Modeler_modeler_context_pad_domainStoryContextPadProvider__WEBPACK_IMPORTED_MODULE_0__.initializeContextPadProvider)(this.dirtyFlagService, this.iconDictionaryService); + /** The Palette and the Context Menu need the Icons present in the Domain, + * so the IconDictionaryService and the IconSetConfigurationService needs to be given to the Palette **/ + (0,_Modeler_modeler_palette_domainStoryPalette__WEBPACK_IMPORTED_MODULE_2__.initializePalette)(this.iconDictionaryService, this.configurationService); + (0,_Modeler_modeler_domainStoryRenderer__WEBPACK_IMPORTED_MODULE_3__.initializeRenderer)(this.iconDictionaryService, this.elementRegistryService, this.dirtyFlagService); + (0,_Modeler_modeler_labeling_dsLabelEditingProvider__WEBPACK_IMPORTED_MODULE_4__.initializeLabelEditingProvider)(this.labelDictionaryService); + (0,_Modeler_modeler_change_icon_replaceOptions__WEBPACK_IMPORTED_MODULE_5__.initializeReplaceOptions)(this.iconDictionaryService); + (0,_Modeler_modeler_numbering_numbering__WEBPACK_IMPORTED_MODULE_1__.initializeNumbering)(this.elementRegistryService); + (0,_Modeler_modeler_updateHandler_activityUpdateHandlers__WEBPACK_IMPORTED_MODULE_12__.initializeActivityUpdateHandler)(this.elementRegistryService); + } + propagateDomainStoryModelerClassesToServices(commandStack, elementRegistry, canvas, selection, modeler) { + this.commandStackService.setCommandStack(commandStack); + this.elementRegistryService.setElementRegistry(elementRegistry); + this.htmlPresentationService.setModelerClasses(canvas, selection, modeler); + } + initializeDomainStoryModelerEventHandlers(commandStack, eventBus) { + (0,_Modeler_modeler_updateHandler_activityUpdateHandlers__WEBPACK_IMPORTED_MODULE_12__["default"])(commandStack, eventBus); + (0,_Modeler_modeler_updateHandler_massRenameHandler__WEBPACK_IMPORTED_MODULE_9__["default"])(commandStack, eventBus); + (0,_Modeler_modeler_updateHandler_elementUpdateHandler__WEBPACK_IMPORTED_MODULE_13__["default"])(commandStack, eventBus); + (0,_Modeler_modeler_updateHandler_headlineAndDescriptionUpdateHandler__WEBPACK_IMPORTED_MODULE_10__["default"])(commandStack, this.titleService); + } + initiateEventBusListeners(eventBus, commandStack) { + eventBus.on('element.dblclick', e => { + if (!this.replayStateService.getReplayOn()) { + const element = e.element; + if (element.type === _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_6__.elementTypes.ACTIVITY) { + // override the doubleClickListener on activities + this.activityDoubleClick(element, eventBus, commandStack); + } else { + const renderedNumberRegistry = (0,_Modeler_modeler_numbering_numbering__WEBPACK_IMPORTED_MODULE_1__.getNumberRegistry)(); + // add a DoubleClickListener to the number on activities + if (renderedNumberRegistry.length > 1) { + const allActivities = this.elementRegistryService.getActivitiesFromActors(); + if (allActivities.length > 0) { + const htmlCanvas = document.getElementById('canvas'); + if (htmlCanvas) { + const container = htmlCanvas.getElementsByClassName('djs-container'); + const svgElements = container[0].getElementsByTagName('svg'); + const outerSVGElement = svgElements[0]; + const viewport = outerSVGElement.getElementsByClassName('viewport')[0]; + let transform = viewport.getAttribute('transform'); + let transformX = 0; + let transformY = 0; + let zoomX = 1; + let zoomY = 1; + let nums; + const clickX = e.originalEvent.offsetX; + const clickY = e.originalEvent.offsetY; + // adjust for zoom and panning + if (transform) { + transform = transform.replace('matrix(', ''); + transform.replace(')', ''); + nums = transform.split(','); + zoomX = parseFloat(nums[0]); + zoomY = parseFloat(nums[3]); + transformX = parseInt(nums[4], undefined); + transformY = parseInt(nums[5], undefined); + } + const width = 25 * zoomX; + const height = 22 * zoomY; + for (let i = 1; i < renderedNumberRegistry.length; i++) { + const currentNum = renderedNumberRegistry[i]; + if (currentNum) { + const tspan = currentNum.getElementsByTagName('tspan')[0]; + const tx = tspan.getAttribute('x'); + const ty = tspan.getAttribute('y'); + const tNumber = parseInt(tspan.innerHTML, undefined); + const elementX = Math.floor(tx * zoomX + (transformX - 11 * zoomX)); + const elementY = Math.floor(ty * zoomY + (transformY - 15 * zoomY)); + allActivities.forEach(activity => { + const activityNumber = activity.businessObject.number; + if (activityNumber === tNumber) { + if ((0,_Utils_mathExtensions__WEBPACK_IMPORTED_MODULE_11__.positionsMatch)(width, height, elementX, elementY, clickX, clickY)) { + this.activityDoubleClick(activity, eventBus, commandStack); + } + } + }); + } + } + } + } + } + } + } + }); + // when in replay, do not allow any interaction on the canvas + eventBus.on(['element.click', 'element.dblclick', 'element.mousedown', 'drag.init', 'canvas.viewbox.changing', 'autoPlace', 'popupMenu.open'], 10000000000, event => { + if (this.replayStateService.getReplayOn()) { + event.stopPropagation(); + event.preventDefault(); + } + }); + } + /** Overrrides for Canvas Functions **/ + activityDoubleClick(activity, eventBus, commandStack) { + const source = activity.source; + // ensure the right number when changing the direction of an activity + (0,_Modeler_modeler_labeling_dsLabelEditingProvider__WEBPACK_IMPORTED_MODULE_4__.toggleStashUse)(false); + const config = new _angular_material_dialog__WEBPACK_IMPORTED_MODULE_24__.MatDialogConfig(); + config.disableClose = false; + config.autoFocus = true; + if (activity.businessObject.number && source && source.type.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_6__.elementTypes.ACTOR)) { + config.data = new _Domain_Dialog_activityDialogData__WEBPACK_IMPORTED_MODULE_7__.ActivityDialogData(activity, (0,_Modeler_modeler_numbering_numbering__WEBPACK_IMPORTED_MODULE_1__.getMultipleNumberRegistry)()[activity.businessObject.number], true, data => this.saveActivityInputLabel(data, eventBus, commandStack)); + } else if (source && source.type.includes(_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_6__.elementTypes.WORKOBJECT)) { + config.data = new _Domain_Dialog_activityDialogData__WEBPACK_IMPORTED_MODULE_7__.ActivityDialogData(activity, false, false, activityData => this.saveActivityInputLabel(activityData, eventBus, commandStack)); + } + this.dialogService.openDialog(_Presentation_Dialog_activity_dialog_activity_dialog_component__WEBPACK_IMPORTED_MODULE_8__.ActivityDialogComponent, config); + } + saveActivityInputLabel(activityData, eventBus, commandStack) { + const label = activityData.activityLabel; + const hasNumber = activityData.activityNumber ?? false; + const activityNumber = activityData.activityNumber; + const multipleNumberAllowed = activityData.multipleNumbers ?? false; + const element = activityData.activity; + const activitiesFromActors = this.elementRegistryService.getActivitiesFromActors(); + const index = activitiesFromActors.indexOf(element); + activitiesFromActors.splice(index, 1); + if (hasNumber) { + (0,_Modeler_modeler_numbering_numbering__WEBPACK_IMPORTED_MODULE_1__.setNumberIsMultiple)(activityNumber, multipleNumberAllowed); + } + element.businessObject.multipleNumberAllowed = multipleNumberAllowed; + let options; + if (hasNumber) { + options = { + businessObject: element.businessObject, + newLabel: label, + newNumber: activityNumber, + element + }; + } else { + options = { + businessObject: element.businessObject, + newLabel: label, + element + }; + } + commandStack.execute('activity.changed', options); + if (element.businessObject.multipleNumberAllowed !== false) { + if ((0,_Modeler_modeler_numbering_numbering__WEBPACK_IMPORTED_MODULE_1__.getMultipleNumberRegistry)()[activityNumber] === false) { + (0,_Modeler_modeler_numbering_numbering__WEBPACK_IMPORTED_MODULE_1__.updateExistingNumbersAtEditing)(activitiesFromActors, activityNumber, eventBus); + } + } else if (element.businessObject.multipleNumberAllowed === false) { + (0,_Modeler_modeler_numbering_numbering__WEBPACK_IMPORTED_MODULE_1__.updateExistingNumbersAtEditing)(activitiesFromActors, activityNumber, eventBus); + } + } + static #_ = this.ɵfac = function InitializerService_Factory(t) { + return new (t || InitializerService)(_angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_14__.DirtyFlagService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_15__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_16__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_17__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_18__.LabelDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_19__.ReplayStateService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_20__.DialogService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_CommandStack_command_stack_service__WEBPACK_IMPORTED_MODULE_21__.CommandStackService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Title_title_service__WEBPACK_IMPORTED_MODULE_22__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵinject"](_Export_html_presentation_service__WEBPACK_IMPORTED_MODULE_23__.HtmlPresentationService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_25__["ɵɵdefineInjectable"]({ + token: InitializerService, + factory: InitializerService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 74676: +/*!****************************************************!*\ + !*** ./src/app/Service/Modeler/modeler.service.ts ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ModelerService: () => (/* binding */ ModelerService) +/* harmony export */ }); +/* harmony import */ var _home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 56207); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! min-dash */ 81410); +/* harmony import */ var src_app_Modeler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Modeler */ 84756); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _initializer_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./initializer.service */ 33666); +/* harmony import */ var _ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var _IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../IconSetConfiguration/icon-dictionary.service */ 93689); +/* harmony import */ var _IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../IconSetConfiguration/icon-set-configuration.service */ 10200); +/* harmony import */ var _BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../BrowserStorage/storage.service */ 59298); + + + + + + + + + +class ModelerService { + constructor(initializerService, elementRegistryService, iconDictionaryService, iconSetConfigurationService, storageService) { + this.initializerService = initializerService; + this.elementRegistryService = elementRegistryService; + this.iconDictionaryService = iconDictionaryService; + this.iconSetConfigurationService = iconSetConfigurationService; + this.storageService = storageService; + } + postInit() { + const storedIconSetConfiguration = this.storageService.getStoredIconSetConfiguration(); + if (storedIconSetConfiguration) { + this.iconDictionaryService.setCustomConfiguration(storedIconSetConfiguration); + this.iconSetConfigurationService.loadConfiguration(storedIconSetConfiguration); + } + this.initializerService.initializeDomainStoryModelerClasses(); + this.modeler = new src_app_Modeler__WEBPACK_IMPORTED_MODULE_1__["default"]({ + container: '#canvas', + keyboard: { + bindTo: document + }, + // Disable BPMN-SearchModule and re-enable browser Search + additionalModules: [{ + bpmnSearch: ['value', 'foo'] + }] + }); + if (this.modeler.get) { + this.canvas = this.modeler.get('canvas'); + this.elementRegistry = this.modeler.get('elementRegistry'); + this.eventBus = this.modeler.get('eventBus'); + this.commandStack = this.modeler.get('commandStack'); + this.selection = this.modeler.get('selection'); + } + this.initializerService.initializeDomainStoryModelerEventHandlers(this.commandStack, this.eventBus); + this.initializerService.propagateDomainStoryModelerClassesToServices(this.commandStack, this.elementRegistry, this.canvas, this.selection, this.modeler); + const exportArtifacts = this.debounce(this.saveSVG, 500); + if (this.modeler.get) { + this.modeler.on('commandStack.changed', exportArtifacts); + } + this.initializerService.initiateEventBusListeners(this.eventBus, this.commandStack); + this.modeler.createDiagram(); + // expose bpmnjs to window for debugging purposes + (0,min_dash__WEBPACK_IMPORTED_MODULE_7__.assign)(window, { + bpmnjs: this.modeler + }); + this.startDebounce(); + } + restart(iconSetConfiguration, domainStory) { + const currentStory = domainStory != undefined ? domainStory : this.elementRegistryService.createObjectListForDSTDownload().map(e => e.businessObject); + if (!iconSetConfiguration) { + iconSetConfiguration = this.storageService.getStoredIconSetConfiguration(); + } + if (iconSetConfiguration) { + this.storageService.setStoredIconSetConfiguration(iconSetConfiguration); + this.iconDictionaryService.setCustomConfiguration(iconSetConfiguration); + this.iconSetConfigurationService.loadConfiguration(iconSetConfiguration); + } + this.elementRegistryService.clear(); + this.modeler?.destroy(); + this.postInit(); + if (currentStory && this.modeler.get) { + this.modeler.importCustomElements(currentStory); + } + } + /** Interactions with the Modeler **/ + getModeler() { + return this.modeler; + } + commandStackChanged() { + // to update the title of the svg, we need to tell the command stack, that a value has changed + this.eventBus.fire('commandStack.changed', this.debounce(this.saveSVG, 500)); + } + startDebounce() { + this.debounce(this.saveSVG, 500); + } + debounce(fn, timeout) { + return () => { + let timer; + if (timer) { + clearTimeout(timer); + } + timer = setTimeout(() => { + // tslint:disable-next-line:no-unused-expression + fn(this.modeler).then(svg => { + this.encoded = svg; + }); + }, timeout); + }; + } + getEncoded() { + return this.encoded ? this.encoded : ''; + } + saveSVG(modeler) { + return (0,_home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + try { + const result = yield modeler.saveSVG(); + return result.svg; + } catch (err) { + alert('There was an error saving the SVG.\n' + err); + } + })(); + } + static #_ = this.ɵfac = function ModelerService_Factory(t) { + return new (t || ModelerService)(_angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_initializer_service__WEBPACK_IMPORTED_MODULE_2__.InitializerService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_3__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_4__.IconDictionaryService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_5__.IconSetConfigurationService), _angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵinject"](_BrowserStorage_storage_service__WEBPACK_IMPORTED_MODULE_6__.StorageService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_8__["ɵɵdefineInjectable"]({ + token: ModelerService, + factory: ModelerService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 94896: +/*!******************************************************!*\ + !*** ./src/app/Service/Renderer/renderer.service.ts ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ RendererService: () => (/* binding */ RendererService) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Service/Modeler/modeler.service */ 74676); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var src_app_Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Service/DirtyFlag/dirty-flag.service */ 89791); + + + + +class RendererService { + constructor(modelerService, elementRegistryService, dirtyFlagService) { + this.modelerService = modelerService; + this.elementRegistryService = elementRegistryService; + this.dirtyFlagService = dirtyFlagService; + } + renderStory(domainStory) { + this.modelerService.getModeler().importCustomElements(domainStory); + } + reset() { + this.renderStory([]); + } + importStory(domainStory, configurationChange, config, makeClean = true) { + this.modelerService.restart(config, domainStory); + this.renderStory(domainStory); + this.elementRegistryService.correctInitialize(); + this.modelerService.commandStackChanged(); + this.modelerService.startDebounce(); + if (makeClean) { + this.dirtyFlagService.makeClean(); + } + } + getStory() { + return this.elementRegistryService.createObjectListForDSTDownload().map(c => c.businessObject); + } + static #_ = this.ɵfac = function RendererService_Factory(t) { + return new (t || RendererService)(_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵinject"](src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_0__.ModelerService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵinject"](src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_1__.ElementRegistryService), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵinject"](src_app_Service_DirtyFlag_dirty_flag_service__WEBPACK_IMPORTED_MODULE_2__.DirtyFlagService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineInjectable"]({ + token: RendererService, + factory: RendererService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 67820: +/*!********************************************************!*\ + !*** ./src/app/Service/Replay/replay-state.service.ts ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ReplayStateService: () => (/* binding */ ReplayStateService) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); + + +class ReplayStateService { + constructor() { + this.replayOnSubject = new rxjs__WEBPACK_IMPORTED_MODULE_0__.BehaviorSubject(false); + this.replayOn$ = this.replayOnSubject.asObservable(); + } + setReplayState(state) { + this.replayOnSubject.next(state); + } + getReplayOn() { + return this.replayOnSubject.value; + } + static #_ = this.ɵfac = function ReplayStateService_Factory(t) { + return new (t || ReplayStateService)(); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ + token: ReplayStateService, + factory: ReplayStateService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 94788: +/*!**************************************************!*\ + !*** ./src/app/Service/Replay/replay.service.ts ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ReplayService: () => (/* binding */ ReplayService) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Service/Replay/replay-state.service */ 67820); +/* harmony import */ var src_app_Service_DomManipulation_dom_manipulation_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/Service/DomManipulation/dom-manipulation.service */ 63149); +/* harmony import */ var _storyCreator_story_creator_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./storyCreator/story-creator.service */ 24127); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); + + + + + + + +class ReplayService { + constructor(replayStateService, domManipulationService, storyCreatorService, snackbar) { + this.replayStateService = replayStateService; + this.domManipulationService = domManipulationService; + this.storyCreatorService = storyCreatorService; + this.snackbar = snackbar; + this.story = []; + this.currentSentence = new rxjs__WEBPACK_IMPORTED_MODULE_4__.BehaviorSubject(-1); + this.maxSentenceNumber = new rxjs__WEBPACK_IMPORTED_MODULE_4__.BehaviorSubject(0); + this.currentSentence$ = this.currentSentence.asObservable(); + this.maxSentenceNumber$ = this.maxSentenceNumber.asObservable(); + } + isReplayable() { + return this.storyCreatorService.traceActivitiesAndCreateStory().length > 0; + } + initializeReplay() { + this.currentSentence.next(1); + this.story = this.storyCreatorService.traceActivitiesAndCreateStory(); + this.maxSentenceNumber.next(this.story.length); + } + getCurrentSentenceNumber() { + return this.currentSentence.value; + } + getMaxSentenceNumber() { + return this.maxSentenceNumber.value; + } + nextSentence() { + if (this.currentSentence.value < this.story.length) { + this.currentSentence.next(this.currentSentence.value + 1); + this.showCurrentSentence(); + } + } + previousSentence() { + if (this.currentSentence.value > 1) { + this.currentSentence.next(this.currentSentence.value - 1); + this.showCurrentSentence(); + } + } + showCurrentSentence() { + this.domManipulationService.showSentence(this.story[this.currentSentence.value - 1], this.currentSentence.value > 1 ? this.story[this.currentSentence.value - 2] : undefined); + } + startReplay() { + this.initializeReplay(); + if (this.story?.length) { + const missingSentences = this.storyCreatorService.getMissingSentences(this.story); + if (missingSentences.length === 0) { + this.replayStateService.setReplayState(true); + this.domManipulationService.showSentence(this.story[this.currentSentence.getValue() - 1]); + } else { + const sentence = missingSentences.join(', '); + this.snackbar.open(missingSentences.length === 1 ? `The Domain Story is not complete. Sentence ${sentence} is missing.` : `The Domain Story is not complete. Sentences ${sentence} are missing.`, undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION * 2, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO + }); + } + } else { + this.snackbar.open('You need a Domain Story for replay.', undefined, { + duration: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_DURATION * 2, + panelClass: _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_0__.SNACKBAR_INFO + }); + } + } + stopReplay() { + this.currentSentence.next(-1); + this.maxSentenceNumber.next(0); + this.replayStateService.setReplayState(false); + this.domManipulationService.showAll(); + } + static #_ = this.ɵfac = function ReplayService_Factory(t) { + return new (t || ReplayService)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](src_app_Service_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_1__.ReplayStateService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](src_app_Service_DomManipulation_dom_manipulation_service__WEBPACK_IMPORTED_MODULE_2__.DomManipulationService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](_storyCreator_story_creator_service__WEBPACK_IMPORTED_MODULE_3__.StoryCreatorService), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](_angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_6__.MatSnackBar)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineInjectable"]({ + token: ReplayService, + factory: ReplayService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 24127: +/*!**********************************************************************!*\ + !*** ./src/app/Service/Replay/storyCreator/story-creator.service.ts ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ StoryCreatorService: () => (/* binding */ StoryCreatorService) +/* harmony export */ }); +/* harmony import */ var _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Domain/Common/elementTypes */ 30236); +/* harmony import */ var _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Domain/Common/dictionary/dictionary */ 54972); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ElementRegistry/element-registry.service */ 67613); + + + + +class StoryCreatorService { + constructor(elementRegistryService) { + this.elementRegistryService = elementRegistryService; + } + traceActivitiesAndCreateStory() { + const tracedActivityMap = new _Domain_Common_dictionary_dictionary__WEBPACK_IMPORTED_MODULE_1__.Dictionary(); + const story = []; + const activities = this.elementRegistryService.getActivitiesFromActors(); + activities.forEach(activity => { + const activityNumber = Number(activity.businessObject.number); // Sometimes the activityNumber is a string for some reason + const tracedItem = tracedActivityMap.get(`${activityNumber - 1}`) ? tracedActivityMap.get(`${activityNumber - 1}`) : []; + tracedItem.push(activity); + tracedActivityMap.set(`${activityNumber - 1}`, tracedItem); + }); + for (let i = 0; i <= Math.max(...tracedActivityMap.keysArray().map(it => Number(it))); i++) { + this.createSentence(tracedActivityMap, i, story); + } + this.addGroupsToLastSentence(story); + return story; + } + createSentence(tracedActivityMap, i, story) { + const sentenceObjects = this.getSentenceObjects(tracedActivityMap.get(`${i}`) || []); + const highlightedElements = sentenceObjects.map(t => t.id); + if (i > 0) { + story[i - 1].objects.forEach(object => { + if (!sentenceObjects.includes(object)) { + sentenceObjects.push(object); + } + }); + } + story[i] = { + highlightedObjects: highlightedElements, + objects: sentenceObjects + }; + } + getMissingSentences(story) { + if (!story || story.length === 0) { + return []; + } + const missingSentences = []; + for (let i = 0; i < story.length; i++) { + if (!story[i] || story[i].objects.length <= 0 || story[i].highlightedObjects.length === 0 || story[i].objects.filter(element => element.type === _Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTIVITY).length <= 0) { + missingSentences.push(i + 1); + } + } + return missingSentences; + } + getSentenceObjects(tracedActivity) { + const initialSource = []; + const activities = tracedActivity; + const targetObjects = []; + tracedActivity.forEach(parallelSentence => { + initialSource.push(parallelSentence.source); + const firstTarget = parallelSentence.target; + targetObjects.push(firstTarget); + // check the outgoing activities for each target + for (const checkTarget of targetObjects) { + if (checkTarget.businessObject && !checkTarget.businessObject.type.includes('actor') && checkTarget.outgoing) { + // check the target for each outgoing activity + checkTarget.outgoing.forEach(activity => { + activities.push(activity); + const activityTarget = activity.target; + if (activityTarget && !targetObjects.includes(activityTarget)) { + targetObjects.push(activityTarget); + } + }); + } + } + }); + return initialSource.map(e => e.businessObject).concat(activities.map(a => a.businessObject)).concat(targetObjects.map(t => t.businessObject)); + } + addGroupsToLastSentence(story) { + const groups = this.elementRegistryService.getAllGroups(); + if (groups.length > 0) { + story[story.length - 1].objects = story[story.length - 1].objects.concat(groups.map(g => g.businessObject)); + } + } + static #_ = this.ɵfac = function StoryCreatorService_Factory(t) { + return new (t || StoryCreatorService)(_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵinject"](_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_2__.ElementRegistryService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineInjectable"]({ + token: StoryCreatorService, + factory: StoryCreatorService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 58124: +/*!******************************************************!*\ + !*** ./src/app/Service/Settings/settings.service.ts ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SettingsService: () => (/* binding */ SettingsService) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); + + +class SettingsService { + constructor() { + this.showSettings = new rxjs__WEBPACK_IMPORTED_MODULE_0__.BehaviorSubject(false); + this.showSettings$ = this.showSettings.asObservable(); + } + close() { + this.showSettings.next(false); + } + open() { + this.showSettings.next(true); + } + static #_ = this.ɵfac = function SettingsService_Factory(t) { + return new (t || SettingsService)(); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ + token: SettingsService, + factory: SettingsService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 69672: +/*!************************************************!*\ + !*** ./src/app/Service/Title/title.service.ts ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ TitleService: () => (/* binding */ TitleService) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../environments/environment */ 45312); +/* harmony import */ var _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Domain/Common/constants */ 90816); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _CommandStack_command_stack_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../CommandStack/command-stack.service */ 19381); + + + + + +class TitleService { + constructor(commandStackService) { + this.commandStackService = commandStackService; + this.titleSubject = new rxjs__WEBPACK_IMPORTED_MODULE_3__.BehaviorSubject(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_TITLE); + this.descriptionSubject = new rxjs__WEBPACK_IMPORTED_MODULE_3__.BehaviorSubject(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_DESCRIPTION); + this.iconSetNameSubject = new rxjs__WEBPACK_IMPORTED_MODULE_3__.BehaviorSubject(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_ICON_SET_NAME); + this.showDescriptionSubject = new rxjs__WEBPACK_IMPORTED_MODULE_3__.BehaviorSubject(true); + this.title$ = this.titleSubject.asObservable(); + this.description$ = this.descriptionSubject.asObservable(); + this.showDescription$ = this.showDescriptionSubject.asObservable(); + this.iconSetName$ = this.iconSetNameSubject.asObservable(); + } + updateTitleAndDescription(title, description, allowUndo) { + if (allowUndo) { + this.fireTitleAndDescriptionUpdate(title, description); + } else { + this.updateTitle(title); + this.updateDescription(description); + } + } + reset() { + this.updateTitleAndDescription(_Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_TITLE, _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_DESCRIPTION, false); + } + updateTitle(inputTitle) { + const title = !inputTitle || inputTitle.trim().length === 0 ? _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_TITLE : inputTitle; + this.titleSubject.next(title); + document.title = title === _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_TITLE ? 'egon.io' : title; + } + updateDescription(description) { + this.descriptionSubject.next(description ?? this.descriptionSubject.value); + } + setShowDescription(show) { + this.showDescriptionSubject.next(show); + } + setIconSetName(name) { + this.iconSetNameSubject.next(name); + } + getTitle() { + return this.titleSubject.value; + } + getDescription() { + return this.descriptionSubject.value; + } + getIconSetName() { + return this.iconSetNameSubject.value; + } + getVersion() { + return _environments_environment__WEBPACK_IMPORTED_MODULE_0__.environment.version; + } + hasTitleOrDescription() { + return this.getTitle().trim().length > 0 && this.getTitle() !== _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_TITLE || this.getDescription().trim().length > 0 && this.getDescription() !== _Domain_Common_constants__WEBPACK_IMPORTED_MODULE_1__.INITIAL_DESCRIPTION; + } + fireTitleAndDescriptionUpdate(newTitle, newDescription) { + const context = { + newTitle, + newDescription + }; + this.commandStackService.execute('story.updateHeadlineAndDescription', context); + } + static #_ = this.ɵfac = function TitleService_Factory(t) { + return new (t || TitleService)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_CommandStack_command_stack_service__WEBPACK_IMPORTED_MODULE_2__.CommandStackService)); + }; + static #_2 = this.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: TitleService, + factory: TitleService.ɵfac, + providedIn: 'root' + }); +} + +/***/ }), + +/***/ 114: +/*!*****************************************!*\ + !*** ./src/app/Utils/mathExtensions.ts ***! + \*****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Point: () => (/* binding */ Point), +/* harmony export */ angleBetween: () => (/* binding */ angleBetween), +/* harmony export */ degrees: () => (/* binding */ degrees), +/* harmony export */ positionsMatch: () => (/* binding */ positionsMatch) +/* harmony export */ }); + + +// convert rad to deg +function degrees(radians) { + return radians * 180 / Math.PI; +} +// calculate the angle between two points in 2D +function angleBetween(startPoint, endPoint) { + let quadrant; + // determine in which quadrant we are + if (startPoint.x <= endPoint.x) { + if (startPoint.y >= endPoint.y) { + quadrant = 0; + } // upper right quadrant + else { + quadrant = 3; + } // lower right quadrant + } else { + if (startPoint.y >= endPoint.y) { + quadrant = 1; + } // upper left Quadrant + else { + quadrant = 2; + } // lower left quadrant + } + + const adjacent = Math.abs(startPoint.y - endPoint.y); + const opposite = Math.abs(startPoint.x - endPoint.x); + // since the arcus-tangens only gives values between 0 and 90, we have to adjust for the quadrant we are in + if (quadrant === 0) { + return 90 - degrees(Math.atan2(opposite, adjacent)); + } + if (quadrant === 1) { + return 90 + degrees(Math.atan2(opposite, adjacent)); + } + if (quadrant === 2) { + return 270 - degrees(Math.atan2(opposite, adjacent)); + } + if (quadrant === 3) { + return 270 + degrees(Math.atan2(opposite, adjacent)); + } + return undefined; +} +function positionsMatch(width, height, elementX, elementY, clickX, clickY) { + if (clickX > elementX && clickX < elementX + width) { + if (clickY > elementY && clickY < elementY + height) { + return true; + } + } + return false; +} +class Point { + constructor() { + this.y = 0; + this.x = 0; + } +} + +/***/ }), + +/***/ 28714: +/*!*********************************!*\ + !*** ./src/app/Utils/naming.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getNameFromType: () => (/* binding */ getNameFromType) +/* harmony export */ }); +/* harmony import */ var src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Domain/Common/elementTypes */ 30236); + +// TODO: td: This can cause a lot of errors +function getNameFromType(type) { + if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR)) { + return type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.ACTOR, ''); + } else if (type.includes(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT)) { + return type.replace(src_app_Domain_Common_elementTypes__WEBPACK_IMPORTED_MODULE_0__.elementTypes.WORKOBJECT, ''); + } + return ''; +} + +/***/ }), + +/***/ 66107: +/*!************************************!*\ + !*** ./src/app/Utils/sanitizer.ts ***! + \************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ restoreTitleFromFileName: () => (/* binding */ restoreTitleFromFileName), +/* harmony export */ sanitizeForDesktop: () => (/* binding */ sanitizeForDesktop), +/* harmony export */ sanitizeIconName: () => (/* binding */ sanitizeIconName) +/* harmony export */ }); + + +// sanitize user-Input to be Desktop-Filename safe +function sanitizeForDesktop(str) { + const map = { + '/': '', + '\\': '', + ':': '', + '*': '', + '?': '', + '"': '', + '<': '', + '>': '', + '|': '' + }; + const reg = /[/\\:*?"<>|]/gi; + return str ? str.replace(reg, match => map[match]) : ''; +} +function sanitizeIconName(name) { + const map = { + '/': '', + '\\': '', + ':': '', + '*': '', + '?': '', + '"': '', + '<': '', + '>': '', + '|': '', + '(': '', + ')': '', + ' ': '-', + '.': '_' + }; + const reg = /[/\\:*?"<>|() .]/gi; + return name ? name.replace(reg, match => { + return map[match]; + }) : ''; +} +function restoreTitleFromFileName(filename, isSVG) { + let title; + const domainStoryRegex = /_\d+-\d+-\d+( ?_?-?\(\d+\))?(-?\d)?(.dst|.egn)/; + const svgRegex = /_\d+-\d+-\d+( ?_?-?\(\d+\))?(-?\d)?(.dst|.egn).svg/; + const egnSuffix = '.egn'; + const dstSuffix = '.dst'; + const svgSuffix = '.svg'; + let filenameWithoutDateSuffix = filename.replace(isSVG ? svgRegex : domainStoryRegex, ''); + if (filenameWithoutDateSuffix.includes(isSVG ? svgSuffix : dstSuffix)) { + filenameWithoutDateSuffix = filenameWithoutDateSuffix.replace(svgSuffix, '').replace(dstSuffix, '').replace(egnSuffix, ''); + } + title = filenameWithoutDateSuffix; + return title; +} + +/***/ }), + +/***/ 20092: +/*!**********************************!*\ + !*** ./src/app/app.component.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AppComponent: () => (/* binding */ AppComponent) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Domain/Dialog/infoDialogData */ 45574); +/* harmony import */ var _Presentation_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Presentation/Dialog/info-dialog/info-dialog.component */ 16266); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../environments/environment */ 45312); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var src_app_Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Service/Settings/settings.service */ 58124); +/* harmony import */ var _Service_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Service/Dialog/dialog.service */ 4730); +/* harmony import */ var _Service_Title_title_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Service/Title/title.service */ 69672); +/* harmony import */ var _Service_Export_export_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Service/Export/export.service */ 98106); +/* harmony import */ var _Service_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Service/Replay/replay-state.service */ 67820); +/* harmony import */ var _Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Service/Replay/replay.service */ 94788); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var src_app_Presentation_Header_header_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/Presentation/Header/header.component */ 91729); +/* harmony import */ var src_app_Presentation_Settings_settings_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/Presentation/Settings/settings.component */ 1261); +/* harmony import */ var src_app_Presentation_Canvas_modeler_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/Presentation/Canvas/modeler.component */ 29383); + + + + + + + + + + + + + + + + +function AppComponent_app_settings_1_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](0, "app-settings"); + } +} +class AppComponent { + constructor(settingsService, dialogService, titleService, exportService, replayStateService, replayService) { + this.settingsService = settingsService; + this.dialogService = dialogService; + this.titleService = titleService; + this.exportService = exportService; + this.replayStateService = replayStateService; + this.version = _environments_environment__WEBPACK_IMPORTED_MODULE_2__.environment.version; + this.showSettings$ = new rxjs__WEBPACK_IMPORTED_MODULE_13__.BehaviorSubject(false); + this.showDescription$ = new rxjs__WEBPACK_IMPORTED_MODULE_13__.BehaviorSubject(true); + document.addEventListener('keydown', e => { + if (e.ctrlKey && e.key === 's') { + e.preventDefault(); + e.stopPropagation(); + if (this.exportService.isDomainStoryExportable()) { + this.exportService.downloadDST(); + } + } + if (e.ctrlKey && e.key === 'l') { + e.preventDefault(); + e.stopPropagation(); + document.getElementById('import')?.click(); + } + if ((e.key === 'ArrowRight' || e.key === 'ArrowUp') && this.replayStateService.getReplayOn()) { + e.preventDefault(); + e.stopPropagation(); + replayService.nextSentence(); + } + if ((e.key === 'ArrowLeft' || e.key === 'ArrowDown') && this.replayStateService.getReplayOn()) { + e.preventDefault(); + e.stopPropagation(); + replayService.previousSentence(); + } + }); + } + ngOnInit() { + this.showDescription$ = this.titleService.showDescription$; + this.showSettings$ = this.settingsService.showSettings$; + } + openLinkDialog(link, title, text) { + const config = new _angular_material_dialog__WEBPACK_IMPORTED_MODULE_14__.MatDialogConfig(); + config.disableClose = false; + config.autoFocus = true; + config.data = new _Domain_Dialog_infoDialogData__WEBPACK_IMPORTED_MODULE_0__.InfoDialogData(title, text, true, true, link); + this.dialogService.openDialog(_Presentation_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_1__.InfoDialogComponent, config); + } + static #_ = this.ɵfac = function AppComponent_Factory(t) { + return new (t || AppComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](src_app_Service_Settings_settings_service__WEBPACK_IMPORTED_MODULE_3__.SettingsService), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](_Service_Dialog_dialog_service__WEBPACK_IMPORTED_MODULE_4__.DialogService), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_5__.TitleService), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](_Service_Export_export_service__WEBPACK_IMPORTED_MODULE_6__.ExportService), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](_Service_Replay_replay_state_service__WEBPACK_IMPORTED_MODULE_7__.ReplayStateService), _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdirectiveInject"](_Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_8__.ReplayService)); + }; + static #_2 = this.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵdefineComponent"]({ + type: AppComponent, + selectors: [["app-root"]], + decls: 36, + vars: 36, + consts: [["role", "main", 1, "content"], [4, "ngIf"], ["type", "color", "id", "colorPicker", 2, "display", "none"], ["src", "./favicon.ico", "height", "24", "alt", "Egon Logo"], ["href", "https://egon.io", "target", "_blank"], ["href", "https://github.com/WPS/egon.io/releases/latest", "target", "_blank"], ["src", "./assets/logo/wps-icon.ico", "height", "24", "alt", "WPS Logo"], ["href", "https://www.wps.de/", "target", "_blank"], ["href", "https://www.wps.de/datenschutz/", "target", "_blank"], ["href", "https://www.wps.de/impressum/", "target", "_blank"]], + template: function AppComponent_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](0, "div", 0); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtemplate"](1, AppComponent_app_settings_1_Template, 1, 0, "app-settings", 1); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](2, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](3, "div"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](4, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](5, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](6, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](7, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](8, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](9, "input", 2)(10, "app-header"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](11, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](12, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](13, "app-modeler"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](14, "div"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](15, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipe"](16, "async"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](17, "span"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](18, "img", 3); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](19, "a", 4); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](20, " egon.io"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](21, "span"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](22, "version: "); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](23, "a", 5); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](24); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](25, "span"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](26, "by "); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelement"](27, "img", 6); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](28, "a", 7); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](29, "WPS"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](30, "span")(31, "a", 8); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](32, "Privacy"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()(); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementStart"](33, "span")(34, "a", 9); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtext"](35, "Imprint"); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵelementEnd"]()()()(); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](2, 16, ctx.showSettings$)); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵclassProp"]("headerAndCanvas", !_angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](4, 18, ctx.showSettings$) && _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](5, 20, ctx.showDescription$))("headerAndCanvasCollapsed", !_angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](6, 22, ctx.showSettings$) && !_angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](7, 24, ctx.showDescription$))("hidden", _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](8, 26, ctx.showSettings$)); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](7); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵclassProp"]("header", _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](11, 28, ctx.showDescription$))("headerCollapsed", !_angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](12, 30, ctx.showDescription$)); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](4); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵclassProp"]("logoContainer", !_angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](15, 32, ctx.showSettings$))("hidden", _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵpipeBind1"](16, 34, ctx.showSettings$)); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵadvance"](10); + _angular_core__WEBPACK_IMPORTED_MODULE_12__["ɵɵtextInterpolate"](ctx.version); + } + }, + dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_15__.NgIf, src_app_Presentation_Header_header_component__WEBPACK_IMPORTED_MODULE_9__.HeaderComponent, src_app_Presentation_Settings_settings_component__WEBPACK_IMPORTED_MODULE_10__.SettingsComponent, src_app_Presentation_Canvas_modeler_component__WEBPACK_IMPORTED_MODULE_11__.ModelerComponent, _angular_common__WEBPACK_IMPORTED_MODULE_15__.AsyncPipe], + styles: [".content[_ngcontent-%COMP%] {\n height: 100%;\n overflow: hidden;\n}\n\n\n\n.headerAndCanvas[_ngcontent-%COMP%] {\n height: 100%;\n width: 100%;\n display: grid;\n grid-template-rows: 220px auto;\n overflow: hidden;\n}\n\n.headerAndCanvasCollapsed[_ngcontent-%COMP%] {\n height: 100%;\n width: 100%;\n display: grid;\n grid-template-rows: 65px auto;\n overflow: hidden;\n}\n\n.settings[_ngcontent-%COMP%] {\n height: 100%;\n}\n\n.header[_ngcontent-%COMP%] {\n display: grid;\n grid-template-rows: 65px 155px;\n}\n\n\n\n.logoContainer[_ngcontent-%COMP%] {\n display: flex;\n position: absolute;\n bottom: 0;\n right: 100px;\n align-items: flex-end;\n}\n.logoContainer[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n margin-left: 16px;\n margin-bottom: 14px;\n align-items: center;\n}\n\n.hidden[_ngcontent-%COMP%] {\n height: 1px;\n width: 1px;\n}\n\n#wrapper[_ngcontent-%COMP%] {\n padding: 16px;\n min-height: 100%;\n height: 100%;\n box-sizing: border-box; \n\n}\n\n#tab-group[_ngcontent-%COMP%] {\n height: 100%;\n}\n\n#tab-group[_ngcontent-%COMP%] mat-tab-body[_ngcontent-%COMP%] {\n flex-grow: 1;\n}\n\n.mat-button-toggle-label-content[_ngcontent-%COMP%] {\n font-size: 10pt !important;\n padding: 0 5px !important;\n line-height: inherit !important;\n}\n\n .mdc-text-field--filled:not(.mdc-text-field--disabled) {\n background-color: white;\n}\n\nspan[_ngcontent-%COMP%] *[_ngcontent-%COMP%] {\n vertical-align: middle;\n}\n\nspan[_ngcontent-%COMP%] {\n height: 24px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLFlBQUE7RUFDQSxnQkFBQTtBQUNGOztBQUVBLHFCQUFBO0FBRUE7RUFDRSxZQUFBO0VBQ0EsV0F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ZW1zOiBmbGV4LWVuZDtcblxuICBzcGFuIHtcbiAgICBtYXJnaW4tbGVmdDogMTZweDtcbiAgICBtYXJnaW4tYm90dG9tOiAxNHB4O1xuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIH1cbn1cblxuLmhpZGRlbiB7XG4gIGhlaWdodDogMXB4O1xuICB3aWR0aDogMXB4O1xufVxuXG4jd3JhcHBlciB7XG4gIHBhZGRpbmc6IDE2cHg7XG4gIG1pbi1oZWlnaHQ6IDEwMCU7XG4gIGhlaWdodDogMTAwJTtcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDsgLypuZXcqL1xufVxuXG4jdGFiLWdyb3VwIHtcbiAgaGVpZ2h0OiAxMDAlO1xufVxuXG4jdGFiLWdyb3VwIG1hdC10YWItYm9keSB7XG4gIGZsZXgtZ3JvdzogMTtcbn1cblxuLy8gTWF0ZXJpYWwgRGVzaWduIE92ZXJyaWRlc1xuLm1hdC1idXR0b24tdG9nZ2xlLWxhYmVsLWNvbnRlbnQge1xuICBmb250LXNpemU6IDEwcHQgIWltcG9ydGFudDtcbiAgcGFkZGluZzogMCA1cHggIWltcG9ydGFudDtcbiAgbGluZS1oZWlnaHQ6IGluaGVyaXQgIWltcG9ydGFudDtcbn1cblxuOjpuZy1kZWVwLm1kYy10ZXh0LWZpZWxkLS1maWxsZWQ6bm90KC5tZGMtdGV4dC1maWVsZC0tZGlzYWJsZWQpIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG59XG5cbnNwYW4gKiB7XG4gIHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7XG59XG5cbnNwYW4ge1xuICBoZWlnaHQ6IDI0cHg7XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 */"] + }); +} + +/***/ }), + +/***/ 50635: +/*!*******************************!*\ + !*** ./src/app/app.module.ts ***! + \*******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AppModule: () => (/* binding */ AppModule) +/* harmony export */ }); +/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @angular/platform-browser */ 4199); +/* harmony import */ var _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @angular/material/checkbox */ 62827); +/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @angular/platform-browser/animations */ 91244); +/* harmony import */ var src_app_Presentation_Header_header_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/app/Presentation/Header/header.component */ 91729); +/* harmony import */ var src_app_Presentation_Settings_settings_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! src/app/Presentation/Settings/settings.component */ 1261); +/* harmony import */ var src_app_app_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/app.component */ 20092); +/* harmony import */ var src_app_Service_Export_export_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/Service/Export/export.service */ 98106); +/* harmony import */ var src_app_Service_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/Service/Import/import-domain-story.service */ 23779); +/* harmony import */ var src_app_Service_Import_import_repair_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/Service/Import/import-repair.service */ 75158); +/* harmony import */ var src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/Service/Modeler/modeler.service */ 74676); +/* harmony import */ var src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/Service/Title/title.service */ 69672); +/* harmony import */ var src_app_Service_LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/Service/LabelDictionary/label-dictionary.service */ 59783); +/* harmony import */ var src_app_Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! src/app/Service/Replay/replay.service */ 94788); +/* harmony import */ var src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! src/app/Service/ElementRegistry/element-registry.service */ 67613); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-set-configuration.service */ 10200); +/* harmony import */ var src_app_Service_LabelDictionary_mass_naming_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! src/app/Service/LabelDictionary/mass-naming.service */ 37509); +/* harmony import */ var src_app_Presentation_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! src/app/Presentation/Dialog/info-dialog/info-dialog.component */ 16266); +/* harmony import */ var src_app_Presentation_Dialog_export_dialog_export_dialog_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! src/app/Presentation/Dialog/export-dialog/export-dialog.component */ 97218); +/* harmony import */ var src_app_Presentation_Dialog_activity_dialog_activity_dialog_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! src/app/Presentation/Dialog/activity-dialog/activity-dialog.component */ 63954); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @angular/forms */ 48015); +/* harmony import */ var src_app_Presentation_Dialog_header_dialog_header_dialog_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! src/app/Presentation/Dialog/header-dialog/header-dialog.component */ 21270); +/* harmony import */ var src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! src/app/Service/IconSetConfiguration/icon-dictionary.service */ 93689); +/* harmony import */ var src_app_Presentation_Canvas_modeler_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! src/app/Presentation/Canvas/modeler.component */ 29383); +/* harmony import */ var src_app_Modules_settings_module__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! src/app/Modules/settings.module */ 47261); +/* harmony import */ var _Service_Autosave_autosave_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Service/Autosave/autosave.service */ 30534); +/* harmony import */ var _Modules_domain_story_modeler_module_module__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Modules/domain-story-modeler-module.module */ 76330); +/* harmony import */ var _Presentation_Dialog_label_dictionary_dialog_label_dictionary_dialog_component__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component */ 23958); +/* harmony import */ var _material_module__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./material.module */ 89439); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @angular/core */ 96623); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +class AppModule { + constructor(autosaveService) { + this.autosaveService = autosaveService; + // autosaveService wird so automatisch initialisiert, auf keinen Fall entfernen! + } + + ngDoBootstrap(app) { + const componentElement = document.createElement('app-root'); + document.body.append(componentElement); + app.bootstrap(src_app_app_component__WEBPACK_IMPORTED_MODULE_2__.AppComponent); + } + static #_ = this.ɵfac = function AppModule_Factory(t) { + return new (t || AppModule)(_angular_core__WEBPACK_IMPORTED_MODULE_24__["ɵɵinject"](_Service_Autosave_autosave_service__WEBPACK_IMPORTED_MODULE_20__.AutosaveService)); + }; + static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_24__["ɵɵdefineNgModule"]({ + type: AppModule + }); + static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_24__["ɵɵdefineInjector"]({ + providers: [_Service_Autosave_autosave_service__WEBPACK_IMPORTED_MODULE_20__.AutosaveService, src_app_Service_Export_export_service__WEBPACK_IMPORTED_MODULE_3__.ExportService, src_app_Service_Import_import_domain_story_service__WEBPACK_IMPORTED_MODULE_4__.ImportDomainStoryService, src_app_Service_Import_import_repair_service__WEBPACK_IMPORTED_MODULE_5__.ImportRepairService, src_app_Service_IconSetConfiguration_icon_dictionary_service__WEBPACK_IMPORTED_MODULE_17__.IconDictionaryService, src_app_Service_Title_title_service__WEBPACK_IMPORTED_MODULE_7__.TitleService, src_app_Service_LabelDictionary_label_dictionary_service__WEBPACK_IMPORTED_MODULE_8__.LabelDictionaryService, src_app_Service_Replay_replay_service__WEBPACK_IMPORTED_MODULE_9__.ReplayService, src_app_Service_ElementRegistry_element_registry_service__WEBPACK_IMPORTED_MODULE_10__.ElementRegistryService, src_app_Service_IconSetConfiguration_icon_set_configuration_service__WEBPACK_IMPORTED_MODULE_11__.IconSetConfigurationService, src_app_Service_Modeler_modeler_service__WEBPACK_IMPORTED_MODULE_6__.ModelerService, src_app_Service_LabelDictionary_mass_naming_service__WEBPACK_IMPORTED_MODULE_12__.MassNamingService, _angular_forms__WEBPACK_IMPORTED_MODULE_25__.UntypedFormBuilder, { + provide: _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_26__.MAT_CHECKBOX_DEFAULT_OPTIONS, + useValue: { + clickAction: 'noop' + } + }], + imports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_27__.BrowserModule, _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_28__.NoopAnimationsModule, _angular_forms__WEBPACK_IMPORTED_MODULE_25__.ReactiveFormsModule, src_app_Modules_settings_module__WEBPACK_IMPORTED_MODULE_19__.SettingsModule, _Modules_domain_story_modeler_module_module__WEBPACK_IMPORTED_MODULE_21__.DomainStoryModelerModuleModule, _material_module__WEBPACK_IMPORTED_MODULE_23__.MaterialModule] + }); +} +(function () { + (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_24__["ɵɵsetNgModuleScope"](AppModule, { + declarations: [src_app_Presentation_Header_header_component__WEBPACK_IMPORTED_MODULE_0__.HeaderComponent, src_app_Presentation_Settings_settings_component__WEBPACK_IMPORTED_MODULE_1__.SettingsComponent, src_app_app_component__WEBPACK_IMPORTED_MODULE_2__.AppComponent, src_app_Presentation_Dialog_info_dialog_info_dialog_component__WEBPACK_IMPORTED_MODULE_13__.InfoDialogComponent, src_app_Presentation_Dialog_export_dialog_export_dialog_component__WEBPACK_IMPORTED_MODULE_14__.ExportDialogComponent, src_app_Presentation_Dialog_activity_dialog_activity_dialog_component__WEBPACK_IMPORTED_MODULE_15__.ActivityDialogComponent, src_app_Presentation_Dialog_header_dialog_header_dialog_component__WEBPACK_IMPORTED_MODULE_16__.HeaderDialogComponent, src_app_Presentation_Canvas_modeler_component__WEBPACK_IMPORTED_MODULE_18__.ModelerComponent, _Presentation_Dialog_label_dictionary_dialog_label_dictionary_dialog_component__WEBPACK_IMPORTED_MODULE_22__.LabelDictionaryDialogComponent], + imports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_27__.BrowserModule, _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_28__.NoopAnimationsModule, _angular_forms__WEBPACK_IMPORTED_MODULE_25__.ReactiveFormsModule, src_app_Modules_settings_module__WEBPACK_IMPORTED_MODULE_19__.SettingsModule, _Modules_domain_story_modeler_module_module__WEBPACK_IMPORTED_MODULE_21__.DomainStoryModelerModuleModule, _material_module__WEBPACK_IMPORTED_MODULE_23__.MaterialModule] + }); +})(); + +/***/ }), + +/***/ 89439: +/*!************************************!*\ + !*** ./src/app/material.module.ts ***! + \************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ MaterialModule: () => (/* binding */ MaterialModule) +/* harmony export */ }); +/* harmony import */ var _angular_material_dialog__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/dialog */ 72768); +/* harmony import */ var _angular_material_form_field__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/form-field */ 48913); +/* harmony import */ var _angular_material_input__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/material/input */ 29836); +/* harmony import */ var _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/material/toolbar */ 31165); +/* harmony import */ var _angular_material_expansion__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/material/expansion */ 3695); +/* harmony import */ var _angular_material_card__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/material/card */ 34294); +/* harmony import */ var _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/material/snack-bar */ 40382); +/* harmony import */ var _angular_material_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/material/button */ 95912); +/* harmony import */ var _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/grid-list */ 84533); +/* harmony import */ var _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/material/button-toggle */ 68529); +/* harmony import */ var _angular_material_list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/material/list */ 68708); +/* harmony import */ var _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/material/checkbox */ 62827); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); + + + + + + + + + + + + + +class MaterialModule { + static #_ = this.ɵfac = function MaterialModule_Factory(t) { + return new (t || MaterialModule)(); + }; + static #_2 = this.ɵmod = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ + type: MaterialModule + }); + static #_3 = this.ɵinj = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ + imports: [_angular_material_button__WEBPACK_IMPORTED_MODULE_1__.MatButtonModule, _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_2__.MatButtonToggleModule, _angular_material_list__WEBPACK_IMPORTED_MODULE_3__.MatListModule, _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_4__.MatCheckboxModule, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_5__.MatDialogModule, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_6__.MatFormFieldModule, _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_7__.MatGridListModule, _angular_material_input__WEBPACK_IMPORTED_MODULE_8__.MatInputModule, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__.MatToolbarModule, _angular_material_expansion__WEBPACK_IMPORTED_MODULE_10__.MatExpansionModule, _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_11__.MatSnackBarModule, _angular_material_card__WEBPACK_IMPORTED_MODULE_12__.MatCardModule, _angular_material_button__WEBPACK_IMPORTED_MODULE_1__.MatButtonModule, _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_2__.MatButtonToggleModule, _angular_material_list__WEBPACK_IMPORTED_MODULE_3__.MatListModule, _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_4__.MatCheckboxModule, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_5__.MatDialogModule, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_6__.MatFormFieldModule, _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_7__.MatGridListModule, _angular_material_input__WEBPACK_IMPORTED_MODULE_8__.MatInputModule, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__.MatToolbarModule, _angular_material_expansion__WEBPACK_IMPORTED_MODULE_10__.MatExpansionModule, _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_11__.MatSnackBarModule, _angular_material_card__WEBPACK_IMPORTED_MODULE_12__.MatCardModule] + }); +} +(function () { + (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](MaterialModule, { + imports: [_angular_material_button__WEBPACK_IMPORTED_MODULE_1__.MatButtonModule, _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_2__.MatButtonToggleModule, _angular_material_list__WEBPACK_IMPORTED_MODULE_3__.MatListModule, _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_4__.MatCheckboxModule, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_5__.MatDialogModule, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_6__.MatFormFieldModule, _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_7__.MatGridListModule, _angular_material_input__WEBPACK_IMPORTED_MODULE_8__.MatInputModule, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__.MatToolbarModule, _angular_material_expansion__WEBPACK_IMPORTED_MODULE_10__.MatExpansionModule, _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_11__.MatSnackBarModule, _angular_material_card__WEBPACK_IMPORTED_MODULE_12__.MatCardModule], + exports: [_angular_material_button__WEBPACK_IMPORTED_MODULE_1__.MatButtonModule, _angular_material_button_toggle__WEBPACK_IMPORTED_MODULE_2__.MatButtonToggleModule, _angular_material_list__WEBPACK_IMPORTED_MODULE_3__.MatListModule, _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_4__.MatCheckboxModule, _angular_material_dialog__WEBPACK_IMPORTED_MODULE_5__.MatDialogModule, _angular_material_form_field__WEBPACK_IMPORTED_MODULE_6__.MatFormFieldModule, _angular_material_grid_list__WEBPACK_IMPORTED_MODULE_7__.MatGridListModule, _angular_material_input__WEBPACK_IMPORTED_MODULE_8__.MatInputModule, _angular_material_toolbar__WEBPACK_IMPORTED_MODULE_9__.MatToolbarModule, _angular_material_expansion__WEBPACK_IMPORTED_MODULE_10__.MatExpansionModule, _angular_material_snack_bar__WEBPACK_IMPORTED_MODULE_11__.MatSnackBarModule, _angular_material_card__WEBPACK_IMPORTED_MODULE_12__.MatCardModule] + }); +})(); + +/***/ }), + +/***/ 45312: +/*!*****************************************!*\ + !*** ./src/environments/environment.ts ***! + \*****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ environment: () => (/* binding */ environment) +/* harmony export */ }); +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. +const environment = { + production: false, + version: '2.0.0-dev' +}; +/* + * For easier debugging in development mode, you can import the following file + * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. + * + * This import should be commented out in production mode because it will have a negative impact + * on performance if an error is thrown. + */ +// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. + +/***/ }), + +/***/ 84429: +/*!*********************!*\ + !*** ./src/main.ts ***! + \*********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/platform-browser */ 4199); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app/app.module */ 50635); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./environments/environment */ 45312); + + + + +if (_environments_environment__WEBPACK_IMPORTED_MODULE_1__.environment.production) { + (0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.enableProdMode)(); +} +_angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__.platformBrowser().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_0__.AppModule).catch(err => console.error(err)); + +/***/ }) + +}, +/******/ __webpack_require__ => { // webpackRuntimeModules +/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) +/******/ __webpack_require__.O(0, ["vendor"], () => (__webpack_exec__(84429))); +/******/ var __webpack_exports__ = __webpack_require__.O(); +/******/ } +]); +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/app-v2/main.js.map b/app-v2/main.js.map new file mode 100644 index 0000000..7a4531e --- /dev/null +++ b/app-v2/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAA0C;AACgB;AACf;AACX;AAEU;AACU;AACJ;AACa;AAE/C,SAAUS,kBAAkBA,CAACC,OAAO;EAChDV,2DAAO,CAACW,IAAI,CAAC,IAAI,EAAED,OAAO,CAAC;EAE3B,IAAI,CAACE,eAAe,GAAG,EAAE;EACzB,IAAI,CAACC,cAAc,GAAG,EAAE;AAC1B;AAEAT,+CAAQ,CAACK,kBAAkB,EAAET,2DAAO,CAAC;AAErCS,kBAAkB,CAACK,SAAS,CAACC,QAAQ,GAAG,EAAE,CAACC,MAAM,CAC/CP,kBAAkB,CAACK,SAAS,CAACC,QAAQ,EACrC,CAACV,gDAAiB,EAAEC,yDAAkB,EAAEC,yDAAc,CAAC,EACvD,CAACN,sEAAY,CAAC,CACf;AAED;;;;;AAKAQ,kBAAkB,CAACK,SAAS,CAACG,eAAe,GAAG,UAAUC,aAAa;EACpE,IAAIC,QAAQ,GAAGD,aAAa,CAACE,MAAM;EACnC,OAAOF,aAAa,CAACG,QAAQ;EAC7B,OAAOH,aAAa,CAACE,MAAM;EAC3B,IAAI,CAACR,eAAe,CAACU,IAAI,CAACJ,aAAa,CAAC;EAExC,IAAIK,MAAM,GAAG,IAAI,CAACC,GAAG,CAAC,QAAQ,CAAC;IAC7BC,cAAc,GAAG,IAAI,CAACD,GAAG,CAAC,gBAAgB,CAAC;EAE7C,IAAIE,WAAW,GAAGxB,gDAAM,CAAC;IAAEyB,cAAc,EAAET;EAAa,CAAE,EAAEA,aAAa,CAAC;EAC1E,IAAIU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ChBC,4EAAkB,EAClBE,2EAAiB,EACjBD,kEAAa,EAGbE,qEAAe,EACfE,kFAAqB,EACrBC,iEAAa,EACbC,yEAAiB,EACjBX,qEAAe,EACfC,4EAAkB,EAClBO,0EAAiB,EACjBN,mEAAc,EACdC,uEAAgB,EAChBC,4EAAkB,EAClBE,2EAAiB,EACjBD,kEAAa;EAAA;;;sHAGJn6B,cAAc;IAAAM,OAAA,GA5BvB+5B,qEAAe,EACfE,kFAAqB,EACrBC,iEAAa,EACbC,yEAAiB,EACjBX,qEAAe,EACfC,4EAAkB,EAClBO,0EAAiB,EACjBN,mEAAc,EACdC,uEAAgB,EAChBC,4EAAkB,EAClBE,2EAAiB,EACjBD,kEAAa;IAAA55B,OAAA,GAGb85B,qEAAe,EACfE,kFAAqB,EACrBC,iEAAa,EACbC,yEAAiB,EACjBX,qEAAe,EACfC,4EAAkB,EAClBO,0EAAiB,EACjBN,mEAAc,EACdC,uEAAgB,EAChBC,4EAAkB,EAClBE,2EAAiB,EACjBD,kEAAa;EAAA;AAAA;;;;;;;;;;;;;;AC1CjB;AACA;AACA;AAEO,MAAMpY,WAAW,GAAG;EACzB2Y,UAAU,EAAE,KAAK;EACjBtW,OAAO,EAAE;CACV;AAED;;;;;;;AAOA;;;;;;;;;;;;;;;;AChB+C;AAGF;AACY;AAEzD,IAAIrC,kEAAW,CAAC2Y,UAAU,EAAE;EAC1BC,6DAAc,EAAE;AAClB;AAEAC,sEAAA,EAAwB,CACrBE,eAAe,CAACxB,sDAAS,CAAC,CAC1ByB,KAAK,CAAE1V,GAAG,IAAK2V,OAAO,CAACC,KAAK,CAAC5V,GAAG,CAAC,CAAC","sources":["./src/app/Modeler/index.js","./src/app/Modeler/modeler/change-icon/replace.js","./src/app/Modeler/modeler/change-icon/replaceMenuProvider.js","./src/app/Modeler/modeler/change-icon/replaceOptions.js","./src/app/Modeler/modeler/context-pad/domainStoryContextPadProvider.js","./src/app/Modeler/modeler/domainStoryElementFactory.js","./src/app/Modeler/modeler/domainStoryIdFactory.js","./src/app/Modeler/modeler/domainStoryRenderer.js","./src/app/Modeler/modeler/domainStoryRules.js","./src/app/Modeler/modeler/domainStoryUpdater.js","./src/app/Modeler/modeler/index.js","./src/app/Modeler/modeler/labeling/dsLabelEditingPreview.js","./src/app/Modeler/modeler/labeling/dsLabelEditingProvider.js","./src/app/Modeler/modeler/labeling/dsLabelUtil.js","./src/app/Modeler/modeler/labeling/index.js","./src/app/Modeler/modeler/labeling/position.js","./src/app/Modeler/modeler/modeling/dSModeling.js","./src/app/Modeler/modeler/modeling/index.js","./src/app/Modeler/modeler/numbering/numbering.js","./src/app/Modeler/modeler/palette/domainStoryPalette.js","./src/app/Modeler/modeler/updateHandler/activityUpdateHandlers.js","./src/app/Modeler/modeler/updateHandler/elementUpdateHandler.js","./src/app/Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler.js","./src/app/Modeler/modeler/updateHandler/massRenameHandler.js","./src/app/Modeler/modeler/updateHandler/updateLabelHandler.js","./src/app/Modeler/modeler/util.js","./src/app/Service/Export/exportUtil.js","./src/app/Domain/Common/businessObject.ts","./src/app/Domain/Common/configuration.ts","./src/app/Domain/Common/constants.ts","./src/app/Domain/Common/dictionary/dictionary.ts","./src/app/Domain/Common/elementTypes.ts","./src/app/Domain/Common/iconConfiguration.ts","./src/app/Domain/Common/iconSetConfiguration.ts","./src/app/Domain/Dialog/activityDialogData.ts","./src/app/Domain/Dialog/exportDialogData.ts","./src/app/Domain/Dialog/infoDialogData.ts","./src/app/Domain/DomManipulation/replayConstants.ts","./src/app/Domain/Export/configAndDst.ts","./src/app/Domain/Export/exportConstants.ts","./src/app/Domain/Icon-Set-Configuration/allIcons.ts","./src/app/Domain/Icon-Set-Configuration/iconFilterEnum.ts","./src/app/Modules/autosave-settings.module.ts","./src/app/Modules/domain-story-modeler-module.module.ts","./src/app/Modules/settings.module.ts","./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.ts","./src/app/Presentation/Autosave/AutosaveOptions/autosave-options.component.html","./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.ts","./src/app/Presentation/Autosave/AutosaveSettings/autosave-settings.component.html","./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.ts","./src/app/Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component.html","./src/app/Presentation/Canvas/modeler.component.ts","./src/app/Presentation/Canvas/modeler.component.html","./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.ts","./src/app/Presentation/Dialog/activity-dialog/activity-dialog.component.html","./src/app/Presentation/Dialog/export-dialog/export-dialog.component.ts","./src/app/Presentation/Dialog/export-dialog/export-dialog.component.html","./src/app/Presentation/Dialog/header-dialog/header-dialog.component.ts","./src/app/Presentation/Dialog/header-dialog/header-dialog.component.html","./src/app/Presentation/Dialog/info-dialog/info-dialog.component.ts","./src/app/Presentation/Dialog/info-dialog/info-dialog.component.html","./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.ts","./src/app/Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component.html","./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.ts","./src/app/Presentation/DomainConfiguration/details-list-item/details-list-item.component.html","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.ts","./src/app/Presentation/DomainConfiguration/icon-list-item/icon-list-item.component.html","./src/app/Presentation/DomainConfiguration/icon-set-configuration.component.ts","./src/app/Presentation/DomainConfiguration/icon-set-configuration.component.html","./src/app/Presentation/DomainConfiguration/icon-set-details/icon-set-details.component.ts","./src/app/Presentation/DomainConfiguration/icon-set-details/icon-set-details.component.html","./src/app/Presentation/Header/header-buttons.component.ts","./src/app/Presentation/Header/header-buttons.component.html","./src/app/Presentation/Header/header.component.ts","./src/app/Presentation/Header/header.component.html","./src/app/Presentation/LabelDictionary/label-dictionary.component.ts","./src/app/Presentation/LabelDictionary/label-dictionary.component.html","./src/app/Presentation/Settings/General/general-settings.component.ts","./src/app/Presentation/Settings/General/general-settings.component.html","./src/app/Presentation/Settings/settings.component.ts","./src/app/Presentation/Settings/settings.component.html","./src/app/Service/Autosave/autosave-configuration.service.ts","./src/app/Service/Autosave/autosave.service.ts","./src/app/Service/BrowserStorage/storage.service.ts","./src/app/Service/CommandStack/command-stack.service.ts","./src/app/Service/Dialog/dialog.service.ts","./src/app/Service/DirtyFlag/dirty-flag.service.ts","./src/app/Service/DomManipulation/dom-manipulation.service.ts","./src/app/Service/ElementRegistry/element-registry.service.ts","./src/app/Service/Export/export.service.ts","./src/app/Service/Export/html-presentation.service.ts","./src/app/Service/Export/png.service.ts","./src/app/Service/Export/svg.service.ts","./src/app/Service/IconSetConfiguration/icon-dictionary.service.ts","./src/app/Service/IconSetConfiguration/icon-set-configuration.service.ts","./src/app/Service/IconSetConfiguration/icon-set-customization.service.ts","./src/app/Service/Import/import-domain-story.service.ts","./src/app/Service/Import/import-repair.service.ts","./src/app/Service/LabelDictionary/label-dictionary.service.ts","./src/app/Service/LabelDictionary/mass-naming.service.ts","./src/app/Service/Modeler/initializer.service.ts","./src/app/Service/Modeler/modeler.service.ts","./src/app/Service/Renderer/renderer.service.ts","./src/app/Service/Replay/replay-state.service.ts","./src/app/Service/Replay/replay.service.ts","./src/app/Service/Replay/storyCreator/story-creator.service.ts","./src/app/Service/Settings/settings.service.ts","./src/app/Service/Title/title.service.ts","./src/app/Utils/mathExtensions.ts","./src/app/Utils/naming.ts","./src/app/Utils/sanitizer.ts","./src/app/app.component.ts","./src/app/app.component.html","./src/app/app.module.ts","./src/app/material.module.ts","./src/environments/environment.ts","./src/main.ts"],"sourcesContent":["import Modeler from \"bpmn-js/lib/Modeler\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport { assign, isArray } from \"min-dash\";\nimport inherits from \"inherits\";\n\nimport DomainStoryModule from \"./modeler\";\nimport LabelEditingModule from \"./modeler/labeling\";\nimport ModelingModule from \"./modeler/modeling\";\nimport { elementTypes } from \"../Domain/Common/elementTypes\";\n\nexport default function DomainStoryModeler(options) {\n Modeler.call(this, options);\n\n this._customElements = [];\n this._groupElements = [];\n}\n\ninherits(DomainStoryModeler, Modeler);\n\nDomainStoryModeler.prototype._modules = [].concat(\n DomainStoryModeler.prototype._modules,\n [DomainStoryModule, LabelEditingModule, ModelingModule],\n [ResizeModule],\n);\n\n/**\n * add a single custom element to the underlying diagram\n *\n * @param {Object} customElement\n */\nDomainStoryModeler.prototype._addCustomShape = function (customElement) {\n let parentId = customElement.parent;\n delete customElement.children;\n delete customElement.parent;\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n let customShape = elementFactory.create(\"shape\", customAttrs);\n\n if (isGroup(customElement)) {\n this._groupElements[customElement.id] = customShape;\n }\n\n if (parentId) {\n let parentShape = this._groupElements[parentId];\n\n if (isGroup(parentShape)) {\n return canvas.addShape(customShape, parentShape, parentShape.id);\n }\n }\n return canvas.addShape(customShape);\n};\n\nDomainStoryModeler.prototype._addCustomConnection = function (customElement) {\n this._customElements.push(customElement);\n\n let canvas = this.get(\"canvas\"),\n elementFactory = this.get(\"elementFactory\"),\n elementRegistry = this.get(\"elementRegistry\");\n\n let customAttrs = assign({ businessObject: customElement }, customElement);\n\n let connection = elementFactory.create(\n \"connection\",\n assign(customAttrs, {\n source: elementRegistry.get(customElement.source),\n target: elementRegistry.get(customElement.target),\n }),\n elementRegistry.get(customElement.source).parent,\n );\n\n return canvas.addConnection(connection);\n};\n\n//** We import BusinessObjects, not the whole Canvas Object!!!!!!!!\nDomainStoryModeler.prototype.importCustomElements = function (elements) {\n this.get(\"eventBus\").fire(\"diagram.clear\", {});\n this._customElements = [];\n this._groupElements = [];\n\n this.addCustomElements(elements);\n};\n\n/**\n * add a number of custom elements and connections to the underlying diagram.\n *\n * @param {Array} customElements\n */\nDomainStoryModeler.prototype.addCustomElements = function (customElements) {\n if (!isArray(customElements)) {\n throw new Error(\"argument must be an array\");\n }\n\n let shapes = [],\n connections = [],\n groups = [];\n\n customElements.forEach(function (customElement) {\n if (isConnection(customElement)) {\n connections.push(customElement);\n } else if (isGroup(customElement)) {\n groups.push(customElement);\n } else {\n shapes.push(customElement);\n }\n });\n\n // add groups before shapes and shapes before connections so that connections\n // can already rely on the shapes being part of the diagram\n groups.forEach(this._addCustomShape, this);\n shapes.forEach(this._addCustomShape, this);\n connections.forEach(this._addCustomConnection, this);\n};\n\n/**\n * get custom elements with their current status.\n *\n * @return {Array} custom elements on the diagram\n */\nDomainStoryModeler.prototype.getCustomElements = function () {\n return this._customElements;\n};\n\n// override standard function to prevent default elements on canvas\nDomainStoryModeler.prototype.createDiagram = function (done) {};\n\nfunction isConnection(element) {\n return (\n element.type === elementTypes.ACTIVITY ||\n element.type === elementTypes.CONNECTION\n );\n}\n\nfunction isGroup(element) {\n return element && element.type === elementTypes.GROUP;\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\n/**\n * service that allow replacing of elements.\n */\nexport default function Replace(modeling) {\n this._modeling = modeling;\n}\n\n/**\n * @param {Element} oldElement - element to be replaced\n * @param {Object} newElementData - containing information about the new Element, for example height, width, type.\n * @param modeling\n */\nfunction replaceElement(oldElement, newElementData, modeling) {\n // let modeling = this._modeling;\n\n let newElement = setCenterOfElement(newElementData, oldElement, modeling);\n let outgoingActivities = newElement.outgoing;\n let incomingActivities = newElement.incoming;\n\n outgoingActivities.forEach((element) => {\n element.businessObject.source = newElement.id;\n });\n\n incomingActivities.forEach((element) => {\n element.businessObject.target = newElement.id;\n });\n\n return newElement;\n}\n\nfunction setCenterOfElement(newElementData, oldElement, modeling) {\n newElementData.x = Math.ceil(\n oldElement.x + (newElementData.width || oldElement.width) / 2,\n );\n newElementData.y = Math.ceil(\n oldElement.y + (newElementData.height || oldElement.height) / 2,\n );\n\n assign(newElementData, { name: oldElement.businessObject.name });\n\n return modeling.replaceShape(oldElement, newElementData, {});\n}\n\nReplace.prototype.replaceElement = replaceElement;\n","\"use strict\";\n\nimport Replace from \"./replace\";\nimport * as replaceOptions from \"./replaceOptions\";\n\nimport { forEach } from \"min-dash\";\n\n/**\n * This module is an element agnostic replace menu provider for the popup menu.\n */\nexport default function ReplaceMenuProvider(modeling) {\n this._dsReplace = new Replace(modeling);\n this._modeling = modeling;\n}\n\nReplaceMenuProvider.$inject = [\"modeling\"];\n\n/**\n * Get all entries from replaceOptions for the given element and apply filters\n * on them. Get for example only elements, which are different from the current one.\n *\n * @param {djs.model.Base} element\n *\n * @return {Array} a list of menu entry items\n */\nReplaceMenuProvider.prototype.getEntries = function (element) {\n let entries;\n if (element.type.includes(\"actor\")) {\n entries = replaceOptions.actorReplaceOptions(element.type);\n } else if (element.type.includes(\"workObject\")) {\n entries = replaceOptions.workObjectReplaceOptions(element.type);\n }\n\n return this._createEntries(element, entries);\n};\n\n/**\n * Creates an array of menu entry objects for a given element and filters the replaceOptions\n * according to a filter function.\n *\n * @param {djs.model.Base} element\n * @param {Object} replaceOptions\n *\n * @return {Array} a list of menu items\n */\nReplaceMenuProvider.prototype._createEntries = function (\n element,\n replaceOptions,\n) {\n let menuEntries = [];\n\n let self = this;\n\n forEach(replaceOptions, function (definition) {\n let entry = self._createMenuEntry(definition, element);\n\n menuEntries.push(entry);\n });\n\n return menuEntries;\n};\n\n/**\n * Creates and returns a single menu entry item.\n *\n * @param {Object} definition a single replace options definition object\n * @param {djs.model.Base} element\n * @param {Function} [action] an action callback function which gets called when\n * the menu entry is being triggered.\n *\n * @return {Object} menu entry item\n */\nReplaceMenuProvider.prototype._createMenuEntry = function (\n definition,\n element,\n action,\n) {\n let replaceElement = this._dsReplace.replaceElement;\n let modeling = this._modeling;\n let replaceAction = function () {\n return replaceElement(element, definition.target, modeling);\n };\n\n action = action || replaceAction;\n\n return {\n label: definition.label,\n className: definition.className,\n id: definition.actionName,\n action: action,\n };\n};\n","import { elementTypes } from \"src/app/Domain/Common/elementTypes\";\n\nlet iconDictionaryService;\n\nexport function initializeReplaceOptions(iconDictionary) {\n iconDictionaryService = iconDictionary;\n}\n\nexport function actorReplaceOptions(name) {\n const actorTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.ACTOR,\n );\n\n let replaceOption = {};\n let i = 0;\n\n actorTypes.keysArray().forEach((actorType) => {\n if (!name.includes(actorType)) {\n const typeName = actorType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName.toLowerCase(),\n className: iconDictionaryService.getIconForBPMN(\n elementTypes.ACTOR,\n actorType,\n ),\n target: {\n type: `${elementTypes.ACTOR}${actorType}`,\n },\n };\n i++;\n }\n });\n return replaceOption;\n}\n\nexport function workObjectReplaceOptions(name) {\n const workObjectTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.WORKOBJECT,\n );\n\n let replaceOption = {};\n let i = 0;\n\n workObjectTypes.keysArray().forEach((workObjectType) => {\n if (!name.includes(workObjectType)) {\n const typeName = workObjectType;\n replaceOption[i] = {\n label: \"Change to \" + typeName,\n actionName: \"replace-with-actor-\" + typeName,\n className: iconDictionaryService.getIconForBPMN(\n elementTypes.WORKOBJECT,\n workObjectType,\n ),\n target: {\n type: `${elementTypes.WORKOBJECT}${workObjectType}`,\n },\n };\n }\n i++;\n });\n return replaceOption;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport ContextPadProvider from \"bpmn-js/lib/features/context-pad/ContextPadProvider\";\n\nimport { assign, bind } from \"min-dash\";\nimport { generateAutomaticNumber } from \"../numbering/numbering\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getAllStandardIconKeys } from \"src/app/Domain/Icon-Set-Configuration/allIcons\";\n\nlet dirtyFlagService;\nlet iconDictionaryService;\n\nexport function initializeContextPadProvider(dirtyFlag, iconDictionary) {\n dirtyFlagService = dirtyFlag;\n iconDictionaryService = iconDictionary;\n}\n\nexport default function DomainStoryContextPadProvider(\n injector,\n connect,\n translate,\n elementFactory,\n create,\n canvas,\n contextPad,\n popupMenu,\n replaceMenuProvider,\n commandStack,\n eventBus,\n modeling,\n) {\n let startConnect;\n let selectedElement;\n\n injector.invoke(ContextPadProvider, this);\n let autoPlace = injector.get(\"autoPlace\", false);\n\n let cached = bind(this.getContextPadEntries, this);\n\n const colorPicker = document.getElementById(\"colorPicker\");\n colorPicker.onchange = (ev) => {\n const context = {\n businessObject: selectedElement.businessObject,\n newColor: ev.target.value,\n element: selectedElement,\n };\n\n commandStack.execute(\"element.colorChange\", context);\n dirtyFlagService.makeDirty();\n };\n\n popupMenu.registerProvider(\"ds-replace\", replaceMenuProvider);\n popupMenu.registerProvider(\"bpmn-replace\", replaceMenuProvider);\n\n this.getContextPadEntries = function (element) {\n const allStandardIconKeys = getAllStandardIconKeys();\n let actions = cached(element);\n\n startConnect = function (event, element, autoActivate) {\n connect.start(event, element, autoActivate);\n };\n\n if (element.type.includes(elementTypes.WORKOBJECT)) {\n if (\n allStandardIconKeys.includes(\n element.type.replace(elementTypes.WORKOBJECT, \"\"),\n )\n ) {\n addColorChange(actions);\n }\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addActors(appendAction, actions);\n addWorkObjects(appendAction, actions);\n addChangeWorkObjectTypeMenu(actions);\n } else if (element.type.includes(elementTypes.ACTOR)) {\n if (\n allStandardIconKeys.includes(\n element.type.replace(elementTypes.ACTOR, \"\"),\n )\n ) {\n addColorChange(actions);\n }\n addConnectWithActivity(actions, startConnect);\n addTextAnnotation(actions);\n addWorkObjects(appendAction, actions);\n addChangeActorTypeMenu(actions);\n } else if (element.type.includes(elementTypes.GROUP)) {\n delete actions.delete;\n addTextAnnotation(actions);\n assign(actions, {\n deleteGroup: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove Group without Child-Elements\",\n action: {\n click: function (event, element) {\n modeling.removeGroup(element);\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n addColorChange(actions);\n } else if (element.type.includes(elementTypes.ACTIVITY)) {\n moveDeleteActionToEndOfArray(actions);\n\n addColorChange(actions);\n\n assign(actions, {\n delete: {\n group: \"edit\",\n className: \"bpmn-icon-trash\",\n title: \"Remove\",\n action: {\n click: function (event, element) {\n modeling.removeElements({ element });\n dirtyFlagService.makeDirty();\n },\n },\n },\n });\n }\n\n return actions;\n };\n\n function moveDeleteActionToEndOfArray(actions) {\n delete actions.delete;\n\n assign(actions, {\n changeDirection: {\n group: \"edit\",\n className: \"icon-domain-story-changeDirection\",\n title: translate(\"Change direction\"),\n action: {\n // event needs to be addressed\n click: function (event, element) {\n changeDirection(element);\n },\n },\n },\n });\n }\n\n function addChangeActorTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function addColorChange(actions) {\n assign(actions, {\n colorChange: {\n group: \"edit\",\n className: \"icon-domain-story-color-picker\",\n title: translate(\"Change color\"),\n action: {\n click: function (event, element) {\n selectedElement = element;\n colorPicker.click();\n },\n },\n },\n });\n }\n\n function addTextAnnotation(actions) {\n assign(actions, {\n \"append.text-annotation\": appendAction(\n elementTypes.TEXTANNOTATION,\n \"bpmn-icon-text-annotation\",\n \"textannotation\",\n \"connect\",\n ),\n });\n }\n\n function addConnectWithActivity(actions, startConnect) {\n assign(actions, {\n connect: {\n group: \"connect\",\n className: \"bpmn-icon-connection\",\n title: translate(\"Connect with activity\"),\n action: {\n click: startConnect,\n dragstart: startConnect,\n },\n },\n });\n }\n\n function addWorkObjects(appendAction, actions) {\n let workObjectTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.WORKOBJECT,\n );\n workObjectTypes.keysArray().forEach((workObjectType) => {\n let name = workObjectType;\n let icon = iconDictionaryService.getIconForBPMN(\n elementTypes.WORKOBJECT,\n workObjectType,\n );\n let action = [];\n action[\"append.workObject\" + name] = appendAction(\n `${elementTypes.WORKOBJECT}${workObjectType}`,\n icon,\n name,\n \"workObjects\",\n );\n assign(actions, action);\n });\n }\n\n function addActors(appendAction, actions) {\n let actorTypes = iconDictionaryService.getTypeDictionary(\n elementTypes.ACTOR,\n );\n actorTypes.keysArray().forEach((actorType) => {\n let name = actorType;\n let icon = iconDictionaryService.getIconForBPMN(\n elementTypes.ACTOR,\n actorType,\n );\n let action = [];\n action[\"append.actor\" + name] = appendAction(\n `${elementTypes.ACTOR}${actorType}`,\n icon,\n name,\n \"actors\",\n );\n assign(actions, action);\n });\n }\n\n function addChangeWorkObjectTypeMenu(actions) {\n assign(actions, {\n replace: {\n group: \"edit\",\n className: \"bpmn-icon-screw-wrench\",\n title: translate(\"Change type\"),\n action: {\n click: function (event, element) {\n let position = assign(getReplaceMenuPosition(element), {\n cursor: { x: event.x, y: event.y },\n });\n popupMenu.open(element, \"ds-replace\", position);\n },\n },\n },\n });\n }\n\n function changeDirection(element) {\n let context;\n let businessObject = element.businessObject;\n let newNumber;\n\n if (element.source.type.includes(elementTypes.ACTOR)) {\n newNumber = 0;\n } else {\n newNumber = generateAutomaticNumber(element, commandStack);\n }\n context = {\n businessObject: businessObject,\n newNumber: newNumber,\n element: element,\n };\n commandStack.execute(\"activity.directionChange\", context);\n }\n\n function getReplaceMenuPosition(element) {\n let Y_OFFSET = 5;\n\n let diagramContainer = canvas.getContainer(),\n pad = contextPad.getPad(element).html;\n\n let diagramRect = diagramContainer.getBoundingClientRect(),\n padRect = pad.getBoundingClientRect();\n\n let top = padRect.top - diagramRect.top;\n let left = padRect.left - diagramRect.left;\n\n return {\n x: left,\n y: top + padRect.height + Y_OFFSET,\n };\n }\n\n /**\n * create an append action\n *\n * @param {String} type\n * @param {String} className\n * @param {String} [title]\n * @param {String} group\n * @param {Object} [options]\n *\n * @return {Object} descriptor\n */\n function appendAction(type, className, title, group, options) {\n if (typeof title !== \"string\") {\n options = title;\n title = translate(\"{type}\", { type: type.replace(/^domainStory:/, \"\") });\n }\n\n function appendStart(event, element) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n let context = {\n elements: [shape],\n hints: {},\n source: element,\n };\n create.start(event, shape, context);\n }\n\n return {\n group: group,\n className: className,\n title: \"Append \" + title,\n action: {\n dragstart: startConnect,\n click: appendStart,\n },\n };\n }\n}\n\ninherits(DomainStoryContextPadProvider, ContextPadProvider);\n\nDomainStoryContextPadProvider.$inject = [\n \"injector\",\n \"connect\",\n \"translate\",\n \"elementFactory\",\n \"create\",\n \"canvas\",\n \"contextPad\",\n \"popupMenu\",\n \"replaceMenuProvider\",\n \"commandStack\",\n \"eventBus\",\n \"modeling\",\n];\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport BpmnElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\n\nimport { DEFAULT_LABEL_SIZE } from \"bpmn-js/lib/util/LabelUtil\";\n\nimport DomainStoryIdFactory from \"./domainStoryIdFactory\";\n\n/**\n * A custom factory that knows how to create BPMN _and_ custom elements.\n */\nexport default function DomainStoryElementFactory(bpmnFactory, moddle) {\n BpmnElementFactory.call(this, bpmnFactory, moddle);\n\n let self = this;\n let domainStoryIdFactory = new DomainStoryIdFactory();\n\n /**\n * create a diagram-js element with the given type (any of shape, connection, label).\n *\n * @param {String} elementType\n * @param {Object} attrs\n *\n * @return {djs.model.Base}\n */\n this.create = function (elementType, attrs) {\n let type = attrs.type;\n\n if (elementType === \"label\") {\n return self.baseCreate(\n elementType,\n assign({ type: \"label\" }, DEFAULT_LABEL_SIZE, attrs),\n );\n }\n\n // add type to businessObject if custom\n if (/^domainStory:/.test(type)) {\n if (!attrs.businessObject) {\n attrs.businessObject = {\n type: type,\n name: attrs.name ? attrs.name : \"\",\n };\n }\n\n if (attrs.id) {\n domainStoryIdFactory.registerId(attrs.id);\n } else {\n attrs.id = domainStoryIdFactory.getId(elementType);\n }\n assign(attrs.businessObject, {\n id: attrs.id,\n });\n\n let id = attrs.id;\n attrs.businessObject.get = function (key) {\n if (key === \"id\") {\n return id;\n }\n };\n attrs.businessObject.set = function (key, value) {\n if (key === \"id\") {\n assign(attrs.businessObject, { id: value });\n }\n };\n\n if (!attrs.businessObject.$type) {\n assign(attrs.businessObject, { $type: \"Element\" });\n }\n assign(attrs.businessObject, { di: {} });\n if (!attrs.businessObject.$descriptor) {\n assign(attrs.businessObject, { $descriptor: {} });\n }\n\n // add width and height if shape\n if (\n (!/:activity$/.test(type) || !/:connection$/.test(type)) &&\n !((/:group$/.test(type) && attrs.height) || attrs.width)\n ) {\n assign(attrs, self._getCustomElementSize(type));\n }\n\n if (!(\"$instanceOf\" in attrs.businessObject)) {\n // ensure we can use ModelUtil#is for type checks\n Object.defineProperty(attrs.businessObject, \"$instanceOf\", {\n value: function (type) {\n return this.type === type;\n },\n });\n }\n\n return self.baseCreate(elementType, attrs);\n }\n\n return self.createBpmnElement(elementType, attrs);\n };\n}\n\ninherits(DomainStoryElementFactory, BpmnElementFactory);\n\nDomainStoryElementFactory.$inject = [\"bpmnFactory\", \"moddle\"];\n\n/**\n * returns the default size of custom shapes.\n *\n * the following example shows an interface on how\n * to setup the custom shape's dimensions.\n * *\n * @param {String} type\n *\n * @return {Dimensions} a {width, height} object representing the size of the element\n */\nDomainStoryElementFactory.prototype._getCustomElementSize = function (type) {\n let shapes = {\n __default: { width: 75, height: 75 },\n \"domainStory:textAnnotation\": { width: 100, height: 30 },\n \"domainStory:group\": { width: 525, height: 275 },\n };\n\n return shapes[type] || shapes.__default;\n};\n\nclass Dimensions {\n width;\n height;\n}\n","\"use strict\";\n\nlet idList = [];\n\nexport default function DomainStoryIdFactory() {}\n\nDomainStoryIdFactory.prototype.getId = function (type) {\n return generateId(type);\n};\n\nDomainStoryIdFactory.prototype.registerId = function (id) {\n idList.push(id);\n};\n\nfunction generateId(type) {\n let idNumber = fourDigitsId();\n\n let id = type + \"_\" + idSuffix(idNumber);\n\n while (containsId(id)) {\n idNumber++;\n\n id = type + \"_\" + idSuffix(idNumber);\n }\n\n idList.push(id);\n return id;\n}\n\nfunction idSuffix(idNumber) {\n let id;\n if (idNumber > 9999) {\n id = 0;\n } else if (idNumber < 10) {\n id = \"000\" + idNumber;\n } else if (idNumber < 100) {\n id = \"00\" + idNumber;\n } else if (idNumber < 1000) {\n id = \"0\" + idNumber;\n } else {\n id = \"\" + idNumber;\n }\n return id;\n}\n\nfunction fourDigitsId() {\n return Math.floor(Math.random() * 10000);\n}\n\nexport function containsId(id) {\n let same = false;\n idList.forEach((element) => {\n if (id === element) {\n same = true;\n }\n });\n return same;\n}\n","\"use strict\";\n\nimport inherits from \"inherits\";\nimport BaseRenderer from \"diagram-js/lib/draw/BaseRenderer\";\nimport Ids from \"ids\";\nimport { getAnnotationBoxHeight } from \"./labeling/dsLabelEditingPreview\";\nimport { componentsToPath, createLine } from \"diagram-js/lib/util/RenderUtil\";\nimport {\n append as svgAppend,\n attr as svgAttr,\n classes as svgClasses,\n create as svgCreate,\n} from \"tiny-svg\";\nimport { query as domQuery } from \"min-dom\";\nimport { assign, isObject } from \"min-dash\";\nimport { getNumberStash } from \"./labeling/dsLabelEditingProvider\";\nimport {\n addNumberToRegistry,\n generateAutomaticNumber,\n numberBoxDefinitions,\n} from \"./numbering/numbering\";\n\nimport { calculateTextWidth } from \"./labeling/dsLabelUtil\";\nimport { countLines, labelPosition } from \"./labeling/position\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { angleBetween } from \"../../Utils/mathExtensions\";\nimport { getNameFromType } from \"../../Utils/naming\";\n\nlet RENDERER_IDS = new Ids();\nlet numbers = [];\nconst DEFAULT_COLOR = \"black\";\n\n/**\n * a renderer that knows how to render custom elements.\n */\nlet iconDictionary;\nlet elementRegistry;\nlet dirtyFlag;\n\nexport function initializeRenderer(\n iconDictionaryService,\n elementRegistryService,\n dirtyFlagService,\n) {\n iconDictionary = iconDictionaryService;\n elementRegistry = elementRegistryService;\n dirtyFlag = dirtyFlagService;\n}\n\nexport default function DomainStoryRenderer(\n eventBus,\n styles,\n canvas,\n textRenderer,\n pathMap,\n commandStack,\n) {\n BaseRenderer.call(this, eventBus, 2000);\n\n let rendererId = RENDERER_IDS.next();\n let markers = {};\n let computeStyle = styles.computeStyle;\n\n // generate the automatic Number for an activity originating from an actor\n function generateActivityNumber(parentGfx, element, box) {\n // whenever we want to edit an activity, it gets redrawn as a new object\n // and the custom information is lost,\n // so we stash it before the editing occurs and set the value here\n\n let numberStash = getNumberStash();\n let semantic = element.businessObject;\n\n if (numberStash.use) {\n semantic.number = numberStash.number;\n }\n\n // !IMPORTANT!\n // When converting svg-files via Inkscape or Photoshop the svg-circle is converted to a black dot that obscures the number.\n // To circumvent this, we draw a . as the white background and an o as the circle around the number.\n // There is a minor Bug, that in some Programs the used Font is not supported, which defaults to Arial, where the o is not round but oval.\n // Unit 3rd Party Tools update their svg-version to 1.2 we should keep this workaround.\n box.x -= 65;\n box.y -= 12;\n renderNumber(parentGfx, \".\", backgroundDotStyle(box), element.type);\n box.x += 30;\n box.y += 3;\n renderNumber(parentGfx, \"o\", backgroundBoxStyle(box), element.type);\n\n numbers[semantic.number] = true;\n box.x += 9;\n box.y -= 7;\n\n if (semantic.number < 10) {\n box.x += 3;\n }\n\n let newRenderedNumber = renderNumber(\n parentGfx,\n semantic.number,\n numberStyle(box),\n element.type,\n );\n addNumberToRegistry(newRenderedNumber, semantic.number);\n }\n\n // style functions\n function numberStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n position: \"absolute\",\n }),\n };\n }\n\n function backgroundBoxStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n fontSize: 50,\n position: \"absolute\",\n fontFamily: \"Courier New\",\n }),\n };\n }\n\n function backgroundDotStyle(box) {\n return {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"white\",\n fontSize: 150,\n position: \"absolute\",\n fontFamily: \"Courier\",\n }),\n };\n }\n\n // render functions\n // render label associated with actors and workobjects\n function renderEmbeddedLabel(parentGfx, element, align, padding) {\n let businessObject = element.businessObject;\n return renderLabel(\n parentGfx,\n businessObject.name,\n {\n box: element,\n align: align,\n padding: padding ? padding : 0,\n style: {\n fill: \"#000000\",\n },\n },\n element.type,\n );\n }\n\n // render label associated with activities\n function renderExternalLabel(parentGfx, element) {\n let semantic = element.businessObject;\n let waypoints = element.waypoints;\n let lines = countLines(semantic.name);\n\n if (element.waypoints != null) {\n let position = labelPosition(waypoints, lines);\n let startPoint = element.waypoints[position.selected];\n let endPoint = element.waypoints[position.selected + 1];\n let angle = angleBetween(startPoint, endPoint);\n let alignment = \"left\";\n let boxWidth = 500;\n let xStart = position.x;\n\n // if the activity is horizontal, we want to center the label\n if (angle === 0 || angle === 180) {\n boxWidth = Math.abs(startPoint.x - endPoint.x);\n alignment = \"center\";\n xStart =\n (startPoint.x + endPoint.x) / 2 - calculateTextWidth(semantic.name);\n }\n\n let box = {\n textAlign: alignment,\n width: boxWidth,\n height: 30,\n x: xStart,\n y: position.y,\n };\n\n if (semantic.name && semantic.name.length) {\n return renderLabel(\n parentGfx,\n semantic.name,\n {\n box: box,\n fitBox: true,\n style: assign({}, textRenderer.getExternalStyle(), {\n fill: \"black\",\n wordWrap: \"break-word\",\n overflowWrap: \"break-word\",\n hyphens: \"auto\",\n }),\n },\n element.type,\n );\n }\n }\n }\n\n // render the number associated with an activity\n function renderExternalNumber(parentGfx, element) {\n if (element && element.source) {\n let semantic = element.businessObject;\n\n let box = numberBoxDefinitions(element);\n\n if (\n semantic.number == null &&\n element.source.type &&\n element.source.type.includes(elementTypes.ACTOR)\n ) {\n generateAutomaticNumber(element, commandStack);\n }\n\n // render the background for the number\n if (semantic.number && element.source.type.includes(elementTypes.ACTOR)) {\n generateActivityNumber(parentGfx, element, box);\n } else {\n semantic.number = null;\n }\n }\n }\n\n // render a number on the canvas\n function renderNumber(parentGfx, number, options, type) {\n if (number < 10) {\n number = String(number);\n }\n number = String(number);\n let text = textRenderer.createText(number || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-labelNumber\");\n\n setCoordinates(type, text, options, height, parentGfx);\n\n svgAppend(parentGfx, text);\n\n return text;\n }\n\n // the coordinates of the activity label must be set directly and will not be taken from the box\n function setCoordinates(type, text, options, height, parentGfx) {\n if (/:activity$/.test(type)) {\n text.innerHTML = manipulateInnerHTMLXLabel(\n text.children,\n options.box.x,\n 0,\n );\n text.innerHTML = manipulateInnerHTMLYLabel(\n text.children,\n options.box.y,\n 0,\n );\n } else if (/:actor/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 0);\n } else if (/:workObject/.test(type)) {\n height = parentGfx.firstChild.attributes.height.nodeValue;\n text.innerHTML = manipulateInnerHTMLYLabel(text.children, height, 26);\n }\n }\n\n // render a label on the canvas\n function renderLabel(parentGfx, label, options, type) {\n let text = textRenderer.createText(label || \"\", options);\n let height = 0;\n\n svgClasses(text).add(\"djs-label\");\n setCoordinates(type, text, options, height, parentGfx);\n\n svgAppend(parentGfx, text);\n return text;\n }\n\n // determine the Y-coordinate of the label / number to be rendered\n function manipulateInnerHTMLYLabel(children, y, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /y=\"-?\\d*.\\d*\"/,\n 'y=\"' + (Number(y) + offset + 14 * i) + '\"',\n );\n }\n return result;\n }\n }\n\n // determine the X-coordinate of the label / number to be rendered\n function manipulateInnerHTMLXLabel(children, x, offset) {\n if (children) {\n let result = \"\";\n for (let i = 0; i < children.length; i++) {\n result += children[i].outerHTML.replace(\n /x=\"-?\\d*.\\d*\"/,\n 'x=\"' + (Number(x) + offset + 14) + '\"',\n );\n }\n return result;\n }\n }\n\n // draw functions\n this.drawGroup = function (parentGfx, element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = DEFAULT_COLOR;\n }\n let rect = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n assign(\n {\n fill: \"none\",\n stroke: element.businessObject.pickedColor,\n },\n element.attrs,\n ),\n );\n renderEmbeddedLabel(parentGfx, element, \"left-top\", 8);\n\n return rect;\n };\n\n function useColorForElement(element, iconSRC) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = DEFAULT_COLOR;\n }\n const match = iconSRC.match(/fill=\".*?\"/);\n if (match && match.length > 1) {\n return iconSRC.replace(\n /fill=\".*?\"/,\n 'fill=\"' + element.businessObject.pickedColor + '\"',\n );\n } else {\n const index = iconSRC.indexOf(\"' +\n ''\n );\n } else {\n return useColorForElement(element, iconSRC);\n }\n }\n\n this.drawActor = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width,\n height: element.height,\n },\n actor;\n let iconSRC = iconDictionary.getTypeIconSRC(\n elementTypes.ACTOR,\n getNameFromType(element.type),\n );\n iconSRC = getIconSrc(iconSRC, element);\n actor = svgCreate(iconSRC);\n\n svgAttr(actor, svgDynamicSizeAttributes);\n svgAppend(parent, actor);\n\n renderEmbeddedLabel(parent, element, \"center\", -5);\n return actor;\n };\n\n this.drawWorkObject = function (parent, element) {\n let svgDynamicSizeAttributes = {\n width: element.width * 0.65,\n height: element.height * 0.65,\n x: element.width / 2 - 25,\n y: element.height / 2 - 25,\n },\n workObject;\n let iconSRC = iconDictionary.getTypeIconSRC(\n elementTypes.WORKOBJECT,\n getNameFromType(element.type),\n );\n iconSRC = getIconSrc(iconSRC, element);\n workObject = svgCreate(iconSRC);\n\n svgAttr(workObject, svgDynamicSizeAttributes);\n svgAppend(parent, workObject);\n renderEmbeddedLabel(parent, element, \"center\", -5);\n\n return workObject;\n };\n\n function useColorForActivity(element) {\n if (!element.businessObject.pickedColor) {\n element.businessObject.pickedColor = \"black\";\n }\n let attrs = \"\";\n return computeStyle(attrs, {\n stroke: element.businessObject.pickedColor,\n fill: \"none\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n markerEnd: marker(\n \"activity\",\n \"black\",\n element.businessObject.pickedColor,\n ),\n });\n }\n\n this.drawActivity = function (p, element) {\n adjustForTextOverlap(element);\n\n if (element) {\n let attrs = useColorForActivity(element);\n\n let x = svgAppend(p, createLine(element.waypoints, attrs));\n renderExternalLabel(p, element);\n renderExternalNumber(p, element);\n\n // just adjusting the start- and endpoint of the connection-element moves only the drawn connection,\n // not the interactive line. This can be fixed by manually overriding the points of the interactive polyline\n // in the HTMl with the points of the drawn one.\n // this however does not adjust the surrounding box of the connection.\n fixConnectionInHTML(p.parentElement);\n\n return x;\n }\n };\n\n function checkIfPointOverlapsText(point, source) {\n if (point.y > source.y + 60) {\n if (point.x > source.x + 3 && point.x < source.x + 72) {\n let lineOffset = getLineOffset(source);\n if (source.y + 75 + lineOffset > point.y) {\n point.y += lineOffset;\n }\n }\n }\n }\n\n function adjustForTextOverlap(element) {\n let source = element.source;\n let target = element.target;\n\n let waypoints = element.waypoints;\n let startPoint = waypoints[0];\n let endPoint = waypoints[waypoints.length - 1];\n\n if (startPoint && endPoint && source && target) {\n checkIfPointOverlapsText(startPoint, source);\n checkIfPointOverlapsText(endPoint, source);\n }\n }\n\n function getLineOffset(element) {\n let id = element.id;\n let offset = 0;\n\n let objects = document.getElementsByClassName(\"djs-element djs-shape\");\n for (let i = 0; i < objects.length; i++) {\n let data_id = objects.item(i).getAttribute(\"data-element-id\");\n if (data_id === id) {\n let object = objects.item(i);\n let text = object.getElementsByTagName(\"text\")[0];\n let tspans = text.getElementsByTagName(\"tspan\");\n let tspan = tspans[tspans.length - 1];\n offset = tspan.getAttribute(\"y\");\n }\n }\n return offset - 70;\n }\n\n function fixConnectionInHTML(wantedConnection) {\n if (wantedConnection) {\n let polylines = wantedConnection.getElementsByTagName(\"polyline\");\n if (polylines.length > 1) {\n polylines[1].setAttribute(\n \"points\",\n polylines[0].getAttribute(\"points\"),\n );\n }\n }\n }\n\n this.drawDSConnection = function (p, element) {\n let attrs = \"\";\n attrs = computeStyle(attrs, {\n stroke: \"#000000\",\n strokeWidth: 1.5,\n strokeLinejoin: \"round\",\n strokeDasharray: \"5, 5\",\n });\n\n return svgAppend(p, createLine(element.waypoints, attrs));\n };\n\n this.drawAnnotation = function (parentGfx, element) {\n let style = {\n fill: \"none\",\n stroke: \"none\",\n };\n\n let text = element.businessObject.text || \"\";\n if (element.businessObject.text) {\n let height = getAnnotationBoxHeight();\n\n if (height === 0 && element.businessObject.number) {\n height = element.businessObject.number;\n }\n assign(element, {\n height: height,\n });\n\n // for some reason the keyword height is not exported, so we use another, which we know will be exported,\n // to ensure persistent annotation heights between sessions\n assign(element.businessObject, {\n number: height,\n });\n }\n\n let textElement = drawRect(\n parentGfx,\n element.width,\n element.height,\n 0,\n 0,\n style,\n );\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n drawPath(parentGfx, textPathData, {\n stroke: \"black\",\n });\n\n renderLabel(parentGfx, text, {\n box: element,\n align: \"left-top\",\n padding: 5,\n style: {\n fill: \"black\",\n },\n });\n\n return textElement;\n };\n\n // draw helper functions\n function drawPath(parentGfx, d, attrs) {\n attrs = computeStyle(attrs, [\"no-fill\"], {\n strokeWidth: 2,\n stroke: \"black\",\n });\n\n let path = svgCreate(\"path\");\n svgAttr(path, { d: d });\n svgAttr(path, attrs);\n\n svgAppend(parentGfx, path);\n\n return path;\n }\n\n function drawRect(parentGfx, width, height, r, offset, attrs) {\n if (isObject(offset)) {\n attrs = offset;\n offset = 0;\n }\n\n offset = offset || 0;\n attrs = computeStyle(attrs, {\n stroke: \"black\",\n strokeWidth: 2,\n fill: \"white\",\n });\n\n let rect = svgCreate(\"rect\");\n svgAttr(rect, {\n x: offset,\n y: offset,\n width: width - offset * 2,\n height: height - offset * 2,\n rx: r,\n ry: r,\n });\n\n svgAttr(rect, attrs);\n svgAppend(parentGfx, rect);\n\n return rect;\n }\n\n // marker functions\n function marker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (!markers[id]) {\n createMarker(type, fill, stroke);\n }\n return \"url(#\" + id + \")\";\n }\n\n function createMarker(type, fill, stroke) {\n let id = type + \"-\" + fill + \"-\" + stroke + \"-\" + rendererId;\n\n if (type === \"activity\") {\n let sequenceflowEnd = svgCreate(\"path\");\n svgAttr(sequenceflowEnd, { d: \"M 1 5 L 11 10 L 1 15 Z\" });\n\n addMarker(id, {\n element: sequenceflowEnd,\n ref: { x: 11, y: 10 },\n scale: 0.5,\n attrs: {\n fill: stroke,\n stroke: stroke,\n },\n });\n }\n }\n\n function addMarker(id, options) {\n let attrs = assign(\n {\n fill: \"black\",\n strokeWidth: 1,\n strokeLinecap: \"round\",\n strokeDasharray: \"none\",\n },\n options.attrs,\n );\n\n let ref = options.ref || { x: 0, y: 0 };\n let scale = options.scale || 1;\n\n // resetting stroke dash array\n if (attrs.strokeDasharray === \"none\") {\n attrs.strokeDasharray = [10000, 1];\n }\n\n let marker = svgCreate(\"marker\");\n\n svgAttr(options.element, attrs);\n svgAppend(marker, options.element);\n svgAttr(marker, {\n id: id,\n viewBox: \"0 0 20 20\",\n refX: ref.x,\n refY: ref.y,\n markerWidth: 20 * scale,\n markerHeight: 20 * scale,\n orient: \"auto\",\n });\n\n let defs = domQuery(\"defs\", canvas._svg);\n if (!defs) {\n defs = svgCreate(\"defs\");\n svgAppend(canvas._svg, defs);\n }\n svgAppend(defs, marker);\n markers[id] = marker;\n }\n\n // path functions\n this.getWorkObjectPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getGroupPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n\n this.getActivityPath = function (connection) {\n let waypoints = connection.waypoints.map(function (p) {\n return p.original || p;\n });\n\n let activityPath = [[\"M\", waypoints[0].x, waypoints[0].y]];\n\n waypoints.forEach(function (waypoint, index) {\n if (index !== 0) {\n activityPath.push([\"L\", waypoint.x, waypoint.y]);\n }\n });\n return componentsToPath(activityPath);\n };\n\n this.getActorPath = function (shape) {\n let rectangle = getRectPath(shape);\n return componentsToPath(rectangle);\n };\n}\n\ninherits(DomainStoryRenderer, BaseRenderer);\n\nDomainStoryRenderer.$inject = [\n \"eventBus\",\n \"styles\",\n \"canvas\",\n \"textRenderer\",\n \"pathMap\",\n \"commandStack\",\n];\n\nDomainStoryRenderer.prototype.canRender = function (element) {\n return /^domainStory:/.test(element.type);\n};\n\nDomainStoryRenderer.prototype.drawShape = function (p, element) {\n // polyfill for tests\n if (!String.prototype.startsWith) {\n Object.defineProperty(String.prototype, \"startsWith\", {\n value: function (search, pos) {\n pos = !pos || pos < 0 ? 0 : +pos;\n return this.substring(pos, pos + search.length) === search;\n },\n });\n }\n\n let type = element.type;\n element.businessObject.type = type;\n\n elementRegistry.correctInitialize();\n dirtyFlag.makeDirty();\n\n if (type.includes(elementTypes.ACTOR)) {\n return this.drawActor(p, element);\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return this.drawWorkObject(p, element);\n } else if (type.includes(elementTypes.TEXTANNOTATION)) {\n return this.drawAnnotation(p, element);\n } else if (type.includes(elementTypes.GROUP)) {\n return this.drawGroup(p, element);\n }\n};\n\nDomainStoryRenderer.prototype.getShapePath = function (shape) {\n let type = shape.type;\n\n if (type.includes(elementTypes.ACTOR)) {\n return this.getActorPath(shape);\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return this.getWorkObjectPath(shape);\n } else if (type.includes(elementTypes.GROUP)) {\n return this.getGroupPath(shape);\n }\n};\n\nDomainStoryRenderer.prototype.drawConnection = function (p, element) {\n let type = element.type;\n\n dirtyFlag.makeDirty();\n\n // fixes activities that were copy-pasted\n if (!element.businessObject.type) {\n element.businessObject.type = type;\n }\n if (type === elementTypes.ACTIVITY) {\n return this.drawActivity(p, element);\n } else if (type === elementTypes.CONNECTION) {\n return this.drawDSConnection(p, element);\n }\n};\n\n// creates a SVG path that describes a rectangle which encloses the given shape.\nfunction getRectPath(shape) {\n let offset = 5;\n let x = shape.x,\n y = shape.y,\n width = shape.width / 2 + offset,\n height = shape.height / 2 + offset;\n\n return [\n [\"M\", x, y],\n [\"l\", width, 0],\n [\"l\", width, height],\n [\"l\", -width, height],\n [\"l\", -width, 0],\n [\"z\"],\n ];\n}\n","\"use strict\";\n\nimport { assign, every, reduce } from \"min-dash\";\n\nimport inherits from \"inherits\";\n\nimport RuleProvider from \"diagram-js/lib/features/rules/RuleProvider\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { is } from \"./util\";\n\nconst HIGH_PRIORITY = 1500;\nconst MIN_SIZE = 125;\n\nfunction isDomainStory(element) {\n return element && /^domainStory:/.test(element.type);\n}\n\nfunction isDomainStoryGroup(element) {\n return element && /^domainStory:group/.test(element.type);\n}\n\nfunction isActor(element) {\n return element && /^domainStory:actor\\w*/.test(element.type);\n}\n\nfunction isWorkObject(element) {\n return element && /^domainStory:workObject/.test(element.type);\n}\n\nfunction isActivity(element) {\n return element && /^domainStory:activity/.test(element.type);\n}\n\nfunction isConnection(element) {\n return element && /^domainStory:connection/.test(element.type);\n}\n\nfunction isAnnotation(element) {\n return element && /^domainStory:textAnnotation/.test(element.type);\n}\n\n/**\n * can source and target be connected?\n */\nfunction canConnect(source, target) {\n // only judge about two custom elements\n if (\n isDomainStoryGroup(target) ||\n !isDomainStory(source) ||\n !isDomainStory(target)\n ) {\n return;\n }\n\n // do not allow a connection from one element to itself\n if (source === target) {\n return;\n }\n\n // do not allow a connection between two actors\n if (isActor(source) && isActor(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an activity\n if (isActivity(source) || isActivity(target)) {\n return;\n }\n\n // do not allow a connection, where the source or target is an annotation connection\n if (isConnection(source) || isConnection(target)) {\n return;\n }\n\n // do not allow a connection to a connection(the special type of connection between an element and a comment box)\n // when the target is an annotation, the connection type is an annotation connection instead of an activity\n if (isAnnotation(target)) {\n return { type: elementTypes.CONNECTION };\n }\n\n return { type: elementTypes.ACTIVITY };\n}\n\nfunction canResize(shape, newBounds) {\n if (is(shape, elementTypes.GROUP)) {\n if (newBounds) {\n let lowerLeft = { x: shape.x, y: shape.y + shape.height };\n let lowerRight = { x: shape.x + shape.width, y: shape.y + shape.height };\n let upperRight = { x: shape.x + shape.width, y: shape.y };\n\n if (newBounds.x !== shape.x && newBounds.y !== shape.y) {\n // upper left\n if (newBounds.x > lowerRight.x - MIN_SIZE) {\n assign(newBounds, { x: lowerRight.x - MIN_SIZE });\n }\n if (newBounds.y > lowerRight.y - MIN_SIZE) {\n assign(newBounds, { y: lowerRight.y - MIN_SIZE });\n }\n }\n\n if (newBounds.x !== shape.x && newBounds.y === shape.y) {\n // lower left\n if (newBounds.x > upperRight.x - MIN_SIZE) {\n assign(newBounds, { x: upperRight.x - MIN_SIZE });\n }\n }\n\n if (newBounds.x === shape.x && newBounds.y !== shape.y) {\n // upper right\n if (newBounds.y > lowerLeft.y - MIN_SIZE) {\n assign(newBounds, { y: lowerLeft.y - MIN_SIZE });\n }\n }\n\n if (newBounds.height < MIN_SIZE) {\n assign(newBounds, {\n height: MIN_SIZE,\n });\n }\n if (newBounds.width < MIN_SIZE) {\n assign(newBounds, {\n width: MIN_SIZE,\n });\n }\n }\n return true;\n }\n\n return false;\n}\n\nfunction canAttach(elements, target, source) {\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n\n // disallow appending as boundary event\n if (source) {\n return false;\n }\n\n // only (re-)attach one element at a time\n if (elements.length !== 1) {\n return false;\n }\n\n // allow default move operation\n if (!target) {\n return true;\n }\n\n // only allow drop on DomainStory Elements\n if (!isDomainStory(target)) {\n return false;\n }\n\n return \"attach\";\n}\n\nfunction canConnectToAnnotation(source, target, connection) {\n // do not allow an activity connect to an annotation\n if (isActivity(connection) && isAnnotation(target)) {\n return false;\n }\n\n // do not allow an annotation connection between two annotations\n if (\n isConnection(connection) &&\n isAnnotation(source) &&\n isAnnotation(target)\n ) {\n return false;\n }\n\n // do not allow an annotation connection between an actor or workObject and anything except an annotation\n return !(\n isConnection(connection) &&\n !isAnnotation(target) &&\n (isActor(source) || isWorkObject(source))\n );\n}\n\n/**\n * specific rules for custom elements\n */\nexport default function DomainStoryRules(eventBus) {\n RuleProvider.call(this, eventBus);\n}\n\ninherits(DomainStoryRules, RuleProvider);\n\nDomainStoryRules.$inject = [\"eventBus\"];\n\nDomainStoryRules.prototype.init = function () {\n /**\n * can shape be created on target container?\n */\n function canCreate(shape, target) {\n // only judge about custom elements\n if (!isDomainStory(shape)) {\n return;\n }\n\n // allow creation just on groups\n return !isDomainStory(target) || isDomainStoryGroup(target);\n }\n\n this.addRule(\"elements.create\", function (context) {\n const elements = context.elements,\n position = context.position,\n target = context.target;\n\n return every(elements, function (element) {\n if (isConnection(element)) {\n return canConnect(element.source, element.target, element);\n }\n\n if (element.host) {\n return canAttach(element, element.host, null, position);\n }\n\n return canCreate(element, target, null, position);\n });\n });\n\n this.addRule(\"elements.move\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shapes = context.shapes;\n\n let type;\n\n // do not allow mixed movements of custom / BPMN shapes\n // if any shape cannot be moved, the group cannot be moved, too\n\n // reject, if we have at least one\n // custom element that cannot be moved\n return reduce(\n shapes,\n function (result, s) {\n if (type === undefined) {\n type = isDomainStory(s);\n }\n\n if (type !== isDomainStory(s) || result === false) {\n return false;\n }\n\n return canCreate(s, target);\n },\n undefined,\n );\n });\n\n this.addRule(\"shape.create\", HIGH_PRIORITY, function (context) {\n let target = context.target,\n shape = context.shape;\n\n return canCreate(shape, target);\n });\n\n this.addRule(\"connection.create\", HIGH_PRIORITY, function (context) {\n let source = context.source,\n target = context.target;\n\n return canConnect(source, target);\n });\n\n this.addRule(\"connection.reconnect\", HIGH_PRIORITY, function (context) {\n let connection = context.connection,\n source = context.hover || context.source,\n target = context.target;\n\n // --------------------------------------------------------------\n let result = canConnectToAnnotation(source, target, connection);\n\n if (!result) {\n return;\n }\n\n // --------------------------------------------------------------\n\n return canConnect(source, target, connection);\n });\n\n this.addRule(\"shape.resize\", function (context) {\n let shape = context.shape,\n newBounds = context.newBounds;\n\n return canResize(shape, newBounds);\n });\n};\n\nDomainStoryRules.prototype.canConnect = canConnect;\nDomainStoryRules.prototype.canAttach = canAttach;\nDomainStoryRules.prototype.isDomainStory = isDomainStory;\nDomainStoryRules.prototype.canResize = canResize;\n","\"use strict\";\n\nimport inherits from \"inherits\";\n\nimport { pick, assign } from \"min-dash\";\n\nimport CommandInterceptor from \"diagram-js/lib/command/CommandInterceptor\";\n\nimport {\n add as collectionAdd,\n remove as collectionRemove,\n} from \"diagram-js/lib/util/Collections\";\n\nimport { reworkGroupElements } from \"./util\";\nimport { elementTypes } from \"../../Domain/Common/elementTypes\";\n\n/**\n * a handler responsible for updating the custom element's businessObject\n * once changes on the diagram happen.\n */\nexport default function DomainStoryUpdater(eventBus, bpmnjs) {\n CommandInterceptor.call(this, eventBus);\n\n function updateCustomElement(e) {\n let context = e.context,\n shape = context.shape,\n businessObject = shape.businessObject;\n\n if (!shape || !shape.type.includes(elementTypes.DOMAINSTORY)) {\n return;\n }\n\n let parent = shape.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // save custom element position\n assign(businessObject, pick(shape, [\"x\", \"y\"]));\n\n // save custom element size if resizable\n if (shape.type === elementTypes.GROUP) {\n assign(businessObject, pick(shape, [\"height\", \"width\"]));\n\n // rework the child-parent relations if a group was moved, such that all Objects that are visually in the group are also associated with it\n // since we do not have access to the standard-canvas object here, we cannot use the function correctGroupChildren() from DSLabelUtil\n if (parent != null) {\n reworkGroupElements(parent, shape);\n }\n }\n if (\n shape &&\n shape.parent &&\n \"type\" in shape.parent &&\n shape.parent.type === elementTypes.GROUP\n ) {\n assign(businessObject, {\n parent: shape.parent.id,\n });\n }\n }\n\n function updateCustomConnection(e) {\n let context = e.context,\n connection = context.connection,\n source = connection.source,\n target = connection.target,\n businessObject = connection.businessObject;\n\n if (e.newTarget) {\n target = e.newTarget;\n }\n if (e.newSource) {\n source = e.newSource;\n }\n\n let parent = connection.parent;\n let customElements = bpmnjs._customElements;\n\n // make sure element is added / removed from bpmnjs.customElements\n if (!parent) {\n collectionRemove(customElements, businessObject);\n } else {\n collectionAdd(customElements, businessObject);\n }\n\n // update waypoints\n assign(businessObject, {\n waypoints: copyWaypoints(connection),\n });\n\n if (source) {\n if (!businessObject.source) {\n assign(businessObject, { source: source.id });\n } else {\n businessObject.source = source.id;\n }\n }\n if (target) {\n if (!businessObject.target) {\n assign(businessObject, { target: target.id });\n } else {\n businessObject.target = target.id;\n }\n }\n }\n\n function copyWaypoints(connection) {\n return connection.waypoints.map(function (p) {\n if (p.original) {\n return {\n original: {\n x: p.original.x,\n y: p.original.y,\n },\n x: p.x,\n y: p.y,\n };\n } else {\n return {\n x: p.x,\n y: p.y,\n };\n }\n });\n }\n\n this.executed(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement),\n );\n\n this.reverted(\n [\n \"shape.create\",\n \"shape.move\",\n \"shape.delete\",\n \"shape.resize\",\n \"shape.removeGroupWithChildren\",\n ],\n ifDomainStoryElement(updateCustomElement),\n );\n\n this.executed(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection),\n );\n\n this.reverted(\n [\n \"connection.create\",\n \"connection.reconnect\",\n \"connection.updateWaypoints\",\n \"connection.delete\",\n \"connection.layout\",\n \"connection.move\",\n ],\n ifDomainStoryElement(updateCustomConnection),\n );\n}\n\n// check if element in the context of an event is a domainStory element\nfunction ifDomainStoryElement(fn) {\n return (event) => {\n const context = event.context;\n const element = context.shape || context.connection;\n\n if (isDomainStory(element)) {\n fn(event);\n }\n };\n}\n\nfunction isDomainStory(element) {\n return element && /domainStory:/.test(element.type);\n}\n\ninherits(DomainStoryUpdater, CommandInterceptor);\n\nDomainStoryUpdater.$inject = [\"eventBus\", \"bpmnjs\"];\n","\"use strict\";\n\nimport DomainStoryElementFactory from \"./domainStoryElementFactory\";\nimport DomainStoryRenderer from \"./domainStoryRenderer\";\nimport DomainStoryPalette from \"./palette/domainStoryPalette\";\nimport DomainStoryRules from \"./domainStoryRules\";\nimport DomainStoryUpdater from \"./domainStoryUpdater\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"./updateHandler/updateLabelHandler\";\nimport headlineAndDescriptionUpdateHandler from \"./updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryContextPadProvider from \"./context-pad/domainStoryContextPadProvider\";\nimport ReplaceMenuProvider from \"./change-icon/replaceMenuProvider\";\nimport DSModeling from \"./modeling/dSModeling\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport {\n append as svgAppend,\n attr as svgAttr,\n create as svgCreate,\n remove as svgRemove,\n} from \"tiny-svg\";\n\nimport { translate } from \"diagram-js/lib/util/SvgTransformUtil\";\nimport { elementTypes } from \"../../../Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nconst MARKER_HIDDEN = \"djs-element-hidden\",\n MARKER_LABEL_HIDDEN = \"djs-label-hidden\";\n\nlet annotationBoxHeight = 0;\n\nexport function getAnnotationBoxHeight() {\n return annotationBoxHeight;\n}\n\nexport default function DSLabelEditingPreview(eventBus, canvas, pathMap) {\n let self = this;\n\n let defaultLayer = canvas.getDefaultLayer();\n let element, absoluteElementBBox, gfx;\n\n eventBus.on(\"directEditing.activate\", function (context) {\n let activeProvider = context.active;\n\n element = activeProvider.element.label || activeProvider.element;\n\n // text annotation\n if (is(element, elementTypes.TEXTANNOTATION)) {\n absoluteElementBBox = canvas.getAbsoluteBBox(element);\n\n gfx = svgCreate(\"g\");\n\n annotationBoxHeight = element.height;\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: element.height,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n let path = (self.path = svgCreate(\"path\"));\n\n svgAttr(path, {\n d: textPathData,\n strokeWidth: 2,\n stroke: getStrokeColor(element),\n });\n\n svgAppend(gfx, path);\n\n svgAppend(defaultLayer, gfx);\n\n translate(gfx, element.x, element.y);\n }\n\n if (is(element, elementTypes.TEXTANNOTATION) || element.labelTarget) {\n canvas.addMarker(element, MARKER_HIDDEN);\n } else if (\n element.type.includes(elementTypes.ACTOR) ||\n element.type.includes(elementTypes.WORKOBJECT) ||\n element.type.includes(elementTypes.ACTIVITY) ||\n element.type.includes(elementTypes.GROUP)\n ) {\n canvas.addMarker(element, MARKER_LABEL_HIDDEN);\n }\n });\n\n eventBus.on(\"directEditing.resize\", function (context) {\n // text annotation\n if (is(element, elementTypes.TEXTANNOTATION)) {\n let height = context.height,\n dy = context.dy;\n\n let newElementHeight = Math.max(\n (element.height / absoluteElementBBox.height) * (height + dy),\n 0,\n );\n annotationBoxHeight = newElementHeight;\n\n let textPathData = pathMap.getScaledPath(\"TEXT_ANNOTATION\", {\n xScaleFactor: 1,\n yScaleFactor: 1,\n containerWidth: element.width,\n containerHeight: newElementHeight,\n position: {\n mx: 0.0,\n my: 0.0,\n },\n });\n\n svgAttr(self.path, {\n d: textPathData,\n });\n }\n });\n\n eventBus.on(\n [\"directEditing.complete\", \"directEditing.cancel\"],\n function (context) {\n let activeProvider = context.active;\n\n if (activeProvider) {\n canvas.removeMarker(\n activeProvider.element.label || activeProvider.element,\n MARKER_HIDDEN,\n );\n canvas.removeMarker(element, MARKER_LABEL_HIDDEN);\n }\n\n element = undefined;\n absoluteElementBBox = undefined;\n\n if (gfx) {\n svgRemove(gfx);\n\n gfx = undefined;\n }\n },\n );\n}\n\nDSLabelEditingPreview.$inject = [\"eventBus\", \"canvas\", \"pathMap\"];\n\n// helpers ///////////////////\n\nfunction getStrokeColor() {\n return \"black\";\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\n\nimport { autocomplete, getLabel } from \"./dsLabelUtil\";\n\nimport { isAny } from \"bpmn-js/lib/features/modeling/util/ModelingUtil\";\n\nimport {\n getExternalLabelMid,\n hasExternalLabel,\n isLabel,\n isLabelExternal,\n} from \"bpmn-js/lib/util/LabelUtil\";\n\nimport { elementTypes } from \"../../../Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nlet dictionaryService;\n\nlet numberStash = 0;\nlet stashUse = false;\n\nexport function initializeLabelEditingProvider(labelingDictionary) {\n dictionaryService = labelingDictionary;\n}\n\nexport function getNumberStash() {\n let number = { use: stashUse, number: numberStash };\n stashUse = false;\n return number;\n}\n\nexport function toggleStashUse(use) {\n stashUse = use;\n}\n\nexport function focusElement(element) {\n // Opening a Angular Dialog seems to mess with the focus logic somehow.\n // My guess is that is makes the mousedown event passive, which prevents \"preventDefault\" from intercepting.\n // I am not sure how to fix it, but this seems to be a workaround.\n setTimeout(() => element.focus(), 0);\n}\n\nexport default function DSLabelEditingProvider(\n eventBus,\n canvas,\n directEditing,\n modeling,\n resizeHandles,\n textRenderer,\n updateLabelHandler,\n) {\n this._canvas = canvas;\n this._modeling = modeling;\n this._textRenderer = textRenderer;\n this._updateLabelHandler = updateLabelHandler;\n\n directEditing.registerProvider(this);\n\n // listen to dblclick on non-root elements\n eventBus.on(\"element.dblclick\", function (event) {\n activateDirectEdit(event.element, true);\n if (is(event.element, elementTypes.ACTIVITY)) {\n // if we edit an activity, we do not want the standard editing box\n numberStash = event.element.businessObject.number;\n stashUse = true;\n directEditing.complete();\n }\n });\n\n // complete on followup canvas operation\n eventBus.on(\n [\n \"element.mousedown\",\n \"drag.init\",\n \"canvas.viewbox.changing\",\n \"autoPlace\",\n \"popupMenu.open\",\n ],\n function () {\n if (directEditing.isActive()) {\n directEditing.complete();\n }\n },\n );\n\n // cancel on command stack changes\n eventBus.on([\"commandStack.changed\"], function () {\n if (directEditing.isActive()) {\n directEditing.cancel();\n }\n });\n\n eventBus.on(\"directEditing.activate\", function (event) {\n resizeHandles.removeResizers();\n let element = event.active.element;\n createAutocomplete(element);\n });\n\n eventBus.on(\"create.end\", 500, function (event) {\n let element = event.shape,\n canExecute = event.context.canExecute,\n isTouch = event.isTouch;\n\n if (isTouch) {\n return;\n }\n\n if (!canExecute) {\n return;\n }\n if (!is(element, elementTypes.ACTIVITY)) {\n activateDirectEdit(element);\n }\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\",\n );\n focusElement(editingBox.item(0));\n });\n\n eventBus.on(\"autoPlace.end\", 500, function (event) {\n activateDirectEdit(event.shape);\n });\n\n function activateDirectEdit(element, force) {\n if (\n force ||\n isAny(element, [elementTypes.TEXTANNOTATION]) ||\n element.businessObject.type.includes(elementTypes.DOMAINSTORY)\n ) {\n directEditing.activate(element);\n }\n }\n\n function createAutocomplete(element) {\n let editingBox = document.getElementsByClassName(\n \"djs-direct-editing-content\",\n );\n focusElement(editingBox.item(0));\n autocomplete(\n editingBox[0],\n dictionaryService.getUniqueWorkObjectNames(),\n element,\n eventBus,\n );\n }\n}\n\nDSLabelEditingProvider.$inject = [\n \"eventBus\",\n \"canvas\",\n \"directEditing\",\n \"modeling\",\n \"resizeHandles\",\n \"textRenderer\",\n \"updateLabelHandler\",\n];\n\n/**\n * activate direct editing for activities and text annotations.\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object with properties bounds (position and size), text and options\n */\nDSLabelEditingProvider.prototype.activate = function (element) {\n // text\n if (element.id === \"__implicitrootbase\") {\n return;\n }\n let text = getLabel(element);\n\n if (text === undefined) {\n return;\n }\n\n let context = {\n text: text,\n };\n\n // bounds\n let bounds = this.getEditingBBox(element);\n\n assign(context, bounds);\n\n let options = {};\n\n // external labels\n if (isLabelExternal(element)) {\n assign(options, {\n autoResize: true,\n });\n }\n\n // text annotations\n if (is(element, elementTypes.TEXTANNOTATION)) {\n assign(options, {\n resizable: true,\n autoResize: true,\n });\n }\n\n assign(context, {\n options: options,\n });\n\n return context;\n};\n\n/**\n * get the editing bounding box based on the element's size and position\n *\n * @param {djs.model.Base} element\n *\n * @return {Object} an object containing information about position\n * and size (fixed or minimum and/or maximum)\n */\nDSLabelEditingProvider.prototype.getEditingBBox = function (element) {\n let canvas = this._canvas;\n\n let target = element.label || element;\n\n let bbox = canvas.getAbsoluteBBox(target);\n\n let mid = {\n x: bbox.x + bbox.width / 2,\n y: bbox.y + bbox.height / 2,\n };\n\n // default position\n let bounds = { x: bbox.x, y: bbox.y };\n\n /** The cavnas is an Object from BPMN, the IDE might say, that zoom is deprecated,\n * because it thinks canvas is the standard HTMLElement. -> Needs to stay toom **/\n let zoom = canvas.zoom();\n let defaultStyle = this._textRenderer.getDefaultStyle(),\n externalStyle = this._textRenderer.getExternalStyle();\n\n // take zoom into account\n let externalFontSize = externalStyle.fontSize * zoom,\n externalLineHeight = externalStyle.lineHeight,\n defaultFontSize = defaultStyle.fontSize * zoom,\n defaultLineHeight = defaultStyle.lineHeight;\n\n let style = {\n fontFamily: this._textRenderer.getDefaultStyle().fontFamily,\n fontWeight: this._textRenderer.getDefaultStyle().fontWeight,\n };\n\n // adjust for groups\n if (is(element, elementTypes.GROUP)) {\n assign(bounds, {\n minWidth: bbox.width / 2.5 > 125 ? bbox.width / 2.5 : 125,\n maxWidth: bbox.width,\n minHeight: 30 * zoom,\n x: bbox.x,\n y: bbox.y,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n textAlign: \"left\",\n });\n }\n\n // internal labels for tasks and collapsed call activities,\n // sub processes and participants\n if (\n /^domainStory:actor\\w*/.test(element.type) ||\n /^domainStory:workObject\\w*/.test(element.type)\n ) {\n assign(bounds, {\n width: bbox.width,\n minHeight: 30,\n y: bbox.y + bbox.height - 20,\n x: bbox.x,\n });\n\n assign(style, {\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n });\n }\n\n let width = 90 * zoom,\n paddingTop = 7 * zoom,\n paddingBottom = 4 * zoom;\n\n // external labels for events, data elements, gateways and connections\n if (target.labelTarget) {\n assign(bounds, {\n width: width,\n height: bbox.height + paddingTop + paddingBottom,\n x: mid.x - width / 2,\n y: bbox.y - paddingTop,\n });\n\n assign(style, {\n fontSize: externalFontSize + \"px\",\n lineHeight: externalLineHeight,\n paddingTop: paddingTop + \"px\",\n paddingBottom: paddingBottom + \"px\",\n });\n }\n\n // external label not yet created\n if (\n isLabelExternal(target) &&\n !hasExternalLabel(target) &&\n !isLabel(target)\n ) {\n let externalLabelMid = getExternalLabelMid(element);\n\n let absoluteBBox = canvas.getAbsoluteBBox({\n x: externalLabelMid.x,\n y: externalLabelMid.y,\n width: 0,\n height: 0,\n });\n\n let height = externalFontSize + paddingTop + paddingBottom;\n\n assign(bounds, {\n width: width,\n height: height,\n x: absoluteBBox.x - width / 2,\n y: absoluteBBox.y - height / 2,\n });\n\n assign(style, {\n fontSize: externalFontSize + \"px\",\n lineHeight: externalLineHeight,\n paddingTop: paddingTop + \"px\",\n paddingBottom: paddingBottom + \"px\",\n });\n }\n\n // text annotations\n if (is(element, elementTypes.TEXTANNOTATION)) {\n assign(bounds, {\n width: bbox.width,\n height: bbox.height,\n minWidth: 30 * zoom,\n minHeight: 10 * zoom,\n });\n\n assign(style, {\n textAlign: \"left\",\n paddingTop: 7 * zoom + \"px\",\n paddingBottom: 7 * zoom + \"px\",\n paddingLeft: 5 * zoom + \"px\",\n paddingRight: 5 * zoom + \"px\",\n fontSize: defaultFontSize + \"px\",\n lineHeight: defaultLineHeight,\n });\n }\n\n return { bounds: bounds, style: style };\n};\n\nDSLabelEditingProvider.prototype.update = function (\n element,\n newLabel,\n activeContextText,\n bounds,\n) {\n let newBounds, bbox;\n\n if (is(element, elementTypes.TEXTANNOTATION)) {\n bbox = this._canvas.getAbsoluteBBox(element);\n\n newBounds = {\n x: element.x,\n y: element.y,\n width: (element.width / bbox.width) * bounds.width,\n height: (element.height / bbox.height) * bounds.height,\n };\n }\n\n this._modeling.updateLabel(element, newLabel, newBounds);\n};\n","\"use strict\";\n\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { is } from \"../util\";\n\nfunction getLabelAttr(semantic) {\n if (\n semantic.type.includes(elementTypes.ACTOR) ||\n semantic.type.includes(elementTypes.WORKOBJECT) ||\n semantic.type.includes(elementTypes.ACTIVITY) ||\n semantic.type.includes(elementTypes.GROUP)\n ) {\n return \"name\";\n }\n\n if (is(semantic, elementTypes.TEXTANNOTATION)) {\n return \"text\";\n }\n}\n\nfunction getNumberAttr(semantic) {\n if (is(semantic, elementTypes.ACTIVITY)) {\n return \"number\";\n }\n}\n\nexport function getLabel(element) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n if (attr && semantic) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function getNumber(element) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n return semantic[attr] || \"\";\n }\n}\n\nexport function setLabel(element, text) {\n let semantic;\n if (element.businessObject) {\n semantic = element.businessObject;\n } else {\n semantic = element;\n }\n let attr = getLabelAttr(semantic);\n\n if (attr) {\n semantic[attr] = text;\n }\n return element;\n}\n\nexport function setNumber(element, textNumber) {\n let semantic = element.businessObject,\n attr = getNumberAttr(semantic);\n\n if (attr) {\n semantic[attr] = textNumber;\n }\n\n return element;\n}\n\n// select at which part of the activity the label should be attached to\nexport function selectPartOfActivity(waypoints, angleActivity) {\n let selectedActivity = 0;\n let linelength = 49;\n\n for (let i = 0; i < waypoints.length; i++) {\n if (angleActivity[i] === 0 || angleActivity[i] === 180) {\n let length = Math.abs(waypoints[i].x - waypoints[i + 1].x);\n if (length > linelength) {\n selectedActivity = i;\n }\n }\n }\n return selectedActivity;\n}\n\n// approximate the width of the label text, standard fontsize: 11\nexport function calculateTextWidth(text) {\n if (!text) {\n return 0;\n }\n\n let fontsize = text.length * 5.1;\n fontsize = fontsize / 2;\n\n // add an initial offset to the absolute middle of the activity\n fontsize += 20;\n return fontsize;\n}\n\n/**\n * copied from https://www.w3schools.com/howto/howto_js_autocomplete.asp on 18.09.2018\n */\nexport function autocomplete(input, workObjectNames, element, eventBus) {\n closeAllLists();\n\n /* the autocomplete function takes three arguments,\n the text field element and an array of possible autocompleted values and an optional element to which it is appended:*/\n let currentFocus, filteredWorkObjectNames;\n\n /* execute a function when someone writes in the text field:*/\n input.addEventListener(\"input\", function () {\n if (workObjectNames.length === 0) {\n return;\n }\n\n /* the direct editing field of actors and workobjects is a recycled html-element and has old values that need to be overridden*/\n if (element.type.includes(elementTypes.WORKOBJECT)) {\n this.value = this.innerHTML;\n }\n let autocompleteList,\n autocompleteItem,\n val = this.value;\n\n /* close any already open lists of autocompleted values*/\n closeAllLists();\n currentFocus = -1;\n\n /* create a DIV element that will contain the items (values):*/\n autocompleteList = document.createElement(\"DIV\");\n autocompleteList.setAttribute(\"id\", \"autocomplete-list\");\n autocompleteList.setAttribute(\"class\", \"autocomplete-items\");\n\n /* append the DIV element as a child of the autocomplete container:*/\n this.parentNode.appendChild(autocompleteList);\n\n /* for each item in the array...*/\n filteredWorkObjectNames = [];\n for (const name of workObjectNames) {\n /* check if the item starts with the same letters as the text field value:*/\n if (val) {\n if (name.substring(0, val.length).toUpperCase() === val.toUpperCase()) {\n /* create a DIV element for each matching element:*/\n autocompleteItem = document.createElement(\"DIV\");\n\n /* make the matching letters bold:*/\n autocompleteItem.innerHTML =\n \"\" +\n name.substring(0, val.length) +\n \"\" +\n name.substring(val.length);\n\n /* insert an input field that will hold the current name:*/\n autocompleteItem.innerHTML +=\n \"\";\n autocompleteList.appendChild(autocompleteItem);\n\n filteredWorkObjectNames.push(name);\n }\n }\n }\n\n // if we edit an actor, we do not want auto-complete, since actors generally are unique\n if (element.type.includes(elementTypes.ACTOR)) {\n autocompleteList.style.visibility = \"hidden\";\n }\n });\n\n /* execute a function presses a key on the keyboard:*/\n input.onkeydown = function (e) {\n let autocompleteList = document.getElementById(\"autocomplete-list\");\n if (autocompleteList) {\n autocompleteList = autocompleteList.getElementsByTagName(\"div\");\n }\n if (e.keyCode === 40) {\n /* If the arrow DOWN key is pressed,\n increase the currentFocus letiable:*/\n currentFocus++;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 38) {\n // up\n /* If the arrow UP key is pressed,\n decrease the currentFocus letiable:*/\n currentFocus--;\n\n /* and and make the current item more visible:*/\n addActive(autocompleteList);\n } else if (e.keyCode === 13) {\n e.preventDefault();\n /* If the ENTER key is pressed, prevent the form from being submitted,*/\n if (currentFocus > -1) {\n element.businessObject.name = filteredWorkObjectNames[currentFocus];\n eventBus.fire(\"element.changed\", { element });\n }\n }\n };\n\n function addActive(autocompleteList) {\n /* a function to classify an item as \"active\":*/\n if (!autocompleteList || autocompleteList.length < 1) return false;\n\n /* start by removing the \"active\" class on all items:*/\n removeActive(autocompleteList);\n if (currentFocus >= autocompleteList.length) currentFocus = 0;\n if (currentFocus < 0) currentFocus = autocompleteList.length - 1;\n\n /* add class \"autocomplete-active\":*/\n autocompleteList[currentFocus].classList.add(\"autocomplete-active\");\n }\n\n function removeActive(autocompleteList) {\n /* a function to remove the \"active\" class from all autocomplete items:*/\n if (autocompleteList.length > 1) {\n for (const item of autocompleteList) {\n item.classList.remove(\"autocomplete-active\");\n }\n }\n }\n\n function closeAllLists(survivor) {\n /* close all autocomplete lists in the document,\n except the one passed as an argument:*/\n let autocompleteList =\n document.getElementsByClassName(\"autocomplete-items\");\n for (const item of autocompleteList) {\n if (survivor != item && survivor != input) {\n item.parentNode.removeChild(item);\n }\n }\n }\n\n /* execute a function when someone clicks in the document:*/\n document.addEventListener(\"click\", function (e) {\n closeAllLists(e.target);\n });\n}\n","\"use strict\";\n\nimport ChangeSupportModule from \"diagram-js/lib/features/change-support\";\nimport ResizeModule from \"diagram-js/lib/features/resize\";\nimport DirectEditingModule from \"diagram-js-direct-editing\";\n\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DSLabelEditingPreview from \"./dsLabelEditingPreview\";\nimport DSLabelEditingProvider from \"./dsLabelEditingProvider\";\nimport DSModeling from \"../modeling/dSModeling\";\n\nexport default {\n __depends__: [ChangeSupportModule, ResizeModule, DirectEditingModule],\n __init__: [\"dSlabelEditingProvider\", \"dSlabelEditingPreview\"],\n dSlabelEditingProvider: [\"type\", DSLabelEditingProvider],\n dSlabelEditingPreview: [\"type\", DSLabelEditingPreview],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n commandStack: [\"type\", CommandStack],\n modeling: [\"type \", DSModeling],\n};\n","\"use strict\";\n\nimport { selectPartOfActivity } from \"./dsLabelUtil\";\nimport { angleBetween } from \"../../../Utils/mathExtensions\";\n\nexport function countLines(str) {\n return str.split(/\\r\\n|\\r|\\n/).length;\n}\n\n// determine the position of the label at the activity\nexport function labelPosition(waypoints, lines = 1) {\n let amountWaypoints = waypoints.length;\n let determinedPosition;\n let xPos;\n let yPos;\n\n if (amountWaypoints > 2) {\n let angleActivity = new Array(amountWaypoints - 1);\n for (let i = 0; i < amountWaypoints - 1; i++) {\n // calculate the angles of the activities\n angleActivity[i] = angleBetween(waypoints[i], waypoints[i + 1]);\n }\n\n let selectedActivity = selectPartOfActivity(waypoints, angleActivity);\n\n xPos = labelPositionX(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1],\n );\n yPos = labelPositionY(\n waypoints[selectedActivity],\n waypoints[selectedActivity + 1],\n lines,\n );\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: selectedActivity,\n };\n\n return determinedPosition;\n } else {\n xPos = labelPositionX(waypoints[0], waypoints[1]);\n yPos = labelPositionY(waypoints[0], waypoints[1], lines);\n\n determinedPosition = {\n x: xPos,\n y: yPos,\n selected: 0,\n };\n\n return determinedPosition;\n }\n}\n\n// calculate the X position of the label\nexport function labelPositionX(startPoint, endPoint) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetX = 0;\n let scaledAngle = 0;\n if (angle === 0 || angle === 180 || angle === 90 || angle === 270) {\n offsetX = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetX = 5 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetX = 5 - scaledAngle / 18;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetX = scaledAngle / 18;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetX = 5 - scaledAngle / 6;\n }\n return offsetX + (startPoint.x + endPoint.x) / 2;\n}\n\n// calculate the Y position of the label\nexport function labelPositionY(startPoint, endPoint, lines = 1) {\n let angle = angleBetween(startPoint, endPoint);\n let offsetY = 0;\n let scaledAngle = 0;\n\n if (angle === 0 || angle === 180) {\n offsetY = 15;\n } else if (angle === 90 || angle === 270) {\n offsetY = 0;\n } else if (angle > 0 && angle < 90) {\n // endpoint in upper right quadrant\n offsetY = 15 - angle / 6;\n } else if (angle > 90 && angle < 180) {\n // endpoint in upper left quadrant\n scaledAngle = angle - 90;\n offsetY = (-scaledAngle / 9) * lines;\n } else if (angle > 180 && angle < 270) {\n // endpoint in lower left quadrant\n scaledAngle = angle - 180;\n offsetY = 15 - scaledAngle / 3;\n } else if (angle > 270) {\n // endpoint in lower right quadrant\n scaledAngle = angle - 270;\n offsetY = (-scaledAngle / 9) * lines;\n }\n return offsetY + (startPoint.y + endPoint.y) / 2;\n}\n","\"use strict\";\n\nimport Modeling from \"bpmn-js/lib/features/modeling/Modeling\";\n\nimport { inherits } from \"util\";\n\nexport default function DSModeling(\n eventBus,\n elementFactory,\n commandStack,\n domainStoryRules,\n) {\n Modeling.call(this, eventBus, elementFactory, commandStack, domainStoryRules);\n}\n\nModeling.prototype.updateLabel = function (element, newLabel, newBounds) {\n if (\n element.businessObject\n ? newLabel !== element.businessObject.name\n : newLabel !== element.name\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newLabel: newLabel,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.updateNumber = function (element, newNumber, newBounds) {\n if (\n element.businessObject\n ? newNumber !== element.businessObject.number\n : newNumber !== element.number\n ) {\n if (/^domainStory:/.test(element.type)) {\n this._commandStack.execute(\"element.updateCustomLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n } else {\n this._commandStack.execute(\"element.updateLabel\", {\n element: element,\n newNumber: newNumber,\n newBounds: newBounds,\n });\n }\n }\n};\n\nModeling.prototype.replaceShape = function (oldShape, newShape, hints) {\n let context = {\n oldShape: oldShape,\n newData: newShape,\n hints: hints || {},\n };\n\n this._commandStack.execute(\"shape.replace\", context);\n return context.newShape;\n};\n\nModeling.prototype.removeGroup = function (element) {\n this._commandStack.execute(\"shape.removeGroupWithoutChildren\", {\n element: element,\n });\n this.removeElements({ element });\n};\n\ninherits(DSModeling, Modeling);\n\nDSModeling.$inject = [\n \"eventBus\",\n \"elementFactory\",\n \"commandStack\",\n \"domainStoryRules\",\n];\n","\"use strict\";\n\nimport DomainStoryPalette from \"../palette/domainStoryPalette\";\nimport ElementFactory from \"bpmn-js/lib/features/modeling/ElementFactory\";\nimport CreateModule from \"diagram-js/lib/features/create\";\nimport PathMap from \"bpmn-js/lib/draw/PathMap\";\nimport PopupMenuModule from \"bpmn-js/lib/features/popup-menu\";\nimport ContextPadModule from \"diagram-js/lib/features/context-pad\";\nimport CommandStack from \"diagram-js/lib/command/CommandStack\";\nimport UpdateLabelHandler from \"../updateHandler/updateLabelHandler\";\nimport DomainStoryUpdater from \"../domainStoryUpdater\";\nimport DomainStoryElementFactory from \"../domainStoryElementFactory\";\nimport headlineAndDescriptionUpdateHandler from \"../updateHandler/headlineAndDescriptionUpdateHandler\";\nimport DomainStoryRenderer from \"../domainStoryRenderer\";\nimport DSModeling from \"./dSModeling\";\nimport DomainStoryRules from \"../domainStoryRules\";\nimport ReplaceMenuProvider from \"../change-icon/replaceMenuProvider\";\nimport DomainStoryContextPadProvider from \"../context-pad/domainStoryContextPadProvider\";\n\nexport default {\n __depends__: [CreateModule, ContextPadModule, PopupMenuModule],\n __init__: [\n \"domainStoryRenderer\",\n \"paletteProvider\",\n \"domainStoryRules\",\n \"domainStoryUpdater\",\n \"contextPadProvider\",\n \"replaceMenuProvider\",\n ],\n elementFactory: [\"type\", DomainStoryElementFactory],\n domainStoryRenderer: [\"type\", DomainStoryRenderer],\n paletteProvider: [\"type\", DomainStoryPalette],\n domainStoryRules: [\"type\", DomainStoryRules],\n domainStoryUpdater: [\"type\", DomainStoryUpdater],\n contextPadProvider: [\"type\", DomainStoryContextPadProvider],\n elementFactoryBpmn: [\"type\", ElementFactory],\n pathMap: [\"type\", PathMap],\n replaceMenuProvider: [\"type\", ReplaceMenuProvider],\n commandStack: [\"type\", CommandStack],\n updateLabelHandler: [\"type\", UpdateLabelHandler],\n headlineAndDescriptionUpdateHandler: [\n \"type\",\n headlineAndDescriptionUpdateHandler,\n ],\n modeling: [\"type\", DSModeling],\n};\n","\"use strict\";\n\nimport { angleBetween } from \"../../../Utils/mathExtensions\";\n\nlet numberRegistry = [];\nlet multipleNumberRegistry = [false];\n\nlet canvasElementRegistry;\n\nexport function initializeNumbering(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\n// defines the box for activity numbers\nexport function numberBoxDefinitions(element) {\n let alignment = \"center\";\n let boxWidth = 30;\n let boxHeight = 30;\n let angle = 0;\n if (element.waypoints.length > 1) {\n angle = angleBetween(\n // Start of first arrow segment\n element.waypoints[0],\n // End of first arrow segment\n element.waypoints[1],\n );\n }\n let x = element.waypoints[0].x;\n let y = element.waypoints[0].y;\n\n let fixedOffsetX = 0;\n let fixedOffsetY = 0;\n let angleDependantOffsetX = 0;\n let angleDependantOffsetY = 0;\n\n // Fine tune positioning of sequence number above beginning of first arrow segment\n if (angle >= 0 && angle <= 45) {\n fixedOffsetX = 25;\n angleDependantOffsetY = 20 * (1 - angle / 45);\n } else if (angle <= 90) {\n fixedOffsetX = 5;\n angleDependantOffsetX = 15 * (1 - (angle - 45) / 45);\n } else if (angle <= 135) {\n fixedOffsetX = 5;\n angleDependantOffsetX = -20 * ((angle - 90) / 45);\n } else if (angle <= 180) {\n fixedOffsetX = -15;\n angleDependantOffsetY = 20 * ((angle - 135) / 45);\n } else if (angle <= 225) {\n fixedOffsetX = -15;\n fixedOffsetY = 15;\n angleDependantOffsetY = 25 * ((angle - 180) / 45);\n } else if (angle <= 270) {\n fixedOffsetX = 5;\n angleDependantOffsetX = -20 * (1 - (angle - 225) / 45);\n fixedOffsetY = 40;\n } else if (angle <= 315) {\n fixedOffsetX = 5;\n angleDependantOffsetX = 25 * ((angle - 270) / 45);\n fixedOffsetY = 40;\n } else {\n fixedOffsetX = 25;\n fixedOffsetY = 20;\n angleDependantOffsetY = 15 * (1 - (angle - 315) / 45);\n }\n\n x = x + fixedOffsetX + angleDependantOffsetX;\n y = y + fixedOffsetY + angleDependantOffsetY;\n\n return {\n textAlign: alignment,\n width: boxWidth,\n height: boxHeight,\n x: x,\n y: y,\n };\n}\n\n// determine the next available number that is not yet used\nexport function generateAutomaticNumber(elementActivity, commandStack) {\n const semantic = elementActivity.businessObject;\n const usedNumbers = [0];\n let wantedNumber = -1;\n\n const activitiesFromActors = canvasElementRegistry.getActivitiesFromActors();\n\n activitiesFromActors.forEach((element) => {\n if (element.businessObject.number) {\n usedNumbers.push(+element.businessObject.number);\n }\n });\n for (let i = 0; i < usedNumbers.length; i++) {\n if (!usedNumbers.includes(i)) {\n if (!usedNumbers.includes(i)) {\n wantedNumber = i;\n i = usedNumbers.length;\n }\n }\n }\n if (wantedNumber === -1) {\n wantedNumber = usedNumbers.length;\n }\n\n updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack,\n );\n semantic.number = wantedNumber;\n return wantedNumber;\n}\n\n// update the numbers at the activities when generating a new activity\nexport function updateExistingNumbersAtGeneration(\n activitiesFromActors,\n wantedNumber,\n commandStack,\n) {\n activitiesFromActors.forEach((element) => {\n let number = +element.businessObject.number;\n\n if (number >= wantedNumber) {\n wantedNumber++;\n setTimeout(function () {\n commandStack.execute(\"activity.changed\", {\n businessObject: element.businessObject,\n newLabel: element.businessObject.name,\n newNumber: number,\n element: element,\n });\n }, 10);\n }\n });\n}\n\n// update the numbers at the activities when editing an activity\nexport function updateExistingNumbersAtEditing(\n activitiesFromActors,\n wantedNumber,\n eventBus,\n) {\n // get a sorted list of all activities that could need changing\n let sortedActivities = [[]];\n activitiesFromActors.forEach((activity) => {\n if (!sortedActivities[activity.businessObject.number]) {\n sortedActivities[activity.businessObject.number] = [];\n }\n sortedActivities[activity.businessObject.number].push(activity);\n });\n\n // set the number of each activity to the next highest number, starting from the number, we overrode\n let currentNumber = wantedNumber;\n for (\n currentNumber;\n currentNumber < sortedActivities.length;\n currentNumber++\n ) {\n if (sortedActivities[currentNumber]) {\n wantedNumber++;\n setNumberOfActivity(\n sortedActivities[currentNumber],\n wantedNumber,\n eventBus,\n );\n }\n }\n}\n\n// get the IDs of activities with their associated number, only returns activities that are originating from an actor\nexport function getNumbersAndIDs() {\n let iDWithNumber = [];\n let activities = canvasElementRegistry.getActivitiesFromActors();\n\n for (let i = activities.length - 1; i >= 0; i--) {\n let id = activities[i].businessObject.id;\n let number = activities[i].businessObject.number;\n iDWithNumber.push({ id: id, number: number });\n }\n return iDWithNumber;\n}\n\nexport function addNumberToRegistry(renderedNumber, number) {\n numberRegistry[number] = renderedNumber;\n}\n\nexport function setNumberIsMultiple(number, multi) {\n multipleNumberRegistry[number] = multi;\n}\n\n/**\n * @returns copy of registry\n */\nexport function getNumberRegistry() {\n return numberRegistry.slice(0);\n}\n\nexport function getMultipleNumberRegistry() {\n return multipleNumberRegistry.slice(0);\n}\n\nfunction setNumberOfActivity(elementArray, wantedNumber, eventBus) {\n if (elementArray) {\n elementArray.forEach((element) => {\n if (element) {\n let businessObject = element.businessObject;\n if (businessObject) {\n businessObject.number = wantedNumber;\n }\n eventBus.fire(\"element.changed\", { element });\n }\n });\n }\n}\n","\"use strict\";\n\nimport { assign } from \"min-dash\";\nimport { overrideAppendedIcons } from \"src/app/Domain/Icon-Set-Configuration/allIcons\";\nimport { Dictionary } from \"src/app/Domain/Common/dictionary/dictionary\";\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { APPENDED_ICONS_TAG } from \"../../../Domain/Common/constants\";\n\n/**\n * A palette that allows you to create BPMN _and_ custom elements.\n */\n\nlet iconDictionary;\nlet configuration;\n\nexport function initializePalette(iconDictionaryService, configurationService) {\n iconDictionary = iconDictionaryService;\n configuration = configurationService;\n}\n\nexport default function PaletteProvider(\n palette,\n create,\n elementFactory,\n spaceTool,\n lassoTool,\n) {\n this._create = create;\n this._elementFactory = elementFactory;\n this._spaceTool = spaceTool;\n this._lassoTool = lassoTool;\n\n palette.registerProvider(this);\n}\n\nPaletteProvider.$inject = [\n \"palette\",\n \"create\",\n \"elementFactory\",\n \"spaceTool\",\n \"lassoTool\",\n \"modeling\",\n];\n\nPaletteProvider.prototype.getPaletteEntries = function () {\n let actions = {},\n create = this._create,\n elementFactory = this._elementFactory,\n spaceTool = this._spaceTool,\n lassoTool = this._lassoTool;\n\n function createAction(type, group, className, title, options) {\n function createListener(event) {\n let shape = elementFactory.createShape(assign({ type: type }, options));\n\n assign(shape.businessObject, {\n id: shape.id,\n });\n\n if (options) {\n shape.businessObject.di.isExpanded = options.isExpanded;\n }\n\n create.start(event, shape);\n }\n\n let shortType = type.replace(/^domainStory:/, \"\");\n\n return {\n group: group,\n className: className,\n title: \"Create \" + title || \"Create \" + shortType,\n action: {\n dragstart: createListener,\n click: createListener,\n },\n };\n }\n\n return initPalette(actions, spaceTool, lassoTool, createAction);\n};\n\nfunction appendCSSStyleCheat(customIcons) {\n const sheetEl = document.createElement(\"style\");\n document.head.appendChild(sheetEl);\n\n let customIconDict = new Dictionary();\n\n customIconDict.appendDict(customIcons);\n let customIconDictKeys = customIconDict.keysArray();\n\n customIconDictKeys.forEach((name) => {\n if (iconDictionary.getAppendedIconDictionary().has(name)) {\n let src = customIconDict.get(name);\n\n const iconStyle =\n \".icon-domain-story-\" +\n name.toLowerCase() +\n \"::before{\" +\n \" display: block;\" +\n ' content: url(\"data:image/svg+xml;utf8,' +\n wrapSRCInSVG(src) +\n '\");' +\n \" margin: 3px;}\";\n sheetEl.sheet.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n }\n });\n}\n\nfunction initPalette(actions, spaceTool, lassoTool, createAction) {\n let config = iconDictionary?.getCurrentIconConfigurationForBPMN();\n\n let customIcons = localStorage.getItem(APPENDED_ICONS_TAG);\n\n if (customIcons) {\n customIcons = JSON.parse(customIcons);\n if (customIconsLegacy(customIcons)) {\n customIcons = convertLegacyAppendedIconsToDict(customIcons);\n }\n if (customIcons.entries && customIcons.entries.forEach) {\n const customIconsDict = new Dictionary();\n customIcons.entries.forEach((entry) => {\n customIconsDict.putEntry(entry);\n });\n overrideAppendedIcons(customIconsDict);\n appendCSSStyleCheat(customIcons);\n }\n }\n\n iconDictionary?.initTypeDictionaries(config.actors, config.workObjects);\n\n let actorTypes = iconDictionary?.getTypeDictionary(elementTypes.ACTOR);\n\n actorTypes?.keysArray().forEach((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n elementTypes.ACTOR,\n );\n });\n\n assign(actions, {\n \"actor-separator\": {\n group: \"actor\",\n separator: true,\n },\n });\n\n let workObjectTypes = iconDictionary?.getTypeDictionary(\n elementTypes.WORKOBJECT,\n );\n\n workObjectTypes?.keysArray().forEach((name) => {\n addCanvasObjectTypes(\n name,\n createAction,\n actions,\n \"actor\",\n elementTypes.WORKOBJECT,\n );\n });\n\n assign(actions, {\n \"workObject-separator\": {\n group: \"workObject\",\n separator: true,\n },\n \"domainStory-group\": createAction(\n elementTypes.GROUP,\n \"group\",\n \"icon-domain-story-tool-group\",\n \"group\",\n ),\n \"group-separator\": {\n group: \"group\",\n separator: true,\n },\n \"lasso-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-lasso-tool\",\n title: \"Activate the lasso tool\",\n action: {\n click: function (event) {\n lassoTool.activateSelection(event);\n },\n },\n },\n \"space-tool\": {\n group: \"tools\",\n className: \"bpmn-icon-space-tool\",\n title: \"Activate the create/remove space tool\",\n action: {\n click: function (event) {\n spaceTool.activateSelection(event);\n },\n },\n },\n });\n\n return actions;\n}\n\nfunction addCanvasObjectTypes(\n name,\n createAction,\n actions,\n className,\n elementType,\n) {\n let icon = iconDictionary.getIconForBPMN(elementType, name);\n\n let action = [];\n action[\"domainStory-\" + className + name] = createAction(\n `${elementType}${name}`,\n className,\n icon,\n name,\n );\n assign(actions, action);\n}\n\nfunction customIconsLegacy(customIcons) {\n return !(\n Object.keys(customIcons).length === 1 &&\n Object.keys(customIcons)[0] === \"entries\"\n );\n}\n\nfunction convertLegacyAppendedIconsToDict(customIcons) {\n let dict = new Dictionary();\n Object.keys(customIcons).forEach((key) => {\n dict.set(key, customIcons[key]);\n });\n return dict;\n}\n\n// For some reason its important to use ' in the content for the Palette and ContextPad\n// Do not change!\nfunction wrapSRCInSVG(src) {\n return (\n \"\" +\n \"\"\n );\n}\n","\"use strict\";\n\nimport { getNumbersAndIDs } from \"../numbering/numbering\";\n\n/**\n * commandStack Handler for changes at activities\n */\n\nlet canvasElementRegistry;\nexport function initializeActivityUpdateHandler(canvasElementRegistryService) {\n canvasElementRegistry = canvasElementRegistryService;\n}\n\nexport default function activityUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\n \"activity.directionChange\",\n activity_directionChange,\n );\n commandStack.registerHandler(\"activity.changed\", activity_changed);\n\n // update the activity from the activity-dialog, either with or without number\n // and change other activities too, to keep the numbers consistent\n function activity_changed(modeling) {\n this.preExecute = function (context) {\n context.oldLabel = context.businessObject.name || \" \";\n\n let oldNumbersWithIDs = getNumbersAndIDs();\n modeling.updateLabel(context.businessObject, context.newLabel);\n modeling.updateNumber(context.businessObject, context.newNumber);\n\n context.oldNumber = context.businessObject.number;\n context.oldNumbersWithIDs = oldNumbersWithIDs;\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n\n if (context.newLabel && context.newLabel.length < 1) {\n context.newLabel = \" \";\n }\n\n businessObject.name = context.newLabel;\n businessObject.number = context.newNumber;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n semantic.name = context.oldLabel;\n semantic.number = context.oldNumber;\n\n revertAutomaticNumberGenerationChange(\n context.oldNumbersWithIDs,\n eventBus,\n );\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n // change the direction of a single activity without affecting other activities\n function activity_directionChange(modeling) {\n this.preExecute = function (context) {\n context.oldNumber = context.businessObject.number;\n context.oldWaypoints = context.element.waypoints;\n context.name = context.businessObject.name;\n\n if (!context.oldNumber) {\n context.oldNumber = 0;\n }\n modeling.updateNumber(context.businessObject, context.newNumber);\n };\n\n this.execute = function (context) {\n let businessObject = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n let newWaypoints = [];\n let waypoints = element.waypoints;\n\n for (let i = waypoints.length - 1; i >= 0; i--) {\n newWaypoints.push(waypoints[i]);\n }\n\n element.source = element.target;\n businessObject.source = businessObject.target;\n element.target = swapSource;\n businessObject.target = swapSource.id;\n\n businessObject.name = context.name;\n businessObject.number = context.newNumber;\n element.waypoints = newWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n let swapSource = element.source;\n\n element.source = element.target;\n semantic.source = semantic.target;\n element.target = swapSource;\n semantic.target = swapSource.id;\n\n semantic.name = context.name;\n\n semantic.number = context.oldNumber;\n element.waypoints = context.oldWaypoints;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n}\n\n// reverts the automatic changed done by the automatic number-generation at editing\nfunction revertAutomaticNumberGenerationChange(iDWithNumber, eventBus) {\n let activities = canvasElementRegistry?.getActivitesFromActors();\n for (let i = activities.length - 1; i >= 0; i--) {\n for (let j = iDWithNumber.length - 1; j >= 0; j--) {\n if (iDWithNumber[j].id.includes(activities[i].businessObject.id)) {\n let element = activities[i];\n element.businessObject.number = iDWithNumber[j].number;\n j = -5;\n eventBus.fire(\"element.changed\", { element });\n iDWithNumber.splice(j, 1);\n }\n }\n }\n}\n","\"use strict\";\n\nimport { undoGroupRework } from \"../util\";\n\nexport default function elementUpdateHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"element.colorChange\", element_colorChange);\n commandStack.registerHandler(\n \"shape.removeGroupWithoutChildren\",\n removeGroupWithoutChildren,\n );\n\n function element_colorChange() {\n this.preExecute = function (context) {\n context.oldColor = context.businessObject.pickedColor;\n };\n\n this.execute = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n semantic.pickedColor = context.newColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n\n this.revert = function (context) {\n let semantic = context.businessObject;\n let element = context.element;\n\n semantic.pickedColor = context.oldColor;\n\n eventBus.fire(\"element.changed\", { element });\n };\n }\n\n function removeGroupWithoutChildren() {\n this.preExecute = function (ctx) {\n ctx.parent = ctx.element.parent;\n ctx.children = ctx.element.children.slice();\n };\n\n this.execute = function (ctx) {\n let element = ctx.element;\n ctx.children.forEach((child) => {\n undoGroupRework(element, child);\n eventBus.fire(\"element.changed\", { element: child });\n });\n eventBus.fire(\"shape.remove\", { element });\n };\n\n this.revert = function (ctx) {\n let element = ctx.element;\n eventBus.fire(\"shape.added\", { element });\n\n ctx.element.children.forEach((child) => {\n reworkGroupElements(element, child);\n });\n };\n }\n}\n","/**\n * a handler that updates the text of a BPMN element.\n */\nexport default function headlineAndDescriptionUpdateHandler(\n commandStack,\n titleService,\n) {\n commandStack.registerHandler(\n \"story.updateHeadlineAndDescription\",\n handlerFunction,\n );\n\n function handlerFunction() {\n this.execute = function (ctx) {\n ctx.oldTitle = titleService.getTitle();\n ctx.oldDescription = titleService.getDescription();\n\n titleService.updateTitleAndDescription(\n ctx.newTitle,\n ctx.newDescription,\n false,\n );\n };\n\n this.revert = function (ctx) {\n titleService.updateTitleAndDescription(\n ctx.oldTitle,\n ctx.oldDescription,\n false,\n );\n };\n }\n}\n","\"use strict\";\n\nexport default function DSMassRenameHandler(commandStack, eventBus) {\n commandStack.registerHandler(\"domainStoryObjects.massRename\", massRename);\n\n function massRename(modeling) {\n this.preExecute = function (context) {\n let relevantElements = context.elements;\n\n context.oldLabel = relevantElements[0].businessObject.name;\n\n relevantElements.forEach((element) => {\n modeling.updateLabel(element.businessObject, confirm.newValue);\n });\n };\n\n this.execute = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.newValue;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n\n this.revert = function (context) {\n let relevantElements = context.elements;\n relevantElements.forEach((element) => {\n let semantic = element.businessObject;\n semantic.name = context.oldLabel;\n\n eventBus.fire(\"element.changed\", { element });\n });\n };\n }\n}\n","\"use strict\";\n\nimport {\n setLabel,\n getLabel,\n setNumber,\n getNumber,\n} from \"../labeling/dsLabelUtil\";\n\nimport {\n getExternalLabelMid,\n isLabelExternal,\n hasExternalLabel,\n isLabel,\n} from \"bpmn-js/lib/util/LabelUtil\";\n\nimport { elementTypes } from \"src/app/Domain/Common/elementTypes\";\nimport { getBusinessObject, is } from \"../util\";\n\nconst NULL_DIMENSIONS = {\n width: 0,\n height: 0,\n};\n\n/**\n * a handler that updates the text of a BPMN element.\n */\nexport default function UpdateLabelHandler(\n modeling,\n textRenderer,\n commandStack,\n) {\n commandStack.registerHandler(\"element.updateCustomLabel\", handlerFunction);\n\n function handlerFunction() {\n /**\n * Set the label and return the changed elements.\n *\n * Element parameter can be label itself or connection (i.e. sequence flow).\n *\n * @param {djs.model.Base} element\n * @param {String} text\n */\n\n this.preExecute = function (ctx) {\n let element = ctx.element,\n businessObject = element.businessObject,\n newLabel = ctx.newLabel,\n newNumber = ctx.newNumber;\n\n if (\n !isLabel(element) &&\n isLabelExternal(element) &&\n !hasExternalLabel(element) &&\n (newLabel !== \"\" || newNumber !== \"\")\n ) {\n // create label\n let paddingTop = 7;\n\n let labelCenter = getExternalLabelMid(element);\n\n labelCenter = {\n x: labelCenter.x,\n y: labelCenter.y + paddingTop,\n };\n\n modeling.createLabel(element, labelCenter, {\n id: businessObject.id + \"_label\",\n businessObject: businessObject,\n });\n }\n };\n\n this.execute = function (ctx) {\n ctx.oldLabel = getLabel(ctx.element);\n ctx.oldNumber = getNumber(ctx.element);\n return setText(ctx.element, ctx.newLabel, ctx.newNumber);\n };\n\n this.revert = function (ctx) {\n return setText(ctx.element, ctx.oldLabel, ctx.oldNumber);\n };\n\n this.postExecute = function (ctx) {\n let element = ctx.element,\n label = element.label || element,\n newLabel = ctx.newLabel,\n newBounds = ctx.newBounds;\n\n if (isLabel(label) && newLabel.trim() === \"\") {\n modeling.removeShape(label);\n\n return;\n }\n\n // ignore internal labels for elements except text annotations\n if (\n !isLabelExternal(element) &&\n !is(element, elementTypes.TEXTANNOTATION)\n ) {\n return;\n }\n\n let bo = getBusinessObject(label);\n\n let text = bo.name || bo.text;\n\n // don't resize without text\n if (!text) {\n return;\n }\n\n // resize element based on label _or_ pre-defined bounds\n if (typeof newBounds === \"undefined\") {\n newBounds = textRenderer.getLayoutedBounds(label, text);\n }\n\n // setting newBounds to false or _null_ will\n // disable the postExecute resize operation\n if (newBounds) {\n modeling.resizeShape(label, newBounds, NULL_DIMENSIONS);\n }\n };\n }\n}\n\nfunction setText(element, text, textNumber) {\n // external label if present\n let label = element.label || element;\n\n let number = element.number || element;\n\n let labelTarget = element.labelTarget || element;\n\n let numberTarget = element.numberTarget || element;\n setLabel(label, text);\n setNumber(number, textNumber);\n\n return [label, labelTarget, number, numberTarget];\n}\n\nUpdateLabelHandler.$inject = [\"modeling\", \"textRenderer\", \"commandStack\"];\n","import { some } from \"min-dash\";\n\nexport function is(element, type) {\n const bo = getBusinessObject(element);\n\n return bo && typeof bo.$instanceOf == \"function\" && bo.$instanceOf(type);\n}\n\nexport function getBusinessObject(element) {\n return (element && element.businessObject) || element;\n}\n\nexport function isAny(element, types) {\n return some(types, function (t) {\n return is(element, t);\n });\n}\n\nexport function reworkGroupElements(parent, shape) {\n parent.children.slice().forEach((innerShape) => {\n if (innerShape.id !== shape.id) {\n if (innerShape.x >= shape.x && innerShape.x <= shape.x + shape.width) {\n if (innerShape.y >= shape.y && innerShape.y <= shape.y + shape.height) {\n innerShape.parent = shape;\n if (!shape.children.includes(innerShape)) {\n shape.children.push(innerShape);\n }\n }\n }\n }\n });\n}\n\nexport function undoGroupRework(parent, shape) {\n const superParent = parent.parent;\n\n parent.children.remove(shape);\n superParent.children.add(shape);\n\n shape.parent = superParent;\n\n const svgShape = document.querySelector(\n \"[data-element-id=\" + shape.id + \"]\",\n ).parentElement;\n const svgGroup = svgShape.parentElement;\n const svgGroupParent = svgGroup.parentElement.parentElement;\n svgGroup.removeChild(svgShape);\n svgGroupParent.appendChild(svgShape);\n}\n","import {\n SVG_LINK,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n TEXTSPAN_TITLE_HEIGHT,\n X_OFFSET_UTIL,\n} from \"../../Domain/Export/exportConstants\";\n\nlet extraHeight = 0;\n\n// Has to be js File so we can access te correct non-standard HTML-Properties without excessive usage of ts-ignore\nexport function createTitleAndDescriptionSVGElement(\n title,\n description,\n xLeft,\n yUp,\n width,\n) {\n title = title.replace(\"<\", \"\").replace(\">\", \"\");\n\n let titleElement = createTitle(title, width);\n let descriptionElement = createDescription(description, width);\n\n // to display the title and description in the SVG-file, we need to add a container for our text-elements\n let insertText =\n '' +\n titleElement +\n descriptionElement +\n \"\";\n return { insertText, extraHeight };\n}\n\nfunction createTitle(text, width) {\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"30px Arial\";\n\n return createTextSpans(text, width, ctx, 10, TEXTSPAN_TITLE_HEIGHT, 30);\n}\n\nfunction createDescription(text, width) {\n let description = \"\";\n let descriptionParts = text.split(\"
\");\n\n let tempCanvas = document.createElement(\"canvas\");\n let ctx = tempCanvas.getContext(\"2d\");\n ctx.font = \"12px Arial\";\n\n for (let i = 0; i < descriptionParts.length; i++) {\n description += createTextSpans(\n descriptionParts[i],\n width,\n ctx,\n 0,\n TEXTSPAN_DESCRIPTION_HEIGHT,\n 12,\n );\n }\n return description;\n}\n\nfunction createTextSpans(text, width, ctx, yOffset, heightOffset, fontSize) {\n let textSpans = \"\";\n let words = text.split(\" \");\n\n let textTag =\n '';\n\n let textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n let textNode = document.createTextNode(words[0]);\n\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + extraHeight);\n textSpan.setAttribute(\"font-size\", fontSize);\n textSpan.appendChild(textNode);\n\n for (let j = 1; j < words.length; j++) {\n if (textSpan.firstChild && textSpan.firstChild.data) {\n let len = textSpan.firstChild.data.length;\n textNode.data += \" \" + words[j];\n\n if (ctx.measureText(textNode.data).width > width - 16) {\n extraHeight += heightOffset;\n textSpan.firstChild.data = textSpan.firstChild.data.slice(0, len); // remove overflow word\n\n textSpans += textTag + textSpan.outerHTML + \"\"; // append line\n\n // create new textspan for line break\n textSpan = document.createElementNS(SVG_LINK, \"tspan\");\n textNode = document.createTextNode(words[j]);\n textSpan.setAttribute(\"x\", X_OFFSET_UTIL);\n textSpan.setAttribute(\"y\", yOffset + extraHeight);\n textSpan.appendChild(textNode);\n }\n }\n }\n extraHeight += heightOffset;\n\n textSpans += textTag + textSpan.outerHTML + \"\";\n return textSpans;\n}\n","import { elementTypes } from './elementTypes';\n\nexport interface BusinessObject {\n $descriptor: any;\n $type: any;\n di: any;\n get: any;\n set: any;\n\n id: string;\n name: string;\n\n type: string;\n\n x: number;\n y: number;\n height: number | undefined;\n width: number | undefined;\n pickedColor: string | undefined;\n}\n\nexport const testBusinessObject: BusinessObject = {\n $descriptor: undefined,\n $type: undefined,\n di: undefined,\n get: undefined,\n set: undefined,\n\n id: 'test',\n name: 'test',\n\n type: elementTypes.WORKOBJECT,\n\n x: 0,\n y: 0,\n height: 38,\n width: 38,\n pickedColor: undefined,\n};\n","export class Configuration {\n actors: string[];\n workObjects: string[];\n\n constructor(actors: string[], workObjects: string[]) {\n this.actors = actors;\n this.workObjects = workObjects;\n }\n}\n","/** DEFAULT VALUES **/\nexport const INITIAL_TITLE = '< title >';\nexport const INITIAL_DESCRIPTION = '';\nexport const INITIAL_ICON_SET_NAME = 'default';\n\n/** LocalStorageTags **/\nexport const APPENDED_ICONS_TAG = 'appendedIcons';\n// String value of tag should not be renamed, because existing configurations would not load\nexport const ICON_SET_CONFIGURATION_TAG = 'domainConfigurationTag';\n\n/** AUTOSAVE DEFAULTS **/\nexport const DEFAULT_AUTOSAVES_ENABLED = true;\nexport const DEFAULT_AUTOSAVES_MAX_DRAFTS = 5;\nexport const DEFAULT_AUTOSAVES_INTERVAL = 30;\n\n/** SNACKBAR **/\nexport const SNACKBAR_DURATION = 2000;\nexport const SNACKBAR_SUCCESS = 'snackbar_success';\nexport const SNACKBAR_ERROR = 'snackbar_error';\nexport const SNACKBAR_INFO = 'snackbar_info';\n\n/** BPMN_RELEVANT_CONSTANTS **/\nexport const IMPLICIT_ROOT_ID = '__implicitroot';\n","export class Dictionary {\n private entries: Entry[];\n\n constructor() {\n this.entries = [];\n }\n\n get length(): number {\n return this.entries.length;\n }\n\n all(): Entry[] {\n return this.entries;\n }\n\n size(): number {\n return this.entries.length;\n }\n\n isEmpty(): boolean {\n return this.entries.length <= 0;\n }\n\n has(key: string): boolean {\n return this.entries.some((entry) => entry.key === key);\n }\n\n set(key: string, value: any): void {\n if (!this.has(key)) {\n this.entries.push(new Entry(value, key));\n }\n }\n\n add(value: any, key: string): void {\n this.set(key, value);\n }\n\n putEntry(entry: Entry): void {\n if (!this.has(entry.key)) {\n this.entries.push(new Entry(entry.value, entry.key));\n }\n }\n\n keysArray(): string[] {\n return this.entries.map((entry) => entry.key);\n }\n\n addEach(object: any): void {\n Object.keys(object).forEach((key) => {\n this.set(key, object[key]);\n });\n }\n\n appendDict(dict: Dictionary): void {\n dict.entries.forEach((entry) => this.putEntry(entry));\n }\n\n clear(): void {\n this.entries = [];\n }\n\n delete(key: string): void {\n this.entries = this.entries.filter((entry) => entry.key !== key);\n }\n\n get(key: string): any {\n const found = this.entries.filter((entry) => entry.key === key);\n return found[0] ? found[0].value : null;\n }\n\n sort(fn: (a: Entry, b: Entry) => number) {\n this.entries.sort(fn);\n }\n\n sortByName() {\n this.entries.sort((a: Entry, b: Entry) => {\n if (a.key.includes('_custom') == b.key.includes('_custom')) {\n if (a.key < b.key) return -1;\n else {\n return 1;\n }\n } else {\n if (a.key.includes('_custom')) {\n return -1;\n } else {\n return 1;\n }\n }\n });\n }\n}\n\nexport class Entry {\n value: any;\n key: string;\n\n constructor(value: any, key: string) {\n this.value = value;\n this.key = key;\n }\n}\n","export enum elementTypes {\n ACTIVITY = 'domainStory:activity',\n CONNECTION = 'domainStory:connection',\n ACTOR = 'domainStory:actor',\n WORKOBJECT = 'domainStory:workObject',\n GROUP = 'domainStory:group',\n TEXTANNOTATION = 'domainStory:textAnnotation',\n DOMAINSTORY = 'domainStory:',\n}\n","import { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { overrideAppendedIcons } from 'src/app/Domain/Icon-Set-Configuration/allIcons';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { INITIAL_ICON_SET_NAME } from './constants';\n\nexport class IconConfiguration {\n domainName = INITIAL_ICON_SET_NAME;\n\n private allIconDictionary: Dictionary;\n\n constructor(allIconDictionary: Dictionary) {\n this.allIconDictionary = allIconDictionary;\n }\n\n /**\n * Select the Iconset which you want to use\n */\n getDefaultConf(): Configuration {\n return defaultConf;\n }\n\n updateAllIconRegistry(allIconDictionary: Dictionary): void {\n this.allIconDictionary = allIconDictionary;\n }\n\n appendSRCFile(\n actors: string[],\n actorsDict: Dictionary,\n workObjects: string[],\n workObjectsDict: Dictionary,\n ): void {\n const newAppendedIcons: { [key: string]: any } = {};\n\n actors.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = actorsDict.get(name);\n }\n });\n\n workObjects.forEach((name: string) => {\n if (!this.allIconDictionary.has(name)) {\n newAppendedIcons[name] = workObjectsDict.get(name);\n }\n });\n const appen = new Dictionary();\n Object.keys(newAppendedIcons).forEach((key) => {\n appen.set(key, newAppendedIcons[key]);\n });\n\n overrideAppendedIcons(appen);\n }\n\n createCustomConf(iconSetConfiguration: IconSetConfiguration): Configuration {\n this.domainName = iconSetConfiguration.name;\n\n let actors = iconSetConfiguration.actors;\n let workObjects = iconSetConfiguration.workObjects;\n\n this.appendSRCFile(\n actors.keysArray(),\n actors,\n workObjects.keysArray(),\n workObjects,\n );\n\n return new Configuration(actors.keysArray(), workObjects.keysArray());\n }\n}\n\n/* eslint no-unused-vars: 0*/\n\n/**\n * All Icons as one Set\n * There are more Icons than fit in the palette.\n * This is just for reference\n */\nconst allIconsConf = {\n actors: ['Person', 'Group', 'System', 'Pet'],\n workObjects: [\n 'Place',\n 'Flag',\n 'World',\n 'Water',\n 'Store',\n 'Theater',\n 'Business',\n 'Meeting-room',\n 'Hotel',\n 'Dining',\n 'Courthouse',\n 'Gas-station',\n 'Car',\n 'Bus',\n 'Train',\n 'Truck',\n 'Taxi',\n 'Bike',\n 'Boat',\n 'Motorcycle',\n 'Plane',\n 'Flight-takeoff',\n 'Flight-landing',\n 'Shuttle',\n 'Walking',\n 'Traffic',\n 'Commute',\n 'Document',\n 'Folder',\n 'Call',\n 'Email',\n 'Copyright',\n 'Briefcase',\n 'Attach',\n 'Ruler',\n 'Sum',\n 'Conversation',\n 'Update',\n 'Cellphone',\n 'Speaker-phone',\n 'Signal',\n 'Key',\n 'Pencil',\n 'How-To-Reg',\n 'Settings',\n 'Grid',\n 'Label',\n 'Receipt',\n 'Calendar',\n 'Wrench',\n 'Headset',\n 'Keyboard',\n 'Mouse',\n 'Microphone',\n 'Router',\n 'Scanner',\n 'Printer',\n 'DNS',\n 'Security',\n 'Cloud',\n 'Desktop',\n 'Tablet',\n 'Assessment',\n 'Dashboard',\n 'Pie-chart',\n 'View-List',\n 'Euro',\n 'Dollar',\n 'Info',\n 'Alarm',\n 'Problem',\n 'Circle-Arrows',\n 'Picture-as-PDF',\n 'Credit-Card',\n 'Shopping',\n 'Favorite',\n 'Gavel',\n 'Blind',\n 'Hourglass',\n 'Time',\n 'Search',\n 'Thumb-up',\n 'Thumb-down',\n 'Thumb-up-down',\n 'Couch',\n 'Education',\n 'Watch',\n ],\n};\n\n/**\n * Default Iconset\n */\nexport const defaultConf = {\n actors: ['Person', 'Group', 'System'],\n workObjects: ['Document', 'Folder', 'Call', 'Email', 'Conversation', 'Info'],\n};\n","import { INITIAL_ICON_SET_NAME } from './constants';\nimport { testBusinessObject } from './businessObject';\nimport { elementTypes } from './elementTypes';\nimport { Dictionary } from './dictionary/dictionary';\n\nexport interface IconSetConfiguration {\n name: string;\n actors: Dictionary;\n workObjects: Dictionary;\n}\n\nexport interface IconSetConfigurationForExport {\n name: string;\n actors: any;\n workObjects: any;\n}\n\nexport interface CustomIconSetConfiguration {\n name: string;\n actors: string[];\n workObjects: string[];\n}\nconst actor = structuredClone(testBusinessObject);\nactor.type = elementTypes.ACTOR;\n\nexport const testCustomIconSetConfiguration: CustomIconSetConfiguration = {\n name: INITIAL_ICON_SET_NAME,\n actors: ['Person'],\n workObjects: ['Document'],\n};\n\nexport function fromConfigurationFromFile(configFromFile: {\n name: string;\n actors: { [p: string]: any };\n workObjects: { [p: string]: any };\n}) {\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n Object.keys(configFromFile.actors).forEach((key) => {\n actorsDict.add(configFromFile.actors[key], key);\n });\n Object.keys(configFromFile.workObjects).forEach((key) => {\n workObjectsDict.add(configFromFile.workObjects[key], key);\n });\n\n return {\n name: configFromFile.name,\n actors: actorsDict,\n workObjects: workObjectsDict,\n };\n}\n","import { ActivityCanvasObject } from '../Common/activityCanvasObject';\n\nexport class ActivityDialogData {\n activity: ActivityCanvasObject;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n\n saveFN: any;\n\n constructor(\n activity: ActivityCanvasObject,\n numberIsAllowedMultipleTimes: boolean,\n showNumberFields: boolean,\n saveFN: any,\n ) {\n this.activity = activity;\n this.numberIsAllowedMultipleTimes = numberIsAllowedMultipleTimes;\n this.showNumberFields = showNumberFields;\n this.saveFN = saveFN;\n }\n}\n","export class ExportDialogData {\n title: string;\n options: ExportOption[];\n\n constructor(title: string, options: ExportOption[]) {\n this.title = title;\n this.options = options;\n }\n}\n\nexport class ExportOption {\n text: string;\n fn: any;\n tooltip: string;\n\n constructor(text: string, tooltip: string, fn: any) {\n this.text = text;\n this.tooltip = tooltip;\n this.fn = fn;\n }\n}\n","export class InfoDialogData {\n title: string;\n infoText: string;\n isInfo: boolean;\n isLink: boolean;\n linkText: string | undefined;\n\n constructor(\n title: string,\n infoText: string,\n isInfo: boolean,\n isLink: boolean = false,\n linkText?: string,\n ) {\n this.title = title;\n this.infoText = infoText;\n this.isInfo = isInfo;\n this.isLink = isLink;\n this.linkText = linkText;\n }\n}\n","export const NUMBER_BACKGROUND_COLOR = 'white';\nexport const NUMBER_COLOR = 'black';\nexport const STROKE_WIDTH = '1.5';\n\nexport const HIGHLIGHT_NUMBER_BACKGROUNG_COLOR = '#43acbf';\nexport const HIGHLIGHT_NUMBER_COLOR = 'black';\nexport const HIGHLIGHT_COLOR = 'black';\nexport const HIGHLIGHT_STROKE_WIDTH = '4';\n","export class ConfigAndDST {\n domain: any;\n dst: any;\n\n constructor(domain: any, dst: any) {\n this.domain = domain;\n this.dst = dst;\n }\n}\n\nexport const testConfigAndDst: ConfigAndDST = {\n domain: JSON.parse(\n '{\"name\":\"\",' +\n '\"actors\":{\"Person\":\"' +\n '' +\n '\",' +\n '\"Group\":\"' +\n '' +\n '\",' +\n '\"System\":\"' +\n '\"},' +\n '\"workObjects\":{\"Document\":\"' +\n '\",' +\n '\"Folder\":\"' +\n '' +\n '\",' +\n '\"Call\":\"' +\n '\",' +\n '\"Email\":\"' +\n '\",' +\n '\"Conversation\":\"' +\n '\",' +\n '\"Info\":\"' +\n '' +\n '\"}}',\n ),\n dst:\n '[' +\n '{\"type\":\"domainStory:workObjectDocument\",\"name\":\"\",\"id\":\"shape_3792\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":302,\"y\":102},' +\n '{\"type\":\"domainStory:actorPerson\",\"name\":\"\",\"id\":\"shape_4666\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"x\":103,\"y\":93},' +\n '{\"type\":\"domainStory:activity\",\"name\":\"\",\"id\":\"connection_4884\",\"$type\":\"Element\",\"di\":{},\"$descriptor\":{},\"pickedColor\":\"black\",\"number\":1,' +\n '\"waypoints\":[{\"original\":{\"x\":141,\"y\":131},\"x\":186,\"y\":133},{\"original\":{\"x\":340,\"y\":140},\"x\":302,\"y\":138}],' +\n '\"source\":\"shape_4666\",\"target\":\"shape_3792\"}]',\n};\n","export const SVG_LINK = 'http://www.w3.org/2000/svg';\nexport const X_OFFSET_UTIL = '8';\nexport const TEXTSPAN_TITLE_HEIGHT = 30;\nexport const TEXTSPAN_DESCRIPTION_HEIGHT = 15;\n","import { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\n\nexport let appendedIcons = new Dictionary();\nexport const allIcons = {\n Person:\n '',\n Group:\n '',\n Pet: '',\n Conversation:\n '',\n World:\n '',\n Store:\n '',\n Theater:\n '',\n Business:\n '',\n Water:\n '',\n Hotel:\n '',\n Dining:\n '',\n 'Gas-station':\n '',\n 'Meeting-room':\n '',\n Courthouse:\n '',\n Flag: '',\n Place:\n '',\n Car: '',\n Bus: '',\n Train:\n '',\n Truck:\n '',\n Taxi: '',\n Bike: '',\n Boat: '',\n Motorcycle:\n '',\n Plane:\n '',\n 'Flight-takeoff':\n '',\n 'Flight-landing':\n '',\n Shuttle:\n '',\n Walking:\n '',\n Traffic:\n '',\n Commute:\n '',\n System:\n '',\n Printer:\n '',\n Document:\n '',\n Folder:\n '',\n Call: '',\n Email:\n '',\n Copyright:\n '',\n DNS: '',\n Settings:\n '',\n Cellphone:\n '',\n Update:\n '',\n Briefcase:\n '',\n Microphone:\n '',\n Signal:\n '',\n Key: '',\n Pencil:\n '',\n Sum: '',\n Headset:\n '',\n Keyboard:\n '',\n Mouse:\n '',\n Router:\n '',\n Scanner:\n '',\n Security:\n '',\n Desktop:\n '',\n 'Speaker-phone':\n '',\n Tablet:\n '',\n Label:\n '',\n Receipt:\n '',\n Calendar:\n '',\n Cloud:\n '',\n Assessment:\n '',\n Dashboard:\n '',\n 'Pie-chart':\n '',\n Problem:\n '',\n 'Picture-as-PDF':\n '',\n Grid: '',\n Watch:\n '',\n Euro: '',\n Dollar:\n '',\n Info: '',\n Alarm:\n '',\n Wrench:\n '',\n 'Circle-Arrows':\n '',\n 'Credit-Card':\n '',\n Favorite:\n '',\n Gavel:\n '',\n Blind:\n '',\n Hourglass:\n '',\n Time: '',\n Search:\n '',\n Shopping:\n '',\n 'Thumb-up':\n '',\n 'Thumb-down':\n '',\n 'Thumb-up-down':\n '',\n Couch:\n '',\n Attach:\n '',\n Ruler:\n '',\n Education:\n '',\n 'How-To-Reg':\n '',\n 'View-List':\n '',\n};\n\nexport function getAllStandardIconKeys(): string[] {\n const allIconsDict = new Dictionary();\n\n allIconsDict.addEach(allIcons);\n\n return allIconsDict.keysArray();\n}\n\nexport function overrideAppendedIcons(newIcons: Dictionary): void {\n appendedIcons = newIcons;\n}\n","export enum IconFilterEnum {\n ICON_FILTER_ACTOR = 'ICON_FILTER_ACTOR',\n ICON_FILTER_WORKOBJECT = 'ICON_FILTER_WORKOBJECT',\n ICON_FILTER_UNASSIGNED = 'ICON_FILTER_UNASSIGNED',\n ICON_FILTER_NONE = 'ICON_FILTER_NONE',\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AutosaveSettingsComponent } from '../Presentation/Autosave/AutosaveSettings/autosave-settings.component';\nimport { AutosaveOptionsComponent } from '../Presentation/Autosave/AutosaveOptions/autosave-options.component';\nimport { AutosavedDraftsComponent } from '../Presentation/Autosave/AutosavedDrafts/autosaved-drafts.component';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n declarations: [\n AutosaveSettingsComponent,\n AutosaveOptionsComponent,\n AutosavedDraftsComponent,\n ],\n exports: [AutosaveSettingsComponent],\n imports: [CommonModule, FormsModule, MaterialModule],\n})\nexport class AutosaveSettingsModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HeaderButtonsComponent } from '../Presentation/Header/header-buttons.component';\n\n@NgModule({\n declarations: [HeaderButtonsComponent],\n exports: [HeaderButtonsComponent],\n imports: [CommonModule],\n})\nexport class DomainStoryModelerModuleModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IconSetConfigurationComponent } from 'src/app/Presentation/DomainConfiguration/icon-set-configuration.component';\nimport { IconListItemComponent } from '../Presentation/DomainConfiguration/icon-list-item/icon-list-item.component';\nimport { DetailsListItemComponent } from '../Presentation/DomainConfiguration/details-list-item/details-list-item.component';\nimport { IconSetDetailsComponent } from '../Presentation/DomainConfiguration/icon-set-details/icon-set-details.component';\nimport { GeneralSettingsComponent } from '../Presentation/Settings/General/general-settings.component';\nimport { LabelDictionaryComponent } from '../Presentation/LabelDictionary/label-dictionary.component';\nimport { FormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\nimport { AutosaveSettingsModule } from './autosave-settings.module';\n\n@NgModule({\n declarations: [\n IconSetConfigurationComponent,\n GeneralSettingsComponent,\n LabelDictionaryComponent,\n IconListItemComponent,\n DetailsListItemComponent,\n IconSetDetailsComponent,\n ],\n exports: [\n GeneralSettingsComponent,\n IconSetConfigurationComponent,\n LabelDictionaryComponent,\n ],\n imports: [AutosaveSettingsModule, CommonModule, FormsModule, MaterialModule],\n})\nexport class SettingsModule {}\n","import { Component } from '@angular/core';\nimport { AutosaveConfigurationService } from '../../../Service/Autosave/autosave-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_ERROR,\n SNACKBAR_SUCCESS,\n} from 'src/app/Domain/Common/constants';\n\n@Component({\n selector: 'app-autosave-options',\n templateUrl: './autosave-options.component.html',\n styleUrls: ['./autosave-options.component.scss'],\n})\nexport class AutosaveOptionsComponent {\n constructor(\n protected autosaveConfiguration: AutosaveConfigurationService,\n private snackbar: MatSnackBar,\n ) {}\n\n save(activated: boolean, maxDrafts: number, interval: number) {\n if (\n this.autosaveConfiguration.setConfiguration({\n activated,\n maxDrafts,\n interval,\n })\n ) {\n this.snackbar.open('Settings for Autosave saved', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n } else {\n this.snackbar.open(\n 'Unable to save settings for Autosave - please try again',\n undefined,\n {\n duration: 2 * SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n },\n );\n }\n }\n}\n","\n \n Autosave Options\n \n \n
\n \n Enabled\n
\n
\n Interval [sec]\n \n
\n
\n Max. Drafts\n \n
\n \n Apply\n \n
\n
\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-autosave-settings',\n templateUrl: './autosave-settings.component.html',\n styleUrls: ['./autosave-settings.component.scss'],\n})\nexport class AutosaveSettingsComponent {}\n","\n\n","import { Component, OnInit } from '@angular/core';\nimport { AutosaveService } from '../../../Service/Autosave/autosave.service';\nimport { Draft } from '../../../Domain/Autosave/draft';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_SUCCESS,\n} from 'src/app/Domain/Common/constants';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'app-autosaved-drafts',\n templateUrl: './autosaved-drafts.component.html',\n styleUrls: ['./autosaved-drafts.component.scss'],\n})\nexport class AutosavedDraftsComponent implements OnInit {\n drafts: Draft[] = [];\n subscription: Subscription;\n\n constructor(\n private autosaveService: AutosaveService,\n private snackbar: MatSnackBar,\n ) {\n this.subscription = this.autosaveService.autosavedDraftsChanged$.subscribe(\n () => this.initDrafts(),\n );\n }\n\n ngOnInit(): void {\n this.initDrafts();\n }\n\n initDrafts() {\n this.drafts = this.autosaveService.loadCurrentDrafts();\n }\n\n loadDraft(draft: Draft): void {\n this.autosaveService.loadDraft(draft);\n this.snackbar.open('Draft loaded', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n });\n }\n\n removeAllDrafts() {\n this.autosaveService.removeAllDrafts();\n }\n}\n","\n \n \n History\n \n {{ drafts.length ? drafts.length : \"no\" }}\n {{ drafts.length > 1 ? \"drafts\" : \"draft\" }} available\n \n \n
\n
\n
\n
{{ draft.title }}
\n
{{ draft.date }}
\n
\n \n Load Draft\n \n
\n
\n
\n \n Remove All Drafts\n \n
\n
\n
\n
\n\nNo drafts found.\n","import { Component, OnInit } from '@angular/core';\nimport { ModelerService } from '../../Service/Modeler/modeler.service';\nimport { AutosaveService } from '../../Service/Autosave/autosave.service';\n\n@Component({\n selector: 'app-modeler',\n templateUrl: './modeler.component.html',\n styleUrls: ['./modeler.component.scss'],\n})\nexport class ModelerComponent implements OnInit {\n constructor(\n private modelerService: ModelerService,\n private autosaveService: AutosaveService,\n ) {}\n\n ngOnInit(): void {\n this.modelerService.postInit();\n this.autosaveService.loadLatestDraft();\n }\n}\n","
\n","import { AfterViewInit, Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\nimport { ActivityDialogData } from 'src/app/Domain/Dialog/activityDialogData';\nimport { ActivityCanvasObject } from '../../../Domain/Common/activityCanvasObject';\n\n@Component({\n selector: 'app-activity-dialog',\n templateUrl: './activity-dialog.component.html',\n styleUrls: ['./activity-dialog.component.scss'],\n})\nexport class ActivityDialogComponent {\n form: UntypedFormGroup;\n activityLabel: string;\n activityNumber: number | undefined;\n numberIsAllowedMultipleTimes: boolean;\n showNumberFields: boolean;\n activity: ActivityCanvasObject;\n\n saveFN: any;\n\n constructor(\n private fb: UntypedFormBuilder,\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ActivityDialogData,\n ) {\n this.activity = data.activity;\n this.activityLabel = data.activity.businessObject.name;\n this.numberIsAllowedMultipleTimes = data.numberIsAllowedMultipleTimes;\n this.activityNumber = data.activity.businessObject.number;\n this.showNumberFields = data.showNumberFields;\n\n this.saveFN = data.saveFN;\n\n this.form = this.fb.group({\n activityLabel: [this.activityLabel, []],\n activityNumber: [this.activityNumber, []],\n multipleNumbers: [this.numberIsAllowedMultipleTimes, []],\n });\n }\n\n onSubmit(): void {\n this.numberIsAllowedMultipleTimes = !this.numberIsAllowedMultipleTimes;\n this.form.patchValue({\n multipleNumbers: this.numberIsAllowedMultipleTimes,\n });\n }\n\n save(): void {\n this.saveFN({\n activity: this.activity,\n ...this.form.value,\n });\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n

Edit Activity

\n
\n
\n \n Number\n \n \n \n multiple\n
\n \n Label\n \n \n
\n
\n\n\n \n \n\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { ExportDialogData } from 'src/app/Domain/Dialog/exportDialogData';\nimport { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';\n\n@Component({\n selector: 'app-export-dialog',\n templateUrl: './export-dialog.component.html',\n styleUrls: ['./export-dialog.component.scss'],\n})\nexport class ExportDialogComponent implements OnInit {\n title: string;\n options: {\n text: string;\n tooltip: string;\n fn: any;\n }[];\n withTitle: BehaviorSubject;\n useWhiteBackground: BehaviorSubject;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: ExportDialogData,\n ) {\n this.withTitle = new BehaviorSubject(true);\n this.useWhiteBackground = new BehaviorSubject(true);\n this.title = data.title;\n this.options = data.options;\n }\n\n ngOnInit(): void {}\n\n doOption(i: number): void {\n this.options[i].fn(this.withTitle.value, this.useWhiteBackground.value);\n this.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n updateWithTitle($event: Event) {\n // @ts-ignore\n this.withTitle.next($event.target.checked);\n }\n\n updateUseWhiteBackground($event: Event) {\n // @ts-ignore\n this.useWhiteBackground.next($event.target.checked);\n }\n}\n","\n

{{ title }}

\n \n
\n \n
\n\n
\n\n
\n \n \n {{ option.text }}\n \n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';\nimport { TitleService } from 'src/app/Service/Title/title.service';\n\n@Component({\n selector: 'app-header-dialog',\n templateUrl: './header-dialog.component.html',\n styleUrls: ['./header-dialog.component.scss'],\n})\nexport class HeaderDialogComponent implements OnInit {\n form: UntypedFormGroup;\n title: string;\n description: string;\n\n constructor(\n private fb: UntypedFormBuilder,\n private dialogRef: MatDialogRef,\n private titleService: TitleService,\n ) {\n this.title =\n this.titleService.getTitle() === '< name of this Domain Story >'\n ? ''\n : this.titleService.getTitle();\n this.description = this.titleService.getDescription();\n\n this.form = this.fb.group({\n title: [this.title, []],\n description: [this.description, []],\n });\n }\n\n ngOnInit(): void {}\n\n save(): void {\n this.titleService.updateTitleAndDescription(\n this.form.get('title')?.value,\n this.form.get('description')?.value,\n true,\n );\n this.dialogRef.close();\n }\n\n close(): void {\n this.dialogRef.close();\n }\n\n preventDefault(event: Event) {\n event.preventDefault();\n }\n}\n","\n
\n \n Title\n \n \n
\n \n Description\n \n \n
\n
\n\n\n \n \n\n","import { AfterViewInit, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { InfoDialogData } from 'src/app/Domain/Dialog/infoDialogData';\n\n@Component({\n selector: 'app-info-dialog',\n templateUrl: './info-dialog.component.html',\n styleUrls: ['./info-dialog.component.scss'],\n})\nexport class InfoDialogComponent implements AfterViewInit {\n title: string;\n infoText: string;\n showConfirmButton: boolean;\n hasLink: boolean;\n linkText: string;\n\n constructor(\n private dialogRef: MatDialogRef,\n @Inject(MAT_DIALOG_DATA) data: InfoDialogData,\n ) {\n this.title = data.title;\n this.infoText = data.infoText;\n this.showConfirmButton = !data.isInfo;\n this.hasLink = data.isLink;\n this.linkText = data.linkText || '';\n }\n\n ngAfterViewInit() {\n const span = document.getElementsByClassName(\n 'readOnlyText',\n )[0] as HTMLTextAreaElement;\n span.style.height = span.scrollHeight + 'px';\n }\n\n close(): void {\n this.dialogRef.close();\n }\n}\n","\n

{{ title }}

\n {{ infoText }} \n {{ linkText }}\n
\n\n\n \n\n","import { Component } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\n\n@Component({\n selector: 'app-label-dictionary-dialog',\n templateUrl: './label-dictionary-dialog.component.html',\n styleUrls: ['./label-dictionary-dialog.component.scss'],\n})\nexport class LabelDictionaryDialogComponent {\n constructor(\n private dialogRef: MatDialogRef,\n ) {}\n\n close(): void {\n this.dialogRef.close();\n }\n}\n","\n

Label Dictionary

\n \n
\n","import { AfterViewChecked, Component, Input } from '@angular/core';\nimport { IconListItem } from '../../../Domain/Icon-Set-Configuration/iconListItem';\n\n@Component({\n selector: 'app-details-list-item',\n templateUrl: './details-list-item.component.html',\n styleUrls: ['./details-list-item.component.scss'],\n})\nexport class DetailsListItemComponent implements AfterViewChecked {\n @Input()\n icon!: IconListItem;\n\n private iconInitiated = false;\n\n get id(): string {\n return (\n 'domain-configuration-details-icon-' +\n this.icon.name.toLowerCase() +\n '-' +\n (this.icon.isWorkObject ? 'workobject' : 'actor')\n );\n }\n\n get name(): string {\n return this.icon.name;\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon.svg;\n this.iconInitiated = true;\n }\n }\n}\n","
\n \"{{\n {{ icon.name }}\n
\n","import { AfterViewChecked, Component, Input, OnInit } from '@angular/core';\nimport { IconListItem } from '../../../Domain/Icon-Set-Configuration/iconListItem';\nimport { BehaviorSubject } from 'rxjs';\nimport { IconSetCustomizationService } from '../../../Service/IconSetConfiguration/icon-set-customization.service';\n\n@Component({\n selector: 'app-icon-list-item',\n templateUrl: './icon-list-item.component.html',\n styleUrls: ['./icon-list-item.component.scss'],\n})\nexport class IconListItemComponent implements OnInit, AfterViewChecked {\n @Input()\n iconName: string = '';\n\n private iconInitiated = false;\n\n // @ts-ignore\n icon = new BehaviorSubject({});\n\n isActor: boolean = false;\n isWorkobject: boolean = false;\n isNone: boolean = true;\n\n get name(): string {\n return this.iconName;\n }\n\n get id() {\n return 'domain-configuration-icon-' + this.iconName;\n }\n\n constructor(\n private iconSetCustomizationService: IconSetCustomizationService,\n ) {}\n\n ngOnInit(): void {\n this.icon = this.iconSetCustomizationService.getIconForName(this.iconName);\n if (!this.icon) {\n return;\n }\n\n this.icon.subscribe((value) => {\n this.isActor = value.isActor;\n this.isWorkobject = value.isWorkObject;\n this.isNone = !(value.isActor || value.isWorkObject);\n });\n this.isActor = this.icon.value.isActor;\n this.isWorkobject = this.icon.value.isWorkObject;\n this.isNone = !(this.icon.value.isActor || this.icon.value.isWorkObject);\n }\n\n ngAfterViewChecked(): void {\n this.createIcon();\n }\n\n private createIcon(): void {\n const img = document.getElementById(this.id) as HTMLImageElement;\n if (img && !this.iconInitiated) {\n img.src = '' + this.icon.value?.svg;\n this.iconInitiated = true;\n }\n }\n\n toggleNone() {\n this.iconSetCustomizationService.setAsUnassigned(\n this.iconName,\n this.icon.value.isActor,\n );\n }\n\n toggleActor(): void {\n this.iconSetCustomizationService.setAsActor(true, this.iconName);\n }\n\n toggleWorkobject(): void {\n this.iconSetCustomizationService.setAsWorkobject(true, this.iconName);\n }\n}\n","
\n
\n \"{{\n
{{ name }}
\n
\n
\n \n \n None\n \n \n Actor\n \n \n Workobject\n \n \n
\n
\n","import { Component, OnInit } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport {\n CustomIconSetConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/iconSetConfiguration';\nimport { IconSetConfigurationService } from 'src/app/Service/IconSetConfiguration/icon-set-configuration.service';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/icon-dictionary.service';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { sanitizeIconName } from 'src/app/Utils/sanitizer';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { IconFilterEnum } from '../../Domain/Icon-Set-Configuration/iconFilterEnum';\nimport { IconSetCustomizationService } from '../../Service/IconSetConfiguration/icon-set-customization.service';\n\n@Component({\n selector: 'app-icon-set-configuration',\n templateUrl: './icon-set-configuration.component.html',\n styleUrls: ['./icon-set-configuration.component.scss'],\n})\nexport class IconSetConfigurationComponent implements OnInit {\n private iconSetConfigurationTypes: CustomIconSetConfiguration;\n\n filter = new BehaviorSubject(IconFilterEnum.ICON_FILTER_NONE);\n\n selectedActors = new BehaviorSubject([]);\n selectedWorkobjects = new BehaviorSubject([]);\n\n allIcons: BehaviorSubject;\n allIconNames = new BehaviorSubject([]);\n allFilteredIconNames = new BehaviorSubject([]);\n\n constructor(\n private configurationService: IconSetConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private iconSetCustomizationService: IconSetCustomizationService,\n private elementRegistryService: ElementRegistryService,\n ) {\n this.iconSetConfigurationTypes =\n this.iconSetCustomizationService.getIconSetConfiguration().value;\n\n this.allIcons = new BehaviorSubject(\n this.iconDictionaryService.getFullDictionary(),\n );\n this.allIcons.subscribe((allIcons) => {\n this.allIconNames.next(allIcons.keysArray().sort(this.sortByName));\n });\n\n this.selectedActors = this.iconSetCustomizationService.selectedActors$;\n this.selectedWorkobjects =\n this.iconSetCustomizationService.selectedWorkobjects$;\n }\n\n ngOnInit(): void {\n this.filter.subscribe((type) => {\n let allFiltered = this.getFilteredNamesForType(type);\n this.allFilteredIconNames.next(allFiltered.sort(this.sortByName));\n });\n }\n\n private sortByName(a: string, b: string): number {\n if (a.includes('_custom') == b.includes('_custom')) {\n if (a < b) return -1;\n else {\n return 1;\n }\n } else {\n if (a.includes('_custom')) {\n return -1;\n } else {\n return 1;\n }\n }\n }\n\n /** Default Icon Set **/\n loadMinimalIconConfigurationWithDefaultIcons(): void {\n this.iconSetCustomizationService.resetIconSet();\n }\n\n loadInitialConfiguration(): void {\n this.iconSetCustomizationService.cancel();\n }\n\n /** Persist Icon Set **/\n saveIconSet(): void {\n this.iconSetCustomizationService.saveIconSet(\n this.elementRegistryService.getUsedIcons(),\n );\n }\n\n exportIconSet(): void {\n this.iconSetCustomizationService.exportIconSet();\n }\n\n /** Add Custom Icon **/\n startIconUpload(): void {\n document.getElementById('importIcon')?.click();\n }\n\n importIcon(): void {\n // @ts-ignore\n const files = document.getElementById('importIcon').files;\n for (let iconInputFile of files) {\n const reader = new FileReader();\n const name = sanitizeIconName(iconInputFile.name);\n const iconName = name + '_custom';\n\n reader.onloadend = (e: ProgressEvent) => {\n if (e.target) {\n const src: string = e.target.result as unknown as string;\n this.iconDictionaryService.addIMGToIconDictionary(src, iconName);\n // TODO: td: What kind of type is it here?\n this.iconDictionaryService.registerIconForBPMN(\n iconName,\n src,\n elementTypes.ACTOR,\n );\n\n this.allIcons.next(this.iconDictionaryService.getFullDictionary());\n this.filter.next(this.filter.value);\n\n this.iconSetCustomizationService.addNewIcon(iconName);\n }\n };\n reader.readAsDataURL(iconInputFile);\n }\n }\n\n /** Import Icon Set **/\n startIconSetImport(): void {\n document.getElementById('importDomain')?.click();\n }\n\n importIconSet(): void {\n // @ts-ignore\n const iconSetInputFile = document.getElementById('importDomain').files[0];\n const reader = new FileReader();\n\n reader.onloadend = (e: ProgressEvent) => {\n const configFromFile = JSON.parse(\n e.target?.result as unknown as string,\n ) as {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n const config = fromConfigurationFromFile(configFromFile);\n this.configurationService.loadConfiguration(config, false);\n\n this.iconSetCustomizationService.importConfiguration(config);\n };\n\n reader.readAsText(iconSetInputFile);\n }\n\n /** Filter **/\n filterForActors(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_ACTOR) {\n this.filter.next(IconFilterEnum.ICON_FILTER_ACTOR);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForWorkobjects(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_WORKOBJECT) {\n this.filter.next(IconFilterEnum.ICON_FILTER_WORKOBJECT);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterForUnassigned(): void {\n if (this.filter.value !== IconFilterEnum.ICON_FILTER_UNASSIGNED) {\n this.filter.next(IconFilterEnum.ICON_FILTER_UNASSIGNED);\n } else {\n this.filter.next(IconFilterEnum.ICON_FILTER_NONE);\n }\n }\n\n filterByNameAndType($event: any) {\n const filteredByNameAndType = this.getFilteredNamesForType(\n this.filter.value,\n ).filter((name) =>\n name.toLowerCase().includes($event.target.value.toLowerCase()),\n );\n this.allFilteredIconNames.next(filteredByNameAndType.sort(this.sortByName));\n }\n\n private getFilteredNamesForType(type: IconFilterEnum): string[] {\n let allFiltered: string[] = [];\n switch (type) {\n case IconFilterEnum.ICON_FILTER_NONE:\n allFiltered = this.allIconNames.value;\n break;\n case IconFilterEnum.ICON_FILTER_ACTOR:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconActor(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_WORKOBJECT:\n allFiltered = this.allIconNames.value.filter((name) =>\n this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n case IconFilterEnum.ICON_FILTER_UNASSIGNED:\n allFiltered = this.allIconNames.value.filter(\n (name) =>\n !this.iconSetCustomizationService.isIconActor(name) &&\n !this.iconSetCustomizationService.isIconWorkObject(name),\n );\n break;\n }\n return allFiltered;\n }\n}\n","
\n
\n
\n
\n
Filter by assignment:
\n \n None\n \n \n Actors\n \n \n Workobjects\n \n \n
\n
\n \n \n home \n \n \n close\n \n
\n \n
\n \n unarchive\n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n
\n\n \n
\n","import { Component, OnInit } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { IconSetCustomizationService } from 'src/app/Service/IconSetConfiguration/icon-set-customization.service';\nimport { IconListItem } from 'src/app/Domain/Icon-Set-Configuration/iconListItem';\nimport { TitleService } from 'src/app/Service/Title/title.service';\n\n@Component({\n selector: 'app-icon-set-details',\n templateUrl: './icon-set-details.component.html',\n styleUrls: ['./icon-set-details.component.scss'],\n})\nexport class IconSetDetailsComponent implements OnInit {\n iconSetName: Observable;\n\n private draggedList: string = '';\n private draggedIndex = 0;\n\n selectedActors$ = this.customizationService.selectedActors$;\n selectedWorkobjects$ = this.customizationService.selectedWorkobjects$;\n\n constructor(\n private customizationService: IconSetCustomizationService,\n titleService: TitleService,\n ) {\n this.iconSetName = titleService.iconSetName$;\n }\n\n ngOnInit(): void {}\n\n changeName(event: Event): void {\n // @ts-ignore\n this.customizationService.changeName(event.target.value);\n }\n\n getIconForName(iconName: string): IconListItem {\n return this.customizationService.getIconForName(iconName).value;\n }\n\n allowDrop($event: DragEvent, listName: string) {\n if (this.draggedList === listName) {\n $event.preventDefault();\n }\n }\n\n onDrop($event: DragEvent, iconName: string, actors: boolean, index: number) {\n let list;\n if (actors) {\n list = this.selectedActors$;\n } else {\n list = this.selectedWorkobjects$;\n }\n const sortedList = list.value;\n const item = sortedList[this.draggedIndex];\n sortedList.splice(this.draggedIndex, 1);\n sortedList.splice(index, 0, item);\n list.next(sortedList);\n\n if (actors) {\n this.customizationService.setSelectedActors(sortedList);\n } else {\n this.customizationService.setSelectedWorkObject(sortedList);\n }\n }\n\n onDragStart(index: number, draggedList: string) {\n this.draggedList = draggedList;\n this.draggedIndex = index;\n }\n}\n","
\n
\n

Icon Set Name

\n
\n \n \n \n
\n
\n
\n

Order of Actors

\n \n \n \n \n \n
\n
\n

Order of Work Objects

\n \n \n \n \n \n
\n
\n","import { Component } from '@angular/core';\nimport { SettingsService } from '../../Service/Settings/settings.service';\nimport { ModelerService } from '../../Service/Modeler/modeler.service';\nimport { Observable } from 'rxjs';\nimport { ReplayStateService } from '../../Service/Replay/replay-state.service';\nimport { DirtyFlagService } from '../../Service/DirtyFlag/dirty-flag.service';\nimport {\n ExportDialogData,\n ExportOption,\n} from '../../Domain/Dialog/exportDialogData';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { ExportDialogComponent } from '../Dialog/export-dialog/export-dialog.component';\nimport { InfoDialogData } from '../../Domain/Dialog/infoDialogData';\nimport { InfoDialogComponent } from '../Dialog/info-dialog/info-dialog.component';\nimport { DialogService } from '../../Service/Dialog/dialog.service';\nimport { ReplayService } from '../../Service/Replay/replay.service';\nimport { ExportService } from '../../Service/Export/export.service';\nimport { ImportDomainStoryService } from '../../Service/Import/import-domain-story.service';\nimport { LabelDictionaryDialogComponent } from '../Dialog/label-dictionary-dialog/label-dictionary-dialog.component';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\nimport { TitleService } from '../../Service/Title/title.service';\nimport { RendererService } from '../../Service/Renderer/renderer.service';\n\n@Component({\n selector: 'app-header-buttons',\n templateUrl: './header-buttons.component.html',\n styleUrls: ['./header-buttons.component.scss'],\n})\nexport class HeaderButtonsComponent {\n isReplay$: Observable;\n isDirty$: Observable;\n\n constructor(\n private settingsService: SettingsService,\n private modelerService: ModelerService,\n private replayStateService: ReplayStateService,\n private dirtyFlagService: DirtyFlagService,\n private dialogService: DialogService,\n protected replayService: ReplayService,\n protected exportService: ExportService,\n private importService: ImportDomainStoryService,\n private titleService: TitleService,\n private renderService: RendererService,\n private snackbar: MatSnackBar,\n ) {\n this.isReplay$ = this.replayStateService.replayOn$;\n this.isDirty$ = this.dirtyFlagService.dirty$;\n }\n import(): void {\n // @ts-ignore\n const filename = document.getElementById('import').files[0].name;\n if (filename.endsWith('.dst')) {\n this.importService.importDST(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n false,\n );\n } else if (filename.endsWith('.dst.svg')) {\n this.importService.importDST(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n true,\n );\n } else if (filename.endsWith('.egn')) {\n this.importService.importEGN(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n false,\n );\n } else if (filename.endsWith('.egn.svg')) {\n this.importService.importEGN(\n // @ts-ignore\n document.getElementById('import').files[0],\n filename,\n true,\n );\n }\n this.modelerService.commandStackChanged();\n }\n\n openSettings(): void {\n this.settingsService.open();\n }\n\n /** Open Dialogs **/\n openDownloadDialog(): void {\n if (this.exportService.isDomainStoryExportable()) {\n const SVGDownloadOption = new ExportOption(\n 'SVG',\n 'Download an SVG-Image with the Domain-Story embedded. Can be used to save and share your Domain-Story.',\n (withTitle: boolean, useWhiteBackground: boolean) =>\n this.exportService.downloadSVG(withTitle, useWhiteBackground),\n );\n const EGNDownloadOption = new ExportOption(\n 'EGN',\n 'Download an EGN-File with the Domain-Story. Can be used to save and share your Domain-Story.',\n () => this.exportService.downloadDST(),\n );\n const PNGDownloadOption = new ExportOption(\n 'PNG',\n 'Download a PNG-Image of the Domain-Story. This does not include the Domain-Story!',\n (withTitle: boolean) => this.exportService.downloadPNG(withTitle),\n );\n const HTMLDownloadOption = new ExportOption(\n 'HTML-Presentation',\n 'Download an HTML-Presentation. This does not include the Domain-Story!',\n () => this.exportService.downloadHTMLPresentation(),\n );\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n config.data = new ExportDialogData('Export', [\n SVGDownloadOption,\n EGNDownloadOption,\n PNGDownloadOption,\n HTMLDownloadOption,\n ]);\n\n this.dialogService.openDialog(ExportDialogComponent, config);\n } else {\n this.snackbar.open('No Domain Story to be exported', undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n });\n }\n }\n\n openKeyboardShortcutsDialog(): void {\n const title = 'Keyboard Shortcuts';\n const shortCutText =\n 'Undo:\\t\\t\\t\\t\\tctrl + Z \\n' +\n 'Redo:\\t\\t\\t\\t\\tctrl + Y OR ctrl + shift + Z\\n' +\n 'Select All:\\t\\t\\t\\tctrl + A\\n' +\n 'Export as EGN:\\t\\t\\tctrl + S\\n' +\n 'Import Domain Story: \\t\\tctrl + L\\n' +\n 'Search for text:\\t\\t\\tctrl + F\\n' +\n 'Direct editing:\\t\\t\\tE\\n' +\n 'Hand tool:\\t\\t\\t\\tH\\n' +\n 'Lasso tool:\\t\\t\\t\\tL\\n' +\n 'Space tool:\\t\\t\\t\\tS';\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, shortCutText, true);\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n\n openLabelDictionary(): void {\n if (this.exportService.isDomainStoryExportable()) {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n this.dialogService.openDialog(LabelDictionaryDialogComponent, config);\n } else {\n this.snackbar.open(\n 'There are currently no Elements on the canvas',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n }\n\n createNewDomainStory(): void {\n this.titleService.reset();\n this.renderService.reset();\n this.dirtyFlagService.makeClean();\n }\n\n /** Replay functions **/\n startReplay(): void {\n this.replayService.startReplay();\n }\n\n stopReplay(): void {\n this.replayService.stopReplay();\n }\n\n previousSentence(): void {\n this.replayService.previousSentence();\n }\n\n nextSentence(): void {\n this.replayService.nextSentence();\n }\n\n isExportable(): boolean {\n return (\n this.titleService.hasTitleOrDescription() ||\n this.exportService.isDomainStoryExportable()\n );\n }\n}\n","
\n \n play_arrow \n \n \n unarchive \n \n \n \n \n archive\n \n \n archive\n \n \n \n \n spellcheck\n \n \n \n \n keyboard \n \n \n note_add \n \n
\n
\n \n skip_previous \n \n \n \n
\n","import { Component } from '@angular/core';\nimport { combineLatest, map, Observable } from 'rxjs';\nimport { TitleService } from '../../Service/Title/title.service';\nimport { ReplayService } from '../../Service/Replay/replay.service';\nimport { ReplayStateService } from '../../Service/Replay/replay-state.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { HeaderDialogComponent } from '../Dialog/header-dialog/header-dialog.component';\nimport { DialogService } from '../../Service/Dialog/dialog.service';\n\n@Component({\n selector: 'app-header',\n templateUrl: './header.component.html',\n styleUrls: ['./header.component.scss'],\n})\nexport class HeaderComponent {\n title$ = this.titleService.title$;\n description$ = this.titleService.description$;\n showDescription$ = this.titleService.showDescription$;\n\n isReplay$: Observable;\n sentenceDescription$: Observable;\n showDescription: Observable;\n\n constructor(\n private titleService: TitleService,\n private replayService: ReplayService,\n private replayStateService: ReplayStateService,\n private dialogService: DialogService,\n ) {\n this.isReplay$ = this.replayStateService.replayOn$;\n\n this.sentenceDescription$ = combineLatest([\n this.replayService.currentSentence$,\n this.replayService.maxSentenceNumber$,\n ]).pipe(map(([sentence, count]) => `${sentence}/${count}`));\n\n this.showDescription = this.titleService.showDescription$;\n }\n\n openHeaderDialog(): void {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n this.dialogService.openDialog(HeaderDialogComponent, config);\n }\n\n setShowDescription(show: boolean): void {\n this.titleService.setShowDescription(show);\n }\n}\n","\n \n \n \n expand_less\n \n \n \n expand_more\n \n \n \n {{ title$ | async }}\n edit \n \n \n\n \n \n Sentence: {{ sentenceDescription$ | async }}\n\n \n\n \n \n\n\n {{ description$ | async }}\n\n","import { AfterViewInit, Component, EventEmitter, Output } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { WorkObjectLabelEntry } from '../../Domain/LabelDictionary/workObjectLabelEntry';\nimport { LabelEntry } from '../../Domain/LabelDictionary/labelEntry';\nimport { LabelDictionaryService } from '../../Service/LabelDictionary/label-dictionary.service';\n\n@Component({\n selector: 'app-label-dictionary',\n templateUrl: './label-dictionary.component.html',\n styleUrls: ['./label-dictionary.component.scss'],\n})\nexport class LabelDictionaryComponent implements AfterViewInit {\n workobjectEntriesSubject: BehaviorSubject;\n activityEntriesSubject: BehaviorSubject;\n\n workObjectEntries: WorkObjectLabelEntry[];\n activityEntries: LabelEntry[];\n\n @Output()\n closeEmitter: EventEmitter = new EventEmitter();\n\n constructor(private labelDictionaryService: LabelDictionaryService) {\n this.labelDictionaryService.createLabelDictionaries();\n this.workObjectEntries = this.labelDictionaryService.getWorkObjectLabels();\n this.activityEntries = this.labelDictionaryService.getActivityLabels();\n\n this.workobjectEntriesSubject = new BehaviorSubject(this.workObjectEntries);\n this.activityEntriesSubject = new BehaviorSubject(this.activityEntries);\n }\n\n ngAfterViewInit(): void {\n this.labelDictionaryService.createLabelDictionaries();\n this.workobjectEntriesSubject.next(\n this.labelDictionaryService.getWorkObjectLabels(),\n );\n this.activityEntriesSubject.next(\n this.labelDictionaryService.getActivityLabels(),\n );\n }\n\n save(): void {\n this.workObjectEntries = this.workobjectEntriesSubject.value;\n this.activityEntries = this.activityEntriesSubject.value;\n\n const activityNames: string[] = [];\n const originalActivityNames: string[] = [];\n\n const workObjectNames: string[] = [];\n const originalWorkObjectNames: string[] = [];\n\n this.activityEntries\n .filter((a) => a.name !== a.originalName)\n .forEach((activity) => {\n activityNames.push(activity.name);\n originalActivityNames.push(activity.originalName);\n });\n\n this.workObjectEntries\n .filter((w) => w.name !== w.originalName)\n .forEach((workobject) => {\n workObjectNames.push(workobject.name);\n originalWorkObjectNames.push(workobject.originalName);\n });\n\n this.labelDictionaryService.massRenameLabels(\n activityNames,\n originalActivityNames,\n workObjectNames,\n originalWorkObjectNames,\n );\n this.closeEmitter.emit();\n }\n\n cancel(): void {\n this.workObjectEntries.forEach((w) => {\n w.name = w.originalName;\n });\n this.activityEntries.forEach((a) => {\n a.name = a.originalName;\n });\n\n this.workobjectEntriesSubject.next(this.workObjectEntries);\n this.activityEntriesSubject.next(this.activityEntries);\n }\n\n updateActivityEntry($event: Event, activityEntry: LabelEntry) {\n let entries = this.activityEntriesSubject.value;\n entries.filter(\n (e) => e.originalName === activityEntry.originalName,\n // @ts-ignore\n )[0].name = $event.target.value;\n this.activityEntriesSubject.next(entries);\n }\n\n updateWorkobjectEntry($event: Event, workobjectEntry: LabelEntry) {\n let entries = this.workobjectEntriesSubject.value;\n entries.filter(\n (e) => e.originalName === workobjectEntry.originalName,\n // @ts-ignore\n )[0].name = $event.target.value;\n this.workobjectEntriesSubject.next(entries);\n }\n\n preventDefault(event: Event): void {\n event.preventDefault();\n }\n\n close(): void {\n this.closeEmitter.emit();\n }\n}\n","\n
\n

Workobjects

\n \n \n \n \n \n \n \n
\n
\n

Activities

\n \n \n \n \n \n \n \n
\n
\n\n \n \n\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-general-settings',\n templateUrl: './general-settings.component.html',\n styleUrls: ['./general-settings.component.scss'],\n})\nexport class GeneralSettingsComponent {}\n","
\n \n
\n","import { Component } from '@angular/core';\nimport { SettingsService } from 'src/app/Service/Settings/settings.service';\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\nimport { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { AutosaveConfigurationService } from '../../Service/Autosave/autosave-configuration.service';\nimport { IconSetCustomizationService } from '../../Service/IconSetConfiguration/icon-set-customization.service';\n\n@Component({\n selector: 'app-settings',\n templateUrl: './settings.component.html',\n styleUrls: ['./settings.component.scss'],\n})\nexport class SettingsComponent {\n iconSetConfiguration: IconSetConfiguration | undefined;\n showGeneralSettings = new BehaviorSubject(false);\n showIconSetCustomization = new BehaviorSubject(true);\n\n constructor(\n private settingsService: SettingsService,\n private modelerService: ModelerService,\n private iconSetCustomizationService: IconSetCustomizationService,\n ) {}\n\n close(): void {\n const savedConfiguration =\n this.iconSetCustomizationService.getAndClearSavedConfiguration();\n if (savedConfiguration) {\n this.modelerService.restart(savedConfiguration);\n }\n this.settingsService.close();\n }\n\n openGeneralSettings() {\n this.showGeneralSettings.next(true);\n this.showIconSetCustomization.next(false);\n }\n\n openIconSetCustomization() {\n this.showGeneralSettings.next(false);\n this.showIconSetCustomization.next(true);\n }\n}\n","
\n \n \n \n
\n \n Customize Icons for Your Domain\n \n \n General Settings\n \n
\n
\n
\n\n \n \n
\n","import { Injectable } from '@angular/core';\nimport { ReplaySubject } from 'rxjs';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { AutosaveConfiguration } from '../../Domain/Autosave/autosave-configuration';\nimport {\n DEFAULT_AUTOSAVES_MAX_DRAFTS,\n DEFAULT_AUTOSAVES_ENABLED,\n DEFAULT_AUTOSAVES_INTERVAL,\n} from 'src/app/Domain/Common/constants';\n\nconst AUTOSAVE_CONFIGURATION_TAG = 'autosaveConfiguration';\n\nconst defaultConfiguration: AutosaveConfiguration = {\n activated: DEFAULT_AUTOSAVES_ENABLED,\n interval: DEFAULT_AUTOSAVES_INTERVAL,\n maxDrafts: DEFAULT_AUTOSAVES_MAX_DRAFTS,\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutosaveConfigurationService {\n private configuration = defaultConfiguration;\n\n private readonly configurationSubject =\n new ReplaySubject(1);\n readonly configuration$ = this.configurationSubject.asObservable();\n\n constructor(private storageService: StorageService) {\n this.initializeConfiguration();\n }\n\n private initializeConfiguration() {\n this.loadConfiguration();\n this.configurationSubject.next(this.configuration);\n }\n\n setConfiguration(configuration: AutosaveConfiguration): boolean {\n try {\n this.configuration = configuration;\n this.saveConfiguration();\n this.configurationSubject.next(configuration);\n return true;\n } catch {\n return false;\n }\n }\n\n private loadConfiguration() {\n this.configuration =\n this.storageService.get(AUTOSAVE_CONFIGURATION_TAG) ??\n defaultConfiguration;\n }\n\n private saveConfiguration() {\n this.storageService.set(AUTOSAVE_CONFIGURATION_TAG, this.configuration);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { RendererService } from '../Renderer/renderer.service';\nimport { ExportService } from '../Export/export.service';\nimport { Draft } from '../../Domain/Autosave/draft';\nimport { AutosaveConfigurationService } from './autosave-configuration.service';\nimport { IconDictionaryService } from '../IconSetConfiguration/icon-dictionary.service';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { fromConfigurationFromFile } from '../../Domain/Common/iconSetConfiguration';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { TitleService } from '../Title/title.service';\nimport { AutosaveConfiguration } from '../../Domain/Autosave/autosave-configuration';\nimport { Subject } from 'rxjs';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_TITLE,\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\nexport const DRAFTS_TAG = 'autosaveDrafts';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AutosaveService {\n private autosaveTimer: any;\n autosavedDraftsChanged$ = new Subject();\n\n constructor(\n private autosaveConfiguration: AutosaveConfigurationService,\n private exportService: ExportService,\n private iconDictionaryService: IconDictionaryService,\n private rendererService: RendererService,\n private snackbar: MatSnackBar,\n private storageService: StorageService,\n private titleService: TitleService,\n ) {\n this.autosaveConfiguration.configuration$.subscribe((configuration) =>\n this.updateConfiguration(configuration),\n );\n }\n\n loadCurrentDrafts(): Draft[] {\n const drafts = this.readDrafts();\n this.sortDrafts(drafts);\n return drafts;\n }\n\n loadDraft(draft: Draft): void {\n const configFromFile = draft.configAndDST.domain;\n const config = fromConfigurationFromFile(configFromFile);\n const story = JSON.parse(draft.configAndDST.dst);\n\n this.titleService.updateTitleAndDescription(\n draft.title,\n draft.description,\n false,\n );\n\n const actorIcons = this.iconDictionaryService.getElementsOfType(\n story,\n elementTypes.ACTOR,\n );\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\n story,\n elementTypes.WORKOBJECT,\n );\n this.iconDictionaryService.updateIconRegistries(\n actorIcons,\n workObjectIcons,\n config,\n );\n this.rendererService.importStory(story, true, config, false);\n }\n\n removeAllDrafts() {\n this.storageService.set(DRAFTS_TAG, []);\n this.autosavedDraftsChanged$.next();\n }\n\n loadLatestDraft() {\n const drafts = this.readDrafts();\n if (drafts.length === 0) {\n return;\n }\n this.loadDraft(drafts[0]);\n }\n\n private updateConfiguration(configuration: AutosaveConfiguration) {\n this.stopTimer();\n\n if (configuration.activated) {\n this.startTimer(configuration.interval, configuration.maxDrafts);\n }\n }\n\n private stopTimer(): void {\n if (this.autosaveTimer) {\n clearInterval(this.autosaveTimer);\n this.autosaveTimer = undefined;\n }\n }\n\n private startTimer(interval: number, maxDrafts: number): void {\n this.autosaveTimer = setInterval(() => {\n const savedDrafts = this.loadCurrentDrafts();\n const newDraft = this.createDraft();\n let isChanged = maxDrafts > 0;\n if (savedDrafts.length > 0) {\n isChanged = isChanged && !this.isSame(newDraft, savedDrafts[0]);\n }\n if (isChanged && !this.isDraftEmpty(newDraft)) {\n savedDrafts.unshift(newDraft);\n while (savedDrafts.length > maxDrafts) {\n savedDrafts.pop();\n }\n this.writeDrafts(savedDrafts);\n this.snackbar.open('Draft Saved', undefined, {\n panelClass: SNACKBAR_INFO,\n duration: SNACKBAR_DURATION,\n });\n this.autosavedDraftsChanged$.next();\n }\n }, interval * 1000);\n }\n\n private isDraftEmpty(draft: Draft) {\n return (\n draft.title === INITIAL_TITLE &&\n draft.description === INITIAL_DESCRIPTION &&\n JSON.parse(draft.configAndDST.dst).length === 0\n );\n }\n\n private isSame(a: Draft, b: Draft) {\n return (\n a.title === b.title &&\n a.description === b.description &&\n JSON.stringify(a.configAndDST) === JSON.stringify(b.configAndDST)\n );\n }\n\n private writeDrafts(drafts: Draft[]) {\n this.storageService.set(DRAFTS_TAG, drafts);\n }\n\n private readDrafts(): Draft[] {\n return this.storageService.get(DRAFTS_TAG) ?? [];\n }\n\n private createDraft(): Draft {\n const dst = JSON.stringify(this.rendererService.getStory(), null, 2);\n const configAndDST = this.exportService.createConfigAndDST(dst);\n\n const date = new Date().toString().slice(0, 25);\n\n return {\n title: this.titleService.getTitle(),\n description: this.titleService.getDescription(),\n configAndDST,\n date,\n };\n }\n\n private sortDrafts(drafts: Draft[]): void {\n drafts.sort((a: Draft, b: Draft) => {\n const aDate = Date.parse(a.date);\n const bDate = Date.parse(b.date);\n return aDate > bDate ? 0 : 1;\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ICON_SET_CONFIGURATION_TAG } from '../../Domain/Common/constants';\nimport {\n IconSetConfiguration,\n fromConfigurationFromFile,\n} from '../../Domain/Common/iconSetConfiguration';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StorageService {\n set(key: string, value: any) {\n localStorage.setItem(key, JSON.stringify(value));\n }\n\n get(key: string): any {\n const json = localStorage.getItem(key);\n if (json) {\n return JSON.parse(json);\n }\n return null;\n }\n\n removeItem(key: string) {\n localStorage.removeItem(key);\n }\n\n checkValidityOfConfiguration(configuratioFromFile: IconSetConfiguration) {\n return (\n configuratioFromFile.actors.keysArray().length > 1 &&\n configuratioFromFile.workObjects.keysArray().length > 1 &&\n !configuratioFromFile.actors\n .all()\n .some((e) => typeof e.value !== 'string') &&\n !configuratioFromFile.workObjects\n .all()\n .some((e) => typeof e.value !== 'string')\n );\n }\n\n getStoredIconSetConfiguration(): IconSetConfiguration | undefined {\n const iconSetString = localStorage.getItem(ICON_SET_CONFIGURATION_TAG);\n\n if (!iconSetString) {\n return;\n } else {\n const configurationFromFile = fromConfigurationFromFile(\n JSON.parse(iconSetString),\n );\n if (this.checkValidityOfConfiguration(configurationFromFile)) {\n return configurationFromFile;\n }\n }\n return;\n }\n\n setStoredIconSetConfiguration(config: IconSetConfiguration): void {\n const actors: {\n [p: string]: any;\n } = {};\n config.actors.keysArray().forEach((key) => {\n actors[key] = config.actors.get(key);\n });\n const workObjects: {\n [p: string]: any;\n } = {};\n config.workObjects.keysArray().forEach((key) => {\n workObjects[key] = config.workObjects.get(key);\n });\n\n const configForStorage = {\n name: config.name,\n actors: actors,\n workObjects: workObjects,\n };\n\n localStorage.setItem(\n ICON_SET_CONFIGURATION_TAG,\n JSON.stringify(configForStorage, null, 2),\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CommandStackService {\n private commandStack: any;\n\n constructor() {}\n\n setCommandStack(commandStack: any): void {\n this.commandStack = commandStack;\n }\n\n execute(action: string, payload: any) {\n this.commandStack.execute(action, payload);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { ComponentType } from '@angular/cdk/overlay';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DialogService {\n constructor(private matDialog: MatDialog) {}\n\n openDialog(dialog: ComponentType, config: MatDialogConfig): void {\n this.matDialog.open(dialog, config);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DirtyFlagService {\n private isDirtySubject = new BehaviorSubject(false);\n dirty$ = this.isDirtySubject.asObservable();\n\n makeDirty(): void {\n this.isDirtySubject.next(true);\n }\n\n makeClean(): void {\n this.isDirtySubject.next(false);\n }\n\n get dirty(): boolean {\n return this.isDirtySubject.value;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { StorySentence } from 'src/app/Domain/Replay/storySentence';\nimport {\n HIGHLIGHT_COLOR,\n HIGHLIGHT_NUMBER_BACKGROUNG_COLOR,\n HIGHLIGHT_NUMBER_COLOR,\n HIGHLIGHT_STROKE_WIDTH,\n NUMBER_BACKGROUND_COLOR,\n NUMBER_COLOR,\n STROKE_WIDTH,\n} from '../../Domain/DomManipulation/replayConstants';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * Manipulates the DOM during replay to only show the elements of the current Sentence\n */\nexport class DomManipulationService {\n constructor(private elementRegistryService: ElementRegistryService) {}\n\n showAll(): void {\n this.removeHighlights();\n this.elementRegistryService\n .getAllCanvasObjects()\n .slice()\n .concat(this.elementRegistryService.getAllGroups().slice())\n .map((e) => e.businessObject)\n .forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']',\n );\n // @ts-ignore\n domObject.style.display = 'block';\n });\n }\n\n showSentence(\n replaySentence: StorySentence,\n previousSentence?: StorySentence,\n ): void {\n this.removeHighlights();\n const notShown = this.getAllNotShown(replaySentence.objects);\n\n notShown.forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']',\n );\n if (domObject) {\n // @ts-ignore\n domObject.style.display = 'none';\n }\n });\n\n this.highlightSentence(\n previousSentence\n ? replaySentence.objects.filter(\n (o) => !previousSentence.objects.includes(o),\n )\n : replaySentence.objects,\n );\n\n replaySentence.objects.forEach((element) => {\n const domObject = document.querySelector(\n '[data-element-id=' + element.id + ']',\n );\n if (domObject) {\n // @ts-ignore\n domObject.style.display = 'block';\n }\n });\n }\n\n getNumberDomForActivity(activity: SVGPolylineElement): any {\n const numberDOMS = activity.parentElement?.getElementsByClassName(\n 'djs-labelNumber',\n ) || ['', ''];\n return {\n numberBackgroundDom: numberDOMS[0],\n numberTextDom: numberDOMS[1],\n };\n }\n\n private removeHighlights(): void {\n const allActivities = this.elementRegistryService.getAllActivities();\n const allConnections = this.elementRegistryService.getAllConnections();\n\n allActivities.forEach((activity) => {\n const querySelector = document.querySelector(\n '[data-element-id=' + activity.id + ']',\n );\n if (querySelector) {\n const activityDomObject =\n querySelector.getElementsByTagName('polyline')[0];\n\n activityDomObject.style.stroke =\n activity.businessObject.pickedColor || 'black';\n activityDomObject.style.strokeWidth = STROKE_WIDTH;\n\n const { numberBackgroundDom, numberTextDom } =\n this.getNumberDomForActivity(activityDomObject);\n if (numberBackgroundDom && numberTextDom) {\n numberBackgroundDom.style.fill = NUMBER_BACKGROUND_COLOR;\n numberTextDom.style.fill = NUMBER_COLOR;\n }\n }\n });\n\n allConnections.forEach((connection) => {\n // @ts-ignore\n const connectionDomObject = document\n .querySelector('[data-element-id=' + connection.id + ']')\n .getElementsByTagName('polyline')[0];\n\n connectionDomObject.style.stroke =\n connection.businessObject.pickedColor || 'black';\n connectionDomObject.style.strokeWidth = '1.5';\n });\n }\n\n private highlightSentence(sentenceObjects: BusinessObject[]): void {\n sentenceObjects\n .filter((e) => e.type === elementTypes.ACTIVITY)\n .forEach((activity) => {\n const querySelector = document.querySelector(\n '[data-element-id=' + activity.id + ']',\n );\n if (querySelector) {\n const activityDomObject =\n querySelector.getElementsByTagName('polyline')[0];\n\n activityDomObject.style.stroke = HIGHLIGHT_COLOR;\n activityDomObject.style.strokeWidth = HIGHLIGHT_STROKE_WIDTH;\n\n const { numberBackgroundDom, numberTextDom } =\n this.getNumberDomForActivity(activityDomObject);\n if (numberTextDom && numberBackgroundDom) {\n numberBackgroundDom.style.fill = HIGHLIGHT_NUMBER_BACKGROUNG_COLOR;\n numberTextDom.style.fill = HIGHLIGHT_NUMBER_COLOR;\n }\n }\n });\n }\n\n private getAllNotShown(shownElements: BusinessObject[]): BusinessObject[] {\n const notShownElements: BusinessObject[] = [];\n const allObjects = this.elementRegistryService\n .getAllCanvasObjects()\n .concat(this.elementRegistryService.getAllGroups());\n\n allObjects.forEach((element) => {\n if (!shownElements.includes(element.businessObject)) {\n if (element.type.includes(elementTypes.CONNECTION)) {\n // @ts-ignore\n if (!element.source.type.includes(elementTypes.GROUP)) {\n notShownElements.push(element.businessObject);\n } else {\n // @ts-ignore\n shownElements.push(element.target);\n }\n } else {\n notShownElements.push(element.businessObject);\n }\n }\n });\n return notShownElements;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { CanvasObject } from 'src/app/Domain/Common/canvasObject';\nimport { GroupCanvasObject } from '../../Domain/Common/groupCanvasObject';\nimport { ActivityCanvasObject } from '../../Domain/Common/activityCanvasObject';\nimport { UsedIconList } from 'src/app/Domain/Icon-Set-Configuration/UsedIconList';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ElementRegistryService {\n private registry: any;\n private fullyInitialized = false;\n\n /**\n * Initially the registry has only the root-Element.\n * Once the canvas has bees initialized, we adjust the reference to point to the elements on the canvas for convenience\n */\n correctInitialize(): void {\n if (!this.fullyInitialized) {\n if (this.registry.__implicitroot) {\n this.registry = this.registry.__implicitroot.element.children;\n this.fullyInitialized = true;\n }\n }\n }\n\n setElementRegistry(registry: any): void {\n this.registry = registry._elements;\n }\n\n clear(): void {\n this.registry = null;\n this.fullyInitialized = false;\n }\n\n createObjectListForDSTDownload(): CanvasObject[] {\n if (this.registry) {\n const allObjectsFromCanvas = this.getAllCanvasObjects();\n const groups = this.getAllGroups();\n\n const objectList: CanvasObject[] = [];\n\n this.fillListOfCanvasObjects(allObjectsFromCanvas, objectList, groups);\n\n return objectList;\n }\n return [];\n }\n\n private fillListOfCanvasObjects(\n allObjectsFromCanvas: CanvasObject[],\n objectList: CanvasObject[],\n groups: GroupCanvasObject[],\n ): void {\n allObjectsFromCanvas.forEach((canvasElement) => {\n if (canvasElement.type === elementTypes.ACTIVITY) {\n objectList.push(canvasElement);\n }\n\n // ensure that Activities are always after Actors, Workobjects and Groups in .dst files\n else {\n if (canvasElement.type === elementTypes.TEXTANNOTATION) {\n canvasElement.businessObject.width = canvasElement.width;\n canvasElement.businessObject.height = canvasElement.height;\n }\n if (!objectList.includes(canvasElement)) {\n objectList.unshift(canvasElement);\n }\n }\n });\n\n groups.forEach((group) => {\n objectList.push(group);\n });\n }\n\n getAllActivities(): ActivityCanvasObject[] {\n const activities: ActivityCanvasObject[] = [];\n\n this.getAllCanvasObjects().forEach((element) => {\n if (element.type.includes(elementTypes.ACTIVITY)) {\n activities.push(element as ActivityCanvasObject);\n }\n });\n return activities;\n }\n\n getAllConnections(): ActivityCanvasObject[] {\n const connections: ActivityCanvasObject[] = [];\n this.getAllCanvasObjects().forEach((element) => {\n const type = element.type;\n if (type === elementTypes.CONNECTION) {\n connections.push(element as ActivityCanvasObject);\n }\n });\n return connections;\n }\n\n getAllCanvasObjects(): CanvasObject[] {\n const allObjects: CanvasObject[] = [];\n const groupObjects: GroupCanvasObject[] = [];\n\n this.checkChildForGroup(groupObjects, allObjects);\n\n // for each memorized group, remove it from the group-array and check its children, whether they are groups or not\n // if a child is a group, memorize it in the group-array\n // other children should already be in the allObjects list\n let i = groupObjects.length - 1;\n while (groupObjects.length >= 1) {\n const currentGroup = groupObjects.pop();\n // @ts-ignore\n currentGroup.children.forEach((child: CanvasObject) => {\n const type = child.type;\n if (type.includes(elementTypes.GROUP)) {\n groupObjects.push(child as GroupCanvasObject);\n }\n });\n i = groupObjects.length - 1;\n }\n return allObjects;\n }\n\n // returns all groups on the canvas and inside other groups\n getAllGroups(): GroupCanvasObject[] {\n const groupObjects: GroupCanvasObject[] = [];\n const allObjects: CanvasObject[] = [];\n\n this.checkChildForGroup(groupObjects, allObjects);\n\n for (const group of groupObjects) {\n group.children?.forEach((child: CanvasObject) => {\n if (child.type.includes(elementTypes.GROUP)) {\n groupObjects.push(child as GroupCanvasObject);\n }\n });\n }\n return groupObjects;\n }\n\n private checkChildForGroup(\n groupObjects: GroupCanvasObject[],\n allObjects: CanvasObject[],\n ): void {\n const registryElementNames = Object.keys(this.registry);\n for (let name of registryElementNames) {\n const entry = this.registry[name].element;\n if (entry.businessObject) {\n const type = entry.type;\n if (type && type.includes(elementTypes.GROUP)) {\n // if it is a group, memorize this for later\n groupObjects.push(entry);\n } else if (type) {\n allObjects.push(entry);\n }\n }\n }\n }\n\n // get a list of activities, that originate from an actor-type\n getActivitiesFromActors(): ActivityCanvasObject[] {\n const activitiesFromActors: ActivityCanvasObject[] = [];\n const activities = this.getAllActivities();\n\n activities.forEach((activity: ActivityCanvasObject) => {\n if (activity.source?.type.includes(elementTypes.ACTOR)) {\n activitiesFromActors.push(activity);\n }\n });\n return activitiesFromActors;\n }\n\n getUsedIcons(): UsedIconList {\n const actors = this.getAllActors();\n const workobjects = this.getAllWorkobjects();\n\n return {\n actors: actors.map((a) => a.type.replace(elementTypes.ACTOR, '')),\n workobjects: workobjects.map((w) =>\n w.type.replace(elementTypes.WORKOBJECT, ''),\n ),\n };\n }\n\n private getAllActors() {\n return this.getAllCanvasObjects().filter((co) =>\n co.type.includes(elementTypes.ACTOR),\n );\n }\n\n getAllWorkobjects() {\n return this.getAllCanvasObjects().filter((co) =>\n co.type.includes(elementTypes.WORKOBJECT),\n );\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { IconSetConfigurationService } from 'src/app/Service/IconSetConfiguration/icon-set-configuration.service';\nimport { sanitizeForDesktop } from 'src/app/Utils/sanitizer';\nimport { TitleService } from 'src/app/Service/Title/title.service';\nimport { ConfigAndDST } from 'src/app/Domain/Export/configAndDst';\nimport { DirtyFlagService } from 'src/app/Service/DirtyFlag/dirty-flag.service';\nimport { PngService } from 'src/app/Service/Export/png.service';\nimport { SvgService } from 'src/app/Service/Export/svg.service';\nimport { Subscription } from 'rxjs';\nimport { RendererService } from '../Renderer/renderer.service';\nimport { HtmlPresentationService } from './html-presentation.service';\nimport { formatDate } from '@angular/common';\nimport { environment } from '../../../environments/environment';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ExportService implements OnDestroy {\n titleSubscription: Subscription;\n descriptionSubscription: Subscription;\n\n title = '';\n description = '';\n\n constructor(\n private configurationService: IconSetConfigurationService,\n private titleService: TitleService,\n private dirtyFlagService: DirtyFlagService,\n private pngService: PngService,\n private svgService: SvgService,\n private htmlPresentationService: HtmlPresentationService,\n private rendererService: RendererService,\n ) {\n this.titleSubscription = this.titleService.title$.subscribe(\n (title: string) => {\n this.title = title;\n },\n );\n this.descriptionSubscription = this.titleService.description$.subscribe(\n (description: string) => {\n this.description = description;\n },\n );\n }\n\n ngOnDestroy(): void {\n this.titleSubscription.unsubscribe();\n this.descriptionSubscription.unsubscribe();\n }\n\n isDomainStoryExportable(): boolean {\n return this.rendererService.getStory().length >= 1;\n }\n\n createConfigAndDST(DomainStory: any): ConfigAndDST {\n return new ConfigAndDST(\n this.configurationService.getCurrentConfigurationForExport(),\n DomainStory,\n );\n }\n\n downloadDST(): void {\n const dst = this.getStoryForDownload();\n const configAndDST = this.createConfigAndDST(dst);\n const json = JSON.stringify(configAndDST, null, 2);\n\n const filename = sanitizeForDesktop(\n this.title + '_' + this.getCurrentDateString(),\n );\n\n this.downloadFile(\n json,\n 'data:text/plain;charset=utf-8,',\n filename,\n '.egn',\n true,\n );\n }\n\n private downloadFile(\n data: string,\n datatype: string,\n filename: string,\n fileEnding: string,\n makeClean: boolean,\n ) {\n const element = document.createElement('a');\n element.setAttribute('href', datatype + encodeURIComponent(data));\n element.setAttribute('download', filename + fileEnding);\n\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n if (makeClean) {\n this.dirtyFlagService.makeClean();\n }\n\n document.body.removeChild(element);\n }\n\n downloadSVG(withTitle: boolean, useWhiteBackground: boolean): void {\n const story = this.getStoryForDownload();\n const dst = this.createConfigAndDST(story);\n\n const svgData = this.svgService.createSVGData(\n this.title,\n this.description,\n dst,\n withTitle,\n useWhiteBackground,\n );\n\n this.downloadFile(\n svgData,\n 'data:application/bpmn20-xml;charset=UTF-8,',\n sanitizeForDesktop(this.title + '_' + this.getCurrentDateString()),\n '.egn.svg',\n true,\n );\n }\n\n downloadPNG(withTitle: boolean): void {\n const canvas = document.getElementById('canvas');\n if (canvas) {\n const container = canvas.getElementsByClassName('djs-container');\n const svgElements = container[0].getElementsByTagName('svg');\n const outerSVGElement = svgElements[0];\n const viewport = outerSVGElement.getElementsByClassName('viewport')[0];\n const layerBase = viewport.getElementsByClassName('layer-base')[0];\n\n const image = document.createElement('img');\n\n // removes unwanted black dots in image\n let svg = this.pngService.extractSVG(viewport, outerSVGElement);\n\n svg = this.pngService.prepareSVG(\n svg,\n layerBase,\n this.description,\n this.title,\n withTitle,\n );\n\n image.onload = () => {\n const tempCanvas = document.createElement('canvas');\n\n // add a 10px buffer to the right and lower boundary\n tempCanvas.width = this.pngService.getWidth() + 10;\n tempCanvas.height = this.pngService.getHeight() + 10;\n\n const ctx = tempCanvas.getContext('2d');\n if (ctx) {\n // fill with white background\n ctx.rect(0, 0, tempCanvas.width, tempCanvas.height);\n ctx.fillStyle = 'white';\n ctx.fill();\n\n ctx.drawImage(image, 0, 0);\n }\n\n const png64 = tempCanvas.toDataURL('image/png');\n const ele = document.createElement('a');\n ele.setAttribute(\n 'download',\n sanitizeForDesktop(this.title) +\n '_' +\n this.getCurrentDateString() +\n '.png',\n );\n ele.setAttribute('href', png64);\n document.body.appendChild(ele);\n ele.click();\n document.body.removeChild(ele);\n\n // image source has to be removed to circumvent browser caching\n image.src = '';\n };\n image.onchange = image.onload;\n\n image.width = this.pngService.getWidth();\n image.height = this.pngService.getHeight();\n\n image.src = 'data:image/svg+xml,' + svg;\n }\n }\n\n downloadHTMLPresentation(): void {\n const filename = sanitizeForDesktop(\n this.title + '_' + this.getCurrentDateString(),\n );\n this.htmlPresentationService.downloadHTMLPresentation(filename).then();\n }\n\n private getStoryForDownload(): unknown[] {\n const story = this.rendererService.getStory() as unknown[];\n story.push({ info: this.titleService.getDescription() });\n story.push({ version: environment.version });\n return story;\n }\n\n private getCurrentDateString(): string {\n return formatDate(new Date(), 'YYYY-MM-dd', 'en-GB');\n }\n}\n","import { Injectable } from '@angular/core';\nimport { sanitizeForDesktop } from '../../Utils/sanitizer';\nimport { ReplayService } from '../Replay/replay.service';\n// @ts-ignore\nimport doT from 'dot';\nimport { TitleService } from '../Title/title.service';\n\n@Injectable({\n providedIn: 'root',\n})\n/**\n * Initial idea and PR from https://github.com/indika-dev\n */\nexport class HtmlPresentationService {\n constructor(\n private replayService: ReplayService,\n private titleService: TitleService,\n ) {}\n\n private multiplexSecret: any;\n private multiplexId: any;\n\n private modeler: any;\n\n setModelerClasses(canvas: any, selection: any, modeler: any): void {\n this.modeler = modeler;\n }\n\n private static viewBoxCoordinates(svg: any): any {\n const ViewBoxCoordinate =\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\n const match = svg.match(ViewBoxCoordinate);\n return match[3];\n }\n\n /*\n ---------------------------\n SVG handling starts here\n ----------------------------\n */\n\n async downloadHTMLPresentation(filename: string): Promise {\n const svgData = [];\n // export all sentences of domain story\n this.replayService.startReplay();\n try {\n const result = await this.modeler.saveSVG({});\n this.fixActivityMarkersForEachSentence(\n result,\n this.replayService.getCurrentSentenceNumber(),\n );\n svgData.push({\n content: HtmlPresentationService.createSVGData(result.svg),\n transition: 'slide',\n });\n } catch (err) {\n alert('There was an error exporting the SVG.\\n' + err);\n }\n while (\n this.replayService.getCurrentSentenceNumber() <\n this.replayService.getMaxSentenceNumber()\n ) {\n this.replayService.nextSentence();\n try {\n const result = await this.modeler.saveSVG({});\n this.fixActivityMarkersForEachSentence(\n result,\n this.replayService.getCurrentSentenceNumber(),\n );\n svgData.push({\n content: HtmlPresentationService.createSVGData(result.svg),\n transition: 'slide',\n });\n } catch (err) {\n alert('There was an error exporting the SVG.\\n' + err);\n }\n }\n this.replayService.stopReplay();\n\n // create download for presentation\n const revealjsTemplate = document.getElementById('revealjs-template');\n const dots = doT.template(revealjsTemplate?.innerHTML);\n const revealjsData = {\n script: 'script',\n title: this.titleService.getTitle(),\n description: this.titleService.getDescription(),\n sentences: svgData,\n multiplexSecret: this.multiplexSecret,\n multiplexId: this.multiplexId,\n };\n const element = document.createElement('a');\n element.setAttribute(\n 'href',\n 'data:text/html;charset=UTF-8,' +\n this.fixMalformedHtmlScript(dots, revealjsData),\n );\n element.setAttribute('download', sanitizeForDesktop(filename) + '.html');\n element.style.display = 'none';\n document.body.appendChild(element);\n element.click();\n document.body.removeChild(element);\n }\n\n private fixMalformedHtmlScript(\n dots: any,\n revealjsData: {\n multiplexId: any;\n sentences: any[];\n multiplexSecret: any;\n description: string;\n title: string;\n script: string;\n },\n ) {\n return dots(revealjsData).replace(''),\n result.svg.indexOf('') + 7,\n );\n const split = defs.split(' {\n const idToReplace = id.substring(4, id.length - 1);\n const newId =\n idToReplace.slice(0, id.length - 5) +\n 'customId' +\n sectionIndex +\n idToReplace.slice(idToReplace.length - 2);\n // @ts-ignore\n result.svg = result.svg.replaceAll(idToReplace, newId);\n });\n newDefs += '= 72) {\n fix = true;\n // https://www.chromestatus.com/features/5656049583390720\n }\n } else if (name.includes('Firefox')) {\n fix = true;\n\n // versionNumber of implementation unknown\n }\n if (fix) {\n while (svg.includes('#')) {\n svg = svg.replace('#', '%23');\n }\n }\n return svg;\n }\n\n findMostOuterElements(svg: HTMLElement): Box {\n let xLeft = 0;\n let xRight = 0;\n let yUp = 0;\n let yDown = 0;\n\n const elements = svg.getElementsByClassName('djs-group');\n\n // tslint:disable-next-line:prefer-for-of\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n const sub = element.children;\n\n let elXLeft: number;\n let elXRight: number;\n let elYUp: number;\n let elYDown: number;\n\n const transform = sub[0].getAttribute('transform');\n if (transform) {\n let nums;\n\n if (transform.includes('matrix')) {\n transform.replace('matrix(', '');\n transform.replace(')', '');\n nums = transform.split(' ');\n elXLeft = parseInt(nums[4]);\n elYUp = parseInt(nums[5]);\n } else {\n transform.replace('translate(', '');\n transform.replace(')', '');\n nums = transform.split(' ');\n elXLeft = parseInt(nums[0]);\n elYUp = parseInt(nums[1]);\n }\n\n const rects = sub[0].getElementsByTagName('rect');\n const outerRect = rects[rects.length - 1];\n\n const width = outerRect.getAttribute('width');\n\n elXRight = elXLeft + parseInt(width != null ? width : '0');\n elYDown = elYUp + sub[0].getBoundingClientRect().height;\n } else {\n const rects = element.getElementsByTagName('rect');\n const outerRect = rects[rects.length - 1];\n\n const x = outerRect.getAttribute('x');\n const y = outerRect.getAttribute('y');\n\n elXLeft = parseInt(x != null ? x : '0');\n elYUp = parseInt(y != null ? y : '0');\n\n const width = outerRect.getAttribute('width');\n const height = outerRect.getAttribute('height');\n\n elXRight = elXLeft + parseInt(width != null ? width : '0');\n elYDown = elYUp + parseInt(height != null ? height : '0') + 20; // Add 20 px as Padding for text at the bottom\n }\n if (elXLeft < xLeft) {\n xLeft = elXLeft;\n }\n if (elXRight > xRight) {\n xRight = elXRight;\n }\n if (elYUp < yUp) {\n yUp = elYUp;\n }\n if (elYDown > yDown) {\n yDown = elYDown;\n }\n }\n\n yUp -= 75; // we need to adjust yUp to have space for the title and description\n\n return {\n xLeft,\n xRight,\n yUp,\n yDown,\n };\n }\n\n prepareSVG(\n svg: string,\n layerBase: any,\n description: string,\n title: string,\n withTitle: boolean,\n ): string {\n const box = this.findMostOuterElements(layerBase);\n let viewBoxIndex = svg.indexOf('width=\"');\n\n this.calculateWidthAndHeight(box);\n\n const { insertText, extraHeight } = createTitleAndDescriptionSVGElement(\n title,\n description,\n box.xLeft + 10,\n box.yUp + 20,\n this.width,\n );\n if (withTitle) {\n this.height += extraHeight;\n }\n\n const bounds = this.createBounds(box, extraHeight);\n\n const dataStart = svg.substring(0, viewBoxIndex);\n viewBoxIndex = svg.indexOf('style=\"');\n\n const dataEnd = svg.substring(viewBoxIndex);\n dataEnd.substring(viewBoxIndex);\n\n svg = dataStart + bounds + dataEnd;\n\n const insertIndex = svg.indexOf('') + 20;\n\n if (withTitle) {\n svg = [\n svg.slice(0, insertIndex),\n insertText,\n svg.slice(insertIndex),\n ].join('');\n }\n svg = this.URIHashtagFix(svg);\n\n return svg;\n }\n\n private createBounds(box: Box, extraHeight: number) {\n return (\n 'width=\"' +\n this.width +\n '\" height=\"' +\n this.height +\n '\" viewBox=\" ' +\n box.xLeft +\n ' ' +\n (box.yUp - extraHeight) +\n ' ' +\n this.width +\n ' ' +\n this.height +\n '\" '\n );\n }\n\n /**\n * Calculate the Width and Height of the Bounding Box for the PNG so no Parts are cut off\n */\n private calculateWidthAndHeight(box: Box): [number, number] {\n if (box.xLeft < 0) {\n if (box.xRight < 0) {\n this.width = Math.abs(box.xLeft - box.xRight);\n } else {\n this.width = Math.abs(box.xLeft) + box.xRight;\n }\n } else {\n this.width = box.xRight - box.xLeft;\n }\n\n if (box.yUp < 0) {\n if (box.yDown < 0) {\n this.height = Math.abs(box.yUp - box.yDown);\n } else {\n this.height = Math.abs(box.yUp) + box.yDown;\n }\n } else {\n this.height = box.yDown - box.yUp;\n }\n\n // if the domain-Story is smaller than 300px in width or height, increase its dimensions\n if (this.height < 300) {\n this.height += 300;\n box.yUp -= 150;\n box.yDown += 150;\n }\n if (this.width < 300) {\n this.width += 300;\n box.xLeft -= 150;\n box.xRight += 150;\n }\n return [this.height, this.width];\n }\n\n extractSVG(viewport: any, outerSVGElement: any): string {\n const layerResizers = viewport.getElementsByClassName('layer-resizers');\n const layerOverlays = viewport.getElementsByClassName('layer-overlays');\n const transform = viewport.getAttribute('transform');\n const translate = viewport.getAttribute('translate');\n\n if (layerResizers[0]) {\n layerResizers[0].parentNode.removeChild(layerResizers[0]);\n }\n if (layerOverlays[0]) {\n layerOverlays[0].parentNode.removeChild(layerOverlays[0]);\n }\n\n // remove canvas scrolling and scaling before serializeToString of SVG\n if (transform) {\n viewport.removeAttribute('transform');\n }\n if (translate) {\n viewport.removeAttribute('translate');\n }\n\n const svg = new XMLSerializer().serializeToString(outerSVGElement);\n\n // re-add canvas scrolling and scaling\n if (transform) {\n viewport.setAttribute('transform', transform);\n }\n if (translate) {\n viewport.setAttribute('translate', translate);\n }\n return svg;\n }\n\n getWidth(): number {\n return this.width;\n }\n\n getHeight(): number {\n return this.height;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigAndDST } from 'src/app/Domain/Export/configAndDst';\nimport { createTitleAndDescriptionSVGElement } from 'src/app/Service/Export/exportUtil';\nimport { ModelerService } from '../Modeler/modeler.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SvgService {\n private cacheData = '';\n\n constructor(private modelerService: ModelerService) {}\n\n createSVGData(\n title: string,\n description: string,\n dst: ConfigAndDST,\n withTitle: boolean,\n useWhiteBackground: boolean,\n ): string {\n this.cacheData = this.modelerService.getEncoded();\n\n let data = structuredClone(this.cacheData);\n\n let viewBoxIndex = data.indexOf('width=\"');\n\n let { width, height, viewBox } = this.viewBoxCoordinates(data);\n\n let xLeft: number;\n let xRight: number;\n let yUp: number;\n let yDown: number;\n const splitViewBox = viewBox.split(/\\s/);\n\n xLeft = +splitViewBox[0];\n yUp = +splitViewBox[1];\n xRight = +splitViewBox[2];\n yDown = +splitViewBox[3];\n\n if (xRight < 300) {\n xRight += 300;\n width += 300;\n }\n\n const { insertText } = createTitleAndDescriptionSVGElement(\n title,\n description,\n xLeft,\n yUp,\n width,\n );\n\n const bounds = this.createBounds(\n width,\n height,\n xLeft,\n yUp,\n xRight,\n yDown,\n withTitle,\n );\n\n const dataStart = data.substring(0, viewBoxIndex);\n viewBoxIndex = data.indexOf('\" version');\n\n const dataEnd = data.substring(viewBoxIndex);\n dataEnd.substring(viewBoxIndex);\n\n data = dataStart + bounds + dataEnd;\n\n const insertIndex = this.findIndexToInsertData(data);\n\n if (withTitle) {\n data = data.slice(0, insertIndex) + insertText + data.slice(insertIndex);\n }\n\n if (useWhiteBackground) {\n const svgIndex = data.indexOf('width=\"');\n const backgroundColorWhite = 'style=\"background-color:white\" ';\n data =\n data.slice(0, svgIndex) + backgroundColorWhite + data.slice(svgIndex);\n }\n\n return this.appendDST(data, dst);\n }\n\n private findIndexToInsertData(data: string) {\n let insertIndex = data.indexOf('');\n if (insertIndex < 0) {\n insertIndex = data.indexOf('version=\"1.2\">') + 14;\n } else {\n insertIndex += 7;\n }\n return insertIndex;\n }\n\n private createBounds(\n width: number,\n height: number,\n xLeft: number,\n yUp: number,\n xRight: number,\n yDown: number,\n withTitle: boolean,\n ): string {\n return (\n 'width=\"' +\n width +\n '\" height=\" ' +\n height +\n '\" viewBox=\"' +\n xLeft +\n ' ' +\n (withTitle ? yUp - 80 : yUp) +\n ' ' +\n xRight +\n ' ' +\n (yDown + 30)\n );\n }\n\n private viewBoxCoordinates(svg: string): {\n width: number;\n height: number;\n viewBox: string;\n } {\n const ViewBoxCoordinate =\n /width=\"([^\"]+)\"\\s+height=\"([^\"]+)\"\\s+viewBox=\"([^\"]+)\"/;\n const match = svg.match(ViewBoxCoordinate);\n if (match) {\n return { width: +match[1], height: +match[2], viewBox: match[3] };\n }\n return { width: 0, height: 0, viewBox: '' };\n }\n\n private appendDST(data: string, dst: ConfigAndDST): string {\n data += '\\n';\n return data;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { Configuration } from 'src/app/Domain/Common/configuration';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport {\n defaultConf,\n IconConfiguration,\n} from 'src/app/Domain/Common/iconConfiguration';\nimport {\n allIcons,\n appendedIcons,\n} from 'src/app/Domain/Icon-Set-Configuration/allIcons';\nimport { getNameFromType } from '../../Utils/naming';\nimport { sanitizeIconName } from '../../Utils/sanitizer';\n\nexport const ICON_PREFIX = 'icon-domain-story-';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconDictionaryService {\n private actorIconDictionary = new Dictionary();\n private workObjectDictionary = new Dictionary();\n\n private allIconDictionary = new Dictionary();\n private iconDictionaryForBPMN = new Dictionary();\n\n private customConfiguration?: IconSetConfiguration;\n\n private readonly iconConfig: IconConfiguration;\n\n constructor() {\n this.allIconDictionary.addEach(allIcons);\n this.iconConfig = new IconConfiguration(this.allIconDictionary);\n }\n\n initTypeDictionaries(actors: string[], workObjects: string[]): void {\n if (!actors || actors.length == 0) {\n actors = defaultConf.actors;\n }\n if (!workObjects || workObjects.length == 0) {\n workObjects = defaultConf.workObjects;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(allIcons);\n allTypes.appendDict(this.getAppendedIconDictionary());\n\n this.initDictionary(\n actors,\n allTypes,\n this.actorIconDictionary,\n elementTypes.ACTOR,\n );\n this.initDictionary(\n workObjects,\n allTypes,\n this.workObjectDictionary,\n elementTypes.WORKOBJECT,\n );\n }\n\n private initDictionary(\n keys: string[],\n allTypes: Dictionary,\n dictionary: Dictionary,\n elementType: elementTypes,\n ) {\n dictionary.clear();\n for (const key of keys) {\n dictionary.add(allTypes.get(key), key);\n }\n\n dictionary.keysArray().forEach((name) => {\n this.registerIconForBPMN(\n name,\n ICON_PREFIX + sanitizeIconName(name.toLowerCase()),\n elementType,\n );\n });\n }\n\n getCurrentIconConfigurationForBPMN(): Configuration {\n if (this.customConfiguration) {\n return this.iconConfig.createCustomConf(this.customConfiguration);\n }\n return this.iconConfig.getDefaultConf();\n }\n\n allInTypeDictionary(type: elementTypes, elements: BusinessObject[]): boolean {\n let collection: Dictionary;\n if (type === elementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === elementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n\n let allIn = true;\n if (elements) {\n elements.forEach((element) => {\n if (!collection.has(getNameFromType(element.type))) {\n allIn = false;\n }\n });\n } else {\n return false;\n }\n return allIn;\n }\n\n /** Load Icons from Configuration **/\n addIconsFromIconSetConfiguration(\n dictionaryType: elementTypes,\n iconTypes: string[],\n ): void {\n let collection: Dictionary;\n if (dictionaryType === elementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (dictionaryType === elementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n\n const allTypes = new Dictionary();\n allTypes.addEach(allIcons);\n allTypes.appendDict(appendedIcons);\n\n iconTypes.forEach((name) => {\n if (!collection.has(name)) {\n const src = allTypes.get(name);\n if (src) {\n this.registerIconForType(dictionaryType, name, src);\n this.registerIconForBPMN(\n name,\n sanitizeIconName(ICON_PREFIX + name.toLowerCase()),\n dictionaryType,\n );\n }\n }\n });\n }\n\n /** Add Icon(s) to Dictionary **/\n registerIconForBPMN(\n name: string,\n src: string,\n elementType: elementTypes,\n ): void {\n if (name.includes(elementType)) {\n throw new Error('Should not include elementType');\n }\n\n this.iconDictionaryForBPMN.set(`${elementType}${name}`, src);\n }\n\n addIconsToTypeDictionary(\n actorIcons: BusinessObject[],\n workObjectIcons: BusinessObject[],\n ) {\n if (!this.allInTypeDictionary(elementTypes.ACTOR, actorIcons)) {\n this.addIconsFromIconSetConfiguration(\n elementTypes.ACTOR,\n actorIcons.map((element) => getNameFromType(element.type)),\n );\n }\n if (!this.allInTypeDictionary(elementTypes.WORKOBJECT, workObjectIcons)) {\n this.addIconsFromIconSetConfiguration(\n elementTypes.WORKOBJECT,\n workObjectIcons.map((element) => getNameFromType(element.type)),\n );\n }\n }\n\n registerIconForType(type: elementTypes, name: string, src: string): void {\n if (name.includes(type)) {\n throw new Error('Name should not include type!');\n }\n\n let collection = new Dictionary();\n if (type === elementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === elementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n collection.add(src, name);\n }\n\n unregisterIconForType(type: elementTypes, name: string): void {\n if (name.includes(type)) {\n throw new Error('Name should not include type!');\n }\n\n let collection = new Dictionary();\n if (type === elementTypes.ACTOR) {\n collection = this.actorIconDictionary;\n } else if (type === elementTypes.WORKOBJECT) {\n collection = this.workObjectDictionary;\n }\n collection.delete(name);\n }\n\n updateIconRegistries(\n actors: BusinessObject[],\n workObjects: BusinessObject[],\n config: IconSetConfiguration,\n ): void {\n const elements: BusinessObject[] = [];\n\n actors.forEach((a) => elements.push(a));\n workObjects.forEach((w) => elements.push(w));\n\n const customIcons = new Dictionary();\n\n const actorsDict = new Dictionary();\n const workObjectsDict = new Dictionary();\n config.actors.keysArray().forEach((key) => {\n actorsDict.set(key, config.actors.get(key));\n });\n config.workObjects.keysArray().forEach((key) => {\n workObjectsDict.set(key, config.workObjects.get(key));\n });\n\n this.extractCustomIconsFromDictionary(actorsDict, customIcons);\n this.extractCustomIconsFromDictionary(workObjectsDict, customIcons);\n\n elements.forEach((element) => {\n const name = sanitizeIconName(\n element.type\n .replace(elementTypes.ACTOR, '')\n .replace(elementTypes.WORKOBJECT, ''),\n );\n if (\n (element.type.includes(elementTypes.ACTOR) ||\n element.type.includes(elementTypes.WORKOBJECT)) &&\n !this.getFullDictionary().has(name)\n ) {\n let elementType;\n if (element.type.includes(elementTypes.ACTOR)) {\n elementType = elementTypes.ACTOR;\n } else {\n elementType = elementTypes.WORKOBJECT;\n }\n this.registerIconForBPMN(\n ICON_PREFIX + name.toLowerCase(),\n getNameFromType(element.type),\n elementType,\n );\n }\n });\n\n this.addNewIconsToDictionary(customIcons);\n this.addIconsToTypeDictionary(actors, workObjects);\n }\n\n private extractCustomIconsFromDictionary(\n elementDictionary: Dictionary,\n customIcons: Dictionary,\n ) {\n elementDictionary.keysArray().forEach((name) => {\n const sanitizedName = sanitizeIconName(name);\n if (!this.getFullDictionary().has(sanitizedName)) {\n customIcons.add(elementDictionary.get(name), sanitizedName);\n }\n });\n }\n\n /** Add new Icon(s) **/\n\n addNewIconsToDictionary(customIcons: Dictionary) {\n customIcons.keysArray().forEach((key) => {\n const custom = customIcons.get(key);\n this.addIMGToIconDictionary(custom.src, key);\n });\n this.addIconsToCss(customIcons);\n }\n\n addIMGToIconDictionary(input: string, name: string): void {\n appendedIcons.set(name, input);\n }\n\n addIconsToCss(customIcons: Dictionary) {\n const sheetEl = document.getElementById('iconsCss');\n customIcons.keysArray().forEach((key) => {\n const src = customIcons.get(key);\n const iconStyle =\n '.' +\n ICON_PREFIX +\n sanitizeIconName(key.toLowerCase()) +\n '::before{ content: url(\"data:image/svg+xml;utf8,' +\n this.wrapSRCInSVG(src) +\n '\"); margin: 3px;}';\n // @ts-ignore\n sheetEl?.sheet?.insertRule(iconStyle, sheetEl.sheet.cssRules.length);\n });\n }\n\n private wrapSRCInSVG(src: string): string {\n return (\n \"\"\n );\n }\n\n /** Getter & Setter **/\n\n getFullDictionary(): Dictionary {\n const fullDictionary = new Dictionary();\n fullDictionary.appendDict(this.allIconDictionary);\n fullDictionary.appendDict(this.getAppendedIconDictionary());\n return fullDictionary;\n }\n\n getAppendedIconDictionary(): Dictionary {\n const appendedDict = new Dictionary();\n appendedIcons.keysArray().forEach((key) => {\n if (!this.allIconDictionary.has(key)) {\n appendedDict.set(key, appendedIcons.get(key));\n }\n });\n return appendedDict;\n }\n\n getTypeDictionary(type: elementTypes): Dictionary {\n if (type === elementTypes.ACTOR) {\n return this.actorIconDictionary;\n } else if (type === elementTypes.WORKOBJECT) {\n return this.workObjectDictionary;\n }\n return new Dictionary();\n }\n\n getTypeDictionaryKeys(type: elementTypes): string[] {\n return this.getTypeDictionary(type).keysArray();\n }\n\n getTypeIconSRC(type: elementTypes, name: string): string | null {\n if (type === elementTypes.ACTOR) {\n return this.actorIconDictionary.get(name);\n } else if (type === elementTypes.WORKOBJECT) {\n return this.workObjectDictionary.get(name);\n }\n return null;\n }\n\n getIconForBPMN(elementType: elementTypes, name: string): string | null {\n return this.iconDictionaryForBPMN.get(`${elementType}${name}`);\n }\n\n getIconSource(name: string): string | null {\n if (this.allIconDictionary.has(name)) {\n return this.allIconDictionary.get(name);\n } else if (appendedIcons.has(name)) {\n return appendedIcons.get(name);\n }\n return null;\n }\n\n getElementsOfType(\n elements: BusinessObject[],\n type: elementTypes,\n ): BusinessObject[] {\n const elementOfType: any = [];\n elements.forEach((element) => {\n if (element.type.includes(type)) {\n elementOfType.push(element);\n }\n });\n return elementOfType;\n }\n\n getAllIconDictionary(): Dictionary {\n return this.allIconDictionary;\n }\n\n getActorsDictionary(): Dictionary {\n return this.actorIconDictionary;\n }\n\n getWorkObjectsDictionary(): Dictionary {\n return this.workObjectDictionary;\n }\n\n getIconConfiguration(): IconConfiguration {\n return this.iconConfig;\n }\n\n setCustomConfiguration(customConfiguration: IconSetConfiguration): void {\n this.customConfiguration = customConfiguration;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/icon-dictionary.service';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport {\n CustomIconSetConfiguration,\n IconSetConfiguration,\n IconSetConfigurationForExport,\n} from 'src/app/Domain/Common/iconSetConfiguration';\nimport { defaultConf } from '../../Domain/Common/iconConfiguration';\nimport { TitleService } from '../Title/title.service';\nimport { INITIAL_ICON_SET_NAME } from '../../Domain/Common/constants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconSetConfigurationService {\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private elementRegistryService: ElementRegistryService,\n private titleService: TitleService,\n ) {}\n\n setIconSetName(iconSetName: string): void {\n this.titleService.setIconSetName(\n iconSetName ? iconSetName : INITIAL_ICON_SET_NAME,\n );\n }\n\n exportConfiguration(): void {\n const iconSetConfiguration = this.getCurrentConfigurationForExport();\n if (!iconSetConfiguration) {\n return;\n }\n\n const configJSONString = JSON.stringify(iconSetConfiguration, null, 2);\n const filename = this.titleService.getIconSetName();\n const element = document.createElement('a');\n\n element.setAttribute(\n 'href',\n 'data:text/plain;charset=utf-8,' + encodeURIComponent(configJSONString),\n );\n element.setAttribute('download', filename + '.iconset');\n element.style.display = 'none';\n document.body.appendChild(element);\n\n element.click();\n\n document.body.removeChild(element);\n }\n\n loadConfiguration(\n customConfig: IconSetConfiguration,\n updateIconSetName = true,\n ): void {\n let actorDict = new Dictionary();\n let workObjectDict = new Dictionary();\n\n if (customConfig.actors.keysArray()) {\n actorDict = customConfig.actors;\n workObjectDict = customConfig.workObjects;\n } else {\n actorDict.addEach(customConfig.actors);\n workObjectDict.addEach(customConfig.workObjects);\n }\n\n const actorKeys = actorDict.keysArray();\n const workObjectKeys = workObjectDict.keysArray();\n\n this.iconDictionaryService.updateIconRegistries([], [], customConfig);\n\n this.iconDictionaryService\n .getIconConfiguration()\n .appendSRCFile(actorKeys, actorDict, workObjectKeys, workObjectDict);\n\n this.iconDictionaryService.addIconsFromIconSetConfiguration(\n elementTypes.ACTOR,\n actorKeys.map((a) => elementTypes.ACTOR + a),\n );\n this.iconDictionaryService.addIconsFromIconSetConfiguration(\n elementTypes.WORKOBJECT,\n workObjectKeys.map((w) => elementTypes.WORKOBJECT + w),\n );\n\n if (updateIconSetName) {\n const configurationName = customConfig.name;\n this.setIconSetName(configurationName);\n }\n }\n\n getCurrentConfiguration(): IconSetConfiguration | undefined {\n const actors = this.iconDictionaryService.getActorsDictionary();\n const workObjects = this.iconDictionaryService.getWorkObjectsDictionary();\n\n let iconSetConfiguration;\n\n if (actors.size() > 0 && workObjects.size() > 0) {\n iconSetConfiguration = this.createConfigFromDictionaries(\n actors,\n workObjects,\n );\n }\n return iconSetConfiguration;\n }\n\n getCurrentConfigurationForExport():\n | IconSetConfigurationForExport\n | undefined {\n const currentConfiguration = this.getCurrentConfiguration();\n\n if (currentConfiguration) {\n const actors: any = {};\n const workObjects: any = {};\n\n currentConfiguration.actors.all().forEach((entry) => {\n actors[entry.key] = entry.value;\n });\n currentConfiguration.workObjects.all().forEach((entry) => {\n workObjects[entry.key] = entry.value;\n });\n\n return {\n name: currentConfiguration.name,\n actors: actors,\n workObjects: workObjects,\n };\n }\n return;\n }\n\n getCurrentConfigurationNamesWithoutPrefix(): CustomIconSetConfiguration {\n return {\n name: this.titleService.getIconSetName() || INITIAL_ICON_SET_NAME,\n actors: this.iconDictionaryService\n .getActorsDictionary()\n .keysArray()\n .map((a) => a.replace(elementTypes.ACTOR, '')),\n workObjects: this.iconDictionaryService\n .getWorkObjectsDictionary()\n .keysArray()\n .map((w) => w.replace(elementTypes.WORKOBJECT, '')),\n };\n }\n\n createMinimalConfigurationWithDefaultIcons(): IconSetConfiguration {\n const minimalConfig = this.createConfigFromCanvas();\n\n defaultConf.actors.forEach((iconName) => {\n minimalConfig.actors.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName,\n );\n });\n defaultConf.workObjects.forEach((iconName) => {\n minimalConfig.workObjects.add(\n this.iconDictionaryService.getIconSource(iconName),\n iconName,\n );\n });\n\n return minimalConfig;\n }\n\n private createConfigFromDictionaries(\n actorsDict: Dictionary,\n workObjectsDict: Dictionary,\n ): IconSetConfiguration {\n const actorNames = actorsDict.keysArray();\n const workobjectNames = workObjectsDict.keysArray();\n const newActors = new Dictionary();\n const newWorkobjects = new Dictionary();\n\n // Fill Configuration from Canvas-Objects\n actorNames.forEach((actor) => {\n newActors.add(\n actorsDict.get(actor),\n actor.replace(elementTypes.ACTOR, ''),\n );\n });\n workobjectNames.forEach((workObject) => {\n newWorkobjects.add(\n workObjectsDict.get(workObject),\n workObject.replace(elementTypes.WORKOBJECT, ''),\n );\n });\n\n return {\n name: this.titleService.getIconSetName(),\n actors: newActors,\n workObjects: newWorkobjects,\n };\n }\n\n private createConfigFromCanvas(): IconSetConfiguration {\n const config = {\n name: INITIAL_ICON_SET_NAME,\n actors: new Dictionary(),\n workObjects: new Dictionary(),\n };\n\n let allCanvasObjects = this.elementRegistryService.getAllCanvasObjects();\n\n allCanvasObjects\n .map((e) => e.businessObject)\n .forEach((element) => {\n const type = element.type\n .replace(elementTypes.ACTOR, '')\n .replace(elementTypes.WORKOBJECT, '');\n if (element.type.includes(elementTypes.ACTOR)) {\n let src = this.iconDictionaryService.getIconSource(type) || '';\n config.actors.add(src, type);\n } else if (element.type.includes(elementTypes.WORKOBJECT)) {\n let src = this.iconDictionaryService.getIconSource(type) || '';\n config.workObjects.add(src, type);\n }\n });\n\n return config;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { BehaviorSubject } from 'rxjs';\nimport { UsedIconList } from 'src/app/Domain/Icon-Set-Configuration/UsedIconList';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n SNACKBAR_SUCCESS,\n} from '../../Domain/Common/constants';\nimport { Dictionary } from '../../Domain/Common/dictionary/dictionary';\nimport {\n CustomIconSetConfiguration,\n IconSetConfiguration,\n} from '../../Domain/Common/iconSetConfiguration';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { IconListItem } from '../../Domain/Icon-Set-Configuration/iconListItem';\nimport { getNameFromType } from '../../Utils/naming';\nimport { StorageService } from '../BrowserStorage/storage.service';\nimport { ImportDomainStoryService } from '../Import/import-domain-story.service';\nimport { TitleService } from '../Title/title.service';\nimport { IconSetConfigurationService } from './icon-set-configuration.service';\nimport { IconDictionaryService } from './icon-dictionary.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class IconSetCustomizationService {\n private readonly iconSetConfigurationTypes: BehaviorSubject;\n\n private allIconListItems = new Dictionary();\n\n private configurationHasChanged = false;\n\n selectedActors$ = new BehaviorSubject([]);\n selectedWorkobjects$ = new BehaviorSubject([]);\n private changedIconSetConfiguration: IconSetConfiguration | undefined;\n\n constructor(\n private configurationService: IconSetConfigurationService,\n private iconDictionaryService: IconDictionaryService,\n private importService: ImportDomainStoryService,\n private titleService: TitleService,\n private storageService: StorageService,\n private elementRegistryService: ElementRegistryService,\n private snackbar: MatSnackBar,\n ) {\n this.iconSetConfigurationTypes = new BehaviorSubject(\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix(),\n );\n\n this.selectedWorkobjects$.next(\n this.iconSetConfigurationTypes.value.workObjects,\n );\n this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors);\n\n iconDictionaryService\n .getAllIconDictionary()\n .keysArray()\n .forEach((iconName) => {\n this.addIconToAllIconList(iconName);\n });\n\n importService.importedConfigurationEvent.subscribe((config) => {\n this.importConfiguration(config);\n });\n const storedIconSetConfiguration =\n this.storageService.getStoredIconSetConfiguration();\n if (storedIconSetConfiguration) {\n this.importConfiguration(storedIconSetConfiguration, false);\n }\n const importedConfiguration = this.importService.getImportedConfiguration();\n if (importedConfiguration) {\n this.importConfiguration(importedConfiguration, false);\n }\n }\n\n importConfiguration(\n customConfig: IconSetConfiguration,\n saveIconSet = true,\n ): void {\n const actorKeys = customConfig.actors.keysArray();\n const workObjectKeys = customConfig.workObjects.keysArray();\n\n this.changeName(customConfig.name);\n actorKeys.forEach((iconName) => {\n if (!this.allIconListItems.has(iconName)) {\n this.addIconToAllIconList(iconName);\n }\n const selectedActorNames = this.selectedActors$.value;\n if (!selectedActorNames.includes(iconName)) {\n this.selectActor(iconName);\n }\n });\n workObjectKeys.forEach((iconName) => {\n if (!this.allIconListItems.has(iconName)) {\n this.addIconToAllIconList(iconName);\n }\n const selectedWorkobjectNames = this.selectedWorkobjects$.value;\n if (!selectedWorkobjectNames.includes(iconName)) {\n this.selectWorkObject(iconName);\n }\n });\n if (saveIconSet) {\n this.saveIconSet(this.elementRegistryService.getUsedIcons(), true);\n }\n }\n\n /** Getter & Setter **/\n getIconSetConfiguration(): BehaviorSubject {\n return this.iconSetConfigurationTypes;\n }\n\n getIconForName(iconName: string): BehaviorSubject {\n return this.allIconListItems.get(iconName);\n }\n\n isIconActor(iconName: string): boolean {\n return (\n this.iconSetConfigurationTypes.value.actors.filter(\n (actor: string) => actor === iconName,\n ).length > 0\n );\n }\n\n isIconWorkObject(iconName: string): boolean {\n return (\n this.iconSetConfigurationTypes.value.workObjects.filter(\n (workObject: string) => workObject === iconName,\n ).length > 0\n );\n }\n\n changeName(iconSetName: string): void {\n this.titleService.setIconSetName(iconSetName);\n const changedIconSet = this.iconSetConfigurationTypes.value;\n changedIconSet.name = iconSetName;\n this.iconSetConfigurationTypes.next(changedIconSet);\n }\n\n /** Selected Icons **/\n setAsUnassigned(iconName: string, isActor: boolean): void {\n if (isActor) {\n this.deselectActor(iconName);\n } else {\n this.deselectWorkobject(iconName);\n }\n this.updateIcon(false, false, iconName);\n }\n\n setAsActor(isActor: boolean, actor: string): void {\n if (isActor) {\n this.updateIcon(true, false, actor);\n this.selectActor(actor);\n this.deselectWorkobject(actor);\n } else {\n this.deselectActor(actor);\n this.updateIcon(false, false, actor);\n }\n }\n\n setAsWorkobject(isWorkobject: boolean, workobject: string): void {\n if (isWorkobject) {\n this.updateIcon(false, true, workobject);\n this.selectWorkObject(workobject);\n this.deselectActor(workobject);\n } else {\n this.deselectWorkobject(workobject);\n this.updateIcon(false, false, workobject);\n }\n }\n\n selectActor(actor: string): void {\n const value = this.iconSetConfigurationTypes.value;\n if (!value.actors.includes(actor)) {\n value.actors.push(actor);\n this.iconSetConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n }\n\n selectWorkObject(workObject: string): void {\n const value = this.iconSetConfigurationTypes.value;\n if (!value.workObjects.includes(workObject)) {\n value.workObjects.push(workObject);\n this.iconSetConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n }\n\n deselectActor(actor: string): void {\n if (this.iconSetConfigurationTypes) {\n this.iconSetConfigurationTypes.next({\n name: this.iconSetConfigurationTypes.value.name,\n actors: this.iconSetConfigurationTypes.value.actors.filter(\n (a: string) => !a.includes(actor),\n ),\n workObjects: this.iconSetConfigurationTypes.value.workObjects,\n });\n }\n this.updateActorSubject();\n }\n\n deselectWorkobject(workobject: string): void {\n if (this.iconSetConfigurationTypes) {\n this.iconSetConfigurationTypes.next({\n name: this.iconSetConfigurationTypes.value.name,\n actors: this.iconSetConfigurationTypes.value.actors,\n workObjects: this.iconSetConfigurationTypes.value.workObjects.filter(\n (w: string) => !w.includes(workobject),\n ),\n });\n }\n this.updateWorkObjectSubject();\n }\n\n setSelectedWorkObject(sortedList: string[]): void {\n const value = this.iconSetConfigurationTypes.value;\n value.workObjects = sortedList;\n this.iconSetConfigurationTypes.next(value);\n this.updateWorkObjectSubject();\n }\n\n setSelectedActors(sortedList: string[]): void {\n const value = this.iconSetConfigurationTypes.value;\n value.actors = sortedList;\n this.iconSetConfigurationTypes.next(value);\n this.updateActorSubject();\n }\n\n private updateActorSubject(): void {\n this.selectedActors$.next(this.iconSetConfigurationTypes.value.actors);\n this.configurationHasChanged = true;\n }\n\n private updateWorkObjectSubject(): void {\n this.selectedWorkobjects$.next(\n this.iconSetConfigurationTypes.value.workObjects,\n );\n this.configurationHasChanged = true;\n }\n\n /** Revert Icon Set **/\n resetIconSet(): void {\n const defaultConfig =\n this.configurationService.createMinimalConfigurationWithDefaultIcons();\n\n this.selectedWorkobjects$.value.forEach((workObjectName) => {\n if (!defaultConfig.workObjects.has(workObjectName)) {\n this.deselectWorkobject(workObjectName);\n }\n });\n this.selectedActors$.value.forEach((actorName) => {\n if (!defaultConfig.actors.has(actorName)) {\n this.deselectActor(actorName);\n }\n });\n\n this.iconSetConfigurationTypes.next({\n name: defaultConfig.name,\n actors: defaultConfig.actors.keysArray(),\n workObjects: defaultConfig.workObjects.keysArray(),\n } as CustomIconSetConfiguration);\n\n this.updateAllIconBehaviourSubjects();\n }\n\n cancel(): void {\n this.iconSetConfigurationTypes.next(\n this.configurationService.getCurrentConfigurationNamesWithoutPrefix(),\n );\n this.updateAllIconBehaviourSubjects();\n this.resetToInitialConfiguration();\n }\n\n private resetToInitialConfiguration(): void {\n this.updateActorSubject();\n this.updateWorkObjectSubject();\n }\n\n /** Persist Icon Set **/\n saveIconSet(usedIcons: UsedIconList, imported = false): void {\n const changedActors: string[] = [];\n const changedWorkobjects: string[] = [];\n if (this.configurationHasChanged) {\n const changedIconSet = this.createIconSetConfiguration();\n\n const configurationActors = changedIconSet.actors.keysArray();\n usedIcons?.actors.forEach((actor) => {\n if (\n !configurationActors?.includes(actor) &&\n !changedActors.includes(actor)\n ) {\n changedActors.push(actor);\n }\n });\n const configurationWorkobjects = changedIconSet.workObjects.keysArray();\n usedIcons?.workobjects.forEach((workobject) => {\n if (\n !configurationWorkobjects?.includes(workobject) &&\n !changedWorkobjects.includes(workobject)\n ) {\n changedWorkobjects.push(workobject);\n }\n });\n\n if (!changedActors.length && !changedWorkobjects.length) {\n this.changedIconSetConfiguration = changedIconSet;\n\n this.updateIcons(changedIconSet);\n\n this.storageService.setStoredIconSetConfiguration(\n this.changedIconSetConfiguration,\n );\n this.snackbar.open(\n imported\n ? 'Configuration imported successfully'\n : 'Configuration saved successfully',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_SUCCESS,\n },\n );\n }\n } else {\n this.snackbar.open(\n imported\n ? 'No configuration to be imported'\n : 'No configuration to be saved',\n undefined,\n {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n if (changedActors.length || changedWorkobjects.length) {\n if (changedActors.length) {\n const actors = changedActors.join(', ');\n this.snackbar.open(\n `The following icons are already in use as actors and cannot be changed: ${actors}`,\n undefined,\n {\n duration: SNACKBAR_DURATION * 3,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n if (changedWorkobjects.length) {\n const workobjects = changedWorkobjects.join(', ');\n this.snackbar.open(\n `The following icons are already in use as workobjects and cannot be changed: ${workobjects}`,\n undefined,\n {\n duration: SNACKBAR_DURATION * 3,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n }\n }\n\n exportIconSet(): void {\n this.configurationService.exportConfiguration();\n }\n\n getAndClearSavedConfiguration(): IconSetConfiguration | undefined {\n const temp = this.changedIconSetConfiguration;\n this.changedIconSetConfiguration = undefined;\n\n return temp;\n }\n\n private createIconSetConfiguration(): IconSetConfiguration {\n const actors = new Dictionary();\n const workObjects = new Dictionary();\n\n this.iconSetConfigurationTypes.value.actors.forEach((name: string) => {\n actors.add(this.iconDictionaryService.getIconSource(name), name);\n });\n this.iconSetConfigurationTypes.value.workObjects.forEach((name: string) => {\n workObjects.add(this.iconDictionaryService.getIconSource(name), name);\n });\n\n return {\n name: this.iconSetConfigurationTypes.value.name || '',\n actors,\n workObjects,\n };\n }\n\n /** Update Icons **/\n addNewIcon(iconName: string): void {\n const iconDict = new Dictionary();\n iconDict.add(this.getSrcForIcon(iconName), iconName);\n this.iconDictionaryService.addIconsToCss(iconDict);\n this.addIconToAllIconList(iconName);\n }\n\n private addIconToAllIconList(iconName: string): void {\n this.allIconListItems.add(\n new BehaviorSubject({\n name: iconName,\n svg: this.getSrcForIcon(iconName),\n isActor: this.isIconActor(iconName),\n isWorkObject: this.isIconWorkObject(iconName),\n }),\n iconName,\n );\n }\n\n private updateIcon(\n isActor: boolean,\n isWorkobject: boolean,\n iconName: string,\n ) {\n const iconBehaviourSubject = this.getIconForName(iconName);\n const icon = iconBehaviourSubject.value;\n icon.isActor = isActor;\n icon.isWorkObject = isWorkobject;\n\n iconBehaviourSubject.next(icon);\n }\n\n private updateAllIconBehaviourSubjects(): void {\n const customIconSetConfiguration = this.iconSetConfigurationTypes.value;\n this.allIconListItems.keysArray().forEach((iconName) => {\n if (customIconSetConfiguration.actors.includes(iconName)) {\n this.updateIcon(true, false, iconName);\n } else if (customIconSetConfiguration.workObjects.includes(iconName)) {\n this.updateIcon(false, true, iconName);\n } else {\n this.updateIcon(false, false, iconName);\n }\n });\n }\n\n private getSrcForIcon(name: string): string {\n let iconName: string;\n if (name.includes(elementTypes.DOMAINSTORY)) {\n // TODO: td: This returns empty every time!\n iconName = getNameFromType(name);\n } else {\n iconName = name;\n }\n const rawSrc = this.iconDictionaryService.getIconSource(iconName);\n\n if (!rawSrc) {\n return '';\n }\n\n if (rawSrc.startsWith('data')) {\n return rawSrc;\n } else {\n return 'data:image/svg+xml,' + rawSrc;\n }\n }\n\n private updateIcons(changedIconSet: IconSetConfiguration) {\n this.allIconListItems\n .keysArray()\n .forEach((item) => this.setAsUnassigned(item, this.isIconActor(item)));\n changedIconSet.actors.keysArray().forEach((actor) => {\n this.iconDictionaryService.registerIconForType(\n elementTypes.ACTOR,\n actor,\n this.iconDictionaryService.getFullDictionary().get(actor),\n );\n this.iconDictionaryService.unregisterIconForType(\n elementTypes.WORKOBJECT,\n actor,\n );\n this.setAsActor(true, actor);\n });\n changedIconSet.workObjects.keysArray().forEach((workObject) => {\n this.iconDictionaryService.registerIconForType(\n elementTypes.WORKOBJECT,\n workObject,\n this.iconDictionaryService.getFullDictionary().get(workObject),\n );\n this.iconDictionaryService.unregisterIconForType(\n elementTypes.ACTOR,\n workObject,\n );\n this.setAsWorkobject(true, workObject);\n });\n }\n}\n","import { EventEmitter, Injectable, OnDestroy } from '@angular/core';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/icon-dictionary.service';\nimport { Dictionary } from 'src/app/Domain/Common/dictionary/dictionary';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { TitleService } from 'src/app/Service/Title/title.service';\nimport { ImportRepairService } from 'src/app/Service/Import/import-repair.service';\nimport { Observable, Subscription } from 'rxjs';\nimport { RendererService } from 'src/app/Service/Renderer/renderer.service';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport {\n IconSetConfiguration,\n fromConfigurationFromFile,\n} from 'src/app/Domain/Common/iconSetConfiguration';\nimport { DialogService } from '../Dialog/dialog.service';\nimport { InfoDialogComponent } from '../../Presentation/Dialog/info-dialog/info-dialog.component';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { InfoDialogData } from '../../Domain/Dialog/infoDialogData';\nimport { restoreTitleFromFileName } from '../../Utils/sanitizer';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_TITLE,\n SNACKBAR_DURATION,\n SNACKBAR_ERROR,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\nimport { IconSetConfigurationService } from '../IconSetConfiguration/icon-set-configuration.service';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ImportDomainStoryService implements OnDestroy {\n titleSubscription: Subscription;\n descriptionSubscription: Subscription;\n\n title = INITIAL_TITLE;\n description = INITIAL_DESCRIPTION;\n private importedConfiguration: IconSetConfiguration | null = null;\n\n private importedConfigurationEmitter =\n new EventEmitter();\n\n constructor(\n private iconDictionaryService: IconDictionaryService,\n private importRepairService: ImportRepairService,\n private titleService: TitleService,\n private rendererService: RendererService,\n private dialogService: DialogService,\n private iconSetConfigurationService: IconSetConfigurationService,\n private snackbar: MatSnackBar,\n ) {\n this.titleSubscription = this.titleService.title$.subscribe(\n (title: string) => {\n this.title = title;\n },\n );\n this.descriptionSubscription = this.titleService.description$.subscribe(\n (description: string) => {\n this.description = description;\n },\n );\n }\n\n ngOnDestroy(): void {\n this.titleSubscription.unsubscribe();\n this.descriptionSubscription.unsubscribe();\n }\n\n get importedConfigurationEvent(): Observable {\n return this.importedConfigurationEmitter.asObservable();\n }\n\n getImportedConfiguration(): IconSetConfiguration {\n const config: IconSetConfiguration = {\n name: this.importedConfiguration?.name || '',\n actors: this.importedConfiguration?.actors || new Dictionary(),\n workObjects: this.importedConfiguration?.workObjects || new Dictionary(),\n };\n this.importedConfiguration = null;\n return config;\n }\n\n importDST(input: Blob, filename: string, isSVG: boolean): void {\n const fileReader = new FileReader();\n const titleText = restoreTitleFromFileName(filename, isSVG);\n\n // no need to put this on the commandStack\n this.titleService.updateTitleAndDescription(titleText, null, false);\n\n fileReader.onloadend = (e) => {\n if (e && e.target) {\n this.fileReaderFunction(e.target.result, isSVG, false);\n }\n };\n\n fileReader.readAsText(input);\n }\n\n importEGN(input: Blob, filename: string, isSVG: boolean): void {\n const fileReader = new FileReader();\n const titleText = restoreTitleFromFileName(filename, isSVG);\n\n // no need to put this on the commandStack\n this.titleService.updateTitleAndDescription(titleText, null, false);\n\n fileReader.onloadend = (e) => {\n if (e && e.target) {\n this.fileReaderFunction(e.target.result, isSVG, true);\n }\n };\n\n fileReader.readAsText(input);\n }\n\n private fileReaderFunction(\n text: string | ArrayBuffer | null,\n isSVG: boolean,\n isEGN: boolean,\n ): void {\n let dstText;\n if (typeof text === 'string') {\n if (isSVG) {\n dstText = this.removeXMLComments(text);\n } else {\n dstText = text;\n }\n\n let elements: any[];\n let config: IconSetConfiguration;\n let configFromFile: {\n name: string;\n actors: { [key: string]: any };\n workObjects: { [key: string]: any };\n };\n\n let dstAndConfig = this.extractDstAndConfig(dstText, isSVG);\n if (dstAndConfig == null) {\n return;\n }\n\n // current implementation\n if (dstAndConfig.domain) {\n configFromFile = isEGN\n ? dstAndConfig.domain\n : JSON.parse(dstAndConfig.domain);\n config = fromConfigurationFromFile(configFromFile);\n elements = isEGN ? dstAndConfig.dst : JSON.parse(dstAndConfig.dst);\n } else {\n // legacy implementation\n if (dstAndConfig.config) {\n configFromFile = JSON.parse(dstAndConfig.config);\n config = fromConfigurationFromFile(configFromFile);\n elements = JSON.parse(dstAndConfig.dst);\n } else {\n // implementation prior to configuration\n elements = JSON.parse(dstText);\n config =\n this.iconSetConfigurationService.createMinimalConfigurationWithDefaultIcons();\n }\n }\n\n const configChanged = this.checkConfigForChanges(config);\n\n let lastElement = elements[elements.length - 1];\n if (!lastElement.id) {\n lastElement = elements.pop();\n let importVersionNumber = lastElement;\n\n // if the last element has the importedVersionNumber has the tag version,\n // then there exists another meta tag 'info' for the description\n if (importVersionNumber.version) {\n lastElement = elements.pop();\n }\n\n if (importVersionNumber.version) {\n importVersionNumber = importVersionNumber.version as string;\n } else {\n importVersionNumber = '?';\n this.snackbar.open(`The version number is unreadable.`, undefined, {\n duration: SNACKBAR_DURATION,\n panelClass: SNACKBAR_ERROR,\n });\n }\n elements = this.handleVersionNumber(importVersionNumber, elements);\n }\n\n if (\n !this.importRepairService.checkForUnreferencedElementsInActivitiesAndRepair(\n elements,\n )\n ) {\n this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST');\n }\n\n this.titleService.updateTitleAndDescription(\n this.title,\n lastElement.info,\n false,\n );\n\n this.importRepairService.adjustPositions(elements);\n\n this.updateIconRegistries(elements, config);\n this.rendererService.importStory(elements, configChanged, config);\n }\n }\n\n private handleVersionNumber(\n importVersionNumber: string,\n elements: BusinessObject[],\n ): BusinessObject[] {\n const versionPrefix = +importVersionNumber.substring(\n 0,\n importVersionNumber.lastIndexOf('.'),\n );\n if (versionPrefix <= 0.5) {\n elements =\n this.importRepairService.updateCustomElementsPreviousV050(elements);\n this.showPreviousV050Dialog(versionPrefix);\n }\n return elements;\n }\n\n private extractDstAndConfig(dstText: string, isSVG: boolean) {\n let dstAndConfig = null;\n try {\n dstAndConfig = JSON.parse(dstText);\n } catch (e) {\n this.showBrokenImportDialog(isSVG ? 'SVG' : 'DST');\n }\n return dstAndConfig;\n }\n\n private removeXMLComments(xmlText: string): string {\n xmlText = xmlText.substring(xmlText.indexOf(''));\n while (xmlText.includes('')) {\n xmlText = xmlText.replace('', '');\n }\n xmlText = xmlText.replace('', '');\n xmlText = xmlText.replace('', '');\n return xmlText;\n }\n\n checkConfigForChanges(iconSetConfiguration: IconSetConfiguration): boolean {\n const newActorKeys = iconSetConfiguration.actors.keysArray();\n const newWorkObjectKeys = iconSetConfiguration.workObjects.keysArray();\n\n const currentActorKeys = this.iconDictionaryService.getTypeDictionaryKeys(\n elementTypes.ACTOR,\n );\n const currentWorkobjectKeys =\n this.iconDictionaryService.getTypeDictionaryKeys(elementTypes.WORKOBJECT);\n\n let changed = false;\n\n if (\n newActorKeys.length !== currentActorKeys.length ||\n newWorkObjectKeys.length !== currentWorkobjectKeys.length\n ) {\n return true;\n }\n\n for (let i = 0; i < newActorKeys.length; i++) {\n changed =\n this.clearName(currentActorKeys[i]) !== this.clearName(newActorKeys[i]);\n if (changed) {\n i = newActorKeys.length;\n }\n }\n if (changed) {\n return changed;\n }\n for (let i = 0; i < newWorkObjectKeys.length; i++) {\n changed =\n this.clearName(currentWorkobjectKeys[i]) !==\n this.clearName(newWorkObjectKeys[i]);\n if (changed) {\n i = newWorkObjectKeys.length;\n }\n }\n return changed;\n }\n\n private clearName(name: string): string {\n return name\n .replace(elementTypes.ACTOR, '')\n .replace(elementTypes.WORKOBJECT, '');\n }\n\n private updateIconRegistries(\n elements: BusinessObject[],\n config: IconSetConfiguration,\n ): void {\n const actorIcons = this.iconDictionaryService.getElementsOfType(\n elements,\n elementTypes.ACTOR,\n );\n const workObjectIcons = this.iconDictionaryService.getElementsOfType(\n elements,\n elementTypes.WORKOBJECT,\n );\n this.iconDictionaryService.updateIconRegistries(\n actorIcons,\n workObjectIcons,\n config,\n );\n\n this.setImportedConfigurationAndEmit(config);\n }\n\n private showPreviousV050Dialog(version: number): void {\n const title = 'Compatability-Warning';\n const text =\n 'The uploaded Domain-Story is from version ' +\n version +\n '. There may be problems with the default actors or workobjects contained in the story.';\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, text, true);\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n\n private setImportedConfigurationAndEmit(config: IconSetConfiguration) {\n this.importedConfiguration = config;\n this.importedConfigurationEmitter.emit(config);\n }\n\n private showBrokenImportDialog(type: string) {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n config.data = new InfoDialogData(\n 'Error during import',\n 'The uploaded ' +\n type +\n ' is not complete, there could be elements missing from the canvas.',\n true,\n false,\n );\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { Waypoint } from 'src/app/Domain/Common/waypoint';\nimport { ActivityBusinessObject } from '../../Domain/Common/activityBusinessObject';\n\n/**\n * Repairs broken Domain Stories so that it can be rendered onto the canvas\n * by removing activities and connections that reference elements that don't exists\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class ImportRepairService {\n checkForUnreferencedElementsInActivitiesAndRepair(\n elements: BusinessObject[],\n ): boolean {\n const activities: ActivityBusinessObject[] = [];\n const objectIDs: string[] = [];\n\n let complete = true;\n\n elements.forEach((element) => {\n const type = element.type;\n if (type === elementTypes.ACTIVITY || type === elementTypes.CONNECTION) {\n activities.push(element as ActivityBusinessObject);\n } else {\n objectIDs.push(element.id);\n }\n });\n\n activities.forEach((activity) => {\n const source = activity.source;\n const target = activity.target;\n if (!objectIDs.includes(source) || !objectIDs.includes(target)) {\n complete = false;\n const activityIndex = elements.indexOf(activity);\n elements = elements.splice(activityIndex, 1);\n }\n });\n return complete;\n }\n\n /**\n * Ensure backwards compatibility.\n * Previously Document had no special name and was just addressed as workObject\n * Bubble was renamed to Conversation\n */\n updateCustomElementsPreviousV050(\n elements: BusinessObject[],\n ): BusinessObject[] {\n for (const element of elements) {\n if (element.type === elementTypes.WORKOBJECT) {\n element.type = elementTypes.WORKOBJECT + 'Document';\n } else if (element.type === elementTypes.WORKOBJECT + 'Bubble') {\n element.type = elementTypes.WORKOBJECT + 'Conversation';\n }\n }\n return elements;\n }\n\n /**\n * Adjusts Positions of Elements to ensure the Domain Story starts in the visible parts of the canvas\n */\n adjustPositions(elements: BusinessObject[]): void {\n let xLeft = 0;\n let yUp = 0;\n let isFirst = true;\n\n this.findFirstElement(elements, isFirst, xLeft, yUp);\n\n if (xLeft < 75 || xLeft > 150 || yUp < 0 || yUp > 50) {\n // add Padding for the Palette and the top\n xLeft -= 75;\n yUp -= 50;\n\n elements.forEach((element) =>\n this.adjustElementPosition(element, xLeft, yUp),\n );\n }\n }\n\n private adjustElementPosition(\n element: BusinessObject,\n xLeft: number,\n yUp: number,\n ): void {\n if (\n element.type === elementTypes.ACTIVITY ||\n element.type === elementTypes.CONNECTION\n ) {\n const waypoints = (element as ActivityBusinessObject).waypoints;\n waypoints.forEach((point: Waypoint) => {\n point.x -= xLeft;\n point.y -= yUp;\n\n if (point.original) {\n point.original.x = point.x;\n point.original.y = point.y;\n }\n });\n } else {\n element.x -= xLeft;\n element.y -= yUp;\n }\n }\n\n private findFirstElement(\n elements: BusinessObject[],\n isFirst: boolean,\n xLeft: number,\n yUp: number,\n ) {\n elements.forEach((element) => {\n let elXLeft;\n let elYUp;\n if (\n element.type !== elementTypes.ACTIVITY &&\n element.type !== elementTypes.CONNECTION\n ) {\n if (isFirst) {\n xLeft = element.x;\n yUp = element.y;\n isFirst = false;\n }\n elXLeft = element.x;\n elYUp = element.y;\n if (elXLeft < xLeft) {\n xLeft = elXLeft;\n }\n if (elYUp < yUp) {\n yUp = elYUp;\n }\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { elementTypes } from 'src/app/Domain/Common/elementTypes';\nimport { MassNamingService } from 'src/app/Service/LabelDictionary/mass-naming.service';\nimport { IconDictionaryService } from '../IconSetConfiguration/icon-dictionary.service';\nimport { WorkObjectLabelEntry } from '../../Domain/LabelDictionary/workObjectLabelEntry';\nimport { LabelEntry } from '../../Domain/LabelDictionary/labelEntry';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LabelDictionaryService {\n activityLabels: LabelEntry[] = [];\n workObjektLabels: WorkObjectLabelEntry[] = [];\n\n constructor(\n private massNamingService: MassNamingService,\n private elementRegistryService: ElementRegistryService,\n private iconDictionaryService: IconDictionaryService,\n ) {}\n\n createLabelDictionaries(): void {\n this.activityLabels = [];\n this.workObjektLabels = [];\n\n const allObjects = this.elementRegistryService.getAllCanvasObjects();\n\n allObjects.forEach((element) => {\n const name = element.businessObject.name;\n if (\n name &&\n name.length > 0 &&\n element.type.includes(elementTypes.ACTIVITY) &&\n !this.activityLabels.map((a) => a.name).includes(name)\n ) {\n this.activityLabels.push({\n name,\n originalName: name,\n });\n } else if (\n name &&\n name.length > 0 &&\n element.type.includes(elementTypes.WORKOBJECT) &&\n !this.workObjektLabels.map((e) => e.name).includes(name)\n ) {\n const iconName = element.type.replace(elementTypes.WORKOBJECT, '');\n let icon = this.iconDictionaryService.getIconSource(iconName);\n if (!icon) {\n return;\n }\n if (!icon.startsWith('data')) {\n icon = 'data:image/svg+xml,' + icon;\n }\n this.workObjektLabels.push({\n name,\n originalName: name,\n icon,\n });\n }\n });\n this.activityLabels.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n this.workObjektLabels.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n }\n\n getActivityLabels(): LabelEntry[] {\n return this.activityLabels.slice();\n }\n\n getWorkObjectLabels(): WorkObjectLabelEntry[] {\n return this.workObjektLabels.slice();\n }\n\n getUniqueWorkObjectNames(): String[] {\n const workObjects = this.elementRegistryService.getAllWorkobjects();\n return [\n ...new Set(\n workObjects\n .filter((workObject) => {\n return !!workObject.businessObject.name;\n })\n .map((workObject) => workObject.businessObject.name),\n ),\n ];\n }\n\n massRenameLabels(\n activityNames: string[],\n originalActivityNames: string[],\n workObjectNames: string[],\n originalWorkObjectNames: string[],\n ): void {\n for (let i = 0; i < originalActivityNames.length; i++) {\n if (!activityNames[i]) {\n activityNames[i] = '';\n }\n if (!(activityNames[i] == originalActivityNames[i])) {\n this.massNamingService.massChangeNames(\n originalActivityNames[i],\n activityNames[i],\n elementTypes.ACTIVITY,\n );\n }\n }\n for (let i = 0; i < originalWorkObjectNames.length; i++) {\n if (!workObjectNames[i]) {\n workObjectNames[i] = '';\n }\n if (!(workObjectNames[i] == originalWorkObjectNames[i])) {\n this.massNamingService.massChangeNames(\n originalWorkObjectNames[i],\n workObjectNames[i],\n elementTypes.WORKOBJECT,\n );\n }\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { CanvasObject } from 'src/app/Domain/Common/canvasObject';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MassNamingService {\n constructor(\n private elementRegistryService: ElementRegistryService,\n private commandStackService: CommandStackService,\n ) {}\n\n massChangeNames(\n oldValue: string,\n newValue: string,\n type: elementTypes,\n ): void {\n const allRelevantObjects: CanvasObject[] = [];\n\n this.elementRegistryService.getAllCanvasObjects().forEach((element) => {\n if (\n element.type.includes(type) &&\n element.businessObject.name === oldValue\n ) {\n allRelevantObjects.push(element);\n }\n });\n\n const context = {\n elements: allRelevantObjects,\n newValue,\n };\n\n this.commandStackService.execute('domainStoryObjects.massRename', context);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { initializeContextPadProvider } from '../../Modeler/modeler/context-pad/domainStoryContextPadProvider';\nimport {\n getMultipleNumberRegistry,\n getNumberRegistry,\n initializeNumbering,\n setNumberIsMultiple,\n updateExistingNumbersAtEditing,\n} from '../../Modeler/modeler/numbering/numbering';\nimport { initializePalette } from '../../Modeler/modeler/palette/domainStoryPalette';\nimport { initializeRenderer } from '../../Modeler/modeler/domainStoryRenderer';\nimport {\n initializeLabelEditingProvider,\n toggleStashUse,\n} from '../../Modeler/modeler/labeling/dsLabelEditingProvider';\nimport { initializeReplaceOptions } from '../../Modeler/modeler/change-icon/replaceOptions';\n\nimport { DirtyFlagService } from '../DirtyFlag/dirty-flag.service';\nimport { IconDictionaryService } from '../IconSetConfiguration/icon-dictionary.service';\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\nimport { IconSetConfigurationService } from '../IconSetConfiguration/icon-set-configuration.service';\nimport { LabelDictionaryService } from '../LabelDictionary/label-dictionary.service';\nimport { elementTypes } from '../../Domain/Common/elementTypes';\nimport { ReplayStateService } from '../Replay/replay-state.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { ActivityDialogData } from '../../Domain/Dialog/activityDialogData';\nimport { ActivityDialogComponent } from '../../Presentation/Dialog/activity-dialog/activity-dialog.component';\nimport { DialogService } from '../Dialog/dialog.service';\nimport massRenameHandler from '../../Modeler/modeler/updateHandler/massRenameHandler';\nimport headlineAndDescriptionUpdateHandler from '../../Modeler/modeler/updateHandler/headlineAndDescriptionUpdateHandler';\nimport { TitleService } from '../Title/title.service';\nimport { ActivityCanvasObject } from '../../Domain/Common/activityCanvasObject';\nimport { HtmlPresentationService } from '../Export/html-presentation.service';\nimport { positionsMatch } from '../../Utils/mathExtensions';\nimport activityUpdateHandler, {\n initializeActivityUpdateHandler,\n} from '../../Modeler/modeler/updateHandler/activityUpdateHandlers';\nimport elementUpdateHandler from '../../Modeler/modeler/updateHandler/elementUpdateHandler';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class InitializerService {\n constructor(\n private dirtyFlagService: DirtyFlagService,\n private iconDictionaryService: IconDictionaryService,\n private elementRegistryService: ElementRegistryService,\n private configurationService: IconSetConfigurationService,\n private labelDictionaryService: LabelDictionaryService,\n private replayStateService: ReplayStateService,\n private dialogService: DialogService,\n private commandStackService: CommandStackService,\n private titleService: TitleService,\n private htmlPresentationService: HtmlPresentationService,\n ) {}\n\n initializeDomainStoryModelerClasses(): void {\n initializeContextPadProvider(\n this.dirtyFlagService,\n this.iconDictionaryService,\n );\n /** The Palette and the Context Menu need the Icons present in the Domain,\n * so the IconDictionaryService and the IconSetConfigurationService needs to be given to the Palette **/\n initializePalette(this.iconDictionaryService, this.configurationService);\n initializeRenderer(\n this.iconDictionaryService,\n this.elementRegistryService,\n this.dirtyFlagService,\n );\n initializeLabelEditingProvider(this.labelDictionaryService);\n initializeReplaceOptions(this.iconDictionaryService);\n initializeNumbering(this.elementRegistryService);\n initializeActivityUpdateHandler(this.elementRegistryService);\n }\n\n propagateDomainStoryModelerClassesToServices(\n commandStack: any,\n elementRegistry: any,\n canvas: any,\n selection: any,\n modeler: any,\n ): void {\n this.commandStackService.setCommandStack(commandStack);\n this.elementRegistryService.setElementRegistry(elementRegistry);\n this.htmlPresentationService.setModelerClasses(canvas, selection, modeler);\n }\n\n initializeDomainStoryModelerEventHandlers(\n commandStack: any,\n eventBus: any,\n ): void {\n activityUpdateHandler(commandStack, eventBus);\n massRenameHandler(commandStack, eventBus);\n elementUpdateHandler(commandStack, eventBus);\n headlineAndDescriptionUpdateHandler(commandStack, this.titleService);\n }\n\n initiateEventBusListeners(eventBus: any, commandStack: any): void {\n eventBus.on('element.dblclick', (e: any) => {\n if (!this.replayStateService.getReplayOn()) {\n const element = e.element;\n if (element.type === elementTypes.ACTIVITY) {\n // override the doubleClickListener on activities\n this.activityDoubleClick(element, eventBus, commandStack);\n } else {\n const renderedNumberRegistry = getNumberRegistry();\n\n // add a DoubleClickListener to the number on activities\n if (renderedNumberRegistry.length > 1) {\n const allActivities =\n this.elementRegistryService.getActivitiesFromActors();\n\n if (allActivities.length > 0) {\n const htmlCanvas = document.getElementById('canvas');\n if (htmlCanvas) {\n const container =\n htmlCanvas.getElementsByClassName('djs-container');\n const svgElements = container[0].getElementsByTagName('svg');\n const outerSVGElement = svgElements[0];\n const viewport =\n outerSVGElement.getElementsByClassName('viewport')[0];\n let transform = viewport.getAttribute('transform');\n\n let transformX = 0;\n let transformY = 0;\n let zoomX = 1;\n let zoomY = 1;\n let nums;\n\n const clickX = e.originalEvent.offsetX;\n const clickY = e.originalEvent.offsetY;\n\n // adjust for zoom and panning\n if (transform) {\n transform = transform.replace('matrix(', '');\n transform.replace(')', '');\n nums = transform.split(',');\n zoomX = parseFloat(nums[0]);\n zoomY = parseFloat(nums[3]);\n transformX = parseInt(nums[4], undefined);\n transformY = parseInt(nums[5], undefined);\n }\n\n const width = 25 * zoomX;\n const height = 22 * zoomY;\n\n for (let i = 1; i < renderedNumberRegistry.length; i++) {\n const currentNum = renderedNumberRegistry[i];\n if (currentNum) {\n const tspan = currentNum.getElementsByTagName('tspan')[0];\n const tx = tspan.getAttribute('x');\n const ty = tspan.getAttribute('y');\n const tNumber = parseInt(tspan.innerHTML, undefined);\n\n const elementX = Math.floor(\n tx * zoomX + (transformX - 11 * zoomX),\n );\n const elementY = Math.floor(\n ty * zoomY + (transformY - 15 * zoomY),\n );\n\n allActivities.forEach((activity: ActivityCanvasObject) => {\n const activityNumber = activity.businessObject.number;\n if (activityNumber === tNumber) {\n if (\n positionsMatch(\n width,\n height,\n elementX,\n elementY,\n clickX,\n clickY,\n )\n ) {\n this.activityDoubleClick(\n activity,\n eventBus,\n commandStack,\n );\n }\n }\n });\n }\n }\n }\n }\n }\n }\n }\n });\n\n // when in replay, do not allow any interaction on the canvas\n eventBus.on(\n [\n 'element.click',\n 'element.dblclick',\n 'element.mousedown',\n 'drag.init',\n 'canvas.viewbox.changing',\n 'autoPlace',\n 'popupMenu.open',\n ],\n 10000000000,\n (event: any) => {\n if (this.replayStateService.getReplayOn()) {\n event.stopPropagation();\n event.preventDefault();\n }\n },\n );\n }\n\n /** Overrrides for Canvas Functions **/\n private activityDoubleClick(\n activity: ActivityCanvasObject,\n eventBus: any,\n commandStack: any,\n ): void {\n const source = activity.source;\n\n // ensure the right number when changing the direction of an activity\n toggleStashUse(false);\n\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n if (\n activity.businessObject.number &&\n source &&\n source.type.includes(elementTypes.ACTOR)\n ) {\n config.data = new ActivityDialogData(\n activity,\n getMultipleNumberRegistry()[activity.businessObject.number],\n true,\n (data: any) =>\n this.saveActivityInputLabel(data, eventBus, commandStack),\n );\n } else if (source && source.type.includes(elementTypes.WORKOBJECT)) {\n config.data = new ActivityDialogData(\n activity,\n false,\n false,\n (activityData: any) =>\n this.saveActivityInputLabel(activityData, eventBus, commandStack),\n );\n }\n this.dialogService.openDialog(ActivityDialogComponent, config);\n }\n\n private saveActivityInputLabel(\n activityData: any,\n eventBus: any,\n commandStack: any,\n ): void {\n const label = activityData.activityLabel;\n const hasNumber = activityData.activityNumber ?? false;\n const activityNumber = activityData.activityNumber;\n const multipleNumberAllowed = activityData.multipleNumbers ?? false;\n const element = activityData.activity;\n\n const activitiesFromActors =\n this.elementRegistryService.getActivitiesFromActors();\n const index = activitiesFromActors.indexOf(element);\n\n activitiesFromActors.splice(index, 1);\n if (hasNumber) {\n setNumberIsMultiple(activityNumber, multipleNumberAllowed);\n }\n element.businessObject.multipleNumberAllowed = multipleNumberAllowed;\n\n let options: any;\n if (hasNumber) {\n options = {\n businessObject: element.businessObject,\n newLabel: label,\n newNumber: activityNumber,\n element,\n };\n } else {\n options = {\n businessObject: element.businessObject,\n newLabel: label,\n element,\n };\n }\n\n commandStack.execute('activity.changed', options);\n if (element.businessObject.multipleNumberAllowed !== false) {\n if (getMultipleNumberRegistry()[activityNumber] === false) {\n updateExistingNumbersAtEditing(\n activitiesFromActors,\n activityNumber,\n eventBus,\n );\n }\n } else if (element.businessObject.multipleNumberAllowed === false) {\n updateExistingNumbersAtEditing(\n activitiesFromActors,\n activityNumber,\n eventBus,\n );\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { assign } from 'min-dash';\nimport DomainStoryModeler from 'src/app/Modeler';\nimport { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\nimport { InitializerService } from './initializer.service';\nimport { ElementRegistryService } from '../ElementRegistry/element-registry.service';\nimport { IconDictionaryService } from '../IconSetConfiguration/icon-dictionary.service';\nimport { IconSetConfigurationService } from '../IconSetConfiguration/icon-set-configuration.service';\nimport { BusinessObject } from '../../Domain/Common/businessObject';\nimport { StorageService } from '../BrowserStorage/storage.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ModelerService {\n constructor(\n private initializerService: InitializerService,\n private elementRegistryService: ElementRegistryService,\n private iconDictionaryService: IconDictionaryService,\n private iconSetConfigurationService: IconSetConfigurationService,\n private storageService: StorageService,\n ) {}\n\n private modeler: any;\n private canvas: any;\n private elementRegistry: any;\n private commandStack: any;\n private selection: any;\n private eventBus: any;\n\n private encoded: string | undefined;\n\n postInit(): void {\n const storedIconSetConfiguration =\n this.storageService.getStoredIconSetConfiguration();\n if (storedIconSetConfiguration) {\n this.iconDictionaryService.setCustomConfiguration(\n storedIconSetConfiguration,\n );\n this.iconSetConfigurationService.loadConfiguration(\n storedIconSetConfiguration,\n );\n }\n this.initializerService.initializeDomainStoryModelerClasses();\n this.modeler = new DomainStoryModeler({\n container: '#canvas',\n keyboard: {\n bindTo: document,\n },\n\n // Disable BPMN-SearchModule and re-enable browser Search\n additionalModules: [\n {\n bpmnSearch: ['value', 'foo'],\n },\n ],\n });\n\n if (this.modeler.get) {\n this.canvas = this.modeler.get('canvas');\n this.elementRegistry = this.modeler.get('elementRegistry');\n this.eventBus = this.modeler.get('eventBus');\n this.commandStack = this.modeler.get('commandStack');\n this.selection = this.modeler.get('selection');\n }\n\n this.initializerService.initializeDomainStoryModelerEventHandlers(\n this.commandStack,\n this.eventBus,\n );\n this.initializerService.propagateDomainStoryModelerClassesToServices(\n this.commandStack,\n this.elementRegistry,\n this.canvas,\n this.selection,\n this.modeler,\n );\n\n const exportArtifacts = this.debounce(this.saveSVG, 500);\n if (this.modeler.get) {\n this.modeler.on('commandStack.changed', exportArtifacts);\n }\n\n this.initializerService.initiateEventBusListeners(\n this.eventBus,\n this.commandStack,\n );\n\n this.modeler.createDiagram();\n // expose bpmnjs to window for debugging purposes\n assign(window, { bpmnjs: this.modeler });\n\n this.startDebounce();\n }\n\n restart(\n iconSetConfiguration?: IconSetConfiguration,\n domainStory?: BusinessObject[],\n ): void {\n const currentStory =\n domainStory != undefined\n ? domainStory\n : this.elementRegistryService\n .createObjectListForDSTDownload()\n .map((e) => e.businessObject);\n if (!iconSetConfiguration) {\n iconSetConfiguration =\n this.storageService.getStoredIconSetConfiguration();\n }\n if (iconSetConfiguration) {\n this.storageService.setStoredIconSetConfiguration(iconSetConfiguration);\n this.iconDictionaryService.setCustomConfiguration(iconSetConfiguration);\n this.iconSetConfigurationService.loadConfiguration(iconSetConfiguration);\n }\n\n this.elementRegistryService.clear();\n this.modeler?.destroy();\n this.postInit();\n if (currentStory && this.modeler.get) {\n this.modeler.importCustomElements(currentStory);\n }\n }\n\n /** Interactions with the Modeler **/\n getModeler(): any {\n return this.modeler;\n }\n\n commandStackChanged(): void {\n // to update the title of the svg, we need to tell the command stack, that a value has changed\n this.eventBus.fire(\n 'commandStack.changed',\n this.debounce(this.saveSVG, 500),\n );\n }\n\n startDebounce(): void {\n this.debounce(this.saveSVG, 500);\n }\n\n debounce(fn: any, timeout: number): any {\n return () => {\n let timer;\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(() => {\n // tslint:disable-next-line:no-unused-expression\n fn(this.modeler).then((svg: string) => {\n this.encoded = svg;\n }) as Promise;\n }, timeout);\n };\n }\n\n getEncoded(): string {\n return this.encoded ? this.encoded : '';\n }\n\n async saveSVG(modeler: any): Promise {\n try {\n const result = await modeler.saveSVG();\n return result.svg;\n } catch (err) {\n alert('There was an error saving the SVG.\\n' + err);\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\nimport { BusinessObject } from 'src/app/Domain/Common/businessObject';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { DirtyFlagService } from 'src/app/Service/DirtyFlag/dirty-flag.service';\nimport { IconSetConfiguration } from 'src/app/Domain/Common/iconSetConfiguration';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RendererService {\n constructor(\n private modelerService: ModelerService,\n private elementRegistryService: ElementRegistryService,\n private dirtyFlagService: DirtyFlagService,\n ) {}\n\n renderStory(domainStory: BusinessObject[]): void {\n this.modelerService.getModeler().importCustomElements(domainStory);\n }\n\n reset(): void {\n this.renderStory([]);\n }\n\n importStory(\n domainStory: BusinessObject[],\n configurationChange: boolean,\n config?: IconSetConfiguration,\n makeClean = true,\n ): void {\n this.modelerService.restart(config, domainStory);\n this.renderStory(domainStory);\n\n this.elementRegistryService.correctInitialize();\n\n this.modelerService.commandStackChanged();\n this.modelerService.startDebounce();\n\n if (makeClean) {\n this.dirtyFlagService.makeClean();\n }\n }\n\n getStory(): BusinessObject[] {\n return this.elementRegistryService\n .createObjectListForDSTDownload()\n .map((c) => c.businessObject);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReplayStateService {\n private replayOnSubject = new BehaviorSubject(false);\n\n replayOn$ = this.replayOnSubject.asObservable();\n\n setReplayState(state: boolean): void {\n this.replayOnSubject.next(state);\n }\n\n getReplayOn(): boolean {\n return this.replayOnSubject.value;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ReplayStateService } from 'src/app/Service/Replay/replay-state.service';\nimport { DomManipulationService } from 'src/app/Service/DomManipulation/dom-manipulation.service';\nimport { StorySentence } from 'src/app/Domain/Replay/storySentence';\nimport { StoryCreatorService } from './storyCreator/story-creator.service';\nimport { BehaviorSubject } from 'rxjs';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport {\n SNACKBAR_DURATION,\n SNACKBAR_INFO,\n} from '../../Domain/Common/constants';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ReplayService {\n private story: StorySentence[] = [];\n private currentSentence = new BehaviorSubject(-1);\n private maxSentenceNumber = new BehaviorSubject(0);\n\n currentSentence$ = this.currentSentence.asObservable();\n maxSentenceNumber$ = this.maxSentenceNumber.asObservable();\n\n constructor(\n private replayStateService: ReplayStateService,\n private domManipulationService: DomManipulationService,\n private storyCreatorService: StoryCreatorService,\n private snackbar: MatSnackBar,\n ) {}\n\n isReplayable(): boolean {\n return this.storyCreatorService.traceActivitiesAndCreateStory().length > 0;\n }\n\n initializeReplay(): void {\n this.currentSentence.next(1);\n this.story = this.storyCreatorService.traceActivitiesAndCreateStory();\n this.maxSentenceNumber.next(this.story.length);\n }\n\n getCurrentSentenceNumber(): number {\n return this.currentSentence.value;\n }\n\n getMaxSentenceNumber(): number {\n return this.maxSentenceNumber.value;\n }\n\n nextSentence(): void {\n if (this.currentSentence.value < this.story.length) {\n this.currentSentence.next(this.currentSentence.value + 1);\n this.showCurrentSentence();\n }\n }\n\n previousSentence(): void {\n if (this.currentSentence.value > 1) {\n this.currentSentence.next(this.currentSentence.value - 1);\n this.showCurrentSentence();\n }\n }\n\n private showCurrentSentence() {\n this.domManipulationService.showSentence(\n this.story[this.currentSentence.value - 1],\n this.currentSentence.value > 1\n ? this.story[this.currentSentence.value - 2]\n : undefined,\n );\n }\n\n startReplay(): void {\n this.initializeReplay();\n if (this.story?.length) {\n const missingSentences = this.storyCreatorService.getMissingSentences(\n this.story,\n );\n if (missingSentences.length === 0) {\n this.replayStateService.setReplayState(true);\n this.domManipulationService.showSentence(\n this.story[this.currentSentence.getValue() - 1],\n );\n } else {\n const sentence = missingSentences.join(', ');\n this.snackbar.open(\n missingSentences.length === 1\n ? `The Domain Story is not complete. Sentence ${sentence} is missing.`\n : `The Domain Story is not complete. Sentences ${sentence} are missing.`,\n undefined,\n {\n duration: SNACKBAR_DURATION * 2,\n panelClass: SNACKBAR_INFO,\n },\n );\n }\n } else {\n this.snackbar.open('You need a Domain Story for replay.', undefined, {\n duration: SNACKBAR_DURATION * 2,\n panelClass: SNACKBAR_INFO,\n });\n }\n }\n\n stopReplay(): void {\n this.currentSentence.next(-1);\n this.maxSentenceNumber.next(0);\n this.replayStateService.setReplayState(false);\n this.domManipulationService.showAll();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { elementTypes } from '../../../Domain/Common/elementTypes';\nimport { ActivityCanvasObject } from '../../../Domain/Common/activityCanvasObject';\nimport { BusinessObject } from '../../../Domain/Common/businessObject';\nimport { CanvasObject } from '../../../Domain/Common/canvasObject';\nimport { ElementRegistryService } from '../../ElementRegistry/element-registry.service';\nimport { StorySentence } from '../../../Domain/Replay/storySentence';\nimport { Dictionary } from '../../../Domain/Common/dictionary/dictionary';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class StoryCreatorService {\n constructor(private elementRegistryService: ElementRegistryService) {}\n\n traceActivitiesAndCreateStory(): StorySentence[] {\n const tracedActivityMap = new Dictionary();\n const story: StorySentence[] = [];\n const activities = this.elementRegistryService.getActivitiesFromActors();\n\n activities.forEach((activity) => {\n const activityNumber = Number(activity.businessObject.number); // Sometimes the activityNumber is a string for some reason\n const tracedItem = tracedActivityMap.get(`${activityNumber - 1}`)\n ? tracedActivityMap.get(`${activityNumber - 1}`)\n : [];\n tracedItem.push(activity);\n tracedActivityMap.set(`${activityNumber - 1}`, tracedItem);\n });\n\n for (\n let i = 0;\n i <= Math.max(...tracedActivityMap.keysArray().map((it) => Number(it)));\n i++\n ) {\n this.createSentence(tracedActivityMap, i, story);\n }\n this.addGroupsToLastSentence(story);\n return story;\n }\n\n private createSentence(\n tracedActivityMap: Dictionary,\n i: number,\n story: StorySentence[],\n ): void {\n const sentenceObjects = this.getSentenceObjects(\n tracedActivityMap.get(`${i}`) || [],\n );\n const highlightedElements = sentenceObjects.map((t) => t.id);\n if (i > 0) {\n story[i - 1].objects.forEach((object) => {\n if (!sentenceObjects.includes(object)) {\n sentenceObjects.push(object);\n }\n });\n }\n story[i] = {\n highlightedObjects: highlightedElements,\n objects: sentenceObjects,\n };\n }\n\n getMissingSentences(story: StorySentence[]): number[] {\n if (!story || story.length === 0) {\n return [];\n }\n\n const missingSentences: number[] = [];\n for (let i = 0; i < story.length; i++) {\n if (\n !story[i] ||\n story[i].objects.length <= 0 ||\n story[i].highlightedObjects.length === 0 ||\n story[i].objects.filter(\n (element) => element.type === elementTypes.ACTIVITY,\n ).length <= 0\n ) {\n missingSentences.push(i + 1);\n }\n }\n return missingSentences;\n }\n\n private getSentenceObjects(\n tracedActivity: ActivityCanvasObject[],\n ): BusinessObject[] {\n const initialSource: CanvasObject[] = [];\n const activities = tracedActivity;\n const targetObjects: CanvasObject[] = [];\n\n tracedActivity.forEach((parallelSentence: ActivityCanvasObject) => {\n initialSource.push(parallelSentence.source);\n\n const firstTarget = parallelSentence.target;\n targetObjects.push(firstTarget);\n\n // check the outgoing activities for each target\n for (const checkTarget of targetObjects) {\n if (\n checkTarget.businessObject &&\n !checkTarget.businessObject.type.includes('actor') &&\n checkTarget.outgoing\n ) {\n // check the target for each outgoing activity\n checkTarget.outgoing.forEach((activity: ActivityCanvasObject) => {\n activities.push(activity);\n const activityTarget = activity.target;\n if (activityTarget && !targetObjects.includes(activityTarget)) {\n targetObjects.push(activityTarget);\n }\n });\n }\n }\n });\n return initialSource\n .map((e) => e.businessObject)\n .concat(activities.map((a) => a.businessObject))\n .concat(targetObjects.map((t) => t.businessObject));\n }\n\n private addGroupsToLastSentence(story: StorySentence[]): void {\n const groups = this.elementRegistryService.getAllGroups() as CanvasObject[];\n if (groups.length > 0) {\n story[story.length - 1].objects = story[story.length - 1].objects.concat(\n groups.map((g) => g.businessObject),\n );\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SettingsService {\n private showSettings = new BehaviorSubject(false);\n showSettings$ = this.showSettings.asObservable();\n\n close(): void {\n this.showSettings.next(false);\n }\n\n open(): void {\n this.showSettings.next(true);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { environment } from '../../../environments/environment';\nimport {\n INITIAL_DESCRIPTION,\n INITIAL_ICON_SET_NAME,\n INITIAL_TITLE,\n} from '../../Domain/Common/constants';\nimport { CommandStackService } from '../CommandStack/command-stack.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TitleService {\n private titleSubject = new BehaviorSubject(INITIAL_TITLE);\n private descriptionSubject = new BehaviorSubject(INITIAL_DESCRIPTION);\n private iconSetNameSubject = new BehaviorSubject(\n INITIAL_ICON_SET_NAME,\n );\n private showDescriptionSubject = new BehaviorSubject(true);\n\n title$ = this.titleSubject.asObservable();\n description$ = this.descriptionSubject.asObservable();\n showDescription$ = this.showDescriptionSubject.asObservable();\n iconSetName$ = this.iconSetNameSubject.asObservable();\n\n constructor(private commandStackService: CommandStackService) {}\n\n updateTitleAndDescription(\n title: string | null,\n description: string | null,\n allowUndo: boolean,\n ): void {\n if (allowUndo) {\n this.fireTitleAndDescriptionUpdate(title, description);\n } else {\n this.updateTitle(title);\n this.updateDescription(description);\n }\n }\n\n reset(): void {\n this.updateTitleAndDescription(INITIAL_TITLE, INITIAL_DESCRIPTION, false);\n }\n\n private updateTitle(inputTitle: string | null): void {\n const title =\n !inputTitle || inputTitle.trim().length === 0\n ? INITIAL_TITLE\n : inputTitle;\n\n this.titleSubject.next(title);\n document.title = title === INITIAL_TITLE ? 'egon.io' : title;\n }\n\n private updateDescription(description: string | null): void {\n this.descriptionSubject.next(description ?? this.descriptionSubject.value);\n }\n\n setShowDescription(show: boolean): void {\n this.showDescriptionSubject.next(show);\n }\n\n setIconSetName(name: string): void {\n this.iconSetNameSubject.next(name);\n }\n\n getTitle(): string {\n return this.titleSubject.value;\n }\n\n getDescription(): string {\n return this.descriptionSubject.value;\n }\n\n getIconSetName(): string {\n return this.iconSetNameSubject.value;\n }\n\n getVersion(): string {\n return environment.version;\n }\n\n hasTitleOrDescription(): boolean {\n return (\n (this.getTitle().trim().length > 0 &&\n this.getTitle() !== INITIAL_TITLE) ||\n (this.getDescription().trim().length > 0 &&\n this.getDescription() !== INITIAL_DESCRIPTION)\n );\n }\n\n private fireTitleAndDescriptionUpdate(\n newTitle: string | null,\n newDescription: string | null,\n ): void {\n const context = {\n newTitle,\n newDescription,\n };\n this.commandStackService.execute(\n 'story.updateHeadlineAndDescription',\n context,\n );\n }\n}\n","'use strict';\n\n// convert rad to deg\nexport function degrees(radians: number): number {\n return (radians * 180) / Math.PI;\n}\n\n// calculate the angle between two points in 2D\nexport function angleBetween(\n startPoint: Point,\n endPoint: Point,\n): number | undefined {\n let quadrant;\n\n // determine in which quadrant we are\n if (startPoint.x <= endPoint.x) {\n if (startPoint.y >= endPoint.y) {\n quadrant = 0;\n } // upper right quadrant\n else {\n quadrant = 3;\n } // lower right quadrant\n } else {\n if (startPoint.y >= endPoint.y) {\n quadrant = 1;\n } // upper left Quadrant\n else {\n quadrant = 2;\n } // lower left quadrant\n }\n\n const adjacent = Math.abs(startPoint.y - endPoint.y);\n const opposite = Math.abs(startPoint.x - endPoint.x);\n\n // since the arcus-tangens only gives values between 0 and 90, we have to adjust for the quadrant we are in\n\n if (quadrant === 0) {\n return 90 - degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 1) {\n return 90 + degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 2) {\n return 270 - degrees(Math.atan2(opposite, adjacent));\n }\n if (quadrant === 3) {\n return 270 + degrees(Math.atan2(opposite, adjacent));\n }\n return undefined;\n}\n\nexport function positionsMatch(\n width: number,\n height: number,\n elementX: number,\n elementY: number,\n clickX: number,\n clickY: number,\n): boolean {\n if (clickX > elementX && clickX < elementX + width) {\n if (clickY > elementY && clickY < elementY + height) {\n return true;\n }\n }\n return false;\n}\n\nexport class Point {\n y = 0;\n x = 0;\n}\n","import { elementTypes } from 'src/app/Domain/Common/elementTypes';\n\n// TODO: td: This can cause a lot of errors\nexport function getNameFromType(type: string): string {\n if (type.includes(elementTypes.ACTOR)) {\n return type.replace(elementTypes.ACTOR, '');\n } else if (type.includes(elementTypes.WORKOBJECT)) {\n return type.replace(elementTypes.WORKOBJECT, '');\n }\n return '';\n}\n","'use strict';\n\n// sanitize user-Input to be Desktop-Filename safe\nexport function sanitizeForDesktop(str: string): string {\n const map: { [key: string]: string } = {\n '/': '',\n '\\\\': '',\n ':': '',\n '*': '',\n '?': '',\n '\"': '',\n '<': '',\n '>': '',\n '|': '',\n };\n const reg = /[/\\\\:*?\"<>|]/gi;\n return str ? str.replace(reg, (match) => map[match]) : '';\n}\n\nexport function sanitizeIconName(name: string): string {\n const map: { [key: string]: string } = {\n '/': '',\n '\\\\': '',\n ':': '',\n '*': '',\n '?': '',\n '\"': '',\n '<': '',\n '>': '',\n '|': '',\n '(': '',\n ')': '',\n ' ': '-',\n '.': '_',\n };\n const reg = /[/\\\\:*?\"<>|() .]/gi;\n return name\n ? name.replace(reg, (match) => {\n return map[match];\n })\n : '';\n}\n\nexport function restoreTitleFromFileName(\n filename: string,\n isSVG: boolean,\n): string {\n let title;\n\n const domainStoryRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn)/;\n const svgRegex = /_\\d+-\\d+-\\d+( ?_?-?\\(\\d+\\))?(-?\\d)?(.dst|.egn).svg/;\n\n const egnSuffix = '.egn';\n const dstSuffix = '.dst';\n const svgSuffix = '.svg';\n\n let filenameWithoutDateSuffix = filename.replace(\n isSVG ? svgRegex : domainStoryRegex,\n '',\n );\n if (filenameWithoutDateSuffix.includes(isSVG ? svgSuffix : dstSuffix)) {\n filenameWithoutDateSuffix = filenameWithoutDateSuffix\n .replace(svgSuffix, '')\n .replace(dstSuffix, '')\n .replace(egnSuffix, '');\n }\n title = filenameWithoutDateSuffix;\n return title;\n}\n","import { Component, OnInit } from '@angular/core';\nimport { SettingsService } from 'src/app/Service/Settings/settings.service';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { DialogService } from './Service/Dialog/dialog.service';\nimport { MatDialogConfig } from '@angular/material/dialog';\nimport { InfoDialogData } from './Domain/Dialog/infoDialogData';\nimport { InfoDialogComponent } from './Presentation/Dialog/info-dialog/info-dialog.component';\nimport { TitleService } from './Service/Title/title.service';\nimport { ExportService } from './Service/Export/export.service';\nimport { ReplayStateService } from './Service/Replay/replay-state.service';\nimport { ReplayService } from './Service/Replay/replay.service';\nimport { environment } from '../environments/environment';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n})\nexport class AppComponent implements OnInit {\n showSettings$: Observable | BehaviorSubject;\n showDescription$: Observable;\n version: string = environment.version;\n\n constructor(\n private settingsService: SettingsService,\n private dialogService: DialogService,\n private titleService: TitleService,\n private exportService: ExportService,\n private replayStateService: ReplayStateService,\n replayService: ReplayService,\n ) {\n this.showSettings$ = new BehaviorSubject(false);\n this.showDescription$ = new BehaviorSubject(true);\n\n document.addEventListener('keydown', (e: KeyboardEvent) => {\n if (e.ctrlKey && e.key === 's') {\n e.preventDefault();\n e.stopPropagation();\n if (this.exportService.isDomainStoryExportable()) {\n this.exportService.downloadDST();\n }\n }\n if (e.ctrlKey && e.key === 'l') {\n e.preventDefault();\n e.stopPropagation();\n document.getElementById('import')?.click();\n }\n if (\n (e.key === 'ArrowRight' || e.key === 'ArrowUp') &&\n this.replayStateService.getReplayOn()\n ) {\n e.preventDefault();\n e.stopPropagation();\n replayService.nextSentence();\n }\n if (\n (e.key === 'ArrowLeft' || e.key === 'ArrowDown') &&\n this.replayStateService.getReplayOn()\n ) {\n e.preventDefault();\n e.stopPropagation();\n replayService.previousSentence();\n }\n });\n }\n\n ngOnInit(): void {\n this.showDescription$ = this.titleService.showDescription$;\n this.showSettings$ = this.settingsService.showSettings$;\n }\n\n openLinkDialog(link: string, title: string, text: string): void {\n const config = new MatDialogConfig();\n config.disableClose = false;\n config.autoFocus = true;\n\n config.data = new InfoDialogData(title, text, true, true, link);\n\n this.dialogService.openDialog(InfoDialogComponent, config);\n }\n}\n","
\n \n \n \n\n \n \n
\n\n \n \n \"Egon\n egon.io\n version: \n {{ version }}\n by \n \"WPS\n WPS\n \n\n \n Privacy\n \n\n \n Imprint\n \n \n\n","import { ApplicationRef, DoBootstrap, NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions,\n} from '@angular/material/checkbox';\n\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { HeaderComponent } from 'src/app/Presentation/Header/header.component';\nimport { SettingsComponent } from 'src/app/Presentation/Settings/settings.component';\nimport { AppComponent } from 'src/app/app.component';\nimport { ExportService } from 'src/app/Service/Export/export.service';\nimport { ImportDomainStoryService } from 'src/app/Service/Import/import-domain-story.service';\nimport { ImportRepairService } from 'src/app/Service/Import/import-repair.service';\nimport { ModelerService } from 'src/app/Service/Modeler/modeler.service';\nimport { TitleService } from 'src/app/Service/Title/title.service';\nimport { LabelDictionaryService } from 'src/app/Service/LabelDictionary/label-dictionary.service';\nimport { ReplayService } from 'src/app/Service/Replay/replay.service';\nimport { ElementRegistryService } from 'src/app/Service/ElementRegistry/element-registry.service';\nimport { IconSetConfigurationService } from 'src/app/Service/IconSetConfiguration/icon-set-configuration.service';\nimport { MassNamingService } from 'src/app/Service/LabelDictionary/mass-naming.service';\nimport { InfoDialogComponent } from 'src/app/Presentation/Dialog/info-dialog/info-dialog.component';\nimport { ExportDialogComponent } from 'src/app/Presentation/Dialog/export-dialog/export-dialog.component';\nimport { ActivityDialogComponent } from 'src/app/Presentation/Dialog/activity-dialog/activity-dialog.component';\nimport { UntypedFormBuilder, ReactiveFormsModule } from '@angular/forms';\nimport { HeaderDialogComponent } from 'src/app/Presentation/Dialog/header-dialog/header-dialog.component';\nimport { IconDictionaryService } from 'src/app/Service/IconSetConfiguration/icon-dictionary.service';\nimport { ModelerComponent } from 'src/app/Presentation/Canvas/modeler.component';\nimport { SettingsModule } from 'src/app/Modules/settings.module';\nimport { AutosaveService } from './Service/Autosave/autosave.service';\nimport { DomainStoryModelerModuleModule } from './Modules/domain-story-modeler-module.module';\nimport { LabelDictionaryDialogComponent } from './Presentation/Dialog/label-dictionary-dialog/label-dictionary-dialog.component';\nimport { MaterialModule } from './material.module';\n\n@NgModule({\n declarations: [\n HeaderComponent,\n SettingsComponent,\n AppComponent,\n InfoDialogComponent,\n ExportDialogComponent,\n ActivityDialogComponent,\n HeaderDialogComponent,\n ModelerComponent,\n LabelDictionaryDialogComponent,\n ],\n imports: [\n BrowserModule,\n NoopAnimationsModule,\n ReactiveFormsModule,\n SettingsModule,\n DomainStoryModelerModuleModule,\n MaterialModule,\n ],\n providers: [\n AutosaveService,\n ExportService,\n ImportDomainStoryService,\n ImportRepairService,\n IconDictionaryService,\n TitleService,\n LabelDictionaryService,\n ReplayService,\n ElementRegistryService,\n IconSetConfigurationService,\n ModelerService,\n MassNamingService,\n UntypedFormBuilder,\n {\n provide: MAT_CHECKBOX_DEFAULT_OPTIONS,\n useValue: { clickAction: 'noop' } as MatCheckboxDefaultOptions,\n },\n ],\n})\nexport class AppModule implements DoBootstrap {\n constructor(private autosaveService: AutosaveService) {\n // autosaveService wird so automatisch initialisiert, auf keinen Fall entfernen!\n }\n\n ngDoBootstrap(app: ApplicationRef): void {\n const componentElement = document.createElement('app-root');\n document.body.append(componentElement);\n app.bootstrap(AppComponent);\n }\n}\n","import { MatDialogModule } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { NgModule } from '@angular/core';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatGridListModule } from '@angular/material/grid-list';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatListModule } from '@angular/material/list';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\n@NgModule({\n imports: [\n MatButtonModule,\n MatButtonToggleModule,\n MatListModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatGridListModule,\n MatInputModule,\n MatToolbarModule,\n MatExpansionModule,\n MatSnackBarModule,\n MatCardModule,\n ],\n exports: [\n MatButtonModule,\n MatButtonToggleModule,\n MatListModule,\n MatCheckboxModule,\n MatDialogModule,\n MatFormFieldModule,\n MatGridListModule,\n MatInputModule,\n MatToolbarModule,\n MatExpansionModule,\n MatSnackBarModule,\n MatCardModule,\n ],\n})\nexport class MaterialModule {}\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n production: false,\n version: '2.0.0-dev',\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic()\n .bootstrapModule(AppModule)\n .catch((err) => console.error(err));\n"],"names":["Modeler","ResizeModule","assign","isArray","inherits","DomainStoryModule","LabelEditingModule","ModelingModule","elementTypes","DomainStoryModeler","options","call","_customElements","_groupElements","prototype","_modules","concat","_addCustomShape","customElement","parentId","parent","children","push","canvas","get","elementFactory","customAttrs","businessObject","customShape","create","isGroup","id","parentShape","addShape","_addCustomConnection","elementRegistry","connection","source","target","addConnection","importCustomElements","elements","fire","addCustomElements","customElements","Error","shapes","connections","groups","forEach","isConnection","getCustomElements","createDiagram","done","element","type","ACTIVITY","CONNECTION","GROUP","Replace","modeling","_modeling","replaceElement","oldElement","newElementData","newElement","setCenterOfElement","outgoingActivities","outgoing","incomingActivities","incoming","x","Math","ceil","width","y","height","name","replaceShape","replaceOptions","ReplaceMenuProvider","_dsReplace","$inject","getEntries","entries","includes","actorReplaceOptions","workObjectReplaceOptions","_createEntries","menuEntries","self","definition","entry","_createMenuEntry","action","replaceAction","label","className","actionName","iconDictionaryService","initializeReplaceOptions","iconDictionary","actorTypes","getTypeDictionary","ACTOR","replaceOption","i","keysArray","actorType","typeName","toLowerCase","getIconForBPMN","workObjectTypes","WORKOBJECT","workObjectType","ContextPadProvider","bind","generateAutomaticNumber","getAllStandardIconKeys","dirtyFlagService","initializeContextPadProvider","dirtyFlag","DomainStoryContextPadProvider","injector","connect","translate","contextPad","popupMenu","replaceMenuProvider","commandStack","eventBus","startConnect","selectedElement","invoke","autoPlace","cached","getContextPadEntries","colorPicker","document","getElementById","onchange","ev","context","newColor","value","execute","makeDirty","registerProvider","allStandardIconKeys","actions","event","autoActivate","start","replace","addColorChange","addConnectWithActivity","addTextAnnotation","addActors","appendAction","addWorkObjects","addChangeWorkObjectTypeMenu","addChangeActorTypeMenu","delete","deleteGroup","group","title","click","removeGroup","moveDeleteActionToEndOfArray","removeElements","changeDirection","position","getReplaceMenuPosition","cursor","open","colorChange","TEXTANNOTATION","dragstart","icon","newNumber","Y_OFFSET","diagramContainer","getContainer","pad","getPad","html","diagramRect","getBoundingClientRect","padRect","top","left","appendStart","shape","createShape","hints","BpmnElementFactory","DEFAULT_LABEL_SIZE","DomainStoryIdFactory","DomainStoryElementFactory","bpmnFactory","moddle","domainStoryIdFactory","elementType","attrs","baseCreate","test","registerId","getId","key","set","$type","di","$descriptor","_getCustomElementSize","Object","defineProperty","createBpmnElement","__default","Dimensions","idList","generateId","idNumber","fourDigitsId","idSuffix","containsId","floor","random","same","BaseRenderer","Ids","getAnnotationBoxHeight","componentsToPath","createLine","append","svgAppend","attr","svgAttr","classes","svgClasses","svgCreate","query","domQuery","isObject","getNumberStash","addNumberToRegistry","numberBoxDefinitions","calculateTextWidth","countLines","labelPosition","angleBetween","getNameFromType","RENDERER_IDS","numbers","DEFAULT_COLOR","initializeRenderer","elementRegistryService","DomainStoryRenderer","styles","textRenderer","pathMap","rendererId","next","markers","computeStyle","generateActivityNumber","parentGfx","box","numberStash","semantic","use","number","renderNumber","backgroundDotStyle","backgroundBoxStyle","newRenderedNumber","numberStyle","fitBox","style","getExternalStyle","fill","fontSize","fontFamily","renderEmbeddedLabel","align","padding","renderLabel","renderExternalLabel","waypoints","lines","startPoint","selected","endPoint","angle","alignment","boxWidth","xStart","abs","textAlign","length","wordWrap","overflowWrap","hyphens","renderExternalNumber","String","text","createText","add","setCoordinates","innerHTML","manipulateInnerHTMLXLabel","manipulateInnerHTMLYLabel","firstChild","attributes","nodeValue","offset","result","outerHTML","Number","drawGroup","pickedColor","rect","drawRect","stroke","useColorForElement","iconSRC","match","index","indexOf","substring","getIconSrc","startsWith","drawActor","svgDynamicSizeAttributes","actor","getTypeIconSRC","drawWorkObject","workObject","useColorForActivity","strokeWidth","strokeLinejoin","markerEnd","marker","drawActivity","p","adjustForTextOverlap","fixConnectionInHTML","parentElement","checkIfPointOverlapsText","point","lineOffset","getLineOffset","objects","getElementsByClassName","data_id","item","getAttribute","object","getElementsByTagName","tspans","tspan","wantedConnection","polylines","setAttribute","drawDSConnection","strokeDasharray","drawAnnotation","textElement","textPathData","getScaledPath","xScaleFactor","yScaleFactor","containerWidth","containerHeight","mx","my","drawPath","d","path","r","rx","ry","createMarker","sequenceflowEnd","addMarker","ref","scale","strokeLinecap","viewBox","refX","refY","markerWidth","markerHeight","orient","defs","_svg","getWorkObjectPath","rectangle","getRectPath","getGroupPath","getActivityPath","map","original","activityPath","waypoint","getActorPath","canRender","drawShape","search","pos","correctInitialize","getShapePath","drawConnection","every","reduce","RuleProvider","is","HIGH_PRIORITY","MIN_SIZE","isDomainStory","isDomainStoryGroup","isActor","isWorkObject","isActivity","isAnnotation","canConnect","canResize","newBounds","lowerLeft","lowerRight","upperRight","canAttach","Array","canConnectToAnnotation","DomainStoryRules","init","canCreate","addRule","host","s","undefined","hover","pick","CommandInterceptor","collectionAdd","remove","collectionRemove","reworkGroupElements","DomainStoryUpdater","bpmnjs","updateCustomElement","e","DOMAINSTORY","updateCustomConnection","newTarget","newSource","copyWaypoints","executed","ifDomainStoryElement","reverted","fn","DomainStoryPalette","ElementFactory","CreateModule","PathMap","PopupMenuModule","ContextPadModule","CommandStack","UpdateLabelHandler","headlineAndDescriptionUpdateHandler","DSModeling","__depends__","__init__","domainStoryRenderer","paletteProvider","domainStoryRules","domainStoryUpdater","contextPadProvider","elementFactoryBpmn","updateLabelHandler","svgRemove","MARKER_HIDDEN","MARKER_LABEL_HIDDEN","annotationBoxHeight","DSLabelEditingPreview","defaultLayer","getDefaultLayer","absoluteElementBBox","gfx","on","activeProvider","active","getAbsoluteBBox","getStrokeColor","labelTarget","dy","newElementHeight","max","removeMarker","autocomplete","getLabel","isAny","getExternalLabelMid","hasExternalLabel","isLabel","isLabelExternal","dictionaryService","stashUse","initializeLabelEditingProvider","labelingDictionary","toggleStashUse","focusElement","setTimeout","focus","DSLabelEditingProvider","directEditing","resizeHandles","_canvas","_textRenderer","_updateLabelHandler","activateDirectEdit","complete","isActive","cancel","removeResizers","createAutocomplete","canExecute","isTouch","editingBox","force","activate","getUniqueWorkObjectNames","bounds","getEditingBBox","autoResize","resizable","bbox","mid","zoom","defaultStyle","getDefaultStyle","externalStyle","externalFontSize","externalLineHeight","lineHeight","defaultFontSize","defaultLineHeight","fontWeight","minWidth","maxWidth","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","externalLabelMid","absoluteBBox","update","newLabel","activeContextText","updateLabel","getLabelAttr","getNumberAttr","getNumber","setLabel","setNumber","textNumber","selectPartOfActivity","angleActivity","selectedActivity","linelength","fontsize","input","workObjectNames","closeAllLists","currentFocus","filteredWorkObjectNames","addEventListener","autocompleteList","autocompleteItem","val","createElement","parentNode","appendChild","toUpperCase","visibility","onkeydown","keyCode","addActive","preventDefault","removeActive","classList","survivor","removeChild","ChangeSupportModule","DirectEditingModule","dSlabelEditingProvider","dSlabelEditingPreview","str","split","amountWaypoints","determinedPosition","xPos","yPos","labelPositionX","labelPositionY","offsetX","scaledAngle","offsetY","Modeling","_commandStack","updateNumber","oldShape","newShape","newData","numberRegistry","multipleNumberRegistry","canvasElementRegistry","initializeNumbering","canvasElementRegistryService","boxHeight","fixedOffsetX","fixedOffsetY","angleDependantOffsetX","angleDependantOffsetY","elementActivity","usedNumbers","wantedNumber","activitiesFromActors","getActivitiesFromActors","updateExistingNumbersAtGeneration","updateExistingNumbersAtEditing","sortedActivities","activity","currentNumber","setNumberOfActivity","getNumbersAndIDs","iDWithNumber","activities","renderedNumber","setNumberIsMultiple","multi","getNumberRegistry","slice","getMultipleNumberRegistry","elementArray","overrideAppendedIcons","Dictionary","APPENDED_ICONS_TAG","configuration","initializePalette","configurationService","PaletteProvider","palette","spaceTool","lassoTool","_create","_elementFactory","_spaceTool","_lassoTool","getPaletteEntries","createAction","createListener","isExpanded","shortType","initPalette","appendCSSStyleCheat","customIcons","sheetEl","head","customIconDict","appendDict","customIconDictKeys","getAppendedIconDictionary","has","src","iconStyle","wrapSRCInSVG","sheet","insertRule","cssRules","config","getCurrentIconConfigurationForBPMN","localStorage","getItem","JSON","parse","customIconsLegacy","convertLegacyAppendedIconsToDict","customIconsDict","putEntry","initTypeDictionaries","actors","workObjects","addCanvasObjectTypes","separator","activateSelection","keys","dict","initializeActivityUpdateHandler","activityUpdateHandler","registerHandler","activity_directionChange","activity_changed","preExecute","oldLabel","oldNumbersWithIDs","oldNumber","revert","revertAutomaticNumberGenerationChange","oldWaypoints","swapSource","newWaypoints","getActivitesFromActors","j","splice","undoGroupRework","elementUpdateHandler","element_colorChange","removeGroupWithoutChildren","oldColor","ctx","child","titleService","handlerFunction","oldTitle","getTitle","oldDescription","getDescription","updateTitleAndDescription","newTitle","newDescription","DSMassRenameHandler","massRename","relevantElements","confirm","newValue","getBusinessObject","NULL_DIMENSIONS","labelCenter","createLabel","setText","postExecute","trim","removeShape","bo","getLayoutedBounds","resizeShape","numberTarget","some","$instanceOf","types","t","innerShape","superParent","svgShape","querySelector","svgGroup","svgGroupParent","SVG_LINK","TEXTSPAN_DESCRIPTION_HEIGHT","TEXTSPAN_TITLE_HEIGHT","X_OFFSET_UTIL","extraHeight","createTitleAndDescriptionSVGElement","description","xLeft","yUp","titleElement","createTitle","descriptionElement","createDescription","insertText","tempCanvas","getContext","font","createTextSpans","descriptionParts","yOffset","heightOffset","textSpans","words","textTag","textSpan","createElementNS","textNode","createTextNode","data","len","measureText","testBusinessObject","Configuration","constructor","INITIAL_TITLE","INITIAL_DESCRIPTION","INITIAL_ICON_SET_NAME","ICON_SET_CONFIGURATION_TAG","DEFAULT_AUTOSAVES_ENABLED","DEFAULT_AUTOSAVES_MAX_DRAFTS","DEFAULT_AUTOSAVES_INTERVAL","SNACKBAR_DURATION","SNACKBAR_SUCCESS","SNACKBAR_ERROR","SNACKBAR_INFO","IMPLICIT_ROOT_ID","all","size","isEmpty","Entry","addEach","clear","filter","found","sort","sortByName","a","b","IconConfiguration","allIconDictionary","domainName","getDefaultConf","defaultConf","updateAllIconRegistry","appendSRCFile","actorsDict","workObjectsDict","newAppendedIcons","appen","createCustomConf","iconSetConfiguration","allIconsConf","structuredClone","testCustomIconSetConfiguration","fromConfigurationFromFile","configFromFile","ActivityDialogData","numberIsAllowedMultipleTimes","showNumberFields","saveFN","ExportDialogData","ExportOption","tooltip","InfoDialogData","infoText","isInfo","isLink","linkText","NUMBER_BACKGROUND_COLOR","NUMBER_COLOR","STROKE_WIDTH","HIGHLIGHT_NUMBER_BACKGROUNG_COLOR","HIGHLIGHT_NUMBER_COLOR","HIGHLIGHT_COLOR","HIGHLIGHT_STROKE_WIDTH","ConfigAndDST","domain","dst","testConfigAndDst","appendedIcons","allIcons","Person","Group","Pet","Conversation","World","Store","Theater","Business","Water","Hotel","Dining","Courthouse","Flag","Place","Car","Bus","Train","Truck","Taxi","Bike","Boat","Motorcycle","Plane","Shuttle","Walking","Traffic","Commute","System","Printer","Document","Folder","Call","Email","Copyright","DNS","Settings","Cellphone","Update","Briefcase","Microphone","Signal","Key","Pencil","Sum","Headset","Keyboard","Mouse","Router","Scanner","Security","Desktop","Tablet","Label","Receipt","Calendar","Cloud","Assessment","Dashboard","Problem","Grid","Watch","Euro","Dollar","Info","Alarm","Wrench","Favorite","Gavel","Blind","Hourglass","Time","Search","Shopping","Couch","Attach","Ruler","Education","allIconsDict","newIcons","IconFilterEnum","CommonModule","AutosaveSettingsComponent","AutosaveOptionsComponent","AutosavedDraftsComponent","FormsModule","MaterialModule","AutosaveSettingsModule","_","_2","_3","declarations","imports","exports","HeaderButtonsComponent","DomainStoryModelerModuleModule","IconSetConfigurationComponent","IconListItemComponent","DetailsListItemComponent","IconSetDetailsComponent","GeneralSettingsComponent","LabelDictionaryComponent","SettingsModule","i0","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵelement","ɵɵlistener","AutosaveOptionsComponent_mat_card_0_Template_button_click_20_listener","ɵɵrestoreView","_r1","activated_r2","ɵɵreference","interval_r3","drafts_r4","ctx_r4","ɵɵnextContext","ɵɵresetView","save","checked","ɵɵadvance","ɵɵproperty","configuration_r6","activated","interval","maxDrafts","autosaveConfiguration","snackbar","setConfiguration","duration","panelClass","ɵɵdirectiveInject","i1","AutosaveConfigurationService","i2","MatSnackBar","selectors","decls","vars","consts","template","AutosaveOptionsComponent_Template","rf","ɵɵtemplate","AutosaveOptionsComponent_mat_card_0_Template","ɵɵpipeBind1","configuration$","AutosaveSettingsComponent_Template","AutosavedDraftsComponent_div_7_div_1_Template_button_click_6_listener","draft_r3","_r2","$implicit","ctx_r3","loadDraft","ɵɵtextInterpolate","date","AutosavedDraftsComponent_div_7_div_1_Template","AutosavedDraftsComponent_div_7_Template_button_click_4_listener","removeAllDrafts","drafts","autosaveService","subscription","autosavedDraftsChanged$","subscribe","initDrafts","ngOnInit","loadCurrentDrafts","draft","AutosaveService","AutosavedDraftsComponent_Template","AutosavedDraftsComponent_div_7_Template","AutosavedDraftsComponent_ng_template_8_Template","ɵɵtemplateRefExtractor","ɵɵtextInterpolate2","noDrafts_r5","ModelerComponent","modelerService","postInit","loadLatestDraft","ModelerService","ModelerComponent_Template","MAT_DIALOG_DATA","ActivityDialogComponent","fb","dialogRef","activityLabel","activityNumber","form","multipleNumbers","onSubmit","patchValue","close","UntypedFormBuilder","MatDialogRef","ActivityDialogComponent_Template","ActivityDialogComponent_Template_input_change_9_listener","ActivityDialogComponent_Template_textarea_keydown_enter_14_listener","$event","ActivityDialogComponent_Template_textarea_keyup_enter_14_listener","ActivityDialogComponent_Template_textarea_keyup_escape_14_listener","ActivityDialogComponent_Template_button_click_16_listener","ActivityDialogComponent_Template_button_click_18_listener","BehaviorSubject","ExportDialogComponent_button_17_Template_button_click_0_listener","i_r2","ctx_r2","doOption","option_r4","ɵɵtextInterpolate1","ExportDialogComponent","withTitle","useWhiteBackground","updateWithTitle","updateUseWhiteBackground","ExportDialogComponent_Template","ExportDialogComponent_Template_input_change_4_listener","ExportDialogComponent_Template_input_change_9_listener","ExportDialogComponent_Template_button_click_15_listener","ExportDialogComponent_button_17_Template","HeaderDialogComponent","i3","TitleService","HeaderDialogComponent_Template","HeaderDialogComponent_Template_textarea_keydown_enter_10_listener","HeaderDialogComponent_Template_textarea_keyup_enter_10_listener","HeaderDialogComponent_Template_textarea_keyup_escape_10_listener","HeaderDialogComponent_Template_button_click_12_listener","HeaderDialogComponent_Template_button_click_14_listener","ctx_r0","ɵɵpropertyInterpolate","ɵɵsanitizeUrl","InfoDialogComponent_mat_dialog_actions_5_Template_button_click_1_listener","InfoDialogComponent","showConfirmButton","hasLink","ngAfterViewInit","span","scrollHeight","InfoDialogComponent_Template","InfoDialogComponent_span_3_Template","InfoDialogComponent_a_4_Template","InfoDialogComponent_mat_dialog_actions_5_Template","LabelDictionaryDialogComponent","LabelDictionaryDialogComponent_Template","LabelDictionaryDialogComponent_Template_app_label_dictionary_closeEmitter_3_listener","iconInitiated","ngAfterViewChecked","createIcon","img","svg","inputs","DetailsListItemComponent_Template","iconName","iconSetCustomizationService","isWorkobject","isNone","getIconForName","toggleNone","setAsUnassigned","toggleActor","setAsActor","toggleWorkobject","setAsWorkobject","IconSetCustomizationService","IconListItemComponent_Template","IconListItemComponent_Template_mat_button_toggle_change_7_listener","IconListItemComponent_Template_mat_button_toggle_change_10_listener","IconListItemComponent_Template_mat_button_toggle_change_13_listener","ɵɵclassProp","sanitizeIconName","iconName_r1","ICON_FILTER_NONE","selectedActors","selectedWorkobjects","allIconNames","allFilteredIconNames","iconSetConfigurationTypes","getIconSetConfiguration","getFullDictionary","selectedActors$","selectedWorkobjects$","allFiltered","getFilteredNamesForType","loadMinimalIconConfigurationWithDefaultIcons","resetIconSet","loadInitialConfiguration","saveIconSet","getUsedIcons","exportIconSet","startIconUpload","importIcon","files","iconInputFile","reader","FileReader","onloadend","addIMGToIconDictionary","registerIconForBPMN","addNewIcon","readAsDataURL","startIconSetImport","importIconSet","iconSetInputFile","loadConfiguration","importConfiguration","readAsText","filterForActors","ICON_FILTER_ACTOR","filterForWorkobjects","ICON_FILTER_WORKOBJECT","filterForUnassigned","ICON_FILTER_UNASSIGNED","filterByNameAndType","filteredByNameAndType","isIconActor","isIconWorkObject","IconSetConfigurationService","IconDictionaryService","i4","ElementRegistryService","IconSetConfigurationComponent_Template","IconSetConfigurationComponent_Template_button_click_6_listener","IconSetConfigurationComponent_Template_button_click_10_listener","IconSetConfigurationComponent_Template_button_click_14_listener","IconSetConfigurationComponent_Template_input_input_18_listener","IconSetConfigurationComponent_Template_button_click_20_listener","IconSetConfigurationComponent_Template_input_change_23_listener","IconSetConfigurationComponent_Template_button_click_24_listener","IconSetConfigurationComponent_Template_button_click_27_listener","IconSetConfigurationComponent_Template_button_click_31_listener","IconSetConfigurationComponent_Template_button_click_35_listener","IconSetConfigurationComponent_Template_input_change_38_listener","IconSetConfigurationComponent_Template_button_click_39_listener","IconSetConfigurationComponent_mat_grid_tile_46_Template","IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_dragover_0_listener","ctx_r1","allowDrop","IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_dragstart_0_listener","i_r3","onDragStart","IconSetDetailsComponent_mat_list_item_12_Template_mat_list_item_drop_0_listener","iconName_r5","onDrop","IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_dragover_0_listener","_r6","IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_dragstart_0_listener","i_r7","IconSetDetailsComponent_mat_list_item_18_Template_mat_list_item_drop_0_listener","ctx_r7","iconName_r9","customizationService","draggedList","draggedIndex","iconSetName","iconSetName$","changeName","listName","list","sortedList","setSelectedActors","setSelectedWorkObject","IconSetDetailsComponent_Template","IconSetDetailsComponent_Template_input_input_6_listener","IconSetDetailsComponent_mat_list_item_12_Template","IconSetDetailsComponent_mat_list_item_18_Template","MatDialogConfig","HeaderButtonsComponent_div_0_Template_button_click_1_listener","startReplay","HeaderButtonsComponent_div_0_Template_input_change_7_listener","import","HeaderButtonsComponent_div_0_Template_button_click_8_listener","openDownloadDialog","HeaderButtonsComponent_div_0_span_9_Template","HeaderButtonsComponent_div_0_span_11_Template","HeaderButtonsComponent_div_0_Template_button_click_13_listener","openLabelDictionary","HeaderButtonsComponent_div_0_Template_button_click_16_listener","openSettings","HeaderButtonsComponent_div_0_Template_button_click_19_listener","openKeyboardShortcutsDialog","HeaderButtonsComponent_div_0_Template_button_click_22_listener","createNewDomainStory","replayService","isReplayable","isExportable","isDirty$","exportService","isDomainStoryExportable","HeaderButtonsComponent_div_2_Template_button_click_1_listener","_r3","previousSentence","HeaderButtonsComponent_div_2_Template_button_click_4_listener","nextSentence","HeaderButtonsComponent_div_2_Template_button_click_7_listener","stopReplay","settingsService","replayStateService","dialogService","importService","renderService","isReplay$","replayOn$","dirty$","filename","endsWith","importDST","importEGN","commandStackChanged","SVGDownloadOption","downloadSVG","EGNDownloadOption","downloadDST","PNGDownloadOption","downloadPNG","HTMLDownloadOption","downloadHTMLPresentation","disableClose","autoFocus","openDialog","shortCutText","reset","makeClean","hasTitleOrDescription","SettingsService","ReplayStateService","DirtyFlagService","i5","DialogService","i6","ReplayService","i7","ExportService","i8","ImportDomainStoryService","i9","i10","RendererService","i11","HeaderButtonsComponent_Template","HeaderButtonsComponent_div_0_Template","HeaderButtonsComponent_div_2_Template","combineLatest","HeaderComponent_button_2_Template_button_click_0_listener","setShowDescription","HeaderComponent_button_4_Template_button_click_0_listener","sentenceDescription$","description$","HeaderComponent","title$","showDescription$","currentSentence$","maxSentenceNumber$","pipe","sentence","count","showDescription","openHeaderDialog","show","HeaderComponent_Template","HeaderComponent_button_2_Template","HeaderComponent_button_4_Template","HeaderComponent_Template_span_click_7_listener","HeaderComponent_span_13_Template","HeaderComponent_mat_card_17_Template","EventEmitter","LabelDictionaryComponent_mat_list_item_5_Template_input_change_2_listener","workobjectEntry_r2","updateWorkobjectEntry","LabelDictionaryComponent_mat_list_item_11_Template_textarea_change_2_listener","activityEntry_r5","_r4","updateActivityEntry","LabelDictionaryComponent_mat_list_item_11_Template_textarea_keydown_enter_2_listener","LabelDictionaryComponent_mat_list_item_11_Template_textarea_keyup_enter_2_listener","LabelDictionaryComponent_mat_list_item_11_Template_textarea_keyup_escape_2_listener","labelDictionaryService","closeEmitter","createLabelDictionaries","workObjectEntries","getWorkObjectLabels","activityEntries","getActivityLabels","workobjectEntriesSubject","activityEntriesSubject","activityNames","originalActivityNames","originalWorkObjectNames","originalName","w","workobject","massRenameLabels","emit","activityEntry","workobjectEntry","LabelDictionaryService","outputs","LabelDictionaryComponent_Template","LabelDictionaryComponent_mat_list_item_5_Template","LabelDictionaryComponent_mat_list_item_11_Template","LabelDictionaryComponent_Template_button_click_14_listener","LabelDictionaryComponent_Template_button_click_16_listener","GeneralSettingsComponent_Template","SettingsComponent","showGeneralSettings","showIconSetCustomization","savedConfiguration","getAndClearSavedConfiguration","restart","openGeneralSettings","openIconSetCustomization","SettingsComponent_Template","SettingsComponent_Template_button_click_3_listener","SettingsComponent_Template_button_click_7_listener","SettingsComponent_Template_button_click_11_listener","SettingsComponent_app_general_settings_15_Template","SettingsComponent_app_icon_set_configuration_17_Template","ReplaySubject","AUTOSAVE_CONFIGURATION_TAG","defaultConfiguration","storageService","configurationSubject","asObservable","initializeConfiguration","saveConfiguration","ɵɵinject","StorageService","factory","ɵfac","providedIn","Subject","DRAFTS_TAG","rendererService","updateConfiguration","readDrafts","sortDrafts","configAndDST","story","actorIcons","getElementsOfType","workObjectIcons","updateIconRegistries","importStory","stopTimer","startTimer","autosaveTimer","clearInterval","setInterval","savedDrafts","newDraft","createDraft","isChanged","isSame","isDraftEmpty","unshift","pop","writeDrafts","stringify","getStory","createConfigAndDST","Date","toString","aDate","bDate","setItem","json","removeItem","checkValidityOfConfiguration","configuratioFromFile","getStoredIconSetConfiguration","iconSetString","configurationFromFile","setStoredIconSetConfiguration","configForStorage","CommandStackService","setCommandStack","payload","matDialog","dialog","MatDialog","isDirtySubject","dirty","DomManipulationService","showAll","removeHighlights","getAllCanvasObjects","getAllGroups","domObject","display","showSentence","replaySentence","notShown","getAllNotShown","highlightSentence","o","getNumberDomForActivity","numberDOMS","numberBackgroundDom","numberTextDom","allActivities","getAllActivities","allConnections","getAllConnections","activityDomObject","connectionDomObject","sentenceObjects","shownElements","notShownElements","allObjects","fullyInitialized","registry","__implicitroot","setElementRegistry","_elements","createObjectListForDSTDownload","allObjectsFromCanvas","objectList","fillListOfCanvasObjects","canvasElement","groupObjects","checkChildForGroup","currentGroup","registryElementNames","getAllActors","workobjects","getAllWorkobjects","co","sanitizeForDesktop","formatDate","environment","pngService","svgService","htmlPresentationService","titleSubscription","descriptionSubscription","ngOnDestroy","unsubscribe","DomainStory","getCurrentConfigurationForExport","getStoryForDownload","getCurrentDateString","downloadFile","datatype","fileEnding","encodeURIComponent","body","svgData","createSVGData","container","svgElements","outerSVGElement","viewport","layerBase","image","extractSVG","prepareSVG","onload","getWidth","getHeight","fillStyle","drawImage","png64","toDataURL","ele","then","info","version","PngService","SvgService","HtmlPresentationService","doT","setModelerClasses","selection","modeler","viewBoxCoordinates","ViewBoxCoordinate","_this","_asyncToGenerator","saveSVG","fixActivityMarkersForEachSentence","getCurrentSentenceNumber","content","transition","err","alert","getMaxSentenceNumber","revealjsTemplate","dots","revealjsData","script","sentences","multiplexSecret","multiplexId","fixMalformedHtmlScript","viewBoxIndex","splitViewBox","dataStart","dataEnd","createBounds","sectionIndex","newDefs","ids","idToReplace","newId","replaceAll","browserSpecs","ua","navigator","userAgent","tem","M","exec","appName","appVersion","URIHashtagFix","fix","browser","parseInt","findMostOuterElements","xRight","yDown","sub","elXLeft","elXRight","elYUp","elYDown","transform","nums","rects","outerRect","calculateWidthAndHeight","insertIndex","join","layerResizers","layerOverlays","removeAttribute","XMLSerializer","serializeToString","cacheData","getEncoded","findIndexToInsertData","svgIndex","backgroundColorWhite","appendDST","ICON_PREFIX","actorIconDictionary","workObjectDictionary","iconDictionaryForBPMN","iconConfig","allTypes","initDictionary","dictionary","customConfiguration","allInTypeDictionary","collection","allIn","addIconsFromIconSetConfiguration","dictionaryType","iconTypes","registerIconForType","addIconsToTypeDictionary","unregisterIconForType","extractCustomIconsFromDictionary","addNewIconsToDictionary","elementDictionary","sanitizedName","custom","addIconsToCss","fullDictionary","appendedDict","getTypeDictionaryKeys","getIconSource","elementOfType","getAllIconDictionary","getActorsDictionary","getWorkObjectsDictionary","getIconConfiguration","setCustomConfiguration","setIconSetName","exportConfiguration","configJSONString","getIconSetName","customConfig","updateIconSetName","actorDict","workObjectDict","actorKeys","workObjectKeys","configurationName","getCurrentConfiguration","createConfigFromDictionaries","currentConfiguration","getCurrentConfigurationNamesWithoutPrefix","createMinimalConfigurationWithDefaultIcons","minimalConfig","createConfigFromCanvas","actorNames","workobjectNames","newActors","newWorkobjects","allCanvasObjects","allIconListItems","configurationHasChanged","addIconToAllIconList","importedConfigurationEvent","storedIconSetConfiguration","importedConfiguration","getImportedConfiguration","selectedActorNames","selectActor","selectedWorkobjectNames","selectWorkObject","changedIconSet","deselectActor","deselectWorkobject","updateIcon","updateActorSubject","updateWorkObjectSubject","defaultConfig","workObjectName","actorName","updateAllIconBehaviourSubjects","resetToInitialConfiguration","usedIcons","imported","changedActors","changedWorkobjects","createIconSetConfiguration","configurationActors","configurationWorkobjects","changedIconSetConfiguration","updateIcons","temp","iconDict","getSrcForIcon","iconBehaviourSubject","customIconSetConfiguration","rawSrc","restoreTitleFromFileName","importRepairService","iconSetConfigurationService","importedConfigurationEmitter","isSVG","fileReader","titleText","fileReaderFunction","isEGN","dstText","removeXMLComments","dstAndConfig","extractDstAndConfig","configChanged","checkConfigForChanges","lastElement","importVersionNumber","handleVersionNumber","checkForUnreferencedElementsInActivitiesAndRepair","showBrokenImportDialog","adjustPositions","versionPrefix","lastIndexOf","updateCustomElementsPreviousV050","showPreviousV050Dialog","xmlText","newActorKeys","newWorkObjectKeys","currentActorKeys","currentWorkobjectKeys","changed","clearName","setImportedConfigurationAndEmit","ImportRepairService","objectIDs","activityIndex","isFirst","findFirstElement","adjustElementPosition","massNamingService","activityLabels","workObjektLabels","localeCompare","Set","massChangeNames","MassNamingService","commandStackService","oldValue","allRelevantObjects","massRenameHandler","positionsMatch","InitializerService","initializeDomainStoryModelerClasses","propagateDomainStoryModelerClassesToServices","initializeDomainStoryModelerEventHandlers","initiateEventBusListeners","getReplayOn","activityDoubleClick","renderedNumberRegistry","htmlCanvas","transformX","transformY","zoomX","zoomY","clickX","originalEvent","clickY","parseFloat","currentNum","tx","ty","tNumber","elementX","elementY","stopPropagation","saveActivityInputLabel","activityData","hasNumber","multipleNumberAllowed","initializerService","keyboard","bindTo","additionalModules","bpmnSearch","exportArtifacts","debounce","window","startDebounce","domainStory","currentStory","destroy","getModeler","timeout","timer","clearTimeout","encoded","renderStory","configurationChange","c","replayOnSubject","setReplayState","state","domManipulationService","storyCreatorService","currentSentence","maxSentenceNumber","traceActivitiesAndCreateStory","initializeReplay","showCurrentSentence","missingSentences","getMissingSentences","getValue","StoryCreatorService","tracedActivityMap","tracedItem","it","createSentence","addGroupsToLastSentence","getSentenceObjects","highlightedElements","highlightedObjects","tracedActivity","initialSource","targetObjects","parallelSentence","firstTarget","checkTarget","activityTarget","g","showSettings","showSettings$","titleSubject","descriptionSubject","iconSetNameSubject","showDescriptionSubject","allowUndo","fireTitleAndDescriptionUpdate","updateTitle","updateDescription","inputTitle","getVersion","degrees","radians","PI","quadrant","adjacent","opposite","atan2","Point","reg","domainStoryRegex","svgRegex","egnSuffix","dstSuffix","svgSuffix","filenameWithoutDateSuffix","AppComponent","ctrlKey","openLinkDialog","link","AppComponent_Template","AppComponent_app_settings_1_Template","BrowserModule","MAT_CHECKBOX_DEFAULT_OPTIONS","NoopAnimationsModule","ReactiveFormsModule","AppModule","ngDoBootstrap","app","componentElement","bootstrap","provide","useValue","clickAction","MatDialogModule","MatFormFieldModule","MatInputModule","MatToolbarModule","MatExpansionModule","MatCardModule","MatSnackBarModule","MatButtonModule","MatGridListModule","MatButtonToggleModule","MatListModule","MatCheckboxModule","production","enableProdMode","__NgCli_bootstrap_1","platformBrowser","bootstrapModule","catch","console","error"],"sourceRoot":"webpack:///","x_google_ignoreList":[]} \ No newline at end of file diff --git a/app-v2/material-icons-outlined.78a93b2079680a08.woff b/app-v2/material-icons-outlined.woff similarity index 100% rename from app-v2/material-icons-outlined.78a93b2079680a08.woff rename to app-v2/material-icons-outlined.woff diff --git a/app-v2/material-icons-outlined.f86cb7b0aa53f0fe.woff2 b/app-v2/material-icons-outlined.woff2 similarity index 100% rename from app-v2/material-icons-outlined.f86cb7b0aa53f0fe.woff2 rename to app-v2/material-icons-outlined.woff2 diff --git a/app-v2/material-icons-round.92dc7ca2f4c591e7.woff b/app-v2/material-icons-round.woff similarity index 100% rename from app-v2/material-icons-round.92dc7ca2f4c591e7.woff rename to app-v2/material-icons-round.woff diff --git a/app-v2/material-icons-round.b10ec9db5b7fbc74.woff2 b/app-v2/material-icons-round.woff2 similarity index 100% rename from app-v2/material-icons-round.b10ec9db5b7fbc74.woff2 rename to app-v2/material-icons-round.woff2 diff --git a/app-v2/material-icons-sharp.a71cb2bf66c604de.woff b/app-v2/material-icons-sharp.woff similarity index 100% rename from app-v2/material-icons-sharp.a71cb2bf66c604de.woff rename to app-v2/material-icons-sharp.woff diff --git a/app-v2/material-icons-sharp.3885863ee4746422.woff2 b/app-v2/material-icons-sharp.woff2 similarity index 100% rename from app-v2/material-icons-sharp.3885863ee4746422.woff2 rename to app-v2/material-icons-sharp.woff2 diff --git a/app-v2/material-icons-two-tone.588d63134de807a7.woff b/app-v2/material-icons-two-tone.woff similarity index 100% rename from app-v2/material-icons-two-tone.588d63134de807a7.woff rename to app-v2/material-icons-two-tone.woff diff --git a/app-v2/material-icons-two-tone.675bd578bd14533e.woff2 b/app-v2/material-icons-two-tone.woff2 similarity index 100% rename from app-v2/material-icons-two-tone.675bd578bd14533e.woff2 rename to app-v2/material-icons-two-tone.woff2 diff --git a/app-v2/material-icons.4ad034d2c499d9b6.woff b/app-v2/material-icons.woff similarity index 100% rename from app-v2/material-icons.4ad034d2c499d9b6.woff rename to app-v2/material-icons.woff diff --git a/app-v2/material-icons.59322316b3fd6063.woff2 b/app-v2/material-icons.woff2 similarity index 100% rename from app-v2/material-icons.59322316b3fd6063.woff2 rename to app-v2/material-icons.woff2 diff --git a/app-v2/polyfills.17b2342ca3371da0.js b/app-v2/polyfills.17b2342ca3371da0.js deleted file mode 100644 index 4ffcc72..0000000 --- a/app-v2/polyfills.17b2342ca3371da0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkegon=self.webpackChunkegon||[]).push([[461],{260:()=>{!function(t){const n=t.performance;function i(L){n&&n.mark&&n.mark(L)}function o(L,T){n&&n.measure&&n.measure(L,T)}i("Zone");const c=t.__Zone_symbol_prefix||"__zone_symbol__";function a(L){return c+L}const y=!0===t[a("forceDuplicateZoneCheck")];if(t.Zone){if(y||"function"!=typeof t.Zone.__symbol__)throw new Error("Zone already loaded.");return t.Zone}let d=(()=>{class L{static#e=this.__symbol__=a;static assertZonePatched(){if(t.Promise!==se.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let e=L.current;for(;e.parent;)e=e.parent;return e}static get current(){return U.zone}static get currentTask(){return oe}static __load_patch(e,r,k=!1){if(se.hasOwnProperty(e)){if(!k&&y)throw Error("Already loaded patch: "+e)}else if(!t["__Zone_disable_"+e]){const C="Zone:"+e;i(C),se[e]=r(t,L,X),o(C,C)}}get parent(){return this._parent}get name(){return this._name}constructor(e,r){this._parent=e,this._name=r?r.name||"unnamed":"",this._properties=r&&r.properties||{},this._zoneDelegate=new v(this,this._parent&&this._parent._zoneDelegate,r)}get(e){const r=this.getZoneWith(e);if(r)return r._properties[e]}getZoneWith(e){let r=this;for(;r;){if(r._properties.hasOwnProperty(e))return r;r=r._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,r){if("function"!=typeof e)throw new Error("Expecting function got: "+e);const k=this._zoneDelegate.intercept(this,e,r),C=this;return function(){return C.runGuarded(k,this,arguments,r)}}run(e,r,k,C){U={parent:U,zone:this};try{return this._zoneDelegate.invoke(this,e,r,k,C)}finally{U=U.parent}}runGuarded(e,r=null,k,C){U={parent:U,zone:this};try{try{return this._zoneDelegate.invoke(this,e,r,k,C)}catch($){if(this._zoneDelegate.handleError(this,$))throw $}}finally{U=U.parent}}runTask(e,r,k){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||K).name+"; Execution: "+this.name+")");if(e.state===x&&(e.type===Q||e.type===P))return;const C=e.state!=E;C&&e._transitionTo(E,j),e.runCount++;const $=oe;oe=e,U={parent:U,zone:this};try{e.type==P&&e.data&&!e.data.isPeriodic&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,e,r,k)}catch(u){if(this._zoneDelegate.handleError(this,u))throw u}}finally{e.state!==x&&e.state!==h&&(e.type==Q||e.data&&e.data.isPeriodic?C&&e._transitionTo(j,E):(e.runCount=0,this._updateTaskCount(e,-1),C&&e._transitionTo(x,E,x))),U=U.parent,oe=$}}scheduleTask(e){if(e.zone&&e.zone!==this){let k=this;for(;k;){if(k===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);k=k.parent}}e._transitionTo(z,x);const r=[];e._zoneDelegates=r,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(k){throw e._transitionTo(h,z,x),this._zoneDelegate.handleError(this,k),k}return e._zoneDelegates===r&&this._updateTaskCount(e,1),e.state==z&&e._transitionTo(j,z),e}scheduleMicroTask(e,r,k,C){return this.scheduleTask(new p(I,e,r,k,C,void 0))}scheduleMacroTask(e,r,k,C,$){return this.scheduleTask(new p(P,e,r,k,C,$))}scheduleEventTask(e,r,k,C,$){return this.scheduleTask(new p(Q,e,r,k,C,$))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||K).name+"; Execution: "+this.name+")");if(e.state===j||e.state===E){e._transitionTo(G,j,E);try{this._zoneDelegate.cancelTask(this,e)}catch(r){throw e._transitionTo(h,G),this._zoneDelegate.handleError(this,r),r}return this._updateTaskCount(e,-1),e._transitionTo(x,G),e.runCount=0,e}}_updateTaskCount(e,r){const k=e._zoneDelegates;-1==r&&(e._zoneDelegates=null);for(let C=0;CL.hasTask(e,r),onScheduleTask:(L,T,e,r)=>L.scheduleTask(e,r),onInvokeTask:(L,T,e,r,k,C)=>L.invokeTask(e,r,k,C),onCancelTask:(L,T,e,r)=>L.cancelTask(e,r)};class v{constructor(T,e,r){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=T,this._parentDelegate=e,this._forkZS=r&&(r&&r.onFork?r:e._forkZS),this._forkDlgt=r&&(r.onFork?e:e._forkDlgt),this._forkCurrZone=r&&(r.onFork?this.zone:e._forkCurrZone),this._interceptZS=r&&(r.onIntercept?r:e._interceptZS),this._interceptDlgt=r&&(r.onIntercept?e:e._interceptDlgt),this._interceptCurrZone=r&&(r.onIntercept?this.zone:e._interceptCurrZone),this._invokeZS=r&&(r.onInvoke?r:e._invokeZS),this._invokeDlgt=r&&(r.onInvoke?e:e._invokeDlgt),this._invokeCurrZone=r&&(r.onInvoke?this.zone:e._invokeCurrZone),this._handleErrorZS=r&&(r.onHandleError?r:e._handleErrorZS),this._handleErrorDlgt=r&&(r.onHandleError?e:e._handleErrorDlgt),this._handleErrorCurrZone=r&&(r.onHandleError?this.zone:e._handleErrorCurrZone),this._scheduleTaskZS=r&&(r.onScheduleTask?r:e._scheduleTaskZS),this._scheduleTaskDlgt=r&&(r.onScheduleTask?e:e._scheduleTaskDlgt),this._scheduleTaskCurrZone=r&&(r.onScheduleTask?this.zone:e._scheduleTaskCurrZone),this._invokeTaskZS=r&&(r.onInvokeTask?r:e._invokeTaskZS),this._invokeTaskDlgt=r&&(r.onInvokeTask?e:e._invokeTaskDlgt),this._invokeTaskCurrZone=r&&(r.onInvokeTask?this.zone:e._invokeTaskCurrZone),this._cancelTaskZS=r&&(r.onCancelTask?r:e._cancelTaskZS),this._cancelTaskDlgt=r&&(r.onCancelTask?e:e._cancelTaskDlgt),this._cancelTaskCurrZone=r&&(r.onCancelTask?this.zone:e._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const k=r&&r.onHasTask;(k||e&&e._hasTaskZS)&&(this._hasTaskZS=k?r:b,this._hasTaskDlgt=e,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=T,r.onScheduleTask||(this._scheduleTaskZS=b,this._scheduleTaskDlgt=e,this._scheduleTaskCurrZone=this.zone),r.onInvokeTask||(this._invokeTaskZS=b,this._invokeTaskDlgt=e,this._invokeTaskCurrZone=this.zone),r.onCancelTask||(this._cancelTaskZS=b,this._cancelTaskDlgt=e,this._cancelTaskCurrZone=this.zone))}fork(T,e){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,T,e):new d(T,e)}intercept(T,e,r){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,T,e,r):e}invoke(T,e,r,k,C){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,T,e,r,k,C):e.apply(r,k)}handleError(T,e){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,T,e)}scheduleTask(T,e){let r=e;if(this._scheduleTaskZS)this._hasTaskZS&&r._zoneDelegates.push(this._hasTaskDlgtOwner),r=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,T,e),r||(r=e);else if(e.scheduleFn)e.scheduleFn(e);else{if(e.type!=I)throw new Error("Task is missing scheduleFn.");R(e)}return r}invokeTask(T,e,r,k){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,T,e,r,k):e.callback.apply(r,k)}cancelTask(T,e){let r;if(this._cancelTaskZS)r=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,T,e);else{if(!e.cancelFn)throw Error("Task is not cancelable");r=e.cancelFn(e)}return r}hasTask(T,e){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,T,e)}catch(r){this.handleError(T,r)}}_updateTaskCount(T,e){const r=this._taskCounts,k=r[T],C=r[T]=k+e;if(C<0)throw new Error("More tasks executed then were scheduled.");0!=k&&0!=C||this.hasTask(this.zone,{microTask:r.microTask>0,macroTask:r.macroTask>0,eventTask:r.eventTask>0,change:T})}}class p{constructor(T,e,r,k,C,$){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=T,this.source=e,this.data=k,this.scheduleFn=C,this.cancelFn=$,!r)throw new Error("callback is not defined");this.callback=r;const u=this;this.invoke=T===Q&&k&&k.useG?p.invokeTask:function(){return p.invokeTask.call(t,u,this,arguments)}}static invokeTask(T,e,r){T||(T=this),te++;try{return T.runCount++,T.zone.runTask(T,e,r)}finally{1==te&&_(),te--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(x,z)}_transitionTo(T,e,r){if(this._state!==e&&this._state!==r)throw new Error(`${this.type} '${this.source}': can not transition to '${T}', expecting state '${e}'${r?" or '"+r+"'":""}, was '${this._state}'.`);this._state=T,T==x&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const M=a("setTimeout"),Z=a("Promise"),N=a("then");let J,B=[],H=!1;function q(L){if(J||t[Z]&&(J=t[Z].resolve(0)),J){let T=J[N];T||(T=J.then),T.call(J,L)}else t[M](L,0)}function R(L){0===te&&0===B.length&&q(_),L&&B.push(L)}function _(){if(!H){for(H=!0;B.length;){const L=B;B=[];for(let T=0;TU,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:R,showUncaughtError:()=>!d[a("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:q};let U={parent:null,zone:new d(null,null)},oe=null,te=0;function W(){}o("Zone","Zone"),t.Zone=d}(globalThis);const ce=Object.getOwnPropertyDescriptor,Ee=Object.defineProperty,de=Object.getPrototypeOf,ge=Object.create,Fe=Array.prototype.slice,Oe="addEventListener",Ze="removeEventListener",Ne=Zone.__symbol__(Oe),Ie=Zone.__symbol__(Ze),ae="true",le="false",ke=Zone.__symbol__("");function Me(t,n){return Zone.current.wrap(t,n)}function Le(t,n,i,o,c){return Zone.current.scheduleMacroTask(t,n,i,o,c)}const A=Zone.__symbol__,we=typeof window<"u",Te=we?window:void 0,Y=we&&Te||globalThis,at="removeAttribute";function je(t,n){for(let i=t.length-1;i>=0;i--)"function"==typeof t[i]&&(t[i]=Me(t[i],n+"_"+i));return t}function Be(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&typeof t.set>"u")}const Ue=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Re=!("nw"in Y)&&typeof Y.process<"u"&&"[object process]"==={}.toString.call(Y.process),Ae=!Re&&!Ue&&!(!we||!Te.HTMLElement),We=typeof Y.process<"u"&&"[object process]"==={}.toString.call(Y.process)&&!Ue&&!(!we||!Te.HTMLElement),Ce={},qe=function(t){if(!(t=t||Y.event))return;let n=Ce[t.type];n||(n=Ce[t.type]=A("ON_PROPERTY"+t.type));const i=this||t.target||Y,o=i[n];let c;return Ae&&i===Te&&"error"===t.type?(c=o&&o.call(this,t.message,t.filename,t.lineno,t.colno,t.error),!0===c&&t.preventDefault()):(c=o&&o.apply(this,arguments),null!=c&&!c&&t.preventDefault()),c};function ze(t,n,i){let o=ce(t,n);if(!o&&i&&ce(i,n)&&(o={enumerable:!0,configurable:!0}),!o||!o.configurable)return;const c=A("on"+n+"patched");if(t.hasOwnProperty(c)&&t[c])return;delete o.writable,delete o.value;const a=o.get,y=o.set,d=n.slice(2);let b=Ce[d];b||(b=Ce[d]=A("ON_PROPERTY"+d)),o.set=function(v){let p=this;!p&&t===Y&&(p=Y),p&&("function"==typeof p[b]&&p.removeEventListener(d,qe),y&&y.call(p,null),p[b]=v,"function"==typeof v&&p.addEventListener(d,qe,!1))},o.get=function(){let v=this;if(!v&&t===Y&&(v=Y),!v)return null;const p=v[b];if(p)return p;if(a){let M=a.call(this);if(M)return o.set.call(this,M),"function"==typeof v[at]&&v.removeAttribute(n),M}return null},Ee(t,n,o),t[c]=!0}function Xe(t,n,i){if(n)for(let o=0;ofunction(y,d){const b=i(y,d);return b.cbIdx>=0&&"function"==typeof d[b.cbIdx]?Le(b.name,d[b.cbIdx],b,c):a.apply(y,d)})}function fe(t,n){t[A("OriginalDelegate")]=n}let Ye=!1,He=!1;function ht(){if(Ye)return He;Ye=!0;try{const t=Te.navigator.userAgent;(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/")||-1!==t.indexOf("Edge/"))&&(He=!0)}catch{}return He}Zone.__load_patch("ZoneAwarePromise",(t,n,i)=>{const o=Object.getOwnPropertyDescriptor,c=Object.defineProperty,y=i.symbol,d=[],b=!1!==t[y("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],v=y("Promise"),p=y("then"),M="__creationTrace__";i.onUnhandledError=u=>{if(i.showUncaughtError()){const l=u&&u.rejection;l?console.error("Unhandled Promise rejection:",l instanceof Error?l.message:l,"; Zone:",u.zone.name,"; Task:",u.task&&u.task.source,"; Value:",l,l instanceof Error?l.stack:void 0):console.error(u)}},i.microtaskDrainDone=()=>{for(;d.length;){const u=d.shift();try{u.zone.runGuarded(()=>{throw u.throwOriginal?u.rejection:u})}catch(l){N(l)}}};const Z=y("unhandledPromiseRejectionHandler");function N(u){i.onUnhandledError(u);try{const l=n[Z];"function"==typeof l&&l.call(this,u)}catch{}}function B(u){return u&&u.then}function H(u){return u}function J(u){return e.reject(u)}const q=y("state"),R=y("value"),_=y("finally"),K=y("parentPromiseValue"),x=y("parentPromiseState"),z="Promise.then",j=null,E=!0,G=!1,h=0;function I(u,l){return s=>{try{X(u,l,s)}catch(f){X(u,!1,f)}}}const P=function(){let u=!1;return function(s){return function(){u||(u=!0,s.apply(null,arguments))}}},Q="Promise resolved with itself",se=y("currentTaskTrace");function X(u,l,s){const f=P();if(u===s)throw new TypeError(Q);if(u[q]===j){let g=null;try{("object"==typeof s||"function"==typeof s)&&(g=s&&s.then)}catch(w){return f(()=>{X(u,!1,w)})(),u}if(l!==G&&s instanceof e&&s.hasOwnProperty(q)&&s.hasOwnProperty(R)&&s[q]!==j)oe(s),X(u,s[q],s[R]);else if(l!==G&&"function"==typeof g)try{g.call(s,f(I(u,l)),f(I(u,!1)))}catch(w){f(()=>{X(u,!1,w)})()}else{u[q]=l;const w=u[R];if(u[R]=s,u[_]===_&&l===E&&(u[q]=u[x],u[R]=u[K]),l===G&&s instanceof Error){const m=n.currentTask&&n.currentTask.data&&n.currentTask.data[M];m&&c(s,se,{configurable:!0,enumerable:!1,writable:!0,value:m})}for(let m=0;m{try{const D=u[R],S=!!s&&_===s[_];S&&(s[K]=D,s[x]=w);const O=l.run(m,void 0,S&&m!==J&&m!==H?[]:[D]);X(s,!0,O)}catch(D){X(s,!1,D)}},s)}const L=function(){},T=t.AggregateError;class e{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(l){return l instanceof e?l:X(new this(null),E,l)}static reject(l){return X(new this(null),G,l)}static withResolvers(){const l={};return l.promise=new e((s,f)=>{l.resolve=s,l.reject=f}),l}static any(l){if(!l||"function"!=typeof l[Symbol.iterator])return Promise.reject(new T([],"All promises were rejected"));const s=[];let f=0;try{for(let m of l)f++,s.push(e.resolve(m))}catch{return Promise.reject(new T([],"All promises were rejected"))}if(0===f)return Promise.reject(new T([],"All promises were rejected"));let g=!1;const w=[];return new e((m,D)=>{for(let S=0;S{g||(g=!0,m(O))},O=>{w.push(O),f--,0===f&&(g=!0,D(new T(w,"All promises were rejected")))})})}static race(l){let s,f,g=new this((D,S)=>{s=D,f=S});function w(D){s(D)}function m(D){f(D)}for(let D of l)B(D)||(D=this.resolve(D)),D.then(w,m);return g}static all(l){return e.allWithCallback(l)}static allSettled(l){return(this&&this.prototype instanceof e?this:e).allWithCallback(l,{thenCallback:f=>({status:"fulfilled",value:f}),errorCallback:f=>({status:"rejected",reason:f})})}static allWithCallback(l,s){let f,g,w=new this((O,V)=>{f=O,g=V}),m=2,D=0;const S=[];for(let O of l){B(O)||(O=this.resolve(O));const V=D;try{O.then(F=>{S[V]=s?s.thenCallback(F):F,m--,0===m&&f(S)},F=>{s?(S[V]=s.errorCallback(F),m--,0===m&&f(S)):g(F)})}catch(F){g(F)}m++,D++}return m-=2,0===m&&f(S),w}constructor(l){const s=this;if(!(s instanceof e))throw new Error("Must be an instanceof Promise.");s[q]=j,s[R]=[];try{const f=P();l&&l(f(I(s,E)),f(I(s,G)))}catch(f){X(s,!1,f)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return e}then(l,s){let f=this.constructor?.[Symbol.species];(!f||"function"!=typeof f)&&(f=this.constructor||e);const g=new f(L),w=n.current;return this[q]==j?this[R].push(w,g,l,s):te(this,w,g,l,s),g}catch(l){return this.then(null,l)}finally(l){let s=this.constructor?.[Symbol.species];(!s||"function"!=typeof s)&&(s=e);const f=new s(L);f[_]=_;const g=n.current;return this[q]==j?this[R].push(g,f,l,l):te(this,g,f,l,l),f}}e.resolve=e.resolve,e.reject=e.reject,e.race=e.race,e.all=e.all;const r=t[v]=t.Promise;t.Promise=e;const k=y("thenPatched");function C(u){const l=u.prototype,s=o(l,"then");if(s&&(!1===s.writable||!s.configurable))return;const f=l.then;l[p]=f,u.prototype.then=function(g,w){return new e((D,S)=>{f.call(this,D,S)}).then(g,w)},u[k]=!0}return i.patchThen=C,r&&(C(r),ue(t,"fetch",u=>function $(u){return function(l,s){let f=u.apply(l,s);if(f instanceof e)return f;let g=f.constructor;return g[k]||C(g),f}}(u))),Promise[n.__symbol__("uncaughtPromiseErrors")]=d,e}),Zone.__load_patch("toString",t=>{const n=Function.prototype.toString,i=A("OriginalDelegate"),o=A("Promise"),c=A("Error"),a=function(){if("function"==typeof this){const v=this[i];if(v)return"function"==typeof v?n.call(v):Object.prototype.toString.call(v);if(this===Promise){const p=t[o];if(p)return n.call(p)}if(this===Error){const p=t[c];if(p)return n.call(p)}}return n.call(this)};a[i]=n,Function.prototype.toString=a;const y=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":y.call(this)}});let ye=!1;if(typeof window<"u")try{const t=Object.defineProperty({},"passive",{get:function(){ye=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch{ye=!1}const dt={useG:!0},ne={},$e={},Ke=new RegExp("^"+ke+"(\\w+)(true|false)$"),Je=A("propagationStopped");function Qe(t,n){const i=(n?n(t):t)+le,o=(n?n(t):t)+ae,c=ke+i,a=ke+o;ne[t]={},ne[t][le]=c,ne[t][ae]=a}function _t(t,n,i,o){const c=o&&o.add||Oe,a=o&&o.rm||Ze,y=o&&o.listeners||"eventListeners",d=o&&o.rmAll||"removeAllListeners",b=A(c),v="."+c+":",p="prependListener",M="."+p+":",Z=function(R,_,K){if(R.isRemoved)return;const x=R.callback;let z;"object"==typeof x&&x.handleEvent&&(R.callback=E=>x.handleEvent(E),R.originalDelegate=x);try{R.invoke(R,_,[K])}catch(E){z=E}const j=R.options;return j&&"object"==typeof j&&j.once&&_[a].call(_,K.type,R.originalDelegate?R.originalDelegate:R.callback,j),z};function N(R,_,K){if(!(_=_||t.event))return;const x=R||_.target||t,z=x[ne[_.type][K?ae:le]];if(z){const j=[];if(1===z.length){const E=Z(z[0],x,_);E&&j.push(E)}else{const E=z.slice();for(let G=0;G{throw G})}}}const B=function(R){return N(this,R,!1)},H=function(R){return N(this,R,!0)};function J(R,_){if(!R)return!1;let K=!0;_&&void 0!==_.useG&&(K=_.useG);const x=_&&_.vh;let z=!0;_&&void 0!==_.chkDup&&(z=_.chkDup);let j=!1;_&&void 0!==_.rt&&(j=_.rt);let E=R;for(;E&&!E.hasOwnProperty(c);)E=de(E);if(!E&&R[c]&&(E=R),!E||E[b])return!1;const G=_&&_.eventNameToString,h={},I=E[b]=E[c],P=E[A(a)]=E[a],Q=E[A(y)]=E[y],se=E[A(d)]=E[d];let X;_&&_.prepend&&(X=E[A(_.prepend)]=E[_.prepend]);const e=K?function(s){if(!h.isExisting)return I.call(h.target,h.eventName,h.capture?H:B,h.options)}:function(s){return I.call(h.target,h.eventName,s.invoke,h.options)},r=K?function(s){if(!s.isRemoved){const f=ne[s.eventName];let g;f&&(g=f[s.capture?ae:le]);const w=g&&s.target[g];if(w)for(let m=0;m{ie.zone.cancelTask(ie)},{once:!0})),h.target=null,Pe&&(Pe.taskData=null),rt&&(ee.once=!0),!ye&&"boolean"==typeof ie.options||(ie.options=ee),ie.target=S,ie.capture=Ge,ie.eventName=O,F&&(ie.originalDelegate=V),D?me.unshift(ie):me.push(ie),m?S:void 0}};return E[c]=l(I,v,e,r,j),X&&(E[p]=l(X,M,function(s){return X.call(h.target,h.eventName,s.invoke,h.options)},r,j,!0)),E[a]=function(){const s=this||t;let f=arguments[0];_&&_.transferEventName&&(f=_.transferEventName(f));const g=arguments[2],w=!!g&&("boolean"==typeof g||g.capture),m=arguments[1];if(!m)return P.apply(this,arguments);if(x&&!x(P,m,s,arguments))return;const D=ne[f];let S;D&&(S=D[w?ae:le]);const O=S&&s[S];if(O)for(let V=0;Vfunction(c,a){c[Je]=!0,o&&o.apply(c,a)})}function Tt(t,n,i,o,c){const a=Zone.__symbol__(o);if(n[a])return;const y=n[a]=n[o];n[o]=function(d,b,v){return b&&b.prototype&&c.forEach(function(p){const M=`${i}.${o}::`+p,Z=b.prototype;try{if(Z.hasOwnProperty(p)){const N=t.ObjectGetOwnPropertyDescriptor(Z,p);N&&N.value?(N.value=t.wrapWithCurrentZone(N.value,M),t._redefineProperty(b.prototype,p,N)):Z[p]&&(Z[p]=t.wrapWithCurrentZone(Z[p],M))}else Z[p]&&(Z[p]=t.wrapWithCurrentZone(Z[p],M))}catch{}}),y.call(n,d,b,v)},t.attachOriginToPatched(n[o],y)}function tt(t,n,i){if(!i||0===i.length)return n;const o=i.filter(a=>a.target===t);if(!o||0===o.length)return n;const c=o[0].ignoreProperties;return n.filter(a=>-1===c.indexOf(a))}function nt(t,n,i,o){t&&Xe(t,tt(t,n,i),o)}function xe(t){return Object.getOwnPropertyNames(t).filter(n=>n.startsWith("on")&&n.length>2).map(n=>n.substring(2))}Zone.__load_patch("util",(t,n,i)=>{const o=xe(t);i.patchOnProperties=Xe,i.patchMethod=ue,i.bindArguments=je,i.patchMacroTask=ut;const c=n.__symbol__("BLACK_LISTED_EVENTS"),a=n.__symbol__("UNPATCHED_EVENTS");t[a]&&(t[c]=t[a]),t[c]&&(n[c]=n[a]=t[c]),i.patchEventPrototype=Et,i.patchEventTarget=_t,i.isIEOrEdge=ht,i.ObjectDefineProperty=Ee,i.ObjectGetOwnPropertyDescriptor=ce,i.ObjectCreate=ge,i.ArraySlice=Fe,i.patchClass=ve,i.wrapWithCurrentZone=Me,i.filterProperties=tt,i.attachOriginToPatched=fe,i._redefineProperty=Object.defineProperty,i.patchCallbacks=Tt,i.getGlobalObjects=()=>({globalSources:$e,zoneSymbolEventNames:ne,eventNames:o,isBrowser:Ae,isMix:We,isNode:Re,TRUE_STR:ae,FALSE_STR:le,ZONE_SYMBOL_PREFIX:ke,ADD_EVENT_LISTENER_STR:Oe,REMOVE_EVENT_LISTENER_STR:Ze})});const De=A("zoneTask");function pe(t,n,i,o){let c=null,a=null;i+=o;const y={};function d(v){const p=v.data;return p.args[0]=function(){return v.invoke.apply(this,arguments)},p.handleId=c.apply(t,p.args),v}function b(v){return a.call(t,v.data.handleId)}c=ue(t,n+=o,v=>function(p,M){if("function"==typeof M[0]){const Z={isPeriodic:"Interval"===o,delay:"Timeout"===o||"Interval"===o?M[1]||0:void 0,args:M},N=M[0];M[0]=function(){try{return N.apply(this,arguments)}finally{Z.isPeriodic||("number"==typeof Z.handleId?delete y[Z.handleId]:Z.handleId&&(Z.handleId[De]=null))}};const B=Le(n,M[0],Z,d,b);if(!B)return B;const H=B.data.handleId;return"number"==typeof H?y[H]=B:H&&(H[De]=B),H&&H.ref&&H.unref&&"function"==typeof H.ref&&"function"==typeof H.unref&&(B.ref=H.ref.bind(H),B.unref=H.unref.bind(H)),"number"==typeof H||H?H:B}return v.apply(t,M)}),a=ue(t,i,v=>function(p,M){const Z=M[0];let N;"number"==typeof Z?N=y[Z]:(N=Z&&Z[De],N||(N=Z)),N&&"string"==typeof N.type?"notScheduled"!==N.state&&(N.cancelFn&&N.data.isPeriodic||0===N.runCount)&&("number"==typeof Z?delete y[Z]:Z&&(Z[De]=null),N.zone.cancelTask(N)):v.apply(t,M)})}Zone.__load_patch("legacy",t=>{const n=t[Zone.__symbol__("legacyPatch")];n&&n()}),Zone.__load_patch("timers",t=>{const n="set",i="clear";pe(t,n,i,"Timeout"),pe(t,n,i,"Interval"),pe(t,n,i,"Immediate")}),Zone.__load_patch("requestAnimationFrame",t=>{pe(t,"request","cancel","AnimationFrame"),pe(t,"mozRequest","mozCancel","AnimationFrame"),pe(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(t,n)=>{const i=["alert","prompt","confirm"];for(let o=0;ofunction(b,v){return n.current.run(a,t,v,d)})}),Zone.__load_patch("EventTarget",(t,n,i)=>{(function kt(t,n){n.patchEventPrototype(t,n)})(t,i),function gt(t,n){if(Zone[n.symbol("patchEventTarget")])return;const{eventNames:i,zoneSymbolEventNames:o,TRUE_STR:c,FALSE_STR:a,ZONE_SYMBOL_PREFIX:y}=n.getGlobalObjects();for(let b=0;b{ve("MutationObserver"),ve("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(t,n,i)=>{ve("IntersectionObserver")}),Zone.__load_patch("FileReader",(t,n,i)=>{ve("FileReader")}),Zone.__load_patch("on_property",(t,n,i)=>{!function yt(t,n){if(Re&&!We||Zone[t.symbol("patchEvents")])return;const i=n.__Zone_ignore_on_properties;let o=[];if(Ae){const c=window;o=o.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const a=function ft(){try{const t=Te.navigator.userAgent;if(-1!==t.indexOf("MSIE ")||-1!==t.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:c,ignoreProperties:["error"]}]:[];nt(c,xe(c),i&&i.concat(a),de(c))}o=o.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let c=0;c{!function mt(t,n){const{isBrowser:i,isMix:o}=n.getGlobalObjects();(i||o)&&t.customElements&&"customElements"in t&&n.patchCallbacks(n,t.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(t,i)}),Zone.__load_patch("XHR",(t,n)=>{!function b(v){const p=v.XMLHttpRequest;if(!p)return;const M=p.prototype;let N=M[Ne],B=M[Ie];if(!N){const h=v.XMLHttpRequestEventTarget;if(h){const I=h.prototype;N=I[Ne],B=I[Ie]}}const H="readystatechange",J="scheduled";function q(h){const I=h.data,P=I.target;P[a]=!1,P[d]=!1;const Q=P[c];N||(N=P[Ne],B=P[Ie]),Q&&B.call(P,H,Q);const se=P[c]=()=>{if(P.readyState===P.DONE)if(!I.aborted&&P[a]&&h.state===J){const U=P[n.__symbol__("loadfalse")];if(0!==P.status&&U&&U.length>0){const oe=h.invoke;h.invoke=function(){const te=P[n.__symbol__("loadfalse")];for(let W=0;Wfunction(h,I){return h[o]=0==I[2],h[y]=I[1],K.apply(h,I)}),z=A("fetchTaskAborting"),j=A("fetchTaskScheduling"),E=ue(M,"send",()=>function(h,I){if(!0===n.current[j]||h[o])return E.apply(h,I);{const P={target:h,url:h[y],isPeriodic:!1,args:I,aborted:!1},Q=Le("XMLHttpRequest.send",R,P,q,_);h&&!0===h[d]&&!P.aborted&&Q.state===J&&Q.invoke()}}),G=ue(M,"abort",()=>function(h,I){const P=function Z(h){return h[i]}(h);if(P&&"string"==typeof P.type){if(null==P.cancelFn||P.data&&P.data.aborted)return;P.zone.cancelTask(P)}else if(!0===n.current[z])return G.apply(h,I)})}(t);const i=A("xhrTask"),o=A("xhrSync"),c=A("xhrListener"),a=A("xhrScheduled"),y=A("xhrURL"),d=A("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",t=>{t.navigator&&t.navigator.geolocation&&function lt(t,n){const i=t.constructor.name;for(let o=0;o{const b=function(){return d.apply(this,je(arguments,i+"."+c))};return fe(b,d),b})(a)}}}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(t,n)=>{function i(o){return function(c){et(t,o).forEach(y=>{const d=t.PromiseRejectionEvent;if(d){const b=new d(o,{promise:c.promise,reason:c.rejection});y.invoke(b)}})}}t.PromiseRejectionEvent&&(n[A("unhandledPromiseRejectionHandler")]=i("unhandledrejection"),n[A("rejectionHandledHandler")]=i("rejectionhandled"))}),Zone.__load_patch("queueMicrotask",(t,n,i)=>{!function pt(t,n){n.patchMethod(t,"queueMicrotask",i=>function(o,c){Zone.current.scheduleMicroTask("queueMicrotask",c[0])})}(t,i)})},50:(ce,Ee,de)=>{de(260)}},ce=>{ce(ce.s=50)}]); \ No newline at end of file diff --git a/app-v2/polyfills.js b/app-v2/polyfills.js new file mode 100644 index 0000000..6aeed8b --- /dev/null +++ b/app-v2/polyfills.js @@ -0,0 +1,2767 @@ +"use strict"; +(self["webpackChunkegon"] = self["webpackChunkegon"] || []).push([["polyfills"],{ + +/***/ 27203: +/*!***********************************************!*\ + !*** ./node_modules/zone.js/fesm2015/zone.js ***! + \***********************************************/ +/***/ (() => { + + + +/** + * @license Angular v + * (c) 2010-2022 Google LLC. https://angular.io/ + * License: MIT + */ +// Initialize global `Zone` constant. +(function (global) { + const performance = global['performance']; + function mark(name) { + performance && performance['mark'] && performance['mark'](name); + } + function performanceMeasure(name, label) { + performance && performance['measure'] && performance['measure'](name, label); + } + mark('Zone'); + // Initialize before it's accessed below. + // __Zone_symbol_prefix global can be used to override the default zone + // symbol prefix with a custom one if needed. + const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__'; + function __symbol__(name) { + return symbolPrefix + name; + } + const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true; + if (global['Zone']) { + // if global['Zone'] already exists (maybe zone.js was already loaded or + // some other lib also registered a global object named Zone), we may need + // to throw an error, but sometimes user may not want this error. + // For example, + // we have two web pages, page1 includes zone.js, page2 doesn't. + // and the 1st time user load page1 and page2, everything work fine, + // but when user load page2 again, error occurs because global['Zone'] already exists. + // so we add a flag to let user choose whether to throw this error or not. + // By default, if existing Zone is from zone.js, we will not throw the error. + if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') { + throw new Error('Zone already loaded.'); + } else { + return global['Zone']; + } + } + class Zone { + // tslint:disable-next-line:require-internal-with-underscore + static #_ = this.__symbol__ = __symbol__; + static assertZonePatched() { + if (global['Promise'] !== patches['ZoneAwarePromise']) { + throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' + 'has been overwritten.\n' + 'Most likely cause is that a Promise polyfill has been loaded ' + 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' + 'If you must load one, do so before loading zone.js.)'); + } + } + static get root() { + let zone = Zone.current; + while (zone.parent) { + zone = zone.parent; + } + return zone; + } + static get current() { + return _currentZoneFrame.zone; + } + static get currentTask() { + return _currentTask; + } + // tslint:disable-next-line:require-internal-with-underscore + static __load_patch(name, fn, ignoreDuplicate = false) { + if (patches.hasOwnProperty(name)) { + // `checkDuplicate` option is defined from global variable + // so it works for all modules. + // `ignoreDuplicate` can work for the specified module + if (!ignoreDuplicate && checkDuplicate) { + throw Error('Already loaded patch: ' + name); + } + } else if (!global['__Zone_disable_' + name]) { + const perfName = 'Zone:' + name; + mark(perfName); + patches[name] = fn(global, Zone, _api); + performanceMeasure(perfName, perfName); + } + } + get parent() { + return this._parent; + } + get name() { + return this._name; + } + constructor(parent, zoneSpec) { + this._parent = parent; + this._name = zoneSpec ? zoneSpec.name || 'unnamed' : ''; + this._properties = zoneSpec && zoneSpec.properties || {}; + this._zoneDelegate = new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec); + } + get(key) { + const zone = this.getZoneWith(key); + if (zone) return zone._properties[key]; + } + getZoneWith(key) { + let current = this; + while (current) { + if (current._properties.hasOwnProperty(key)) { + return current; + } + current = current._parent; + } + return null; + } + fork(zoneSpec) { + if (!zoneSpec) throw new Error('ZoneSpec required!'); + return this._zoneDelegate.fork(this, zoneSpec); + } + wrap(callback, source) { + if (typeof callback !== 'function') { + throw new Error('Expecting function got: ' + callback); + } + const _callback = this._zoneDelegate.intercept(this, callback, source); + const zone = this; + return function () { + return zone.runGuarded(_callback, this, arguments, source); + }; + } + run(callback, applyThis, applyArgs, source) { + _currentZoneFrame = { + parent: _currentZoneFrame, + zone: this + }; + try { + return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); + } finally { + _currentZoneFrame = _currentZoneFrame.parent; + } + } + runGuarded(callback, applyThis = null, applyArgs, source) { + _currentZoneFrame = { + parent: _currentZoneFrame, + zone: this + }; + try { + try { + return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source); + } catch (error) { + if (this._zoneDelegate.handleError(this, error)) { + throw error; + } + } + } finally { + _currentZoneFrame = _currentZoneFrame.parent; + } + } + runTask(task, applyThis, applyArgs) { + if (task.zone != this) { + throw new Error('A task can only be run in the zone of creation! (Creation: ' + (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')'); + } + // https://github.com/angular/zone.js/issues/778, sometimes eventTask + // will run in notScheduled(canceled) state, we should not try to + // run such kind of task but just return + if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) { + return; + } + const reEntryGuard = task.state != running; + reEntryGuard && task._transitionTo(running, scheduled); + task.runCount++; + const previousTask = _currentTask; + _currentTask = task; + _currentZoneFrame = { + parent: _currentZoneFrame, + zone: this + }; + try { + if (task.type == macroTask && task.data && !task.data.isPeriodic) { + task.cancelFn = undefined; + } + try { + return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs); + } catch (error) { + if (this._zoneDelegate.handleError(this, error)) { + throw error; + } + } + } finally { + // if the task's state is notScheduled or unknown, then it has already been cancelled + // we should not reset the state to scheduled + if (task.state !== notScheduled && task.state !== unknown) { + if (task.type == eventTask || task.data && task.data.isPeriodic) { + reEntryGuard && task._transitionTo(scheduled, running); + } else { + task.runCount = 0; + this._updateTaskCount(task, -1); + reEntryGuard && task._transitionTo(notScheduled, running, notScheduled); + } + } + _currentZoneFrame = _currentZoneFrame.parent; + _currentTask = previousTask; + } + } + scheduleTask(task) { + if (task.zone && task.zone !== this) { + // check if the task was rescheduled, the newZone + // should not be the children of the original zone + let newZone = this; + while (newZone) { + if (newZone === task.zone) { + throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`); + } + newZone = newZone.parent; + } + } + task._transitionTo(scheduling, notScheduled); + const zoneDelegates = []; + task._zoneDelegates = zoneDelegates; + task._zone = this; + try { + task = this._zoneDelegate.scheduleTask(this, task); + } catch (err) { + // should set task's state to unknown when scheduleTask throw error + // because the err may from reschedule, so the fromState maybe notScheduled + task._transitionTo(unknown, scheduling, notScheduled); + // TODO: @JiaLiPassion, should we check the result from handleError? + this._zoneDelegate.handleError(this, err); + throw err; + } + if (task._zoneDelegates === zoneDelegates) { + // we have to check because internally the delegate can reschedule the task. + this._updateTaskCount(task, 1); + } + if (task.state == scheduling) { + task._transitionTo(scheduled, scheduling); + } + return task; + } + scheduleMicroTask(source, callback, data, customSchedule) { + return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined)); + } + scheduleMacroTask(source, callback, data, customSchedule, customCancel) { + return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel)); + } + scheduleEventTask(source, callback, data, customSchedule, customCancel) { + return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel)); + } + cancelTask(task) { + if (task.zone != this) throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' + (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')'); + if (task.state !== scheduled && task.state !== running) { + return; + } + task._transitionTo(canceling, scheduled, running); + try { + this._zoneDelegate.cancelTask(this, task); + } catch (err) { + // if error occurs when cancelTask, transit the state to unknown + task._transitionTo(unknown, canceling); + this._zoneDelegate.handleError(this, err); + throw err; + } + this._updateTaskCount(task, -1); + task._transitionTo(notScheduled, canceling); + task.runCount = 0; + return task; + } + _updateTaskCount(task, count) { + const zoneDelegates = task._zoneDelegates; + if (count == -1) { + task._zoneDelegates = null; + } + for (let i = 0; i < zoneDelegates.length; i++) { + zoneDelegates[i]._updateTaskCount(task.type, count); + } + } + } + const DELEGATE_ZS = { + name: '', + onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState), + onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task), + onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs), + onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task) + }; + class _ZoneDelegate { + constructor(zone, parentDelegate, zoneSpec) { + this._taskCounts = { + 'microTask': 0, + 'macroTask': 0, + 'eventTask': 0 + }; + this.zone = zone; + this._parentDelegate = parentDelegate; + this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS); + this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt); + this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone); + this._interceptZS = zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS); + this._interceptDlgt = zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt); + this._interceptCurrZone = zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone); + this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS); + this._invokeDlgt = zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt); + this._invokeCurrZone = zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone); + this._handleErrorZS = zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS); + this._handleErrorDlgt = zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt); + this._handleErrorCurrZone = zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone); + this._scheduleTaskZS = zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS); + this._scheduleTaskDlgt = zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt); + this._scheduleTaskCurrZone = zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone); + this._invokeTaskZS = zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS); + this._invokeTaskDlgt = zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt); + this._invokeTaskCurrZone = zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone); + this._cancelTaskZS = zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS); + this._cancelTaskDlgt = zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt); + this._cancelTaskCurrZone = zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone); + this._hasTaskZS = null; + this._hasTaskDlgt = null; + this._hasTaskDlgtOwner = null; + this._hasTaskCurrZone = null; + const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask; + const parentHasTask = parentDelegate && parentDelegate._hasTaskZS; + if (zoneSpecHasTask || parentHasTask) { + // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such + // a case all task related interceptors must go through this ZD. We can't short circuit it. + this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS; + this._hasTaskDlgt = parentDelegate; + this._hasTaskDlgtOwner = this; + this._hasTaskCurrZone = zone; + if (!zoneSpec.onScheduleTask) { + this._scheduleTaskZS = DELEGATE_ZS; + this._scheduleTaskDlgt = parentDelegate; + this._scheduleTaskCurrZone = this.zone; + } + if (!zoneSpec.onInvokeTask) { + this._invokeTaskZS = DELEGATE_ZS; + this._invokeTaskDlgt = parentDelegate; + this._invokeTaskCurrZone = this.zone; + } + if (!zoneSpec.onCancelTask) { + this._cancelTaskZS = DELEGATE_ZS; + this._cancelTaskDlgt = parentDelegate; + this._cancelTaskCurrZone = this.zone; + } + } + } + fork(targetZone, zoneSpec) { + return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) : new Zone(targetZone, zoneSpec); + } + intercept(targetZone, callback, source) { + return this._interceptZS ? this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) : callback; + } + invoke(targetZone, callback, applyThis, applyArgs, source) { + return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) : callback.apply(applyThis, applyArgs); + } + handleError(targetZone, error) { + return this._handleErrorZS ? this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) : true; + } + scheduleTask(targetZone, task) { + let returnTask = task; + if (this._scheduleTaskZS) { + if (this._hasTaskZS) { + returnTask._zoneDelegates.push(this._hasTaskDlgtOwner); + } + // clang-format off + returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task); + // clang-format on + if (!returnTask) returnTask = task; + } else { + if (task.scheduleFn) { + task.scheduleFn(task); + } else if (task.type == microTask) { + scheduleMicroTask(task); + } else { + throw new Error('Task is missing scheduleFn.'); + } + } + return returnTask; + } + invokeTask(targetZone, task, applyThis, applyArgs) { + return this._invokeTaskZS ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) : task.callback.apply(applyThis, applyArgs); + } + cancelTask(targetZone, task) { + let value; + if (this._cancelTaskZS) { + value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task); + } else { + if (!task.cancelFn) { + throw Error('Task is not cancelable'); + } + value = task.cancelFn(task); + } + return value; + } + hasTask(targetZone, isEmpty) { + // hasTask should not throw error so other ZoneDelegate + // can still trigger hasTask callback + try { + this._hasTaskZS && this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty); + } catch (err) { + this.handleError(targetZone, err); + } + } + // tslint:disable-next-line:require-internal-with-underscore + _updateTaskCount(type, count) { + const counts = this._taskCounts; + const prev = counts[type]; + const next = counts[type] = prev + count; + if (next < 0) { + throw new Error('More tasks executed then were scheduled.'); + } + if (prev == 0 || next == 0) { + const isEmpty = { + microTask: counts['microTask'] > 0, + macroTask: counts['macroTask'] > 0, + eventTask: counts['eventTask'] > 0, + change: type + }; + this.hasTask(this.zone, isEmpty); + } + } + } + class ZoneTask { + constructor(type, source, callback, options, scheduleFn, cancelFn) { + // tslint:disable-next-line:require-internal-with-underscore + this._zone = null; + this.runCount = 0; + // tslint:disable-next-line:require-internal-with-underscore + this._zoneDelegates = null; + // tslint:disable-next-line:require-internal-with-underscore + this._state = 'notScheduled'; + this.type = type; + this.source = source; + this.data = options; + this.scheduleFn = scheduleFn; + this.cancelFn = cancelFn; + if (!callback) { + throw new Error('callback is not defined'); + } + this.callback = callback; + const self = this; + // TODO: @JiaLiPassion options should have interface + if (type === eventTask && options && options.useG) { + this.invoke = ZoneTask.invokeTask; + } else { + this.invoke = function () { + return ZoneTask.invokeTask.call(global, self, this, arguments); + }; + } + } + static invokeTask(task, target, args) { + if (!task) { + task = this; + } + _numberOfNestedTaskFrames++; + try { + task.runCount++; + return task.zone.runTask(task, target, args); + } finally { + if (_numberOfNestedTaskFrames == 1) { + drainMicroTaskQueue(); + } + _numberOfNestedTaskFrames--; + } + } + get zone() { + return this._zone; + } + get state() { + return this._state; + } + cancelScheduleRequest() { + this._transitionTo(notScheduled, scheduling); + } + // tslint:disable-next-line:require-internal-with-underscore + _transitionTo(toState, fromState1, fromState2) { + if (this._state === fromState1 || this._state === fromState2) { + this._state = toState; + if (toState == notScheduled) { + this._zoneDelegates = null; + } + } else { + throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? ' or \'' + fromState2 + '\'' : ''}, was '${this._state}'.`); + } + } + toString() { + if (this.data && typeof this.data.handleId !== 'undefined') { + return this.data.handleId.toString(); + } else { + return Object.prototype.toString.call(this); + } + } + // add toJSON method to prevent cyclic error when + // call JSON.stringify(zoneTask) + toJSON() { + return { + type: this.type, + state: this.state, + source: this.source, + zone: this.zone.name, + runCount: this.runCount + }; + } + } + ////////////////////////////////////////////////////// + ////////////////////////////////////////////////////// + /// MICROTASK QUEUE + ////////////////////////////////////////////////////// + ////////////////////////////////////////////////////// + const symbolSetTimeout = __symbol__('setTimeout'); + const symbolPromise = __symbol__('Promise'); + const symbolThen = __symbol__('then'); + let _microTaskQueue = []; + let _isDrainingMicrotaskQueue = false; + let nativeMicroTaskQueuePromise; + function nativeScheduleMicroTask(func) { + if (!nativeMicroTaskQueuePromise) { + if (global[symbolPromise]) { + nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0); + } + } + if (nativeMicroTaskQueuePromise) { + let nativeThen = nativeMicroTaskQueuePromise[symbolThen]; + if (!nativeThen) { + // native Promise is not patchable, we need to use `then` directly + // issue 1078 + nativeThen = nativeMicroTaskQueuePromise['then']; + } + nativeThen.call(nativeMicroTaskQueuePromise, func); + } else { + global[symbolSetTimeout](func, 0); + } + } + function scheduleMicroTask(task) { + // if we are not running in any task, and there has not been anything scheduled + // we must bootstrap the initial task creation by manually scheduling the drain + if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) { + // We are not running in Task, so we need to kickstart the microtask queue. + nativeScheduleMicroTask(drainMicroTaskQueue); + } + task && _microTaskQueue.push(task); + } + function drainMicroTaskQueue() { + if (!_isDrainingMicrotaskQueue) { + _isDrainingMicrotaskQueue = true; + while (_microTaskQueue.length) { + const queue = _microTaskQueue; + _microTaskQueue = []; + for (let i = 0; i < queue.length; i++) { + const task = queue[i]; + try { + task.zone.runTask(task, null, null); + } catch (error) { + _api.onUnhandledError(error); + } + } + } + _api.microtaskDrainDone(); + _isDrainingMicrotaskQueue = false; + } + } + ////////////////////////////////////////////////////// + ////////////////////////////////////////////////////// + /// BOOTSTRAP + ////////////////////////////////////////////////////// + ////////////////////////////////////////////////////// + const NO_ZONE = { + name: 'NO ZONE' + }; + const notScheduled = 'notScheduled', + scheduling = 'scheduling', + scheduled = 'scheduled', + running = 'running', + canceling = 'canceling', + unknown = 'unknown'; + const microTask = 'microTask', + macroTask = 'macroTask', + eventTask = 'eventTask'; + const patches = {}; + const _api = { + symbol: __symbol__, + currentZoneFrame: () => _currentZoneFrame, + onUnhandledError: noop, + microtaskDrainDone: noop, + scheduleMicroTask: scheduleMicroTask, + showUncaughtError: () => !Zone[__symbol__('ignoreConsoleErrorUncaughtError')], + patchEventTarget: () => [], + patchOnProperties: noop, + patchMethod: () => noop, + bindArguments: () => [], + patchThen: () => noop, + patchMacroTask: () => noop, + patchEventPrototype: () => noop, + isIEOrEdge: () => false, + getGlobalObjects: () => undefined, + ObjectDefineProperty: () => noop, + ObjectGetOwnPropertyDescriptor: () => undefined, + ObjectCreate: () => undefined, + ArraySlice: () => [], + patchClass: () => noop, + wrapWithCurrentZone: () => noop, + filterProperties: () => [], + attachOriginToPatched: () => noop, + _redefineProperty: () => noop, + patchCallbacks: () => noop, + nativeScheduleMicroTask: nativeScheduleMicroTask + }; + let _currentZoneFrame = { + parent: null, + zone: new Zone(null, null) + }; + let _currentTask = null; + let _numberOfNestedTaskFrames = 0; + function noop() {} + performanceMeasure('Zone', 'Zone'); + return global['Zone'] = Zone; +})(globalThis); + +/** + * Suppress closure compiler errors about unknown 'Zone' variable + * @fileoverview + * @suppress {undefinedVars,globalThis,missingRequire} + */ +/// +// issue #989, to reduce bundle size, use short name +/** Object.getOwnPropertyDescriptor */ +const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +/** Object.defineProperty */ +const ObjectDefineProperty = Object.defineProperty; +/** Object.getPrototypeOf */ +const ObjectGetPrototypeOf = Object.getPrototypeOf; +/** Object.create */ +const ObjectCreate = Object.create; +/** Array.prototype.slice */ +const ArraySlice = Array.prototype.slice; +/** addEventListener string const */ +const ADD_EVENT_LISTENER_STR = 'addEventListener'; +/** removeEventListener string const */ +const REMOVE_EVENT_LISTENER_STR = 'removeEventListener'; +/** zoneSymbol addEventListener */ +const ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR); +/** zoneSymbol removeEventListener */ +const ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR); +/** true string const */ +const TRUE_STR = 'true'; +/** false string const */ +const FALSE_STR = 'false'; +/** Zone symbol prefix string const. */ +const ZONE_SYMBOL_PREFIX = Zone.__symbol__(''); +function wrapWithCurrentZone(callback, source) { + return Zone.current.wrap(callback, source); +} +function scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) { + return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel); +} +const zoneSymbol = Zone.__symbol__; +const isWindowExists = typeof window !== 'undefined'; +const internalWindow = isWindowExists ? window : undefined; +const _global = isWindowExists && internalWindow || globalThis; +const REMOVE_ATTRIBUTE = 'removeAttribute'; +function bindArguments(args, source) { + for (let i = args.length - 1; i >= 0; i--) { + if (typeof args[i] === 'function') { + args[i] = wrapWithCurrentZone(args[i], source + '_' + i); + } + } + return args; +} +function patchPrototype(prototype, fnNames) { + const source = prototype.constructor['name']; + for (let i = 0; i < fnNames.length; i++) { + const name = fnNames[i]; + const delegate = prototype[name]; + if (delegate) { + const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name); + if (!isPropertyWritable(prototypeDesc)) { + continue; + } + prototype[name] = (delegate => { + const patched = function () { + return delegate.apply(this, bindArguments(arguments, source + '.' + name)); + }; + attachOriginToPatched(patched, delegate); + return patched; + })(delegate); + } + } +} +function isPropertyWritable(propertyDesc) { + if (!propertyDesc) { + return true; + } + if (propertyDesc.writable === false) { + return false; + } + return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined'); +} +const isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope; +// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify +// this code. +const isNode = !('nw' in _global) && typeof _global.process !== 'undefined' && {}.toString.call(_global.process) === '[object process]'; +const isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']); +// we are in electron of nw, so we are both browser and nodejs +// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify +// this code. +const isMix = typeof _global.process !== 'undefined' && {}.toString.call(_global.process) === '[object process]' && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']); +const zoneSymbolEventNames$1 = {}; +const wrapFn = function (event) { + // https://github.com/angular/zone.js/issues/911, in IE, sometimes + // event will be undefined, so we need to use window.event + event = event || _global.event; + if (!event) { + return; + } + let eventNameSymbol = zoneSymbolEventNames$1[event.type]; + if (!eventNameSymbol) { + eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol('ON_PROPERTY' + event.type); + } + const target = this || event.target || _global; + const listener = target[eventNameSymbol]; + let result; + if (isBrowser && target === internalWindow && event.type === 'error') { + // window.onerror have different signature + // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror + // and onerror callback will prevent default when callback return true + const errorEvent = event; + result = listener && listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error); + if (result === true) { + event.preventDefault(); + } + } else { + result = listener && listener.apply(this, arguments); + if (result != undefined && !result) { + event.preventDefault(); + } + } + return result; +}; +function patchProperty(obj, prop, prototype) { + let desc = ObjectGetOwnPropertyDescriptor(obj, prop); + if (!desc && prototype) { + // when patch window object, use prototype to check prop exist or not + const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop); + if (prototypeDesc) { + desc = { + enumerable: true, + configurable: true + }; + } + } + // if the descriptor not exists or is not configurable + // just return + if (!desc || !desc.configurable) { + return; + } + const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched'); + if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) { + return; + } + // A property descriptor cannot have getter/setter and be writable + // deleting the writable and value properties avoids this error: + // + // TypeError: property descriptors must not specify a value or be writable when a + // getter or setter has been specified + delete desc.writable; + delete desc.value; + const originalDescGet = desc.get; + const originalDescSet = desc.set; + // slice(2) cuz 'onclick' -> 'click', etc + const eventName = prop.slice(2); + let eventNameSymbol = zoneSymbolEventNames$1[eventName]; + if (!eventNameSymbol) { + eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol('ON_PROPERTY' + eventName); + } + desc.set = function (newValue) { + // in some of windows's onproperty callback, this is undefined + // so we need to check it + let target = this; + if (!target && obj === _global) { + target = _global; + } + if (!target) { + return; + } + const previousValue = target[eventNameSymbol]; + if (typeof previousValue === 'function') { + target.removeEventListener(eventName, wrapFn); + } + // issue #978, when onload handler was added before loading zone.js + // we should remove it with originalDescSet + originalDescSet && originalDescSet.call(target, null); + target[eventNameSymbol] = newValue; + if (typeof newValue === 'function') { + target.addEventListener(eventName, wrapFn, false); + } + }; + // The getter would return undefined for unassigned properties but the default value of an + // unassigned property is null + desc.get = function () { + // in some of windows's onproperty callback, this is undefined + // so we need to check it + let target = this; + if (!target && obj === _global) { + target = _global; + } + if (!target) { + return null; + } + const listener = target[eventNameSymbol]; + if (listener) { + return listener; + } else if (originalDescGet) { + // result will be null when use inline event attribute, + // such as + // because the onclick function is internal raw uncompiled handler + // the onclick will be evaluated when first time event was triggered or + // the property is accessed, https://github.com/angular/zone.js/issues/525 + // so we should use original native get to retrieve the handler + let value = originalDescGet.call(this); + if (value) { + desc.set.call(this, value); + if (typeof target[REMOVE_ATTRIBUTE] === 'function') { + target.removeAttribute(prop); + } + return value; + } + } + return null; + }; + ObjectDefineProperty(obj, prop, desc); + obj[onPropPatchedSymbol] = true; +} +function patchOnProperties(obj, properties, prototype) { + if (properties) { + for (let i = 0; i < properties.length; i++) { + patchProperty(obj, 'on' + properties[i], prototype); + } + } else { + const onProperties = []; + for (const prop in obj) { + if (prop.slice(0, 2) == 'on') { + onProperties.push(prop); + } + } + for (let j = 0; j < onProperties.length; j++) { + patchProperty(obj, onProperties[j], prototype); + } + } +} +const originalInstanceKey = zoneSymbol('originalInstance'); +// wrap some native API on `window` +function patchClass(className) { + const OriginalClass = _global[className]; + if (!OriginalClass) return; + // keep original class in global + _global[zoneSymbol(className)] = OriginalClass; + _global[className] = function () { + const a = bindArguments(arguments, className); + switch (a.length) { + case 0: + this[originalInstanceKey] = new OriginalClass(); + break; + case 1: + this[originalInstanceKey] = new OriginalClass(a[0]); + break; + case 2: + this[originalInstanceKey] = new OriginalClass(a[0], a[1]); + break; + case 3: + this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]); + break; + case 4: + this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]); + break; + default: + throw new Error('Arg list too long.'); + } + }; + // attach original delegate to patched function + attachOriginToPatched(_global[className], OriginalClass); + const instance = new OriginalClass(function () {}); + let prop; + for (prop in instance) { + // https://bugs.webkit.org/show_bug.cgi?id=44721 + if (className === 'XMLHttpRequest' && prop === 'responseBlob') continue; + (function (prop) { + if (typeof instance[prop] === 'function') { + _global[className].prototype[prop] = function () { + return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments); + }; + } else { + ObjectDefineProperty(_global[className].prototype, prop, { + set: function (fn) { + if (typeof fn === 'function') { + this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop); + // keep callback in wrapped function so we can + // use it in Function.prototype.toString to return + // the native one. + attachOriginToPatched(this[originalInstanceKey][prop], fn); + } else { + this[originalInstanceKey][prop] = fn; + } + }, + get: function () { + return this[originalInstanceKey][prop]; + } + }); + } + })(prop); + } + for (prop in OriginalClass) { + if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) { + _global[className][prop] = OriginalClass[prop]; + } + } +} +function patchMethod(target, name, patchFn) { + let proto = target; + while (proto && !proto.hasOwnProperty(name)) { + proto = ObjectGetPrototypeOf(proto); + } + if (!proto && target[name]) { + // somehow we did not find it, but we can see it. This happens on IE for Window properties. + proto = target; + } + const delegateName = zoneSymbol(name); + let delegate = null; + if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) { + delegate = proto[delegateName] = proto[name]; + // check whether proto[name] is writable + // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob + const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name); + if (isPropertyWritable(desc)) { + const patchDelegate = patchFn(delegate, delegateName, name); + proto[name] = function () { + return patchDelegate(this, arguments); + }; + attachOriginToPatched(proto[name], delegate); + } + } + return delegate; +} +// TODO: @JiaLiPassion, support cancel task later if necessary +function patchMacroTask(obj, funcName, metaCreator) { + let setNative = null; + function scheduleTask(task) { + const data = task.data; + data.args[data.cbIdx] = function () { + task.invoke.apply(this, arguments); + }; + setNative.apply(data.target, data.args); + return task; + } + setNative = patchMethod(obj, funcName, delegate => function (self, args) { + const meta = metaCreator(self, args); + if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') { + return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask); + } else { + // cause an error by calling it directly. + return delegate.apply(self, args); + } + }); +} +function attachOriginToPatched(patched, original) { + patched[zoneSymbol('OriginalDelegate')] = original; +} +let isDetectedIEOrEdge = false; +let ieOrEdge = false; +function isIE() { + try { + const ua = internalWindow.navigator.userAgent; + if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) { + return true; + } + } catch (error) {} + return false; +} +function isIEOrEdge() { + if (isDetectedIEOrEdge) { + return ieOrEdge; + } + isDetectedIEOrEdge = true; + try { + const ua = internalWindow.navigator.userAgent; + if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) { + ieOrEdge = true; + } + } catch (error) {} + return ieOrEdge; +} +Zone.__load_patch('ZoneAwarePromise', (global, Zone, api) => { + const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + const ObjectDefineProperty = Object.defineProperty; + function readableObjectToString(obj) { + if (obj && obj.toString === Object.prototype.toString) { + const className = obj.constructor && obj.constructor.name; + return (className ? className : '') + ': ' + JSON.stringify(obj); + } + return obj ? obj.toString() : Object.prototype.toString.call(obj); + } + const __symbol__ = api.symbol; + const _uncaughtPromiseErrors = []; + const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] !== false; + const symbolPromise = __symbol__('Promise'); + const symbolThen = __symbol__('then'); + const creationTrace = '__creationTrace__'; + api.onUnhandledError = e => { + if (api.showUncaughtError()) { + const rejection = e && e.rejection; + if (rejection) { + console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined); + } else { + console.error(e); + } + } + }; + api.microtaskDrainDone = () => { + while (_uncaughtPromiseErrors.length) { + const uncaughtPromiseError = _uncaughtPromiseErrors.shift(); + try { + uncaughtPromiseError.zone.runGuarded(() => { + if (uncaughtPromiseError.throwOriginal) { + throw uncaughtPromiseError.rejection; + } + throw uncaughtPromiseError; + }); + } catch (error) { + handleUnhandledRejection(error); + } + } + }; + const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler'); + function handleUnhandledRejection(e) { + api.onUnhandledError(e); + try { + const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL]; + if (typeof handler === 'function') { + handler.call(this, e); + } + } catch (err) {} + } + function isThenable(value) { + return value && value.then; + } + function forwardResolution(value) { + return value; + } + function forwardRejection(rejection) { + return ZoneAwarePromise.reject(rejection); + } + const symbolState = __symbol__('state'); + const symbolValue = __symbol__('value'); + const symbolFinally = __symbol__('finally'); + const symbolParentPromiseValue = __symbol__('parentPromiseValue'); + const symbolParentPromiseState = __symbol__('parentPromiseState'); + const source = 'Promise.then'; + const UNRESOLVED = null; + const RESOLVED = true; + const REJECTED = false; + const REJECTED_NO_CATCH = 0; + function makeResolver(promise, state) { + return v => { + try { + resolvePromise(promise, state, v); + } catch (err) { + resolvePromise(promise, false, err); + } + // Do not return value or you will break the Promise spec. + }; + } + + const once = function () { + let wasCalled = false; + return function wrapper(wrappedFunction) { + return function () { + if (wasCalled) { + return; + } + wasCalled = true; + wrappedFunction.apply(null, arguments); + }; + }; + }; + const TYPE_ERROR = 'Promise resolved with itself'; + const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace'); + // Promise Resolution + function resolvePromise(promise, state, value) { + const onceWrapper = once(); + if (promise === value) { + throw new TypeError(TYPE_ERROR); + } + if (promise[symbolState] === UNRESOLVED) { + // should only get value.then once based on promise spec. + let then = null; + try { + if (typeof value === 'object' || typeof value === 'function') { + then = value && value.then; + } + } catch (err) { + onceWrapper(() => { + resolvePromise(promise, false, err); + })(); + return promise; + } + // if (value instanceof ZoneAwarePromise) { + if (state !== REJECTED && value instanceof ZoneAwarePromise && value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) && value[symbolState] !== UNRESOLVED) { + clearRejectedNoCatch(value); + resolvePromise(promise, value[symbolState], value[symbolValue]); + } else if (state !== REJECTED && typeof then === 'function') { + try { + then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false))); + } catch (err) { + onceWrapper(() => { + resolvePromise(promise, false, err); + })(); + } + } else { + promise[symbolState] = state; + const queue = promise[symbolValue]; + promise[symbolValue] = value; + if (promise[symbolFinally] === symbolFinally) { + // the promise is generated by Promise.prototype.finally + if (state === RESOLVED) { + // the state is resolved, should ignore the value + // and use parent promise value + promise[symbolState] = promise[symbolParentPromiseState]; + promise[symbolValue] = promise[symbolParentPromiseValue]; + } + } + // record task information in value when error occurs, so we can + // do some additional work such as render longStackTrace + if (state === REJECTED && value instanceof Error) { + // check if longStackTraceZone is here + const trace = Zone.currentTask && Zone.currentTask.data && Zone.currentTask.data[creationTrace]; + if (trace) { + // only keep the long stack trace into error when in longStackTraceZone + ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { + configurable: true, + enumerable: false, + writable: true, + value: trace + }); + } + } + for (let i = 0; i < queue.length;) { + scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]); + } + if (queue.length == 0 && state == REJECTED) { + promise[symbolState] = REJECTED_NO_CATCH; + let uncaughtPromiseError = value; + try { + // Here we throws a new Error to print more readable error log + // and if the value is not an error, zone.js builds an `Error` + // Object here to attach the stack information. + throw new Error('Uncaught (in promise): ' + readableObjectToString(value) + (value && value.stack ? '\n' + value.stack : '')); + } catch (err) { + uncaughtPromiseError = err; + } + if (isDisableWrappingUncaughtPromiseRejection) { + // If disable wrapping uncaught promise reject + // use the value instead of wrapping it. + uncaughtPromiseError.throwOriginal = true; + } + uncaughtPromiseError.rejection = value; + uncaughtPromiseError.promise = promise; + uncaughtPromiseError.zone = Zone.current; + uncaughtPromiseError.task = Zone.currentTask; + _uncaughtPromiseErrors.push(uncaughtPromiseError); + api.scheduleMicroTask(); // to make sure that it is running + } + } + } + // Resolving an already resolved promise is a noop. + return promise; + } + const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler'); + function clearRejectedNoCatch(promise) { + if (promise[symbolState] === REJECTED_NO_CATCH) { + // if the promise is rejected no catch status + // and queue.length > 0, means there is a error handler + // here to handle the rejected promise, we should trigger + // windows.rejectionhandled eventHandler or nodejs rejectionHandled + // eventHandler + try { + const handler = Zone[REJECTION_HANDLED_HANDLER]; + if (handler && typeof handler === 'function') { + handler.call(this, { + rejection: promise[symbolValue], + promise: promise + }); + } + } catch (err) {} + promise[symbolState] = REJECTED; + for (let i = 0; i < _uncaughtPromiseErrors.length; i++) { + if (promise === _uncaughtPromiseErrors[i].promise) { + _uncaughtPromiseErrors.splice(i, 1); + } + } + } + } + function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) { + clearRejectedNoCatch(promise); + const promiseState = promise[symbolState]; + const delegate = promiseState ? typeof onFulfilled === 'function' ? onFulfilled : forwardResolution : typeof onRejected === 'function' ? onRejected : forwardRejection; + zone.scheduleMicroTask(source, () => { + try { + const parentPromiseValue = promise[symbolValue]; + const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally]; + if (isFinallyPromise) { + // if the promise is generated from finally call, keep parent promise's state and value + chainPromise[symbolParentPromiseValue] = parentPromiseValue; + chainPromise[symbolParentPromiseState] = promiseState; + } + // should not pass value to finally callback + const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ? [] : [parentPromiseValue]); + resolvePromise(chainPromise, true, value); + } catch (error) { + // if error occurs, should always return this error + resolvePromise(chainPromise, false, error); + } + }, chainPromise); + } + const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }'; + const noop = function () {}; + const AggregateError = global.AggregateError; + class ZoneAwarePromise { + static toString() { + return ZONE_AWARE_PROMISE_TO_STRING; + } + static resolve(value) { + if (value instanceof ZoneAwarePromise) { + return value; + } + return resolvePromise(new this(null), RESOLVED, value); + } + static reject(error) { + return resolvePromise(new this(null), REJECTED, error); + } + static withResolvers() { + const result = {}; + result.promise = new ZoneAwarePromise((res, rej) => { + result.resolve = res; + result.reject = rej; + }); + return result; + } + static any(values) { + if (!values || typeof values[Symbol.iterator] !== 'function') { + return Promise.reject(new AggregateError([], 'All promises were rejected')); + } + const promises = []; + let count = 0; + try { + for (let v of values) { + count++; + promises.push(ZoneAwarePromise.resolve(v)); + } + } catch (err) { + return Promise.reject(new AggregateError([], 'All promises were rejected')); + } + if (count === 0) { + return Promise.reject(new AggregateError([], 'All promises were rejected')); + } + let finished = false; + const errors = []; + return new ZoneAwarePromise((resolve, reject) => { + for (let i = 0; i < promises.length; i++) { + promises[i].then(v => { + if (finished) { + return; + } + finished = true; + resolve(v); + }, err => { + errors.push(err); + count--; + if (count === 0) { + finished = true; + reject(new AggregateError(errors, 'All promises were rejected')); + } + }); + } + }); + } + static race(values) { + let resolve; + let reject; + let promise = new this((res, rej) => { + resolve = res; + reject = rej; + }); + function onResolve(value) { + resolve(value); + } + function onReject(error) { + reject(error); + } + for (let value of values) { + if (!isThenable(value)) { + value = this.resolve(value); + } + value.then(onResolve, onReject); + } + return promise; + } + static all(values) { + return ZoneAwarePromise.allWithCallback(values); + } + static allSettled(values) { + const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise; + return P.allWithCallback(values, { + thenCallback: value => ({ + status: 'fulfilled', + value + }), + errorCallback: err => ({ + status: 'rejected', + reason: err + }) + }); + } + static allWithCallback(values, callback) { + let resolve; + let reject; + let promise = new this((res, rej) => { + resolve = res; + reject = rej; + }); + // Start at 2 to prevent prematurely resolving if .then is called immediately. + let unresolvedCount = 2; + let valueIndex = 0; + const resolvedValues = []; + for (let value of values) { + if (!isThenable(value)) { + value = this.resolve(value); + } + const curValueIndex = valueIndex; + try { + value.then(value => { + resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value; + unresolvedCount--; + if (unresolvedCount === 0) { + resolve(resolvedValues); + } + }, err => { + if (!callback) { + reject(err); + } else { + resolvedValues[curValueIndex] = callback.errorCallback(err); + unresolvedCount--; + if (unresolvedCount === 0) { + resolve(resolvedValues); + } + } + }); + } catch (thenErr) { + reject(thenErr); + } + unresolvedCount++; + valueIndex++; + } + // Make the unresolvedCount zero-based again. + unresolvedCount -= 2; + if (unresolvedCount === 0) { + resolve(resolvedValues); + } + return promise; + } + constructor(executor) { + const promise = this; + if (!(promise instanceof ZoneAwarePromise)) { + throw new Error('Must be an instanceof Promise.'); + } + promise[symbolState] = UNRESOLVED; + promise[symbolValue] = []; // queue; + try { + const onceWrapper = once(); + executor && executor(onceWrapper(makeResolver(promise, RESOLVED)), onceWrapper(makeResolver(promise, REJECTED))); + } catch (error) { + resolvePromise(promise, false, error); + } + } + get [Symbol.toStringTag]() { + return 'Promise'; + } + get [Symbol.species]() { + return ZoneAwarePromise; + } + then(onFulfilled, onRejected) { + // We must read `Symbol.species` safely because `this` may be anything. For instance, `this` + // may be an object without a prototype (created through `Object.create(null)`); thus + // `this.constructor` will be undefined. One of the use cases is SystemJS creating + // prototype-less objects (modules) via `Object.create(null)`. The SystemJS creates an empty + // object and copies promise properties into that object (within the `getOrCreateLoad` + // function). The zone.js then checks if the resolved value has the `then` method and invokes + // it with the `value` context. Otherwise, this will throw an error: `TypeError: Cannot read + // properties of undefined (reading 'Symbol(Symbol.species)')`. + let C = this.constructor?.[Symbol.species]; + if (!C || typeof C !== 'function') { + C = this.constructor || ZoneAwarePromise; + } + const chainPromise = new C(noop); + const zone = Zone.current; + if (this[symbolState] == UNRESOLVED) { + this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected); + } else { + scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected); + } + return chainPromise; + } + catch(onRejected) { + return this.then(null, onRejected); + } + finally(onFinally) { + // See comment on the call to `then` about why thee `Symbol.species` is safely accessed. + let C = this.constructor?.[Symbol.species]; + if (!C || typeof C !== 'function') { + C = ZoneAwarePromise; + } + const chainPromise = new C(noop); + chainPromise[symbolFinally] = symbolFinally; + const zone = Zone.current; + if (this[symbolState] == UNRESOLVED) { + this[symbolValue].push(zone, chainPromise, onFinally, onFinally); + } else { + scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally); + } + return chainPromise; + } + } + // Protect against aggressive optimizers dropping seemingly unused properties. + // E.g. Closure Compiler in advanced mode. + ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve; + ZoneAwarePromise['reject'] = ZoneAwarePromise.reject; + ZoneAwarePromise['race'] = ZoneAwarePromise.race; + ZoneAwarePromise['all'] = ZoneAwarePromise.all; + const NativePromise = global[symbolPromise] = global['Promise']; + global['Promise'] = ZoneAwarePromise; + const symbolThenPatched = __symbol__('thenPatched'); + function patchThen(Ctor) { + const proto = Ctor.prototype; + const prop = ObjectGetOwnPropertyDescriptor(proto, 'then'); + if (prop && (prop.writable === false || !prop.configurable)) { + // check Ctor.prototype.then propertyDescriptor is writable or not + // in meteor env, writable is false, we should ignore such case + return; + } + const originalThen = proto.then; + // Keep a reference to the original method. + proto[symbolThen] = originalThen; + Ctor.prototype.then = function (onResolve, onReject) { + const wrapped = new ZoneAwarePromise((resolve, reject) => { + originalThen.call(this, resolve, reject); + }); + return wrapped.then(onResolve, onReject); + }; + Ctor[symbolThenPatched] = true; + } + api.patchThen = patchThen; + function zoneify(fn) { + return function (self, args) { + let resultPromise = fn.apply(self, args); + if (resultPromise instanceof ZoneAwarePromise) { + return resultPromise; + } + let ctor = resultPromise.constructor; + if (!ctor[symbolThenPatched]) { + patchThen(ctor); + } + return resultPromise; + }; + } + if (NativePromise) { + patchThen(NativePromise); + patchMethod(global, 'fetch', delegate => zoneify(delegate)); + } + // This is not part of public API, but it is useful for tests, so we expose it. + Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors; + return ZoneAwarePromise; +}); + +// override Function.prototype.toString to make zone.js patched function +// look like native function +Zone.__load_patch('toString', global => { + // patch Func.prototype.toString to let them look like native + const originalFunctionToString = Function.prototype.toString; + const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate'); + const PROMISE_SYMBOL = zoneSymbol('Promise'); + const ERROR_SYMBOL = zoneSymbol('Error'); + const newFunctionToString = function toString() { + if (typeof this === 'function') { + const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL]; + if (originalDelegate) { + if (typeof originalDelegate === 'function') { + return originalFunctionToString.call(originalDelegate); + } else { + return Object.prototype.toString.call(originalDelegate); + } + } + if (this === Promise) { + const nativePromise = global[PROMISE_SYMBOL]; + if (nativePromise) { + return originalFunctionToString.call(nativePromise); + } + } + if (this === Error) { + const nativeError = global[ERROR_SYMBOL]; + if (nativeError) { + return originalFunctionToString.call(nativeError); + } + } + } + return originalFunctionToString.call(this); + }; + newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString; + Function.prototype.toString = newFunctionToString; + // patch Object.prototype.toString to let them look like native + const originalObjectToString = Object.prototype.toString; + const PROMISE_OBJECT_TO_STRING = '[object Promise]'; + Object.prototype.toString = function () { + if (typeof Promise === 'function' && this instanceof Promise) { + return PROMISE_OBJECT_TO_STRING; + } + return originalObjectToString.call(this); + }; +}); + +/** + * @fileoverview + * @suppress {missingRequire} + */ +let passiveSupported = false; +if (typeof window !== 'undefined') { + try { + const options = Object.defineProperty({}, 'passive', { + get: function () { + passiveSupported = true; + } + }); + // Note: We pass the `options` object as the event handler too. This is not compatible with the + // signature of `addEventListener` or `removeEventListener` but enables us to remove the handler + // without an actual handler. + window.addEventListener('test', options, options); + window.removeEventListener('test', options, options); + } catch (err) { + passiveSupported = false; + } +} +// an identifier to tell ZoneTask do not create a new invoke closure +const OPTIMIZED_ZONE_EVENT_TASK_DATA = { + useG: true +}; +const zoneSymbolEventNames = {}; +const globalSources = {}; +const EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\w+)(true|false)$'); +const IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped'); +function prepareEventNames(eventName, eventNameToString) { + const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR; + const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR; + const symbol = ZONE_SYMBOL_PREFIX + falseEventName; + const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName; + zoneSymbolEventNames[eventName] = {}; + zoneSymbolEventNames[eventName][FALSE_STR] = symbol; + zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture; +} +function patchEventTarget(_global, api, apis, patchOptions) { + const ADD_EVENT_LISTENER = patchOptions && patchOptions.add || ADD_EVENT_LISTENER_STR; + const REMOVE_EVENT_LISTENER = patchOptions && patchOptions.rm || REMOVE_EVENT_LISTENER_STR; + const LISTENERS_EVENT_LISTENER = patchOptions && patchOptions.listeners || 'eventListeners'; + const REMOVE_ALL_LISTENERS_EVENT_LISTENER = patchOptions && patchOptions.rmAll || 'removeAllListeners'; + const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER); + const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':'; + const PREPEND_EVENT_LISTENER = 'prependListener'; + const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':'; + const invokeTask = function (task, target, event) { + // for better performance, check isRemoved which is set + // by removeEventListener + if (task.isRemoved) { + return; + } + const delegate = task.callback; + if (typeof delegate === 'object' && delegate.handleEvent) { + // create the bind version of handleEvent when invoke + task.callback = event => delegate.handleEvent(event); + task.originalDelegate = delegate; + } + // invoke static task.invoke + // need to try/catch error here, otherwise, the error in one event listener + // will break the executions of the other event listeners. Also error will + // not remove the event listener when `once` options is true. + let error; + try { + task.invoke(task, target, [event]); + } catch (err) { + error = err; + } + const options = task.options; + if (options && typeof options === 'object' && options.once) { + // if options.once is true, after invoke once remove listener here + // only browser need to do this, nodejs eventEmitter will cal removeListener + // inside EventEmitter.once + const delegate = task.originalDelegate ? task.originalDelegate : task.callback; + target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options); + } + return error; + }; + function globalCallback(context, event, isCapture) { + // https://github.com/angular/zone.js/issues/911, in IE, sometimes + // event will be undefined, so we need to use window.event + event = event || _global.event; + if (!event) { + return; + } + // event.target is needed for Samsung TV and SourceBuffer + // || global is needed https://github.com/angular/zone.js/issues/190 + const target = context || event.target || _global; + const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]]; + if (tasks) { + const errors = []; + // invoke all tasks which attached to current target with given event.type and capture = false + // for performance concern, if task.length === 1, just invoke + if (tasks.length === 1) { + const err = invokeTask(tasks[0], target, event); + err && errors.push(err); + } else { + // https://github.com/angular/zone.js/issues/836 + // copy the tasks array before invoke, to avoid + // the callback will remove itself or other listener + const copyTasks = tasks.slice(); + for (let i = 0; i < copyTasks.length; i++) { + if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) { + break; + } + const err = invokeTask(copyTasks[i], target, event); + err && errors.push(err); + } + } + // Since there is only one error, we don't need to schedule microTask + // to throw the error. + if (errors.length === 1) { + throw errors[0]; + } else { + for (let i = 0; i < errors.length; i++) { + const err = errors[i]; + api.nativeScheduleMicroTask(() => { + throw err; + }); + } + } + } + } + // global shared zoneAwareCallback to handle all event callback with capture = false + const globalZoneAwareCallback = function (event) { + return globalCallback(this, event, false); + }; + // global shared zoneAwareCallback to handle all event callback with capture = true + const globalZoneAwareCaptureCallback = function (event) { + return globalCallback(this, event, true); + }; + function patchEventTargetMethods(obj, patchOptions) { + if (!obj) { + return false; + } + let useGlobalCallback = true; + if (patchOptions && patchOptions.useG !== undefined) { + useGlobalCallback = patchOptions.useG; + } + const validateHandler = patchOptions && patchOptions.vh; + let checkDuplicate = true; + if (patchOptions && patchOptions.chkDup !== undefined) { + checkDuplicate = patchOptions.chkDup; + } + let returnTarget = false; + if (patchOptions && patchOptions.rt !== undefined) { + returnTarget = patchOptions.rt; + } + let proto = obj; + while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) { + proto = ObjectGetPrototypeOf(proto); + } + if (!proto && obj[ADD_EVENT_LISTENER]) { + // somehow we did not find it, but we can see it. This happens on IE for Window properties. + proto = obj; + } + if (!proto) { + return false; + } + if (proto[zoneSymbolAddEventListener]) { + return false; + } + const eventNameToString = patchOptions && patchOptions.eventNameToString; + // a shared global taskData to pass data for scheduleEventTask + // so we do not need to create a new object just for pass some data + const taskData = {}; + const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER]; + const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] = proto[REMOVE_EVENT_LISTENER]; + const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] = proto[LISTENERS_EVENT_LISTENER]; + const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] = proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER]; + let nativePrependEventListener; + if (patchOptions && patchOptions.prepend) { + nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] = proto[patchOptions.prepend]; + } + /** + * This util function will build an option object with passive option + * to handle all possible input from the user. + */ + function buildEventListenerOptions(options, passive) { + if (!passiveSupported && typeof options === 'object' && options) { + // doesn't support passive but user want to pass an object as options. + // this will not work on some old browser, so we just pass a boolean + // as useCapture parameter + return !!options.capture; + } + if (!passiveSupported || !passive) { + return options; + } + if (typeof options === 'boolean') { + return { + capture: options, + passive: true + }; + } + if (!options) { + return { + passive: true + }; + } + if (typeof options === 'object' && options.passive !== false) { + return { + ...options, + passive: true + }; + } + return options; + } + const customScheduleGlobal = function (task) { + // if there is already a task for the eventName + capture, + // just return, because we use the shared globalZoneAwareCallback here. + if (taskData.isExisting) { + return; + } + return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options); + }; + const customCancelGlobal = function (task) { + // if task is not marked as isRemoved, this call is directly + // from Zone.prototype.cancelTask, we should remove the task + // from tasksList of target first + if (!task.isRemoved) { + const symbolEventNames = zoneSymbolEventNames[task.eventName]; + let symbolEventName; + if (symbolEventNames) { + symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR]; + } + const existingTasks = symbolEventName && task.target[symbolEventName]; + if (existingTasks) { + for (let i = 0; i < existingTasks.length; i++) { + const existingTask = existingTasks[i]; + if (existingTask === task) { + existingTasks.splice(i, 1); + // set isRemoved to data for faster invokeTask check + task.isRemoved = true; + if (existingTasks.length === 0) { + // all tasks for the eventName + capture have gone, + // remove globalZoneAwareCallback and remove the task cache from target + task.allRemoved = true; + task.target[symbolEventName] = null; + } + break; + } + } + } + } + // if all tasks for the eventName + capture have gone, + // we will really remove the global event callback, + // if not, return + if (!task.allRemoved) { + return; + } + return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options); + }; + const customScheduleNonGlobal = function (task) { + return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options); + }; + const customSchedulePrepend = function (task) { + return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options); + }; + const customCancelNonGlobal = function (task) { + return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options); + }; + const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal; + const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal; + const compareTaskCallbackVsDelegate = function (task, delegate) { + const typeOfDelegate = typeof delegate; + return typeOfDelegate === 'function' && task.callback === delegate || typeOfDelegate === 'object' && task.originalDelegate === delegate; + }; + const compare = patchOptions && patchOptions.diff ? patchOptions.diff : compareTaskCallbackVsDelegate; + const unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')]; + const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')]; + const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) { + return function () { + const target = this || _global; + let eventName = arguments[0]; + if (patchOptions && patchOptions.transferEventName) { + eventName = patchOptions.transferEventName(eventName); + } + let delegate = arguments[1]; + if (!delegate) { + return nativeListener.apply(this, arguments); + } + if (isNode && eventName === 'uncaughtException') { + // don't patch uncaughtException of nodejs to prevent endless loop + return nativeListener.apply(this, arguments); + } + // don't create the bind delegate function for handleEvent + // case here to improve addEventListener performance + // we will create the bind delegate when invoke + let isHandleEvent = false; + if (typeof delegate !== 'function') { + if (!delegate.handleEvent) { + return nativeListener.apply(this, arguments); + } + isHandleEvent = true; + } + if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) { + return; + } + const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1; + const options = buildEventListenerOptions(arguments[2], passive); + const signal = options && typeof options === 'object' && options.signal && typeof options.signal === 'object' ? options.signal : undefined; + if (signal?.aborted) { + // the signal is an aborted one, just return without attaching the event listener. + return; + } + if (unpatchedEvents) { + // check unpatched list + for (let i = 0; i < unpatchedEvents.length; i++) { + if (eventName === unpatchedEvents[i]) { + if (passive) { + return nativeListener.call(target, eventName, delegate, options); + } else { + return nativeListener.apply(this, arguments); + } + } + } + } + const capture = !options ? false : typeof options === 'boolean' ? true : options.capture; + const once = options && typeof options === 'object' ? options.once : false; + const zone = Zone.current; + let symbolEventNames = zoneSymbolEventNames[eventName]; + if (!symbolEventNames) { + prepareEventNames(eventName, eventNameToString); + symbolEventNames = zoneSymbolEventNames[eventName]; + } + const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR]; + let existingTasks = target[symbolEventName]; + let isExisting = false; + if (existingTasks) { + // already have task registered + isExisting = true; + if (checkDuplicate) { + for (let i = 0; i < existingTasks.length; i++) { + if (compare(existingTasks[i], delegate)) { + // same callback, same capture, same event name, just return + return; + } + } + } + } else { + existingTasks = target[symbolEventName] = []; + } + let source; + const constructorName = target.constructor['name']; + const targetSource = globalSources[constructorName]; + if (targetSource) { + source = targetSource[eventName]; + } + if (!source) { + source = constructorName + addSource + (eventNameToString ? eventNameToString(eventName) : eventName); + } + // do not create a new object as task.data to pass those things + // just use the global shared one + taskData.options = options; + if (once) { + // if addEventListener with once options, we don't pass it to + // native addEventListener, instead we keep the once setting + // and handle ourselves. + taskData.options.once = false; + } + taskData.target = target; + taskData.capture = capture; + taskData.eventName = eventName; + taskData.isExisting = isExisting; + const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined; + // keep taskData into data to allow onScheduleEventTask to access the task information + if (data) { + data.taskData = taskData; + } + if (signal) { + // if addEventListener with signal options, we don't pass it to + // native addEventListener, instead we keep the signal setting + // and handle ourselves. + taskData.options.signal = undefined; + } + const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn); + if (signal) { + // after task is scheduled, we need to store the signal back to task.options + taskData.options.signal = signal; + nativeListener.call(signal, 'abort', () => { + task.zone.cancelTask(task); + }, { + once: true + }); + } + // should clear taskData.target to avoid memory leak + // issue, https://github.com/angular/angular/issues/20442 + taskData.target = null; + // need to clear up taskData because it is a global object + if (data) { + data.taskData = null; + } + // have to save those information to task in case + // application may call task.zone.cancelTask() directly + if (once) { + options.once = true; + } + if (!(!passiveSupported && typeof task.options === 'boolean')) { + // if not support passive, and we pass an option object + // to addEventListener, we should save the options to task + task.options = options; + } + task.target = target; + task.capture = capture; + task.eventName = eventName; + if (isHandleEvent) { + // save original delegate for compare to check duplicate + task.originalDelegate = delegate; + } + if (!prepend) { + existingTasks.push(task); + } else { + existingTasks.unshift(task); + } + if (returnTarget) { + return target; + } + }; + }; + proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget); + if (nativePrependEventListener) { + proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true); + } + proto[REMOVE_EVENT_LISTENER] = function () { + const target = this || _global; + let eventName = arguments[0]; + if (patchOptions && patchOptions.transferEventName) { + eventName = patchOptions.transferEventName(eventName); + } + const options = arguments[2]; + const capture = !options ? false : typeof options === 'boolean' ? true : options.capture; + const delegate = arguments[1]; + if (!delegate) { + return nativeRemoveEventListener.apply(this, arguments); + } + if (validateHandler && !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) { + return; + } + const symbolEventNames = zoneSymbolEventNames[eventName]; + let symbolEventName; + if (symbolEventNames) { + symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR]; + } + const existingTasks = symbolEventName && target[symbolEventName]; + if (existingTasks) { + for (let i = 0; i < existingTasks.length; i++) { + const existingTask = existingTasks[i]; + if (compare(existingTask, delegate)) { + existingTasks.splice(i, 1); + // set isRemoved to data for faster invokeTask check + existingTask.isRemoved = true; + if (existingTasks.length === 0) { + // all tasks for the eventName + capture have gone, + // remove globalZoneAwareCallback and remove the task cache from target + existingTask.allRemoved = true; + target[symbolEventName] = null; + // in the target, we have an event listener which is added by on_property + // such as target.onclick = function() {}, so we need to clear this internal + // property too if all delegates all removed + if (typeof eventName === 'string') { + const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName; + target[onPropertySymbol] = null; + } + } + existingTask.zone.cancelTask(existingTask); + if (returnTarget) { + return target; + } + return; + } + } + } + // issue 930, didn't find the event name or callback + // from zone kept existingTasks, the callback maybe + // added outside of zone, we need to call native removeEventListener + // to try to remove it. + return nativeRemoveEventListener.apply(this, arguments); + }; + proto[LISTENERS_EVENT_LISTENER] = function () { + const target = this || _global; + let eventName = arguments[0]; + if (patchOptions && patchOptions.transferEventName) { + eventName = patchOptions.transferEventName(eventName); + } + const listeners = []; + const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName); + for (let i = 0; i < tasks.length; i++) { + const task = tasks[i]; + let delegate = task.originalDelegate ? task.originalDelegate : task.callback; + listeners.push(delegate); + } + return listeners; + }; + proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () { + const target = this || _global; + let eventName = arguments[0]; + if (!eventName) { + const keys = Object.keys(target); + for (let i = 0; i < keys.length; i++) { + const prop = keys[i]; + const match = EVENT_NAME_SYMBOL_REGX.exec(prop); + let evtName = match && match[1]; + // in nodejs EventEmitter, removeListener event is + // used for monitoring the removeListener call, + // so just keep removeListener eventListener until + // all other eventListeners are removed + if (evtName && evtName !== 'removeListener') { + this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName); + } + } + // remove removeListener listener finally + this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener'); + } else { + if (patchOptions && patchOptions.transferEventName) { + eventName = patchOptions.transferEventName(eventName); + } + const symbolEventNames = zoneSymbolEventNames[eventName]; + if (symbolEventNames) { + const symbolEventName = symbolEventNames[FALSE_STR]; + const symbolCaptureEventName = symbolEventNames[TRUE_STR]; + const tasks = target[symbolEventName]; + const captureTasks = target[symbolCaptureEventName]; + if (tasks) { + const removeTasks = tasks.slice(); + for (let i = 0; i < removeTasks.length; i++) { + const task = removeTasks[i]; + let delegate = task.originalDelegate ? task.originalDelegate : task.callback; + this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options); + } + } + if (captureTasks) { + const removeTasks = captureTasks.slice(); + for (let i = 0; i < removeTasks.length; i++) { + const task = removeTasks[i]; + let delegate = task.originalDelegate ? task.originalDelegate : task.callback; + this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options); + } + } + } + } + if (returnTarget) { + return this; + } + }; + // for native toString patch + attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener); + attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener); + if (nativeRemoveAllListeners) { + attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners); + } + if (nativeListeners) { + attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners); + } + return true; + } + let results = []; + for (let i = 0; i < apis.length; i++) { + results[i] = patchEventTargetMethods(apis[i], patchOptions); + } + return results; +} +function findEventTasks(target, eventName) { + if (!eventName) { + const foundTasks = []; + for (let prop in target) { + const match = EVENT_NAME_SYMBOL_REGX.exec(prop); + let evtName = match && match[1]; + if (evtName && (!eventName || evtName === eventName)) { + const tasks = target[prop]; + if (tasks) { + for (let i = 0; i < tasks.length; i++) { + foundTasks.push(tasks[i]); + } + } + } + } + return foundTasks; + } + let symbolEventName = zoneSymbolEventNames[eventName]; + if (!symbolEventName) { + prepareEventNames(eventName); + symbolEventName = zoneSymbolEventNames[eventName]; + } + const captureFalseTasks = target[symbolEventName[FALSE_STR]]; + const captureTrueTasks = target[symbolEventName[TRUE_STR]]; + if (!captureFalseTasks) { + return captureTrueTasks ? captureTrueTasks.slice() : []; + } else { + return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) : captureFalseTasks.slice(); + } +} +function patchEventPrototype(global, api) { + const Event = global['Event']; + if (Event && Event.prototype) { + api.patchMethod(Event.prototype, 'stopImmediatePropagation', delegate => function (self, args) { + self[IMMEDIATE_PROPAGATION_SYMBOL] = true; + // we need to call the native stopImmediatePropagation + // in case in some hybrid application, some part of + // application will be controlled by zone, some are not + delegate && delegate.apply(self, args); + }); + } +} +function patchCallbacks(api, target, targetName, method, callbacks) { + const symbol = Zone.__symbol__(method); + if (target[symbol]) { + return; + } + const nativeDelegate = target[symbol] = target[method]; + target[method] = function (name, opts, options) { + if (opts && opts.prototype) { + callbacks.forEach(function (callback) { + const source = `${targetName}.${method}::` + callback; + const prototype = opts.prototype; + // Note: the `patchCallbacks` is used for patching the `document.registerElement` and + // `customElements.define`. We explicitly wrap the patching code into try-catch since + // callbacks may be already patched by other web components frameworks (e.g. LWC), and they + // make those properties non-writable. This means that patching callback will throw an error + // `cannot assign to read-only property`. See this code as an example: + // https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186 + // We don't want to stop the application rendering if we couldn't patch some + // callback, e.g. `attributeChangedCallback`. + try { + if (prototype.hasOwnProperty(callback)) { + const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback); + if (descriptor && descriptor.value) { + descriptor.value = api.wrapWithCurrentZone(descriptor.value, source); + api._redefineProperty(opts.prototype, callback, descriptor); + } else if (prototype[callback]) { + prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source); + } + } else if (prototype[callback]) { + prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source); + } + } catch { + // Note: we leave the catch block empty since there's no way to handle the error related + // to non-writable property. + } + }); + } + return nativeDelegate.call(target, name, opts, options); + }; + api.attachOriginToPatched(target[method], nativeDelegate); +} + +/** + * @fileoverview + * @suppress {globalThis} + */ +function filterProperties(target, onProperties, ignoreProperties) { + if (!ignoreProperties || ignoreProperties.length === 0) { + return onProperties; + } + const tip = ignoreProperties.filter(ip => ip.target === target); + if (!tip || tip.length === 0) { + return onProperties; + } + const targetIgnoreProperties = tip[0].ignoreProperties; + return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1); +} +function patchFilteredProperties(target, onProperties, ignoreProperties, prototype) { + // check whether target is available, sometimes target will be undefined + // because different browser or some 3rd party plugin. + if (!target) { + return; + } + const filteredProperties = filterProperties(target, onProperties, ignoreProperties); + patchOnProperties(target, filteredProperties, prototype); +} +/** + * Get all event name properties which the event name startsWith `on` + * from the target object itself, inherited properties are not considered. + */ +function getOnEventNames(target) { + return Object.getOwnPropertyNames(target).filter(name => name.startsWith('on') && name.length > 2).map(name => name.substring(2)); +} +function propertyDescriptorPatch(api, _global) { + if (isNode && !isMix) { + return; + } + if (Zone[api.symbol('patchEvents')]) { + // events are already been patched by legacy patch. + return; + } + const ignoreProperties = _global['__Zone_ignore_on_properties']; + // for browsers that we can patch the descriptor: Chrome & Firefox + let patchTargets = []; + if (isBrowser) { + const internalWindow = window; + patchTargets = patchTargets.concat(['Document', 'SVGElement', 'Element', 'HTMLElement', 'HTMLBodyElement', 'HTMLMediaElement', 'HTMLFrameSetElement', 'HTMLFrameElement', 'HTMLIFrameElement', 'HTMLMarqueeElement', 'Worker']); + const ignoreErrorProperties = isIE() ? [{ + target: internalWindow, + ignoreProperties: ['error'] + }] : []; + // in IE/Edge, onProp not exist in window object, but in WindowPrototype + // so we need to pass WindowPrototype to check onProp exist or not + patchFilteredProperties(internalWindow, getOnEventNames(internalWindow), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow)); + } + patchTargets = patchTargets.concat(['XMLHttpRequest', 'XMLHttpRequestEventTarget', 'IDBIndex', 'IDBRequest', 'IDBOpenDBRequest', 'IDBDatabase', 'IDBTransaction', 'IDBCursor', 'WebSocket']); + for (let i = 0; i < patchTargets.length; i++) { + const target = _global[patchTargets[i]]; + target && target.prototype && patchFilteredProperties(target.prototype, getOnEventNames(target.prototype), ignoreProperties); + } +} +Zone.__load_patch('util', (global, Zone, api) => { + // Collect native event names by looking at properties + // on the global namespace, e.g. 'onclick'. + const eventNames = getOnEventNames(global); + api.patchOnProperties = patchOnProperties; + api.patchMethod = patchMethod; + api.bindArguments = bindArguments; + api.patchMacroTask = patchMacroTask; + // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to + // define which events will not be patched by `Zone.js`. + // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep + // the name consistent with angular repo. + // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for + // backwards compatibility. + const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS'); + const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS'); + if (global[SYMBOL_UNPATCHED_EVENTS]) { + global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS]; + } + if (global[SYMBOL_BLACK_LISTED_EVENTS]) { + Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] = global[SYMBOL_BLACK_LISTED_EVENTS]; + } + api.patchEventPrototype = patchEventPrototype; + api.patchEventTarget = patchEventTarget; + api.isIEOrEdge = isIEOrEdge; + api.ObjectDefineProperty = ObjectDefineProperty; + api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor; + api.ObjectCreate = ObjectCreate; + api.ArraySlice = ArraySlice; + api.patchClass = patchClass; + api.wrapWithCurrentZone = wrapWithCurrentZone; + api.filterProperties = filterProperties; + api.attachOriginToPatched = attachOriginToPatched; + api._redefineProperty = Object.defineProperty; + api.patchCallbacks = patchCallbacks; + api.getGlobalObjects = () => ({ + globalSources, + zoneSymbolEventNames, + eventNames, + isBrowser, + isMix, + isNode, + TRUE_STR, + FALSE_STR, + ZONE_SYMBOL_PREFIX, + ADD_EVENT_LISTENER_STR, + REMOVE_EVENT_LISTENER_STR + }); +}); + +/** + * @fileoverview + * @suppress {missingRequire} + */ +function patchQueueMicrotask(global, api) { + api.patchMethod(global, 'queueMicrotask', delegate => { + return function (self, args) { + Zone.current.scheduleMicroTask('queueMicrotask', args[0]); + }; + }); +} + +/** + * @fileoverview + * @suppress {missingRequire} + */ +const taskSymbol = zoneSymbol('zoneTask'); +function patchTimer(window, setName, cancelName, nameSuffix) { + let setNative = null; + let clearNative = null; + setName += nameSuffix; + cancelName += nameSuffix; + const tasksByHandleId = {}; + function scheduleTask(task) { + const data = task.data; + data.args[0] = function () { + return task.invoke.apply(this, arguments); + }; + data.handleId = setNative.apply(window, data.args); + return task; + } + function clearTask(task) { + return clearNative.call(window, task.data.handleId); + } + setNative = patchMethod(window, setName, delegate => function (self, args) { + if (typeof args[0] === 'function') { + const options = { + isPeriodic: nameSuffix === 'Interval', + delay: nameSuffix === 'Timeout' || nameSuffix === 'Interval' ? args[1] || 0 : undefined, + args: args + }; + const callback = args[0]; + args[0] = function timer() { + try { + return callback.apply(this, arguments); + } finally { + // issue-934, task will be cancelled + // even it is a periodic task such as + // setInterval + // https://github.com/angular/angular/issues/40387 + // Cleanup tasksByHandleId should be handled before scheduleTask + // Since some zoneSpec may intercept and doesn't trigger + // scheduleFn(scheduleTask) provided here. + if (!options.isPeriodic) { + if (typeof options.handleId === 'number') { + // in non-nodejs env, we remove timerId + // from local cache + delete tasksByHandleId[options.handleId]; + } else if (options.handleId) { + // Node returns complex objects as handleIds + // we remove task reference from timer object + options.handleId[taskSymbol] = null; + } + } + } + }; + const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask); + if (!task) { + return task; + } + // Node.js must additionally support the ref and unref functions. + const handle = task.data.handleId; + if (typeof handle === 'number') { + // for non nodejs env, we save handleId: task + // mapping in local cache for clearTimeout + tasksByHandleId[handle] = task; + } else if (handle) { + // for nodejs env, we save task + // reference in timerId Object for clearTimeout + handle[taskSymbol] = task; + } + // check whether handle is null, because some polyfill or browser + // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame + if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' && typeof handle.unref === 'function') { + task.ref = handle.ref.bind(handle); + task.unref = handle.unref.bind(handle); + } + if (typeof handle === 'number' || handle) { + return handle; + } + return task; + } else { + // cause an error by calling it directly. + return delegate.apply(window, args); + } + }); + clearNative = patchMethod(window, cancelName, delegate => function (self, args) { + const id = args[0]; + let task; + if (typeof id === 'number') { + // non nodejs env. + task = tasksByHandleId[id]; + } else { + // nodejs env. + task = id && id[taskSymbol]; + // other environments. + if (!task) { + task = id; + } + } + if (task && typeof task.type === 'string') { + if (task.state !== 'notScheduled' && (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) { + if (typeof id === 'number') { + delete tasksByHandleId[id]; + } else if (id) { + id[taskSymbol] = null; + } + // Do not cancel already canceled functions + task.zone.cancelTask(task); + } + } else { + // cause an error by calling it directly. + delegate.apply(window, args); + } + }); +} +function patchCustomElements(_global, api) { + const { + isBrowser, + isMix + } = api.getGlobalObjects(); + if (!isBrowser && !isMix || !_global['customElements'] || !('customElements' in _global)) { + return; + } + // https://html.spec.whatwg.org/multipage/custom-elements.html#concept-custom-element-definition-lifecycle-callbacks + const callbacks = ['connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback', 'formAssociatedCallback', 'formDisabledCallback', 'formResetCallback', 'formStateRestoreCallback']; + api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks); +} +function eventTargetPatch(_global, api) { + if (Zone[api.symbol('patchEventTarget')]) { + // EventTarget is already patched. + return; + } + const { + eventNames, + zoneSymbolEventNames, + TRUE_STR, + FALSE_STR, + ZONE_SYMBOL_PREFIX + } = api.getGlobalObjects(); + // predefine all __zone_symbol__ + eventName + true/false string + for (let i = 0; i < eventNames.length; i++) { + const eventName = eventNames[i]; + const falseEventName = eventName + FALSE_STR; + const trueEventName = eventName + TRUE_STR; + const symbol = ZONE_SYMBOL_PREFIX + falseEventName; + const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName; + zoneSymbolEventNames[eventName] = {}; + zoneSymbolEventNames[eventName][FALSE_STR] = symbol; + zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture; + } + const EVENT_TARGET = _global['EventTarget']; + if (!EVENT_TARGET || !EVENT_TARGET.prototype) { + return; + } + api.patchEventTarget(_global, api, [EVENT_TARGET && EVENT_TARGET.prototype]); + return true; +} +function patchEvent(global, api) { + api.patchEventPrototype(global, api); +} + +/** + * @fileoverview + * @suppress {missingRequire} + */ +Zone.__load_patch('legacy', global => { + const legacyPatch = global[Zone.__symbol__('legacyPatch')]; + if (legacyPatch) { + legacyPatch(); + } +}); +Zone.__load_patch('timers', global => { + const set = 'set'; + const clear = 'clear'; + patchTimer(global, set, clear, 'Timeout'); + patchTimer(global, set, clear, 'Interval'); + patchTimer(global, set, clear, 'Immediate'); +}); +Zone.__load_patch('requestAnimationFrame', global => { + patchTimer(global, 'request', 'cancel', 'AnimationFrame'); + patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame'); + patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame'); +}); +Zone.__load_patch('blocking', (global, Zone) => { + const blockingMethods = ['alert', 'prompt', 'confirm']; + for (let i = 0; i < blockingMethods.length; i++) { + const name = blockingMethods[i]; + patchMethod(global, name, (delegate, symbol, name) => { + return function (s, args) { + return Zone.current.run(delegate, global, args, name); + }; + }); + } +}); +Zone.__load_patch('EventTarget', (global, Zone, api) => { + patchEvent(global, api); + eventTargetPatch(global, api); + // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener + const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget']; + if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) { + api.patchEventTarget(global, api, [XMLHttpRequestEventTarget.prototype]); + } +}); +Zone.__load_patch('MutationObserver', (global, Zone, api) => { + patchClass('MutationObserver'); + patchClass('WebKitMutationObserver'); +}); +Zone.__load_patch('IntersectionObserver', (global, Zone, api) => { + patchClass('IntersectionObserver'); +}); +Zone.__load_patch('FileReader', (global, Zone, api) => { + patchClass('FileReader'); +}); +Zone.__load_patch('on_property', (global, Zone, api) => { + propertyDescriptorPatch(api, global); +}); +Zone.__load_patch('customElements', (global, Zone, api) => { + patchCustomElements(global, api); +}); +Zone.__load_patch('XHR', (global, Zone) => { + // Treat XMLHttpRequest as a macrotask. + patchXHR(global); + const XHR_TASK = zoneSymbol('xhrTask'); + const XHR_SYNC = zoneSymbol('xhrSync'); + const XHR_LISTENER = zoneSymbol('xhrListener'); + const XHR_SCHEDULED = zoneSymbol('xhrScheduled'); + const XHR_URL = zoneSymbol('xhrURL'); + const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled'); + function patchXHR(window) { + const XMLHttpRequest = window['XMLHttpRequest']; + if (!XMLHttpRequest) { + // XMLHttpRequest is not available in service worker + return; + } + const XMLHttpRequestPrototype = XMLHttpRequest.prototype; + function findPendingTask(target) { + return target[XHR_TASK]; + } + let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER]; + let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; + if (!oriAddListener) { + const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget']; + if (XMLHttpRequestEventTarget) { + const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype; + oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER]; + oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; + } + } + const READY_STATE_CHANGE = 'readystatechange'; + const SCHEDULED = 'scheduled'; + function scheduleTask(task) { + const data = task.data; + const target = data.target; + target[XHR_SCHEDULED] = false; + target[XHR_ERROR_BEFORE_SCHEDULED] = false; + // remove existing event listener + const listener = target[XHR_LISTENER]; + if (!oriAddListener) { + oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER]; + oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER]; + } + if (listener) { + oriRemoveListener.call(target, READY_STATE_CHANGE, listener); + } + const newListener = target[XHR_LISTENER] = () => { + if (target.readyState === target.DONE) { + // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with + // readyState=4 multiple times, so we need to check task state here + if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) { + // check whether the xhr has registered onload listener + // if that is the case, the task should invoke after all + // onload listeners finish. + // Also if the request failed without response (status = 0), the load event handler + // will not be triggered, in that case, we should also invoke the placeholder callback + // to close the XMLHttpRequest::send macroTask. + // https://github.com/angular/angular/issues/38795 + const loadTasks = target[Zone.__symbol__('loadfalse')]; + if (target.status !== 0 && loadTasks && loadTasks.length > 0) { + const oriInvoke = task.invoke; + task.invoke = function () { + // need to load the tasks again, because in other + // load listener, they may remove themselves + const loadTasks = target[Zone.__symbol__('loadfalse')]; + for (let i = 0; i < loadTasks.length; i++) { + if (loadTasks[i] === task) { + loadTasks.splice(i, 1); + } + } + if (!data.aborted && task.state === SCHEDULED) { + oriInvoke.call(task); + } + }; + loadTasks.push(task); + } else { + task.invoke(); + } + } else if (!data.aborted && target[XHR_SCHEDULED] === false) { + // error occurs when xhr.send() + target[XHR_ERROR_BEFORE_SCHEDULED] = true; + } + } + }; + oriAddListener.call(target, READY_STATE_CHANGE, newListener); + const storedTask = target[XHR_TASK]; + if (!storedTask) { + target[XHR_TASK] = task; + } + sendNative.apply(target, data.args); + target[XHR_SCHEDULED] = true; + return task; + } + function placeholderCallback() {} + function clearTask(task) { + const data = task.data; + // Note - ideally, we would call data.target.removeEventListener here, but it's too late + // to prevent it from firing. So instead, we store info for the event listener. + data.aborted = true; + return abortNative.apply(data.target, data.args); + } + const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) { + self[XHR_SYNC] = args[2] == false; + self[XHR_URL] = args[1]; + return openNative.apply(self, args); + }); + const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send'; + const fetchTaskAborting = zoneSymbol('fetchTaskAborting'); + const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling'); + const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) { + if (Zone.current[fetchTaskScheduling] === true) { + // a fetch is scheduling, so we are using xhr to polyfill fetch + // and because we already schedule macroTask for fetch, we should + // not schedule a macroTask for xhr again + return sendNative.apply(self, args); + } + if (self[XHR_SYNC]) { + // if the XHR is sync there is no task to schedule, just execute the code. + return sendNative.apply(self, args); + } else { + const options = { + target: self, + url: self[XHR_URL], + isPeriodic: false, + args: args, + aborted: false + }; + const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask); + if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted && task.state === SCHEDULED) { + // xhr request throw error when send + // we should invoke task instead of leaving a scheduled + // pending macroTask + task.invoke(); + } + } + }); + const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) { + const task = findPendingTask(self); + if (task && typeof task.type == 'string') { + // If the XHR has already completed, do nothing. + // If the XHR has already been aborted, do nothing. + // Fix #569, call abort multiple times before done will cause + // macroTask task count be negative number + if (task.cancelFn == null || task.data && task.data.aborted) { + return; + } + task.zone.cancelTask(task); + } else if (Zone.current[fetchTaskAborting] === true) { + // the abort is called from fetch polyfill, we need to call native abort of XHR. + return abortNative.apply(self, args); + } + // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no + // task + // to cancel. Do nothing. + }); + } +}); + +Zone.__load_patch('geolocation', global => { + /// GEO_LOCATION + if (global['navigator'] && global['navigator'].geolocation) { + patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']); + } +}); +Zone.__load_patch('PromiseRejectionEvent', (global, Zone) => { + // handle unhandled promise rejection + function findPromiseRejectionHandler(evtName) { + return function (e) { + const eventTasks = findEventTasks(global, evtName); + eventTasks.forEach(eventTask => { + // windows has added unhandledrejection event listener + // trigger the event listener + const PromiseRejectionEvent = global['PromiseRejectionEvent']; + if (PromiseRejectionEvent) { + const evt = new PromiseRejectionEvent(evtName, { + promise: e.promise, + reason: e.rejection + }); + eventTask.invoke(evt); + } + }); + }; + } + if (global['PromiseRejectionEvent']) { + Zone[zoneSymbol('unhandledPromiseRejectionHandler')] = findPromiseRejectionHandler('unhandledrejection'); + Zone[zoneSymbol('rejectionHandledHandler')] = findPromiseRejectionHandler('rejectionhandled'); + } +}); +Zone.__load_patch('queueMicrotask', (global, Zone, api) => { + patchQueueMicrotask(global, api); +}); + +/***/ }), + +/***/ 24050: +/*!**************************!*\ + !*** ./src/polyfills.ts ***! + \**************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var zone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zone.js */ 27203); +/* harmony import */ var zone_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(zone_js__WEBPACK_IMPORTED_MODULE_0__); +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/guide/browser-support + */ +/*************************************************************************************************** + * BROWSER POLYFILLS + */ +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + * because those flags need to be set before `zone.js` being loaded, and webpack + * will put import in the top of bundle, so user need to create a separate file + * in this directory (for example: zone-flags.ts), and put the following flags + * into that file, and then add the following code before importing zone.js. + * import './zone-flags'; + * + * The flags allowed in zone-flags.ts are listed here. + * + * The following flags will work for all browsers. + * + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + * + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + * + * (window as any).__Zone_enable_cross_context_check = true; + * + */ +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ + // Included with Angular CLI. +/*************************************************************************************************** + * APPLICATION IMPORTS + */ + +/***/ }) + +}, +/******/ __webpack_require__ => { // webpackRuntimeModules +/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) +/******/ var __webpack_exports__ = (__webpack_exec__(24050)); +/******/ } +]); +//# sourceMappingURL=polyfills.js.map \ No newline at end of file diff --git a/app-v2/polyfills.js.map b/app-v2/polyfills.js.map new file mode 100644 index 0000000..a19de34 --- /dev/null +++ b/app-v2/polyfills.js.map @@ -0,0 +1 @@ +{"version":3,"file":"polyfills.js","mappings":";;;;;;;;;AAAa;;AACb;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,UAAUA,MAAM,EAAE;EACf,MAAMC,WAAW,GAAGD,MAAM,CAAC,aAAa,CAAC;EACzC,SAASE,IAAIA,CAACC,IAAI,EAAE;IAChBF,WAAW,IAAIA,WAAW,CAAC,MAAM,CAAC,IAAIA,WAAW,CAAC,MAAM,CAAC,CAACE,IAAI,CAAC;EACnE;EACA,SAASC,kBAAkBA,CAACD,IAAI,EAAEE,KAAK,EAAE;IACrCJ,WAAW,IAAIA,WAAW,CAAC,SAAS,CAAC,IAAIA,WAAW,CAAC,SAAS,CAAC,CAACE,IAAI,EAAEE,KAAK,CAAC;EAChF;EACAH,IAAI,CAAC,MAAM,CAAC;EACZ;EACA;EACA;EACA,MAAMI,YAAY,GAAGN,MAAM,CAAC,sBAAsB,CAAC,IAAI,iBAAiB;EACxE,SAASO,UAAUA,CAACJ,IAAI,EAAE;IACtB,OAAOG,YAAY,GAAGH,IAAI;EAC9B;EACA,MAAMK,cAAc,GAAGR,MAAM,CAACO,UAAU,CAAC,yBAAyB,CAAC,CAAC,KAAK,IAAI;EAC7E,IAAIP,MAAM,CAAC,MAAM,CAAC,EAAE;IAChB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAIQ,cAAc,IAAI,OAAOR,MAAM,CAAC,MAAM,CAAC,CAACO,UAAU,KAAK,UAAU,EAAE;MACnE,MAAM,IAAIE,KAAK,CAAC,sBAAsB,CAAC;IAC3C,CAAC,MACI;MACD,OAAOT,MAAM,CAAC,MAAM,CAAC;IACzB;EACJ;EACA,MAAMU,IAAI,C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AAID,qBAAqB,CAAC9F,OAAO,EAAE;YAAEnK,OAAO,EAAE1B,CAAC,CAAC0B,OAAO;YAAE6C,MAAM,EAAEvE,CAAC,CAACC;UAAU,CAAC,CAAC;UAC3F5O,SAAS,CAACT,MAAM,CAACghB,GAAG,CAAC;QACzB;MACJ,CAAC,CAAC;IACN,CAAC;EACL;EACA,IAAIjkB,MAAM,CAAC,uBAAuB,CAAC,EAAE;IACjCU,IAAI,CAAC6M,UAAU,CAAC,kCAAkC,CAAC,CAAC,GAChDuW,2BAA2B,CAAC,oBAAoB,CAAC;IACrDpjB,IAAI,CAAC6M,UAAU,CAAC,yBAAyB,CAAC,CAAC,GACvCuW,2BAA2B,CAAC,kBAAkB,CAAC;EACvD;AACJ,CAAC,CAAC;AACFpjB,IAAI,CAACW,YAAY,CAAC,gBAAgB,EAAE,CAACrB,MAAM,EAAEU,IAAI,EAAEoR,GAAG,KAAK;EACvDwO,mBAAmB,CAACtgB,MAAM,EAAE8R,GAAG,CAAC;AACpC,CAAC,CAAC;;;;;;;;;;;;;AC5tFF;;;;;;;;;;;;;;;AAgBA;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;AAwBA;;;AAGiB,CAAC;AAElB","sources":["./node_modules/zone.js/fesm2015/zone.js","./src/polyfills.ts"],"sourcesContent":["'use strict';\n/**\n * @license Angular v\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n// Initialize global `Zone` constant.\n(function (global) {\n const performance = global['performance'];\n function mark(name) {\n performance && performance['mark'] && performance['mark'](name);\n }\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n mark('Zone');\n // Initialize before it's accessed below.\n // __Zone_symbol_prefix global can be used to override the default zone\n // symbol prefix with a custom one if needed.\n const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';\n function __symbol__(name) {\n return symbolPrefix + name;\n }\n const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n if (global['Zone']) {\n // if global['Zone'] already exists (maybe zone.js was already loaded or\n // some other lib also registered a global object named Zone), we may need\n // to throw an error, but sometimes user may not want this error.\n // For example,\n // we have two web pages, page1 includes zone.js, page2 doesn't.\n // and the 1st time user load page1 and page2, everything work fine,\n // but when user load page2 again, error occurs because global['Zone'] already exists.\n // so we add a flag to let user choose whether to throw this error or not.\n // By default, if existing Zone is from zone.js, we will not throw the error.\n if (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function') {\n throw new Error('Zone already loaded.');\n }\n else {\n return global['Zone'];\n }\n }\n class Zone {\n // tslint:disable-next-line:require-internal-with-underscore\n static { this.__symbol__ = __symbol__; }\n static assertZonePatched() {\n if (global['Promise'] !== patches['ZoneAwarePromise']) {\n throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +\n 'has been overwritten.\\n' +\n 'Most likely cause is that a Promise polyfill has been loaded ' +\n 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +\n 'If you must load one, do so before loading zone.js.)');\n }\n }\n static get root() {\n let zone = Zone.current;\n while (zone.parent) {\n zone = zone.parent;\n }\n return zone;\n }\n static get current() {\n return _currentZoneFrame.zone;\n }\n static get currentTask() {\n return _currentTask;\n }\n // tslint:disable-next-line:require-internal-with-underscore\n static __load_patch(name, fn, ignoreDuplicate = false) {\n if (patches.hasOwnProperty(name)) {\n // `checkDuplicate` option is defined from global variable\n // so it works for all modules.\n // `ignoreDuplicate` can work for the specified module\n if (!ignoreDuplicate && checkDuplicate) {\n throw Error('Already loaded patch: ' + name);\n }\n }\n else if (!global['__Zone_disable_' + name]) {\n const perfName = 'Zone:' + name;\n mark(perfName);\n patches[name] = fn(global, Zone, _api);\n performanceMeasure(perfName, perfName);\n }\n }\n get parent() {\n return this._parent;\n }\n get name() {\n return this._name;\n }\n constructor(parent, zoneSpec) {\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '';\n this._properties = zoneSpec && zoneSpec.properties || {};\n this._zoneDelegate =\n new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\n get(key) {\n const zone = this.getZoneWith(key);\n if (zone)\n return zone._properties[key];\n }\n getZoneWith(key) {\n let current = this;\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n current = current._parent;\n }\n return null;\n }\n fork(zoneSpec) {\n if (!zoneSpec)\n throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n }\n wrap(callback, source) {\n if (typeof callback !== 'function') {\n throw new Error('Expecting function got: ' + callback);\n }\n const _callback = this._zoneDelegate.intercept(this, callback, source);\n const zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n }\n run(callback, applyThis, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runGuarded(callback, applyThis = null, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runTask(task, applyThis, applyArgs) {\n if (task.zone != this) {\n throw new Error('A task can only be run in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n }\n // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n // will run in notScheduled(canceled) state, we should not try to\n // run such kind of task but just return\n if (task.state === notScheduled && (task.type === eventTask || task.type === macroTask)) {\n return;\n }\n const reEntryGuard = task.state != running;\n reEntryGuard && task._transitionTo(running, scheduled);\n task.runCount++;\n const previousTask = _currentTask;\n _currentTask = task;\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n if (task.type == macroTask && task.data && !task.data.isPeriodic) {\n task.cancelFn = undefined;\n }\n try {\n return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n // if the task's state is notScheduled or unknown, then it has already been cancelled\n // we should not reset the state to scheduled\n if (task.state !== notScheduled && task.state !== unknown) {\n if (task.type == eventTask || (task.data && task.data.isPeriodic)) {\n reEntryGuard && task._transitionTo(scheduled, running);\n }\n else {\n task.runCount = 0;\n this._updateTaskCount(task, -1);\n reEntryGuard &&\n task._transitionTo(notScheduled, running, notScheduled);\n }\n }\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\n }\n scheduleTask(task) {\n if (task.zone && task.zone !== this) {\n // check if the task was rescheduled, the newZone\n // should not be the children of the original zone\n let newZone = this;\n while (newZone) {\n if (newZone === task.zone) {\n throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`);\n }\n newZone = newZone.parent;\n }\n }\n task._transitionTo(scheduling, notScheduled);\n const zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n try {\n task = this._zoneDelegate.scheduleTask(this, task);\n }\n catch (err) {\n // should set task's state to unknown when scheduleTask throw error\n // because the err may from reschedule, so the fromState maybe notScheduled\n task._transitionTo(unknown, scheduling, notScheduled);\n // TODO: @JiaLiPassion, should we check the result from handleError?\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n if (task._zoneDelegates === zoneDelegates) {\n // we have to check because internally the delegate can reschedule the task.\n this._updateTaskCount(task, 1);\n }\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n return task;\n }\n scheduleMicroTask(source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n }\n scheduleMacroTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n }\n scheduleEventTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n }\n cancelTask(task) {\n if (task.zone != this)\n throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name + '; Execution: ' + this.name + ')');\n if (task.state !== scheduled && task.state !== running) {\n return;\n }\n task._transitionTo(canceling, scheduled, running);\n try {\n this._zoneDelegate.cancelTask(this, task);\n }\n catch (err) {\n // if error occurs when cancelTask, transit the state to unknown\n task._transitionTo(unknown, canceling);\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n this._updateTaskCount(task, -1);\n task._transitionTo(notScheduled, canceling);\n task.runCount = 0;\n return task;\n }\n _updateTaskCount(task, count) {\n const zoneDelegates = task._zoneDelegates;\n if (count == -1) {\n task._zoneDelegates = null;\n }\n for (let i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n }\n }\n const DELEGATE_ZS = {\n name: '',\n onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState),\n onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task),\n onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs),\n onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task)\n };\n class _ZoneDelegate {\n constructor(zone, parentDelegate, zoneSpec) {\n this._taskCounts = { 'microTask': 0, 'macroTask': 0, 'eventTask': 0 };\n this.zone = zone;\n this._parentDelegate = parentDelegate;\n this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n this._forkCurrZone = zoneSpec && (zoneSpec.onFork ? this.zone : parentDelegate._forkCurrZone);\n this._interceptZS =\n zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n this._interceptDlgt =\n zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n this._interceptCurrZone =\n zoneSpec && (zoneSpec.onIntercept ? this.zone : parentDelegate._interceptCurrZone);\n this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n this._invokeDlgt =\n zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n this._invokeCurrZone =\n zoneSpec && (zoneSpec.onInvoke ? this.zone : parentDelegate._invokeCurrZone);\n this._handleErrorZS =\n zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n this._handleErrorDlgt =\n zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n this._handleErrorCurrZone =\n zoneSpec && (zoneSpec.onHandleError ? this.zone : parentDelegate._handleErrorCurrZone);\n this._scheduleTaskZS =\n zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n this._scheduleTaskDlgt =\n zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n this._scheduleTaskCurrZone =\n zoneSpec && (zoneSpec.onScheduleTask ? this.zone : parentDelegate._scheduleTaskCurrZone);\n this._invokeTaskZS =\n zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n this._invokeTaskDlgt =\n zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n this._invokeTaskCurrZone =\n zoneSpec && (zoneSpec.onInvokeTask ? this.zone : parentDelegate._invokeTaskCurrZone);\n this._cancelTaskZS =\n zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n this._cancelTaskDlgt =\n zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n this._cancelTaskCurrZone =\n zoneSpec && (zoneSpec.onCancelTask ? this.zone : parentDelegate._cancelTaskCurrZone);\n this._hasTaskZS = null;\n this._hasTaskDlgt = null;\n this._hasTaskDlgtOwner = null;\n this._hasTaskCurrZone = null;\n const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n if (zoneSpecHasTask || parentHasTask) {\n // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n // a case all task related interceptors must go through this ZD. We can't short circuit it.\n this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n this._hasTaskDlgt = parentDelegate;\n this._hasTaskDlgtOwner = this;\n this._hasTaskCurrZone = zone;\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this.zone;\n }\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this.zone;\n }\n }\n }\n fork(targetZone, zoneSpec) {\n return this._forkZS ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec) :\n new Zone(targetZone, zoneSpec);\n }\n intercept(targetZone, callback, source) {\n return this._interceptZS ?\n this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source) :\n callback;\n }\n invoke(targetZone, callback, applyThis, applyArgs, source) {\n return this._invokeZS ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source) :\n callback.apply(applyThis, applyArgs);\n }\n handleError(targetZone, error) {\n return this._handleErrorZS ?\n this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error) :\n true;\n }\n scheduleTask(targetZone, task) {\n let returnTask = task;\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n }\n // clang-format off\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n // clang-format on\n if (!returnTask)\n returnTask = task;\n }\n else {\n if (task.scheduleFn) {\n task.scheduleFn(task);\n }\n else if (task.type == microTask) {\n scheduleMicroTask(task);\n }\n else {\n throw new Error('Task is missing scheduleFn.');\n }\n }\n return returnTask;\n }\n invokeTask(targetZone, task, applyThis, applyArgs) {\n return this._invokeTaskZS ?\n this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :\n task.callback.apply(applyThis, applyArgs);\n }\n cancelTask(targetZone, task) {\n let value;\n if (this._cancelTaskZS) {\n value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n }\n else {\n if (!task.cancelFn) {\n throw Error('Task is not cancelable');\n }\n value = task.cancelFn(task);\n }\n return value;\n }\n hasTask(targetZone, isEmpty) {\n // hasTask should not throw error so other ZoneDelegate\n // can still trigger hasTask callback\n try {\n this._hasTaskZS &&\n this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n }\n catch (err) {\n this.handleError(targetZone, err);\n }\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _updateTaskCount(type, count) {\n const counts = this._taskCounts;\n const prev = counts[type];\n const next = counts[type] = prev + count;\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\n if (prev == 0 || next == 0) {\n const isEmpty = {\n microTask: counts['microTask'] > 0,\n macroTask: counts['macroTask'] > 0,\n eventTask: counts['eventTask'] > 0,\n change: type\n };\n this.hasTask(this.zone, isEmpty);\n }\n }\n }\n class ZoneTask {\n constructor(type, source, callback, options, scheduleFn, cancelFn) {\n // tslint:disable-next-line:require-internal-with-underscore\n this._zone = null;\n this.runCount = 0;\n // tslint:disable-next-line:require-internal-with-underscore\n this._zoneDelegates = null;\n // tslint:disable-next-line:require-internal-with-underscore\n this._state = 'notScheduled';\n this.type = type;\n this.source = source;\n this.data = options;\n this.scheduleFn = scheduleFn;\n this.cancelFn = cancelFn;\n if (!callback) {\n throw new Error('callback is not defined');\n }\n this.callback = callback;\n const self = this;\n // TODO: @JiaLiPassion options should have interface\n if (type === eventTask && options && options.useG) {\n this.invoke = ZoneTask.invokeTask;\n }\n else {\n this.invoke = function () {\n return ZoneTask.invokeTask.call(global, self, this, arguments);\n };\n }\n }\n static invokeTask(task, target, args) {\n if (!task) {\n task = this;\n }\n _numberOfNestedTaskFrames++;\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n }\n finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n _numberOfNestedTaskFrames--;\n }\n }\n get zone() {\n return this._zone;\n }\n get state() {\n return this._state;\n }\n cancelScheduleRequest() {\n this._transitionTo(notScheduled, scheduling);\n }\n // tslint:disable-next-line:require-internal-with-underscore\n _transitionTo(toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n if (toState == notScheduled) {\n this._zoneDelegates = null;\n }\n }\n else {\n throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? ' or \\'' + fromState2 + '\\'' : ''}, was '${this._state}'.`);\n }\n }\n toString() {\n if (this.data && typeof this.data.handleId !== 'undefined') {\n return this.data.handleId.toString();\n }\n else {\n return Object.prototype.toString.call(this);\n }\n }\n // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n toJSON() {\n return {\n type: this.type,\n state: this.state,\n source: this.source,\n zone: this.zone.name,\n runCount: this.runCount\n };\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// MICROTASK QUEUE\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const symbolSetTimeout = __symbol__('setTimeout');\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n let _microTaskQueue = [];\n let _isDrainingMicrotaskQueue = false;\n let nativeMicroTaskQueuePromise;\n function nativeScheduleMicroTask(func) {\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n if (nativeMicroTaskQueuePromise) {\n let nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n if (!nativeThen) {\n // native Promise is not patchable, we need to use `then` directly\n // issue 1078\n nativeThen = nativeMicroTaskQueuePromise['then'];\n }\n nativeThen.call(nativeMicroTaskQueuePromise, func);\n }\n else {\n global[symbolSetTimeout](func, 0);\n }\n }\n function scheduleMicroTask(task) {\n // if we are not running in any task, and there has not been anything scheduled\n // we must bootstrap the initial task creation by manually scheduling the drain\n if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n // We are not running in Task, so we need to kickstart the microtask queue.\n nativeScheduleMicroTask(drainMicroTaskQueue);\n }\n task && _microTaskQueue.push(task);\n }\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n while (_microTaskQueue.length) {\n const queue = _microTaskQueue;\n _microTaskQueue = [];\n for (let i = 0; i < queue.length; i++) {\n const task = queue[i];\n try {\n task.zone.runTask(task, null, null);\n }\n catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n _api.microtaskDrainDone();\n _isDrainingMicrotaskQueue = false;\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const NO_ZONE = {\n name: 'NO ZONE'\n };\n const notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';\n const microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';\n const patches = {};\n const _api = {\n symbol: __symbol__,\n currentZoneFrame: () => _currentZoneFrame,\n onUnhandledError: noop,\n microtaskDrainDone: noop,\n scheduleMicroTask: scheduleMicroTask,\n showUncaughtError: () => !Zone[__symbol__('ignoreConsoleErrorUncaughtError')],\n patchEventTarget: () => [],\n patchOnProperties: noop,\n patchMethod: () => noop,\n bindArguments: () => [],\n patchThen: () => noop,\n patchMacroTask: () => noop,\n patchEventPrototype: () => noop,\n isIEOrEdge: () => false,\n getGlobalObjects: () => undefined,\n ObjectDefineProperty: () => noop,\n ObjectGetOwnPropertyDescriptor: () => undefined,\n ObjectCreate: () => undefined,\n ArraySlice: () => [],\n patchClass: () => noop,\n wrapWithCurrentZone: () => noop,\n filterProperties: () => [],\n attachOriginToPatched: () => noop,\n _redefineProperty: () => noop,\n patchCallbacks: () => noop,\n nativeScheduleMicroTask: nativeScheduleMicroTask\n };\n let _currentZoneFrame = { parent: null, zone: new Zone(null, null) };\n let _currentTask = null;\n let _numberOfNestedTaskFrames = 0;\n function noop() { }\n performanceMeasure('Zone', 'Zone');\n return global['Zone'] = Zone;\n})(globalThis);\n\n/**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n/// \n// issue #989, to reduce bundle size, use short name\n/** Object.getOwnPropertyDescriptor */\nconst ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n/** Object.defineProperty */\nconst ObjectDefineProperty = Object.defineProperty;\n/** Object.getPrototypeOf */\nconst ObjectGetPrototypeOf = Object.getPrototypeOf;\n/** Object.create */\nconst ObjectCreate = Object.create;\n/** Array.prototype.slice */\nconst ArraySlice = Array.prototype.slice;\n/** addEventListener string const */\nconst ADD_EVENT_LISTENER_STR = 'addEventListener';\n/** removeEventListener string const */\nconst REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n/** zoneSymbol addEventListener */\nconst ZONE_SYMBOL_ADD_EVENT_LISTENER = Zone.__symbol__(ADD_EVENT_LISTENER_STR);\n/** zoneSymbol removeEventListener */\nconst ZONE_SYMBOL_REMOVE_EVENT_LISTENER = Zone.__symbol__(REMOVE_EVENT_LISTENER_STR);\n/** true string const */\nconst TRUE_STR = 'true';\n/** false string const */\nconst FALSE_STR = 'false';\n/** Zone symbol prefix string const. */\nconst ZONE_SYMBOL_PREFIX = Zone.__symbol__('');\nfunction wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n}\nfunction scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n}\nconst zoneSymbol = Zone.__symbol__;\nconst isWindowExists = typeof window !== 'undefined';\nconst internalWindow = isWindowExists ? window : undefined;\nconst _global = isWindowExists && internalWindow || globalThis;\nconst REMOVE_ATTRIBUTE = 'removeAttribute';\nfunction bindArguments(args, source) {\n for (let i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'function') {\n args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n }\n }\n return args;\n}\nfunction patchPrototype(prototype, fnNames) {\n const source = prototype.constructor['name'];\n for (let i = 0; i < fnNames.length; i++) {\n const name = fnNames[i];\n const delegate = prototype[name];\n if (delegate) {\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);\n if (!isPropertyWritable(prototypeDesc)) {\n continue;\n }\n prototype[name] = ((delegate) => {\n const patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name));\n };\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n }\n}\nfunction isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n if (propertyDesc.writable === false) {\n return false;\n }\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n}\nconst isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isNode = (!('nw' in _global) && typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]');\nconst isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n// we are in electron of nw, so we are both browser and nodejs\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isMix = typeof _global.process !== 'undefined' &&\n {}.toString.call(_global.process) === '[object process]' && !isWebWorker &&\n !!(isWindowExists && internalWindow['HTMLElement']);\nconst zoneSymbolEventNames$1 = {};\nconst wrapFn = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n let eventNameSymbol = zoneSymbolEventNames$1[event.type];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n const target = this || event.target || _global;\n const listener = target[eventNameSymbol];\n let result;\n if (isBrowser && target === internalWindow && event.type === 'error') {\n // window.onerror have different signature\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror\n // and onerror callback will prevent default when callback return true\n const errorEvent = event;\n result = listener &&\n listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);\n if (result === true) {\n event.preventDefault();\n }\n }\n else {\n result = listener && listener.apply(this, arguments);\n if (result != undefined && !result) {\n event.preventDefault();\n }\n }\n return result;\n};\nfunction patchProperty(obj, prop, prototype) {\n let desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n if (prototypeDesc) {\n desc = { enumerable: true, configurable: true };\n }\n }\n // if the descriptor not exists or is not configurable\n // just return\n if (!desc || !desc.configurable) {\n return;\n }\n const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n return;\n }\n // A property descriptor cannot have getter/setter and be writable\n // deleting the writable and value properties avoids this error:\n //\n // TypeError: property descriptors must not specify a value or be writable when a\n // getter or setter has been specified\n delete desc.writable;\n delete desc.value;\n const originalDescGet = desc.get;\n const originalDescSet = desc.set;\n // slice(2) cuz 'onclick' -> 'click', etc\n const eventName = prop.slice(2);\n let eventNameSymbol = zoneSymbolEventNames$1[eventName];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\n desc.set = function (newValue) {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return;\n }\n const previousValue = target[eventNameSymbol];\n if (typeof previousValue === 'function') {\n target.removeEventListener(eventName, wrapFn);\n }\n // issue #978, when onload handler was added before loading zone.js\n // we should remove it with originalDescSet\n originalDescSet && originalDescSet.call(target, null);\n target[eventNameSymbol] = newValue;\n if (typeof newValue === 'function') {\n target.addEventListener(eventName, wrapFn, false);\n }\n };\n // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n desc.get = function () {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return null;\n }\n const listener = target[eventNameSymbol];\n if (listener) {\n return listener;\n }\n else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as \n // because the onclick function is internal raw uncompiled handler\n // the onclick will be evaluated when first time event was triggered or\n // the property is accessed, https://github.com/angular/zone.js/issues/525\n // so we should use original native get to retrieve the handler\n let value = originalDescGet.call(this);\n if (value) {\n desc.set.call(this, value);\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n return value;\n }\n }\n return null;\n };\n ObjectDefineProperty(obj, prop, desc);\n obj[onPropPatchedSymbol] = true;\n}\nfunction patchOnProperties(obj, properties, prototype) {\n if (properties) {\n for (let i = 0; i < properties.length; i++) {\n patchProperty(obj, 'on' + properties[i], prototype);\n }\n }\n else {\n const onProperties = [];\n for (const prop in obj) {\n if (prop.slice(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n for (let j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n}\nconst originalInstanceKey = zoneSymbol('originalInstance');\n// wrap some native API on `window`\nfunction patchClass(className) {\n const OriginalClass = _global[className];\n if (!OriginalClass)\n return;\n // keep original class in global\n _global[zoneSymbol(className)] = OriginalClass;\n _global[className] = function () {\n const a = bindArguments(arguments, className);\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n default:\n throw new Error('Arg list too long.');\n }\n };\n // attach original delegate to patched function\n attachOriginToPatched(_global[className], OriginalClass);\n const instance = new OriginalClass(function () { });\n let prop;\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob')\n continue;\n (function (prop) {\n if (typeof instance[prop] === 'function') {\n _global[className].prototype[prop] = function () {\n return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n };\n }\n else {\n ObjectDefineProperty(_global[className].prototype, prop, {\n set: function (fn) {\n if (typeof fn === 'function') {\n this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n attachOriginToPatched(this[originalInstanceKey][prop], fn);\n }\n else {\n this[originalInstanceKey][prop] = fn;\n }\n },\n get: function () {\n return this[originalInstanceKey][prop];\n }\n });\n }\n }(prop));\n }\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n}\nfunction patchMethod(target, name, patchFn) {\n let proto = target;\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && target[name]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = target;\n }\n const delegateName = zoneSymbol(name);\n let delegate = null;\n if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) {\n delegate = proto[delegateName] = proto[name];\n // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n if (isPropertyWritable(desc)) {\n const patchDelegate = patchFn(delegate, delegateName, name);\n proto[name] = function () {\n return patchDelegate(this, arguments);\n };\n attachOriginToPatched(proto[name], delegate);\n }\n }\n return delegate;\n}\n// TODO: @JiaLiPassion, support cancel task later if necessary\nfunction patchMacroTask(obj, funcName, metaCreator) {\n let setNative = null;\n function scheduleTask(task) {\n const data = task.data;\n data.args[data.cbIdx] = function () {\n task.invoke.apply(this, arguments);\n };\n setNative.apply(data.target, data.args);\n return task;\n }\n setNative = patchMethod(obj, funcName, (delegate) => function (self, args) {\n const meta = metaCreator(self, args);\n if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(self, args);\n }\n });\n}\nfunction attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n}\nlet isDetectedIEOrEdge = false;\nlet ieOrEdge = false;\nfunction isIE() {\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1) {\n return true;\n }\n }\n catch (error) {\n }\n return false;\n}\nfunction isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n isDetectedIEOrEdge = true;\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n }\n catch (error) {\n }\n return ieOrEdge;\n}\n\nZone.__load_patch('ZoneAwarePromise', (global, Zone, api) => {\n const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n const ObjectDefineProperty = Object.defineProperty;\n function readableObjectToString(obj) {\n if (obj && obj.toString === Object.prototype.toString) {\n const className = obj.constructor && obj.constructor.name;\n return (className ? className : '') + ': ' + JSON.stringify(obj);\n }\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n const __symbol__ = api.symbol;\n const _uncaughtPromiseErrors = [];\n const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] !== false;\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n const creationTrace = '__creationTrace__';\n api.onUnhandledError = (e) => {\n if (api.showUncaughtError()) {\n const rejection = e && e.rejection;\n if (rejection) {\n console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n }\n else {\n console.error(e);\n }\n }\n };\n api.microtaskDrainDone = () => {\n while (_uncaughtPromiseErrors.length) {\n const uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n try {\n uncaughtPromiseError.zone.runGuarded(() => {\n if (uncaughtPromiseError.throwOriginal) {\n throw uncaughtPromiseError.rejection;\n }\n throw uncaughtPromiseError;\n });\n }\n catch (error) {\n handleUnhandledRejection(error);\n }\n }\n };\n const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n try {\n const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n if (typeof handler === 'function') {\n handler.call(this, e);\n }\n }\n catch (err) {\n }\n }\n function isThenable(value) {\n return value && value.then;\n }\n function forwardResolution(value) {\n return value;\n }\n function forwardRejection(rejection) {\n return ZoneAwarePromise.reject(rejection);\n }\n const symbolState = __symbol__('state');\n const symbolValue = __symbol__('value');\n const symbolFinally = __symbol__('finally');\n const symbolParentPromiseValue = __symbol__('parentPromiseValue');\n const symbolParentPromiseState = __symbol__('parentPromiseState');\n const source = 'Promise.then';\n const UNRESOLVED = null;\n const RESOLVED = true;\n const REJECTED = false;\n const REJECTED_NO_CATCH = 0;\n function makeResolver(promise, state) {\n return (v) => {\n try {\n resolvePromise(promise, state, v);\n }\n catch (err) {\n resolvePromise(promise, false, err);\n }\n // Do not return value or you will break the Promise spec.\n };\n }\n const once = function () {\n let wasCalled = false;\n return function wrapper(wrappedFunction) {\n return function () {\n if (wasCalled) {\n return;\n }\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n const TYPE_ERROR = 'Promise resolved with itself';\n const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n // Promise Resolution\n function resolvePromise(promise, state, value) {\n const onceWrapper = once();\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n let then = null;\n try {\n if (typeof value === 'object' || typeof value === 'function') {\n then = value && value.then;\n }\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n return promise;\n }\n // if (value instanceof ZoneAwarePromise) {\n if (state !== REJECTED && value instanceof ZoneAwarePromise &&\n value.hasOwnProperty(symbolState) && value.hasOwnProperty(symbolValue) &&\n value[symbolState] !== UNRESOLVED) {\n clearRejectedNoCatch(value);\n resolvePromise(promise, value[symbolState], value[symbolValue]);\n }\n else if (state !== REJECTED && typeof then === 'function') {\n try {\n then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n }\n }\n else {\n promise[symbolState] = state;\n const queue = promise[symbolValue];\n promise[symbolValue] = value;\n if (promise[symbolFinally] === symbolFinally) {\n // the promise is generated by Promise.prototype.finally\n if (state === RESOLVED) {\n // the state is resolved, should ignore the value\n // and use parent promise value\n promise[symbolState] = promise[symbolParentPromiseState];\n promise[symbolValue] = promise[symbolParentPromiseValue];\n }\n }\n // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n if (state === REJECTED && value instanceof Error) {\n // check if longStackTraceZone is here\n const trace = Zone.currentTask && Zone.currentTask.data &&\n Zone.currentTask.data[creationTrace];\n if (trace) {\n // only keep the long stack trace into error when in longStackTraceZone\n ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, { configurable: true, enumerable: false, writable: true, value: trace });\n }\n }\n for (let i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n let uncaughtPromiseError = value;\n try {\n // Here we throws a new Error to print more readable error log\n // and if the value is not an error, zone.js builds an `Error`\n // Object here to attach the stack information.\n throw new Error('Uncaught (in promise): ' + readableObjectToString(value) +\n (value && value.stack ? '\\n' + value.stack : ''));\n }\n catch (err) {\n uncaughtPromiseError = err;\n }\n if (isDisableWrappingUncaughtPromiseRejection) {\n // If disable wrapping uncaught promise reject\n // use the value instead of wrapping it.\n uncaughtPromiseError.throwOriginal = true;\n }\n uncaughtPromiseError.rejection = value;\n uncaughtPromiseError.promise = promise;\n uncaughtPromiseError.zone = Zone.current;\n uncaughtPromiseError.task = Zone.currentTask;\n _uncaughtPromiseErrors.push(uncaughtPromiseError);\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n }\n // Resolving an already resolved promise is a noop.\n return promise;\n }\n const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n function clearRejectedNoCatch(promise) {\n if (promise[symbolState] === REJECTED_NO_CATCH) {\n // if the promise is rejected no catch status\n // and queue.length > 0, means there is a error handler\n // here to handle the rejected promise, we should trigger\n // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n // eventHandler\n try {\n const handler = Zone[REJECTION_HANDLED_HANDLER];\n if (handler && typeof handler === 'function') {\n handler.call(this, { rejection: promise[symbolValue], promise: promise });\n }\n }\n catch (err) {\n }\n promise[symbolState] = REJECTED;\n for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {\n if (promise === _uncaughtPromiseErrors[i].promise) {\n _uncaughtPromiseErrors.splice(i, 1);\n }\n }\n }\n }\n function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n clearRejectedNoCatch(promise);\n const promiseState = promise[symbolState];\n const delegate = promiseState ?\n (typeof onFulfilled === 'function') ? onFulfilled : forwardResolution :\n (typeof onRejected === 'function') ? onRejected :\n forwardRejection;\n zone.scheduleMicroTask(source, () => {\n try {\n const parentPromiseValue = promise[symbolValue];\n const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];\n if (isFinallyPromise) {\n // if the promise is generated from finally call, keep parent promise's state and value\n chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n chainPromise[symbolParentPromiseState] = promiseState;\n }\n // should not pass value to finally callback\n const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution ?\n [] :\n [parentPromiseValue]);\n resolvePromise(chainPromise, true, value);\n }\n catch (error) {\n // if error occurs, should always return this error\n resolvePromise(chainPromise, false, error);\n }\n }, chainPromise);\n }\n const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n const noop = function () { };\n const AggregateError = global.AggregateError;\n class ZoneAwarePromise {\n static toString() {\n return ZONE_AWARE_PROMISE_TO_STRING;\n }\n static resolve(value) {\n if (value instanceof ZoneAwarePromise) {\n return value;\n }\n return resolvePromise(new this(null), RESOLVED, value);\n }\n static reject(error) {\n return resolvePromise(new this(null), REJECTED, error);\n }\n static withResolvers() {\n const result = {};\n result.promise = new ZoneAwarePromise((res, rej) => {\n result.resolve = res;\n result.reject = rej;\n });\n return result;\n }\n static any(values) {\n if (!values || typeof values[Symbol.iterator] !== 'function') {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n const promises = [];\n let count = 0;\n try {\n for (let v of values) {\n count++;\n promises.push(ZoneAwarePromise.resolve(v));\n }\n }\n catch (err) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n if (count === 0) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n let finished = false;\n const errors = [];\n return new ZoneAwarePromise((resolve, reject) => {\n for (let i = 0; i < promises.length; i++) {\n promises[i].then(v => {\n if (finished) {\n return;\n }\n finished = true;\n resolve(v);\n }, err => {\n errors.push(err);\n count--;\n if (count === 0) {\n finished = true;\n reject(new AggregateError(errors, 'All promises were rejected'));\n }\n });\n }\n });\n }\n ;\n static race(values) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n function onResolve(value) {\n resolve(value);\n }\n function onReject(error) {\n reject(error);\n }\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then(onResolve, onReject);\n }\n return promise;\n }\n static all(values) {\n return ZoneAwarePromise.allWithCallback(values);\n }\n static allSettled(values) {\n const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;\n return P.allWithCallback(values, {\n thenCallback: (value) => ({ status: 'fulfilled', value }),\n errorCallback: (err) => ({ status: 'rejected', reason: err })\n });\n }\n static allWithCallback(values, callback) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n // Start at 2 to prevent prematurely resolving if .then is called immediately.\n let unresolvedCount = 2;\n let valueIndex = 0;\n const resolvedValues = [];\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n const curValueIndex = valueIndex;\n try {\n value.then((value) => {\n resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }, (err) => {\n if (!callback) {\n reject(err);\n }\n else {\n resolvedValues[curValueIndex] = callback.errorCallback(err);\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }\n });\n }\n catch (thenErr) {\n reject(thenErr);\n }\n unresolvedCount++;\n valueIndex++;\n }\n // Make the unresolvedCount zero-based again.\n unresolvedCount -= 2;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n return promise;\n }\n constructor(executor) {\n const promise = this;\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n try {\n const onceWrapper = once();\n executor &&\n executor(onceWrapper(makeResolver(promise, RESOLVED)), onceWrapper(makeResolver(promise, REJECTED)));\n }\n catch (error) {\n resolvePromise(promise, false, error);\n }\n }\n get [Symbol.toStringTag]() {\n return 'Promise';\n }\n get [Symbol.species]() {\n return ZoneAwarePromise;\n }\n then(onFulfilled, onRejected) {\n // We must read `Symbol.species` safely because `this` may be anything. For instance, `this`\n // may be an object without a prototype (created through `Object.create(null)`); thus\n // `this.constructor` will be undefined. One of the use cases is SystemJS creating\n // prototype-less objects (modules) via `Object.create(null)`. The SystemJS creates an empty\n // object and copies promise properties into that object (within the `getOrCreateLoad`\n // function). The zone.js then checks if the resolved value has the `then` method and invokes\n // it with the `value` context. Otherwise, this will throw an error: `TypeError: Cannot read\n // properties of undefined (reading 'Symbol(Symbol.species)')`.\n let C = this.constructor?.[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = this.constructor || ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n return chainPromise;\n }\n catch(onRejected) {\n return this.then(null, onRejected);\n }\n finally(onFinally) {\n // See comment on the call to `then` about why thee `Symbol.species` is safely accessed.\n let C = this.constructor?.[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n chainPromise[symbolFinally] = symbolFinally;\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n return chainPromise;\n }\n }\n // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n const NativePromise = global[symbolPromise] = global['Promise'];\n global['Promise'] = ZoneAwarePromise;\n const symbolThenPatched = __symbol__('thenPatched');\n function patchThen(Ctor) {\n const proto = Ctor.prototype;\n const prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n if (prop && (prop.writable === false || !prop.configurable)) {\n // check Ctor.prototype.then propertyDescriptor is writable or not\n // in meteor env, writable is false, we should ignore such case\n return;\n }\n const originalThen = proto.then;\n // Keep a reference to the original method.\n proto[symbolThen] = originalThen;\n Ctor.prototype.then = function (onResolve, onReject) {\n const wrapped = new ZoneAwarePromise((resolve, reject) => {\n originalThen.call(this, resolve, reject);\n });\n return wrapped.then(onResolve, onReject);\n };\n Ctor[symbolThenPatched] = true;\n }\n api.patchThen = patchThen;\n function zoneify(fn) {\n return function (self, args) {\n let resultPromise = fn.apply(self, args);\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n let ctor = resultPromise.constructor;\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n return resultPromise;\n };\n }\n if (NativePromise) {\n patchThen(NativePromise);\n patchMethod(global, 'fetch', delegate => zoneify(delegate));\n }\n // This is not part of public API, but it is useful for tests, so we expose it.\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\n});\n\n// override Function.prototype.toString to make zone.js patched function\n// look like native function\nZone.__load_patch('toString', (global) => {\n // patch Func.prototype.toString to let them look like native\n const originalFunctionToString = Function.prototype.toString;\n const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n const PROMISE_SYMBOL = zoneSymbol('Promise');\n const ERROR_SYMBOL = zoneSymbol('Error');\n const newFunctionToString = function toString() {\n if (typeof this === 'function') {\n const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n if (originalDelegate) {\n if (typeof originalDelegate === 'function') {\n return originalFunctionToString.call(originalDelegate);\n }\n else {\n return Object.prototype.toString.call(originalDelegate);\n }\n }\n if (this === Promise) {\n const nativePromise = global[PROMISE_SYMBOL];\n if (nativePromise) {\n return originalFunctionToString.call(nativePromise);\n }\n }\n if (this === Error) {\n const nativeError = global[ERROR_SYMBOL];\n if (nativeError) {\n return originalFunctionToString.call(nativeError);\n }\n }\n }\n return originalFunctionToString.call(this);\n };\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString;\n // patch Object.prototype.toString to let them look like native\n const originalObjectToString = Object.prototype.toString;\n const PROMISE_OBJECT_TO_STRING = '[object Promise]';\n Object.prototype.toString = function () {\n if (typeof Promise === 'function' && this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n return originalObjectToString.call(this);\n };\n});\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nlet passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n }\n });\n // Note: We pass the `options` object as the event handler too. This is not compatible with the\n // signature of `addEventListener` or `removeEventListener` but enables us to remove the handler\n // without an actual handler.\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\n// an identifier to tell ZoneTask do not create a new invoke closure\nconst OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n useG: true\n};\nconst zoneSymbolEventNames = {};\nconst globalSources = {};\nconst EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\\\w+)(true|false)$');\nconst IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');\nfunction prepareEventNames(eventName, eventNameToString) {\n const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;\n const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n}\nfunction patchEventTarget(_global, api, apis, patchOptions) {\n const ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;\n const REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;\n const LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';\n const REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';\n const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n const PREPEND_EVENT_LISTENER = 'prependListener';\n const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n const invokeTask = function (task, target, event) {\n // for better performance, check isRemoved which is set\n // by removeEventListener\n if (task.isRemoved) {\n return;\n }\n const delegate = task.callback;\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = (event) => delegate.handleEvent(event);\n task.originalDelegate = delegate;\n }\n // invoke static task.invoke\n // need to try/catch error here, otherwise, the error in one event listener\n // will break the executions of the other event listeners. Also error will\n // not remove the event listener when `once` options is true.\n let error;\n try {\n task.invoke(task, target, [event]);\n }\n catch (err) {\n error = err;\n }\n const options = task.options;\n if (options && typeof options === 'object' && options.once) {\n // if options.once is true, after invoke once remove listener here\n // only browser need to do this, nodejs eventEmitter will cal removeListener\n // inside EventEmitter.once\n const delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options);\n }\n return error;\n };\n function globalCallback(context, event, isCapture) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n const target = context || event.target || _global;\n const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]];\n if (tasks) {\n const errors = [];\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n const err = invokeTask(tasks[0], target, event);\n err && errors.push(err);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n const copyTasks = tasks.slice();\n for (let i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n const err = invokeTask(copyTasks[i], target, event);\n err && errors.push(err);\n }\n }\n // Since there is only one error, we don't need to schedule microTask\n // to throw the error.\n if (errors.length === 1) {\n throw errors[0];\n }\n else {\n for (let i = 0; i < errors.length; i++) {\n const err = errors[i];\n api.nativeScheduleMicroTask(() => {\n throw err;\n });\n }\n }\n }\n }\n // global shared zoneAwareCallback to handle all event callback with capture = false\n const globalZoneAwareCallback = function (event) {\n return globalCallback(this, event, false);\n };\n // global shared zoneAwareCallback to handle all event callback with capture = true\n const globalZoneAwareCaptureCallback = function (event) {\n return globalCallback(this, event, true);\n };\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n let useGlobalCallback = true;\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n const validateHandler = patchOptions && patchOptions.vh;\n let checkDuplicate = true;\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n let returnTarget = false;\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n let proto = obj;\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && obj[ADD_EVENT_LISTENER]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = obj;\n }\n if (!proto) {\n return false;\n }\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n const eventNameToString = patchOptions && patchOptions.eventNameToString;\n // a shared global taskData to pass data for scheduleEventTask\n // so we do not need to create a new object just for pass some data\n const taskData = {};\n const nativeAddEventListener = proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER];\n const nativeRemoveEventListener = proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =\n proto[REMOVE_EVENT_LISTENER];\n const nativeListeners = proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =\n proto[LISTENERS_EVENT_LISTENER];\n const nativeRemoveAllListeners = proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER];\n let nativePrependEventListener;\n if (patchOptions && patchOptions.prepend) {\n nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =\n proto[patchOptions.prepend];\n }\n /**\n * This util function will build an option object with passive option\n * to handle all possible input from the user.\n */\n function buildEventListenerOptions(options, passive) {\n if (!passiveSupported && typeof options === 'object' && options) {\n // doesn't support passive but user want to pass an object as options.\n // this will not work on some old browser, so we just pass a boolean\n // as useCapture parameter\n return !!options.capture;\n }\n if (!passiveSupported || !passive) {\n return options;\n }\n if (typeof options === 'boolean') {\n return { capture: options, passive: true };\n }\n if (!options) {\n return { passive: true };\n }\n if (typeof options === 'object' && options.passive !== false) {\n return { ...options, passive: true };\n }\n return options;\n }\n const customScheduleGlobal = function (task) {\n // if there is already a task for the eventName + capture,\n // just return, because we use the shared globalZoneAwareCallback here.\n if (taskData.isExisting) {\n return;\n }\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\n const customCancelGlobal = function (task) {\n // if task is not marked as isRemoved, this call is directly\n // from Zone.prototype.cancelTask, we should remove the task\n // from tasksList of target first\n if (!task.isRemoved) {\n const symbolEventNames = zoneSymbolEventNames[task.eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && task.target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (existingTask === task) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n task.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n task.allRemoved = true;\n task.target[symbolEventName] = null;\n }\n break;\n }\n }\n }\n }\n // if all tasks for the eventName + capture have gone,\n // we will really remove the global event callback,\n // if not, return\n if (!task.allRemoved) {\n return;\n }\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n const customScheduleNonGlobal = function (task) {\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n const compareTaskCallbackVsDelegate = function (task, delegate) {\n const typeOfDelegate = typeof delegate;\n return (typeOfDelegate === 'function' && task.callback === delegate) ||\n (typeOfDelegate === 'object' && task.originalDelegate === delegate);\n };\n const compare = (patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;\n const unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')];\n const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];\n const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) {\n return function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n let delegate = arguments[1];\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n if (isNode && eventName === 'uncaughtException') {\n // don't patch uncaughtException of nodejs to prevent endless loop\n return nativeListener.apply(this, arguments);\n }\n // don't create the bind delegate function for handleEvent\n // case here to improve addEventListener performance\n // we will create the bind delegate when invoke\n let isHandleEvent = false;\n if (typeof delegate !== 'function') {\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n isHandleEvent = true;\n }\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n const passive = passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;\n const options = buildEventListenerOptions(arguments[2], passive);\n const signal = options && typeof options === 'object' && options.signal &&\n typeof options.signal === 'object' ?\n options.signal :\n undefined;\n if (signal?.aborted) {\n // the signal is an aborted one, just return without attaching the event listener.\n return;\n }\n if (unpatchedEvents) {\n // check unpatched list\n for (let i = 0; i < unpatchedEvents.length; i++) {\n if (eventName === unpatchedEvents[i]) {\n if (passive) {\n return nativeListener.call(target, eventName, delegate, options);\n }\n else {\n return nativeListener.apply(this, arguments);\n }\n }\n }\n }\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const once = options && typeof options === 'object' ? options.once : false;\n const zone = Zone.current;\n let symbolEventNames = zoneSymbolEventNames[eventName];\n if (!symbolEventNames) {\n prepareEventNames(eventName, eventNameToString);\n symbolEventNames = zoneSymbolEventNames[eventName];\n }\n const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n let existingTasks = target[symbolEventName];\n let isExisting = false;\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n if (checkDuplicate) {\n for (let i = 0; i < existingTasks.length; i++) {\n if (compare(existingTasks[i], delegate)) {\n // same callback, same capture, same event name, just return\n return;\n }\n }\n }\n }\n else {\n existingTasks = target[symbolEventName] = [];\n }\n let source;\n const constructorName = target.constructor['name'];\n const targetSource = globalSources[constructorName];\n if (targetSource) {\n source = targetSource[eventName];\n }\n if (!source) {\n source = constructorName + addSource +\n (eventNameToString ? eventNameToString(eventName) : eventName);\n }\n // do not create a new object as task.data to pass those things\n // just use the global shared one\n taskData.options = options;\n if (once) {\n // if addEventListener with once options, we don't pass it to\n // native addEventListener, instead we keep the once setting\n // and handle ourselves.\n taskData.options.once = false;\n }\n taskData.target = target;\n taskData.capture = capture;\n taskData.eventName = eventName;\n taskData.isExisting = isExisting;\n const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;\n // keep taskData into data to allow onScheduleEventTask to access the task information\n if (data) {\n data.taskData = taskData;\n }\n if (signal) {\n // if addEventListener with signal options, we don't pass it to\n // native addEventListener, instead we keep the signal setting\n // and handle ourselves.\n taskData.options.signal = undefined;\n }\n const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n if (signal) {\n // after task is scheduled, we need to store the signal back to task.options\n taskData.options.signal = signal;\n nativeListener.call(signal, 'abort', () => {\n task.zone.cancelTask(task);\n }, { once: true });\n }\n // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n taskData.target = null;\n // need to clear up taskData because it is a global object\n if (data) {\n data.taskData = null;\n }\n // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n if (once) {\n options.once = true;\n }\n if (!(!passiveSupported && typeof task.options === 'boolean')) {\n // if not support passive, and we pass an option object\n // to addEventListener, we should save the options to task\n task.options = options;\n }\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n if (isHandleEvent) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n if (!prepend) {\n existingTasks.push(task);\n }\n else {\n existingTasks.unshift(task);\n }\n if (returnTarget) {\n return target;\n }\n };\n };\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n proto[REMOVE_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const options = arguments[2];\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const delegate = arguments[1];\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (validateHandler &&\n !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n existingTask.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n existingTask.allRemoved = true;\n target[symbolEventName] = null;\n // in the target, we have an event listener which is added by on_property\n // such as target.onclick = function() {}, so we need to clear this internal\n // property too if all delegates all removed\n if (typeof eventName === 'string') {\n const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;\n target[onPropertySymbol] = null;\n }\n }\n existingTask.zone.cancelTask(existingTask);\n if (returnTarget) {\n return target;\n }\n return;\n }\n }\n }\n // issue 930, didn't find the event name or callback\n // from zone kept existingTasks, the callback maybe\n // added outside of zone, we need to call native removeEventListener\n // to try to remove it.\n return nativeRemoveEventListener.apply(this, arguments);\n };\n proto[LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const listeners = [];\n const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n for (let i = 0; i < tasks.length; i++) {\n const task = tasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n listeners.push(delegate);\n }\n return listeners;\n };\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (!eventName) {\n const keys = Object.keys(target);\n for (let i = 0; i < keys.length; i++) {\n const prop = keys[i];\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n // in nodejs EventEmitter, removeListener event is\n // used for monitoring the removeListener call,\n // so just keep removeListener eventListener until\n // all other eventListeners are removed\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n }\n // remove removeListener listener finally\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n }\n else {\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n if (symbolEventNames) {\n const symbolEventName = symbolEventNames[FALSE_STR];\n const symbolCaptureEventName = symbolEventNames[TRUE_STR];\n const tasks = target[symbolEventName];\n const captureTasks = target[symbolCaptureEventName];\n if (tasks) {\n const removeTasks = tasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n if (captureTasks) {\n const removeTasks = captureTasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n }\n }\n if (returnTarget) {\n return this;\n }\n };\n // for native toString patch\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n return true;\n }\n let results = [];\n for (let i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n return results;\n}\nfunction findEventTasks(target, eventName) {\n if (!eventName) {\n const foundTasks = [];\n for (let prop in target) {\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n if (evtName && (!eventName || evtName === eventName)) {\n const tasks = target[prop];\n if (tasks) {\n for (let i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n return foundTasks;\n }\n let symbolEventName = zoneSymbolEventNames[eventName];\n if (!symbolEventName) {\n prepareEventNames(eventName);\n symbolEventName = zoneSymbolEventNames[eventName];\n }\n const captureFalseTasks = target[symbolEventName[FALSE_STR]];\n const captureTrueTasks = target[symbolEventName[TRUE_STR]];\n if (!captureFalseTasks) {\n return captureTrueTasks ? captureTrueTasks.slice() : [];\n }\n else {\n return captureTrueTasks ? captureFalseTasks.concat(captureTrueTasks) :\n captureFalseTasks.slice();\n }\n}\nfunction patchEventPrototype(global, api) {\n const Event = global['Event'];\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', (delegate) => function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n // we need to call the native stopImmediatePropagation\n // in case in some hybrid application, some part of\n // application will be controlled by zone, some are not\n delegate && delegate.apply(self, args);\n });\n }\n}\n\nfunction patchCallbacks(api, target, targetName, method, callbacks) {\n const symbol = Zone.__symbol__(method);\n if (target[symbol]) {\n return;\n }\n const nativeDelegate = target[symbol] = target[method];\n target[method] = function (name, opts, options) {\n if (opts && opts.prototype) {\n callbacks.forEach(function (callback) {\n const source = `${targetName}.${method}::` + callback;\n const prototype = opts.prototype;\n // Note: the `patchCallbacks` is used for patching the `document.registerElement` and\n // `customElements.define`. We explicitly wrap the patching code into try-catch since\n // callbacks may be already patched by other web components frameworks (e.g. LWC), and they\n // make those properties non-writable. This means that patching callback will throw an error\n // `cannot assign to read-only property`. See this code as an example:\n // https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186\n // We don't want to stop the application rendering if we couldn't patch some\n // callback, e.g. `attributeChangedCallback`.\n try {\n if (prototype.hasOwnProperty(callback)) {\n const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n if (descriptor && descriptor.value) {\n descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n api._redefineProperty(opts.prototype, callback, descriptor);\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n catch {\n // Note: we leave the catch block empty since there's no way to handle the error related\n // to non-writable property.\n }\n });\n }\n return nativeDelegate.call(target, name, opts, options);\n };\n api.attachOriginToPatched(target[method], nativeDelegate);\n}\n\n/**\n * @fileoverview\n * @suppress {globalThis}\n */\nfunction filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties || ignoreProperties.length === 0) {\n return onProperties;\n }\n const tip = ignoreProperties.filter(ip => ip.target === target);\n if (!tip || tip.length === 0) {\n return onProperties;\n }\n const targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter(op => targetIgnoreProperties.indexOf(op) === -1);\n}\nfunction patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n // check whether target is available, sometimes target will be undefined\n // because different browser or some 3rd party plugin.\n if (!target) {\n return;\n }\n const filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n patchOnProperties(target, filteredProperties, prototype);\n}\n/**\n * Get all event name properties which the event name startsWith `on`\n * from the target object itself, inherited properties are not considered.\n */\nfunction getOnEventNames(target) {\n return Object.getOwnPropertyNames(target)\n .filter(name => name.startsWith('on') && name.length > 2)\n .map(name => name.substring(2));\n}\nfunction propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n if (Zone[api.symbol('patchEvents')]) {\n // events are already been patched by legacy patch.\n return;\n }\n const ignoreProperties = _global['__Zone_ignore_on_properties'];\n // for browsers that we can patch the descriptor: Chrome & Firefox\n let patchTargets = [];\n if (isBrowser) {\n const internalWindow = window;\n patchTargets = patchTargets.concat([\n 'Document', 'SVGElement', 'Element', 'HTMLElement', 'HTMLBodyElement', 'HTMLMediaElement',\n 'HTMLFrameSetElement', 'HTMLFrameElement', 'HTMLIFrameElement', 'HTMLMarqueeElement', 'Worker'\n ]);\n const ignoreErrorProperties = isIE() ? [{ target: internalWindow, ignoreProperties: ['error'] }] : [];\n // in IE/Edge, onProp not exist in window object, but in WindowPrototype\n // so we need to pass WindowPrototype to check onProp exist or not\n patchFilteredProperties(internalWindow, getOnEventNames(internalWindow), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n }\n patchTargets = patchTargets.concat([\n 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'IDBIndex', 'IDBRequest', 'IDBOpenDBRequest',\n 'IDBDatabase', 'IDBTransaction', 'IDBCursor', 'WebSocket'\n ]);\n for (let i = 0; i < patchTargets.length; i++) {\n const target = _global[patchTargets[i]];\n target && target.prototype &&\n patchFilteredProperties(target.prototype, getOnEventNames(target.prototype), ignoreProperties);\n }\n}\n\nZone.__load_patch('util', (global, Zone, api) => {\n // Collect native event names by looking at properties\n // on the global namespace, e.g. 'onclick'.\n const eventNames = getOnEventNames(global);\n api.patchOnProperties = patchOnProperties;\n api.patchMethod = patchMethod;\n api.bindArguments = bindArguments;\n api.patchMacroTask = patchMacroTask;\n // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS` to\n // define which events will not be patched by `Zone.js`.\n // In newer version (>=0.9.0), we change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep\n // the name consistent with angular repo.\n // The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be supported for\n // backwards compatibility.\n const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n if (global[SYMBOL_UNPATCHED_EVENTS]) {\n global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n }\n if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =\n global[SYMBOL_BLACK_LISTED_EVENTS];\n }\n api.patchEventPrototype = patchEventPrototype;\n api.patchEventTarget = patchEventTarget;\n api.isIEOrEdge = isIEOrEdge;\n api.ObjectDefineProperty = ObjectDefineProperty;\n api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;\n api.ObjectCreate = ObjectCreate;\n api.ArraySlice = ArraySlice;\n api.patchClass = patchClass;\n api.wrapWithCurrentZone = wrapWithCurrentZone;\n api.filterProperties = filterProperties;\n api.attachOriginToPatched = attachOriginToPatched;\n api._redefineProperty = Object.defineProperty;\n api.patchCallbacks = patchCallbacks;\n api.getGlobalObjects = () => ({\n globalSources,\n zoneSymbolEventNames,\n eventNames,\n isBrowser,\n isMix,\n isNode,\n TRUE_STR,\n FALSE_STR,\n ZONE_SYMBOL_PREFIX,\n ADD_EVENT_LISTENER_STR,\n REMOVE_EVENT_LISTENER_STR\n });\n});\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nfunction patchQueueMicrotask(global, api) {\n api.patchMethod(global, 'queueMicrotask', (delegate) => {\n return function (self, args) {\n Zone.current.scheduleMicroTask('queueMicrotask', args[0]);\n };\n });\n}\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nconst taskSymbol = zoneSymbol('zoneTask');\nfunction patchTimer(window, setName, cancelName, nameSuffix) {\n let setNative = null;\n let clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n const tasksByHandleId = {};\n function scheduleTask(task) {\n const data = task.data;\n data.args[0] = function () {\n return task.invoke.apply(this, arguments);\n };\n data.handleId = setNative.apply(window, data.args);\n return task;\n }\n function clearTask(task) {\n return clearNative.call(window, task.data.handleId);\n }\n setNative =\n patchMethod(window, setName, (delegate) => function (self, args) {\n if (typeof args[0] === 'function') {\n const options = {\n isPeriodic: nameSuffix === 'Interval',\n delay: (nameSuffix === 'Timeout' || nameSuffix === 'Interval') ? args[1] || 0 :\n undefined,\n args: args\n };\n const callback = args[0];\n args[0] = function timer() {\n try {\n return callback.apply(this, arguments);\n }\n finally {\n // issue-934, task will be cancelled\n // even it is a periodic task such as\n // setInterval\n // https://github.com/angular/angular/issues/40387\n // Cleanup tasksByHandleId should be handled before scheduleTask\n // Since some zoneSpec may intercept and doesn't trigger\n // scheduleFn(scheduleTask) provided here.\n if (!(options.isPeriodic)) {\n if (typeof options.handleId === 'number') {\n // in non-nodejs env, we remove timerId\n // from local cache\n delete tasksByHandleId[options.handleId];\n }\n else if (options.handleId) {\n // Node returns complex objects as handleIds\n // we remove task reference from timer object\n options.handleId[taskSymbol] = null;\n }\n }\n }\n };\n const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n if (!task) {\n return task;\n }\n // Node.js must additionally support the ref and unref functions.\n const handle = task.data.handleId;\n if (typeof handle === 'number') {\n // for non nodejs env, we save handleId: task\n // mapping in local cache for clearTimeout\n tasksByHandleId[handle] = task;\n }\n else if (handle) {\n // for nodejs env, we save task\n // reference in timerId Object for clearTimeout\n handle[taskSymbol] = task;\n }\n // check whether handle is null, because some polyfill or browser\n // may return undefined from setTimeout/setInterval/setImmediate/requestAnimationFrame\n if (handle && handle.ref && handle.unref && typeof handle.ref === 'function' &&\n typeof handle.unref === 'function') {\n task.ref = handle.ref.bind(handle);\n task.unref = handle.unref.bind(handle);\n }\n if (typeof handle === 'number' || handle) {\n return handle;\n }\n return task;\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(window, args);\n }\n });\n clearNative =\n patchMethod(window, cancelName, (delegate) => function (self, args) {\n const id = args[0];\n let task;\n if (typeof id === 'number') {\n // non nodejs env.\n task = tasksByHandleId[id];\n }\n else {\n // nodejs env.\n task = id && id[taskSymbol];\n // other environments.\n if (!task) {\n task = id;\n }\n }\n if (task && typeof task.type === 'string') {\n if (task.state !== 'notScheduled' &&\n (task.cancelFn && task.data.isPeriodic || task.runCount === 0)) {\n if (typeof id === 'number') {\n delete tasksByHandleId[id];\n }\n else if (id) {\n id[taskSymbol] = null;\n }\n // Do not cancel already canceled functions\n task.zone.cancelTask(task);\n }\n }\n else {\n // cause an error by calling it directly.\n delegate.apply(window, args);\n }\n });\n}\n\nfunction patchCustomElements(_global, api) {\n const { isBrowser, isMix } = api.getGlobalObjects();\n if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) {\n return;\n }\n // https://html.spec.whatwg.org/multipage/custom-elements.html#concept-custom-element-definition-lifecycle-callbacks\n const callbacks = [\n 'connectedCallback', 'disconnectedCallback', 'adoptedCallback', 'attributeChangedCallback',\n 'formAssociatedCallback', 'formDisabledCallback', 'formResetCallback',\n 'formStateRestoreCallback'\n ];\n api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\n}\n\nfunction eventTargetPatch(_global, api) {\n if (Zone[api.symbol('patchEventTarget')]) {\n // EventTarget is already patched.\n return;\n }\n const { eventNames, zoneSymbolEventNames, TRUE_STR, FALSE_STR, ZONE_SYMBOL_PREFIX } = api.getGlobalObjects();\n // predefine all __zone_symbol__ + eventName + true/false string\n for (let i = 0; i < eventNames.length; i++) {\n const eventName = eventNames[i];\n const falseEventName = eventName + FALSE_STR;\n const trueEventName = eventName + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n const EVENT_TARGET = _global['EventTarget'];\n if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n return;\n }\n api.patchEventTarget(_global, api, [EVENT_TARGET && EVENT_TARGET.prototype]);\n return true;\n}\nfunction patchEvent(global, api) {\n api.patchEventPrototype(global, api);\n}\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nZone.__load_patch('legacy', (global) => {\n const legacyPatch = global[Zone.__symbol__('legacyPatch')];\n if (legacyPatch) {\n legacyPatch();\n }\n});\nZone.__load_patch('timers', (global) => {\n const set = 'set';\n const clear = 'clear';\n patchTimer(global, set, clear, 'Timeout');\n patchTimer(global, set, clear, 'Interval');\n patchTimer(global, set, clear, 'Immediate');\n});\nZone.__load_patch('requestAnimationFrame', (global) => {\n patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n});\nZone.__load_patch('blocking', (global, Zone) => {\n const blockingMethods = ['alert', 'prompt', 'confirm'];\n for (let i = 0; i < blockingMethods.length; i++) {\n const name = blockingMethods[i];\n patchMethod(global, name, (delegate, symbol, name) => {\n return function (s, args) {\n return Zone.current.run(delegate, global, args, name);\n };\n });\n }\n});\nZone.__load_patch('EventTarget', (global, Zone, api) => {\n patchEvent(global, api);\n eventTargetPatch(global, api);\n // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, api, [XMLHttpRequestEventTarget.prototype]);\n }\n});\nZone.__load_patch('MutationObserver', (global, Zone, api) => {\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n});\nZone.__load_patch('IntersectionObserver', (global, Zone, api) => {\n patchClass('IntersectionObserver');\n});\nZone.__load_patch('FileReader', (global, Zone, api) => {\n patchClass('FileReader');\n});\nZone.__load_patch('on_property', (global, Zone, api) => {\n propertyDescriptorPatch(api, global);\n});\nZone.__load_patch('customElements', (global, Zone, api) => {\n patchCustomElements(global, api);\n});\nZone.__load_patch('XHR', (global, Zone) => {\n // Treat XMLHttpRequest as a macrotask.\n patchXHR(global);\n const XHR_TASK = zoneSymbol('xhrTask');\n const XHR_SYNC = zoneSymbol('xhrSync');\n const XHR_LISTENER = zoneSymbol('xhrListener');\n const XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n const XHR_URL = zoneSymbol('xhrURL');\n const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');\n function patchXHR(window) {\n const XMLHttpRequest = window['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return;\n }\n const XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n function findPendingTask(target) {\n return target[XHR_TASK];\n }\n let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n if (!oriAddListener) {\n const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;\n oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n }\n const READY_STATE_CHANGE = 'readystatechange';\n const SCHEDULED = 'scheduled';\n function scheduleTask(task) {\n const data = task.data;\n const target = data.target;\n target[XHR_SCHEDULED] = false;\n target[XHR_ERROR_BEFORE_SCHEDULED] = false;\n // remove existing event listener\n const listener = target[XHR_LISTENER];\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\n const newListener = target[XHR_LISTENER] = () => {\n if (target.readyState === target.DONE) {\n // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n // readyState=4 multiple times, so we need to check task state here\n if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {\n // check whether the xhr has registered onload listener\n // if that is the case, the task should invoke after all\n // onload listeners finish.\n // Also if the request failed without response (status = 0), the load event handler\n // will not be triggered, in that case, we should also invoke the placeholder callback\n // to close the XMLHttpRequest::send macroTask.\n // https://github.com/angular/angular/issues/38795\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n if (target.status !== 0 && loadTasks && loadTasks.length > 0) {\n const oriInvoke = task.invoke;\n task.invoke = function () {\n // need to load the tasks again, because in other\n // load listener, they may remove themselves\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n for (let i = 0; i < loadTasks.length; i++) {\n if (loadTasks[i] === task) {\n loadTasks.splice(i, 1);\n }\n }\n if (!data.aborted && task.state === SCHEDULED) {\n oriInvoke.call(task);\n }\n };\n loadTasks.push(task);\n }\n else {\n task.invoke();\n }\n }\n else if (!data.aborted && target[XHR_SCHEDULED] === false) {\n // error occurs when xhr.send()\n target[XHR_ERROR_BEFORE_SCHEDULED] = true;\n }\n }\n };\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n const storedTask = target[XHR_TASK];\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n sendNative.apply(target, data.args);\n target[XHR_SCHEDULED] = true;\n return task;\n }\n function placeholderCallback() { }\n function clearTask(task) {\n const data = task.data;\n // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n // to prevent it from firing. So instead, we store info for the event listener.\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\n const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {\n self[XHR_SYNC] = args[2] == false;\n self[XHR_URL] = args[1];\n return openNative.apply(self, args);\n });\n const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n const fetchTaskAborting = zoneSymbol('fetchTaskAborting');\n const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');\n const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) {\n if (Zone.current[fetchTaskScheduling] === true) {\n // a fetch is scheduling, so we are using xhr to polyfill fetch\n // and because we already schedule macroTask for fetch, we should\n // not schedule a macroTask for xhr again\n return sendNative.apply(self, args);\n }\n if (self[XHR_SYNC]) {\n // if the XHR is sync there is no task to schedule, just execute the code.\n return sendNative.apply(self, args);\n }\n else {\n const options = { target: self, url: self[XHR_URL], isPeriodic: false, args: args, aborted: false };\n const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n if (self && self[XHR_ERROR_BEFORE_SCHEDULED] === true && !options.aborted &&\n task.state === SCHEDULED) {\n // xhr request throw error when send\n // we should invoke task instead of leaving a scheduled\n // pending macroTask\n task.invoke();\n }\n }\n });\n const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) {\n const task = findPendingTask(self);\n if (task && typeof task.type == 'string') {\n // If the XHR has already completed, do nothing.\n // If the XHR has already been aborted, do nothing.\n // Fix #569, call abort multiple times before done will cause\n // macroTask task count be negative number\n if (task.cancelFn == null || (task.data && task.data.aborted)) {\n return;\n }\n task.zone.cancelTask(task);\n }\n else if (Zone.current[fetchTaskAborting] === true) {\n // the abort is called from fetch polyfill, we need to call native abort of XHR.\n return abortNative.apply(self, args);\n }\n // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n // task\n // to cancel. Do nothing.\n });\n }\n});\nZone.__load_patch('geolocation', (global) => {\n /// GEO_LOCATION\n if (global['navigator'] && global['navigator'].geolocation) {\n patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n }\n});\nZone.__load_patch('PromiseRejectionEvent', (global, Zone) => {\n // handle unhandled promise rejection\n function findPromiseRejectionHandler(evtName) {\n return function (e) {\n const eventTasks = findEventTasks(global, evtName);\n eventTasks.forEach(eventTask => {\n // windows has added unhandledrejection event listener\n // trigger the event listener\n const PromiseRejectionEvent = global['PromiseRejectionEvent'];\n if (PromiseRejectionEvent) {\n const evt = new PromiseRejectionEvent(evtName, { promise: e.promise, reason: e.rejection });\n eventTask.invoke(evt);\n }\n });\n };\n }\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =\n findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] =\n findPromiseRejectionHandler('rejectionhandled');\n }\n});\nZone.__load_patch('queueMicrotask', (global, Zone, api) => {\n patchQueueMicrotask(global, api);\n});\n","/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfills to this file.\n *\n * This file is divided into 2 sections:\n * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.\n * 2. Application imports. Files imported after ZoneJS that should be loaded before your main\n * file.\n *\n * The current setup is for so-called \"evergreen\" browsers; the last versions of browsers that\n * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),\n * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.\n *\n * Learn more in https://angular.io/guide/browser-support\n */\n\n/***************************************************************************************************\n * BROWSER POLYFILLS\n */\n\n/**\n * By default, zone.js will patch all possible macroTask and DomEvents\n * user can disable parts of macroTask/DomEvents patch by setting following flags\n * because those flags need to be set before `zone.js` being loaded, and webpack\n * will put import in the top of bundle, so user need to create a separate file\n * in this directory (for example: zone-flags.ts), and put the following flags\n * into that file, and then add the following code before importing zone.js.\n * import './zone-flags';\n *\n * The flags allowed in zone-flags.ts are listed here.\n *\n * The following flags will work for all browsers.\n *\n * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame\n * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick\n * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames\n *\n * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js\n * with the following flag, it will bypass `zone.js` patch for IE/Edge\n *\n * (window as any).__Zone_enable_cross_context_check = true;\n *\n */\n\n/***************************************************************************************************\n * Zone JS is required by default for Angular itself.\n */\nimport 'zone.js'; // Included with Angular CLI.\n\n/***************************************************************************************************\n * APPLICATION IMPORTS\n */\n"],"names":["global","performance","mark","name","performanceMeasure","label","symbolPrefix","__symbol__","checkDuplicate","Error","Zone","_","assertZonePatched","patches","root","zone","current","parent","_currentZoneFrame","currentTask","_currentTask","__load_patch","fn","ignoreDuplicate","hasOwnProperty","perfName","_api","_parent","_name","constructor","zoneSpec","_properties","properties","_zoneDelegate","_ZoneDelegate","get","key","getZoneWith","fork","wrap","callback","source","_callback","intercept","runGuarded","arguments","run","applyThis","applyArgs","invoke","error","handleError","runTask","task","NO_ZONE","state","notScheduled","type","eventTask","macroTask","reEntryGuard","running","_transitionTo","scheduled","runCount","previousTask","data","isPeriodic","cancelFn","undefined","invokeTask","unknown","_updateTaskCount","scheduleTask","newZone","scheduling","zoneDelegates","_zoneDelegates","_zone","err","scheduleMicroTask","customSchedule","ZoneTask","microTask","scheduleMacroTask","customCancel","scheduleEventTask","cancelTask","canceling","count","i","length","DELEGATE_ZS","onHasTask","delegate","target","hasTaskState","hasTask","onScheduleTask","onInvokeTask","onCancelTask","parentDelegate","_taskCounts","_parentDelegate","_forkZS","onFork","_forkDlgt","_forkCurrZone","_interceptZS","onIntercept","_interceptDlgt","_interceptCurrZone","_invokeZS","onInvoke","_invokeDlgt","_invokeCurrZone","_handleErrorZS","onHandleError","_handleErrorDlgt","_handleErrorCurrZone","_scheduleTaskZS","_scheduleTaskDlgt","_scheduleTaskCurrZone","_invokeTaskZS","_invokeTaskDlgt","_invokeTaskCurrZone","_cancelTaskZS","_cancelTaskDlgt","_cancelTaskCurrZone","_hasTaskZS","_hasTaskDlgt","_hasTaskDlgtOwner","_hasTaskCurrZone","zoneSpecHasTask","parentHasTask","targetZone","apply","returnTask","push","scheduleFn","value","isEmpty","counts","prev","next","change","options","_state","self","useG","call","args","_numberOfNestedTaskFrames","drainMicroTaskQueue","cancelScheduleRequest","toState","fromState1","fromState2","toString","handleId","Object","prototype","toJSON","symbolSetTimeout","symbolPromise","symbolThen","_microTaskQueue","_isDrainingMicrotaskQueue","nativeMicroTaskQueuePromise","nativeScheduleMicroTask","func","resolve","nativeThen","queue","onUnhandledError","microtaskDrainDone","symbol","currentZoneFrame","noop","showUncaughtError","patchEventTarget","patchOnProperties","patchMethod","bindArguments","patchThen","patchMacroTask","patchEventPrototype","isIEOrEdge","getGlobalObjects","ObjectDefineProperty","ObjectGetOwnPropertyDescriptor","ObjectCreate","ArraySlice","patchClass","wrapWithCurrentZone","filterProperties","attachOriginToPatched","_redefineProperty","patchCallbacks","globalThis","getOwnPropertyDescriptor","defineProperty","ObjectGetPrototypeOf","getPrototypeOf","create","Array","slice","ADD_EVENT_LISTENER_STR","REMOVE_EVENT_LISTENER_STR","ZONE_SYMBOL_ADD_EVENT_LISTENER","ZONE_SYMBOL_REMOVE_EVENT_LISTENER","TRUE_STR","FALSE_STR","ZONE_SYMBOL_PREFIX","scheduleMacroTaskWithCurrentZone","zoneSymbol","isWindowExists","window","internalWindow","_global","REMOVE_ATTRIBUTE","patchPrototype","fnNames","prototypeDesc","isPropertyWritable","patched","propertyDesc","writable","set","isWebWorker","WorkerGlobalScope","isNode","process","isBrowser","isMix","zoneSymbolEventNames$1","wrapFn","event","eventNameSymbol","listener","result","errorEvent","message","filename","lineno","colno","preventDefault","patchProperty","obj","prop","desc","enumerable","configurable","onPropPatchedSymbol","originalDescGet","originalDescSet","eventName","newValue","previousValue","removeEventListener","addEventListener","removeAttribute","onProperties","j","originalInstanceKey","className","OriginalClass","a","instance","patchFn","proto","delegateName","patchDelegate","funcName","metaCreator","setNative","cbIdx","meta","original","isDetectedIEOrEdge","ieOrEdge","isIE","ua","navigator","userAgent","indexOf","api","readableObjectToString","JSON","stringify","_uncaughtPromiseErrors","isDisableWrappingUncaughtPromiseRejection","creationTrace","e","rejection","console","stack","uncaughtPromiseError","shift","throwOriginal","handleUnhandledRejection","UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL","handler","isThenable","then","forwardResolution","forwardRejection","ZoneAwarePromise","reject","symbolState","symbolValue","symbolFinally","symbolParentPromiseValue","symbolParentPromiseState","UNRESOLVED","RESOLVED","REJECTED","REJECTED_NO_CATCH","makeResolver","promise","v","resolvePromise","once","wasCalled","wrapper","wrappedFunction","TYPE_ERROR","CURRENT_TASK_TRACE_SYMBOL","onceWrapper","TypeError","clearRejectedNoCatch","trace","scheduleResolveOrReject","REJECTION_HANDLED_HANDLER","splice","chainPromise","onFulfilled","onRejected","promiseState","parentPromiseValue","isFinallyPromise","ZONE_AWARE_PROMISE_TO_STRING","AggregateError","withResolvers","res","rej","any","values","Symbol","iterator","Promise","promises","finished","errors","race","onResolve","onReject","all","allWithCallback","allSettled","P","thenCallback","status","errorCallback","reason","unresolvedCount","valueIndex","resolvedValues","curValueIndex","thenErr","executor","toStringTag","species","C","catch","finally","onFinally","NativePromise","symbolThenPatched","Ctor","originalThen","wrapped","zoneify","resultPromise","ctor","originalFunctionToString","Function","ORIGINAL_DELEGATE_SYMBOL","PROMISE_SYMBOL","ERROR_SYMBOL","newFunctionToString","originalDelegate","nativePromise","nativeError","originalObjectToString","PROMISE_OBJECT_TO_STRING","passiveSupported","OPTIMIZED_ZONE_EVENT_TASK_DATA","zoneSymbolEventNames","globalSources","EVENT_NAME_SYMBOL_REGX","RegExp","IMMEDIATE_PROPAGATION_SYMBOL","prepareEventNames","eventNameToString","falseEventName","trueEventName","symbolCapture","apis","patchOptions","ADD_EVENT_LISTENER","add","REMOVE_EVENT_LISTENER","rm","LISTENERS_EVENT_LISTENER","listeners","REMOVE_ALL_LISTENERS_EVENT_LISTENER","rmAll","zoneSymbolAddEventListener","ADD_EVENT_LISTENER_SOURCE","PREPEND_EVENT_LISTENER","PREPEND_EVENT_LISTENER_SOURCE","isRemoved","handleEvent","globalCallback","context","isCapture","tasks","copyTasks","globalZoneAwareCallback","globalZoneAwareCaptureCallback","patchEventTargetMethods","useGlobalCallback","validateHandler","vh","chkDup","returnTarget","rt","taskData","nativeAddEventListener","nativeRemoveEventListener","nativeListeners","nativeRemoveAllListeners","nativePrependEventListener","prepend","buildEventListenerOptions","passive","capture","customScheduleGlobal","isExisting","customCancelGlobal","symbolEventNames","symbolEventName","existingTasks","existingTask","allRemoved","customScheduleNonGlobal","customSchedulePrepend","customCancelNonGlobal","compareTaskCallbackVsDelegate","typeOfDelegate","compare","diff","unpatchedEvents","passiveEvents","makeAddListener","nativeListener","addSource","customScheduleFn","customCancelFn","transferEventName","isHandleEvent","signal","aborted","constructorName","targetSource","unshift","onPropertySymbol","findEventTasks","keys","match","exec","evtName","symbolCaptureEventName","captureTasks","removeTasks","results","foundTasks","captureFalseTasks","captureTrueTasks","concat","Event","targetName","method","callbacks","nativeDelegate","opts","forEach","descriptor","ignoreProperties","tip","filter","ip","targetIgnoreProperties","op","patchFilteredProperties","filteredProperties","getOnEventNames","getOwnPropertyNames","startsWith","map","substring","propertyDescriptorPatch","patchTargets","ignoreErrorProperties","eventNames","SYMBOL_BLACK_LISTED_EVENTS","SYMBOL_UNPATCHED_EVENTS","patchQueueMicrotask","taskSymbol","patchTimer","setName","cancelName","nameSuffix","clearNative","tasksByHandleId","clearTask","delay","timer","handle","ref","unref","bind","id","patchCustomElements","customElements","eventTargetPatch","EVENT_TARGET","patchEvent","legacyPatch","clear","blockingMethods","s","XMLHttpRequestEventTarget","patchXHR","XHR_TASK","XHR_SYNC","XHR_LISTENER","XHR_SCHEDULED","XHR_URL","XHR_ERROR_BEFORE_SCHEDULED","XMLHttpRequest","XMLHttpRequestPrototype","findPendingTask","oriAddListener","oriRemoveListener","XMLHttpRequestEventTargetPrototype","READY_STATE_CHANGE","SCHEDULED","newListener","readyState","DONE","loadTasks","oriInvoke","storedTask","sendNative","placeholderCallback","abortNative","openNative","XMLHTTPREQUEST_SOURCE","fetchTaskAborting","fetchTaskScheduling","url","geolocation","findPromiseRejectionHandler","eventTasks","PromiseRejectionEvent","evt"],"sourceRoot":"webpack:///","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/app-v2/runtime.bbaa96f2272e1c52.js b/app-v2/runtime.bbaa96f2272e1c52.js deleted file mode 100644 index 3563da4..0000000 --- a/app-v2/runtime.bbaa96f2272e1c52.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,_={},p={};function n(e){var a=p[e];if(void 0!==a)return a.exports;var r=p[e]={exports:{}};return _[e].call(r.exports,r,r.exports,n),r.exports}n.m=_,e=[],n.O=(a,r,o,l)=>{if(!r){var c=1/0;for(f=0;f=l)&&Object.keys(n.O).every(h=>n.O[h](r[t]))?r.splice(t--,1):(s=!1,l0&&e[f-1][2]>l;f--)e[f]=e[f-1];e[f]=[r,o,l]},n.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return n.d(a,{a}),a},n.d=(e,a)=>{for(var r in a)n.o(a,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},n.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e={121:0};n.O.j=o=>0===e[o];var a=(o,l)=>{var t,u,[f,c,s]=l,v=0;if(f.some(d=>0!==e[d])){for(t in c)n.o(c,t)&&(n.m[t]=c[t]);if(s)var b=s(n)}for(o&&o(l);v { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({}); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/chunk loaded */ +/******/ (() => { +/******/ var deferred = []; +/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { +/******/ if(chunkIds) { +/******/ priority = priority || 0; +/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; +/******/ deferred[i] = [chunkIds, fn, priority]; +/******/ return; +/******/ } +/******/ var notFulfilled = Infinity; +/******/ for (var i = 0; i < deferred.length; i++) { +/******/ var [chunkIds, fn, priority] = deferred[i]; +/******/ var fulfilled = true; +/******/ for (var j = 0; j < chunkIds.length; j++) { +/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { +/******/ chunkIds.splice(j--, 1); +/******/ } else { +/******/ fulfilled = false; +/******/ if(priority < notFulfilled) notFulfilled = priority; +/******/ } +/******/ } +/******/ if(fulfilled) { +/******/ deferred.splice(i--, 1) +/******/ var r = fn(); +/******/ if (r !== undefined) result = r; +/******/ } +/******/ } +/******/ return result; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ "runtime": 0 +/******/ }; +/******/ +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ return __webpack_require__.O(result); +/******/ } +/******/ +/******/ var chunkLoadingGlobal = self["webpackChunkegon"] = self["webpackChunkegon"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ +/******/ })() +; +//# sourceMappingURL=runtime.js.map \ No newline at end of file diff --git a/app-v2/runtime.js.map b/app-v2/runtime.js.map new file mode 100644 index 0000000..e0ba198 --- /dev/null +++ b/app-v2/runtime.js.map @@ -0,0 +1 @@ +{"version":3,"file":"runtime.js","mappings":";;;;UAAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA","sources":["webpack/bootstrap","webpack/runtime/chunk loaded","webpack/runtime/compat get default export","webpack/runtime/define property getters","webpack/runtime/hasOwnProperty shorthand","webpack/runtime/make namespace object","webpack/runtime/jsonp chunk loading","webpack/before-startup","webpack/startup","webpack/after-startup"],"sourcesContent":["// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"runtime\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkegon\"] = self[\"webpackChunkegon\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","",""],"names":[],"sourceRoot":"webpack:///","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9]} \ No newline at end of file diff --git a/app-v2/styles.70d25995ee05de30.css b/app-v2/styles.70d25995ee05de30.css deleted file mode 100644 index 98fbebb..0000000 --- a/app-v2/styles.70d25995ee05de30.css +++ /dev/null @@ -1 +0,0 @@ -.djs-container{--color-grey-225-10-15: hsl(225, 10%, 15%);--color-grey-225-10-35: hsl(225, 10%, 35%);--color-grey-225-10-55: hsl(225, 10%, 55%);--color-grey-225-10-75: hsl(225, 10%, 75%);--color-grey-225-10-80: hsl(225, 10%, 80%);--color-grey-225-10-85: hsl(225, 10%, 85%);--color-grey-225-10-90: hsl(225, 10%, 90%);--color-grey-225-10-95: hsl(225, 10%, 95%);--color-grey-225-10-97: hsl(225, 10%, 97%);--color-blue-205-100-45: hsl(205, 100%, 45%);--color-blue-205-100-45-opacity-30: hsla(205, 100%, 45%, 30%);--color-blue-205-100-50: hsl(205, 100%, 50%);--color-blue-205-100-95: hsl(205, 100%, 95%);--color-green-150-86-44: hsl(150, 86%, 44%);--color-red-360-100-40: hsl(360, 100%, 40%);--color-red-360-100-45: hsl(360, 100%, 45%);--color-red-360-100-92: hsl(360, 100%, 92%);--color-red-360-100-97: hsl(360, 100%, 97%);--color-white: hsl(0, 0%, 100%);--color-black: hsl(0, 0%, 0%);--color-black-opacity-05: hsla(0, 0%, 0%, 5%);--color-black-opacity-10: hsla(0, 0%, 0%, 10%);--bendpoint-fill-color: var(--color-blue-205-100-45-opacity-30);--bendpoint-stroke-color: var(--color-blue-205-100-50);--context-pad-entry-background-color: var(--color-white);--context-pad-entry-hover-background-color: var(--color-grey-225-10-95);--element-dragger-color: var(--color-blue-205-100-50);--element-hover-outline-fill-color: var(--color-blue-205-100-45);--element-selected-outline-stroke-color: var(--color-blue-205-100-50);--lasso-fill-color: var(--color-black-opacity-05);--lasso-stroke-color: var(--color-black);--palette-entry-color: var(--color-grey-225-10-15);--palette-entry-hover-color: var(--color-blue-205-100-45);--palette-entry-selected-color: var(--color-blue-205-100-50);--palette-separator-color: var(--color-grey-225-10-75);--palette-toggle-hover-background-color: var(--color-grey-225-10-55);--palette-background-color: var(--color-grey-225-10-97);--palette-border-color: var(--color-grey-225-10-75);--popup-body-background-color: var(--color-white);--popup-header-entry-selected-color: var(--color-blue-205-100-50);--popup-header-entry-selected-background-color: var(--color-black-opacity-10);--popup-header-separator-color: var(--color-grey-225-10-75);--popup-background-color: var(--color-grey-225-10-97);--popup-border-color: var(--color-grey-225-10-75);--resizer-fill-color: var(--color-blue-205-100-45-opacity-30);--resizer-stroke-color: var(--color-blue-205-100-50);--search-container-background-color: var(--color-grey-225-10-97);--search-container-border-color: var(--color-blue-205-100-50);--search-container-box-shadow-color: var(--color-blue-205-100-95);--search-container-box-shadow-inset-color: var(--color-grey-225-10-80);--search-input-border-color: var(--color-grey-225-10-75);--search-result-border-color: var(--color-grey-225-10-75);--search-result-highlight-color: var(--color-black);--search-result-selected-color: var(--color-blue-205-100-45-opacity-30);--shape-attach-allowed-stroke-color: var(--color-blue-205-100-50);--shape-connect-allowed-fill-color: var(--color-grey-225-10-97);--shape-drop-allowed-fill-color: var(--color-grey-225-10-97);--shape-drop-not-allowed-fill-color: var(--color-red-360-100-97);--shape-resize-preview-stroke-color: var(--color-blue-205-100-50);--snap-line-stroke-color: var(--color-blue-205-100-45-opacity-30);--space-tool-crosshair-stroke-color: var(--color-black);--tooltip-error-background-color: var(--color-red-360-100-97);--tooltip-error-border-color: var(--color-red-360-100-45);--tooltip-error-color: var(--color-red-360-100-45)}.djs-element.hover .djs-outline,.djs-element.selected .djs-outline{visibility:visible;shape-rendering:geometricPrecision;stroke-dasharray:3,3}.djs-element.selected .djs-outline{stroke:var(--element-selected-outline-stroke-color);stroke-width:1px}.djs-element.hover .djs-outline{stroke:var(--element-hover-outline-fill-color);stroke-width:1px}.djs-shape.connect-ok .djs-visual>:nth-child(1){fill:var(--shape-connect-allowed-fill-color)!important}.djs-shape.connect-not-ok .djs-visual>:nth-child(1),.djs-shape.drop-not-ok .djs-visual>:nth-child(1){fill:var(--shape-drop-not-allowed-fill-color)!important}.djs-shape.new-parent .djs-visual>:nth-child(1){fill:var(--shape-drop-allowed-fill-color)!important}svg.drop-not-ok{background:var(--shape-drop-not-allowed-fill-color)!important}svg.new-parent{background:var(--shape-drop-allowed-fill-color)!important}.djs-connection.connect-ok .djs-visual>:nth-child(1),.djs-connection.drop-ok .djs-visual>:nth-child(1){stroke:var(--shape-drop-allowed-fill-color)!important}.djs-connection.connect-not-ok .djs-visual>:nth-child(1),.djs-connection.drop-not-ok .djs-visual>:nth-child(1){stroke:var(--shape-drop-not-allowed-fill-color)!important}.drop-not-ok,.connect-not-ok{cursor:not-allowed}.djs-element.attach-ok .djs-visual>:nth-child(1){stroke-width:5px!important;stroke:var(--shape-attach-allowed-stroke-color)!important}.djs-frame.connect-not-ok .djs-visual>:nth-child(1),.djs-frame.drop-not-ok .djs-visual>:nth-child(1){stroke-width:3px!important;stroke:var(--shape-drop-not-allowed-fill-color)!important;fill:none!important}.djs-lasso-overlay{fill:var(--lasso-fill-color);stroke-dasharray:5 1 3 1;stroke:var(--lasso-stroke-color);shape-rendering:geometricPrecision;pointer-events:none}.djs-resize-overlay{fill:none;stroke-dasharray:5 1 3 1;stroke:var(--shape-resize-preview-stroke-color);pointer-events:none}.djs-resizer-hit{fill:none;pointer-events:all}.djs-resizer-visual{fill:var(--resizer-fill-color);stroke-width:1px;stroke-opacity:.5;stroke:var(--resizer-stroke-color);shape-rendering:geometricprecision}.djs-resizer:hover .djs-resizer-visual{stroke:var(--resizer-stroke-color);stroke-opacity:1}.djs-cursor-resize-ns,.djs-resizer-n,.djs-resizer-s{cursor:ns-resize}.djs-cursor-resize-ew,.djs-resizer-e,.djs-resizer-w{cursor:ew-resize}.djs-cursor-resize-nwse,.djs-resizer-nw,.djs-resizer-se{cursor:nwse-resize}.djs-cursor-resize-nesw,.djs-resizer-ne,.djs-resizer-sw{cursor:nesw-resize}.djs-shape.djs-resizing>.djs-outline{visibility:hidden!important}.djs-shape.djs-resizing>.djs-resizer{visibility:hidden}.djs-dragger>.djs-resizer{visibility:hidden}.djs-dragger *{fill:none!important;stroke:var(--element-dragger-color)!important}.djs-dragger tspan,.djs-dragger text{fill:var(--element-dragger-color)!important;stroke:none!important}marker.djs-dragger circle,marker.djs-dragger path,marker.djs-dragger polygon,marker.djs-dragger polyline,marker.djs-dragger rect{fill:var(--element-dragger-color)!important;stroke:none!important}marker.djs-dragger text,marker.djs-dragger tspan{fill:none!important;stroke:var(--element-dragger-color)!important}.djs-dragging{opacity:.3}.djs-dragging,.djs-dragging>*{pointer-events:none!important}.djs-dragging .djs-context-pad,.djs-dragging .djs-outline{display:none!important}.djs-visual,.djs-outline{pointer-events:none}.djs-element.attach-ok .djs-hit{stroke-width:60px!important}.djs-element>.djs-hit-all{pointer-events:all}.djs-element>.djs-hit-stroke,.djs-element>.djs-hit-click-stroke{pointer-events:stroke}.djs-drag-active .djs-element>.djs-hit-click-stroke{pointer-events:all}.djs-connection .djs-visual{stroke-width:2px;fill:none}.djs-cursor-grab{cursor:grab}.djs-cursor-grabbing{cursor:grabbing}.djs-cursor-crosshair{cursor:crosshair}.djs-cursor-move{cursor:move}.djs-cursor-resize-ns{cursor:ns-resize}.djs-cursor-resize-ew{cursor:ew-resize}.djs-snap-line{stroke:var(--snap-line-stroke-color);stroke-linecap:round;stroke-width:2px;pointer-events:none}.djs-crosshair{stroke:var(--space-tool-crosshair-stroke-color);stroke-linecap:round;stroke-width:1px;pointer-events:none;shape-rendering:crispEdges;stroke-dasharray:5,5}.djs-palette{position:absolute;left:20px;top:20px;box-sizing:border-box;width:48px}.djs-palette .separator{margin:0 5px;padding-top:5px;border:none;border-bottom:solid 1px var(--palette-separator-color);clear:both}.djs-palette .entry:before{vertical-align:text-bottom}.djs-palette .entry,.djs-palette .djs-palette-toggle{color:var(--palette-entry-color);font-size:30px;text-align:center}.djs-palette .djs-palette-toggle:hover{background:var(--palette-toggle-hover-background-color)}.djs-palette .entry:hover{color:var(--palette-entry-hover-color)}.djs-palette .highlighted-entry{color:var(--palette-entry-selected-color)!important}.djs-palette .entry,.djs-palette .djs-palette-toggle{width:46px;height:46px;line-height:46px;cursor:default}.djs-palette.two-column.open{width:94px}.djs-overlay-context-pad{width:72px;z-index:100}.djs-context-pad{position:absolute;display:none;pointer-events:none;line-height:1}.djs-context-pad .entry{width:22px;height:22px;text-align:center;display:inline-block;font-size:22px;margin:0 2px 2px 0;border-radius:3px;cursor:default;background-color:var(--context-pad-entry-background-color);box-shadow:0 0 2px 1px var(--context-pad-entry-background-color);pointer-events:all;vertical-align:middle}.djs-context-pad .entry:hover{background:var(--context-pad-entry-hover-background-color)}.djs-context-pad.open{display:block}.djs-popup .entry{line-height:20px;white-space:nowrap;cursor:default}.djs-popup .entry:before{vertical-align:middle;font-size:20px}.djs-popup .entry>span{vertical-align:middle;font-size:14px}.djs-popup .entry:hover,.djs-popup .entry.active:hover{background:var(--popup-header-entry-selected-background-color)}.djs-popup .entry.disabled{background:inherit}.djs-popup .djs-popup-header .entry{display:inline-block;padding:2px 3px;border:solid 1px transparent;border-radius:3px}.djs-popup .djs-popup-header .entry.active{color:var(--popup-header-entry-selected-color);border:solid 1px var(--popup-header-entry-selected-color);background-color:var(--popup-header-entry-selected-background-color)}.djs-popup-body .entry{padding:4px 10px 4px 5px}.djs-popup-body .entry>span{margin-left:5px}.djs-popup-body{background-color:var(--popup-body-background-color)}.djs-popup-header{border-bottom:1px solid var(--popup-header-separator-color)}.djs-popup-header .entry{margin:1px 1px 1px 3px}.djs-popup-header .entry:last-child{margin-right:3px}.djs-palette{background:var(--palette-background-color);border:solid 1px var(--palette-border-color);border-radius:2px}.djs-popup{background:var(--popup-background-color);border:solid 1px var(--popup-border-color);border-radius:2px}.djs-shape,.djs-connection{touch-action:none}.djs-segment-dragger,.djs-bendpoint{display:none}.djs-segment-dragger .djs-visual{display:none;fill:var(--bendpoint-fill-color);stroke:var(--bendpoint-stroke-color);stroke-width:1px;stroke-opacity:1}.djs-segment-dragger:hover .djs-visual{display:block}.djs-bendpoint .djs-visual{fill:var(--bendpoint-fill-color);stroke:var(--bendpoint-stroke-color);stroke-width:1px;stroke-opacity:.5}.djs-segment-dragger:hover,.djs-bendpoints.hover .djs-segment-dragger,.djs-bendpoints.selected .djs-segment-dragger,.djs-bendpoint:hover,.djs-bendpoints.hover .djs-bendpoint,.djs-bendpoints.selected .djs-bendpoint{display:block}.djs-drag-active .djs-bendpoints *{display:none}.djs-bendpoints:not(.hover) .floating{display:none}.djs-segment-dragger:hover .djs-visual,.djs-segment-dragger.djs-dragging .djs-visual,.djs-bendpoint:hover .djs-visual,.djs-bendpoint.floating .djs-visual{fill:var(--bendpoint-fill-color);stroke:var(--bendpoint-stroke-color);stroke-opacity:1}.djs-bendpoint.floating .djs-hit{pointer-events:none}.djs-segment-dragger .djs-hit,.djs-bendpoint .djs-hit{fill:none;pointer-events:all}.djs-segment-dragger.horizontal .djs-hit{cursor:ns-resize}.djs-segment-dragger.vertical .djs-hit{cursor:ew-resize}.djs-segment-dragger.djs-dragging .djs-hit{pointer-events:none}.djs-updating,.djs-updating>*{pointer-events:none!important}.djs-updating .djs-context-pad,.djs-updating .djs-outline,.djs-updating .djs-bendpoint,.connect-ok .djs-bendpoint,.connect-not-ok .djs-bendpoint,.drop-ok .djs-bendpoint,.drop-not-ok .djs-bendpoint{display:none!important}.djs-segment-dragger.djs-dragging,.djs-bendpoint.djs-dragging{display:block;opacity:1}.djs-tooltip-error{width:160px;padding:6px;background:var(--tooltip-error-background-color);border:solid 1px var(--tooltip-error-border-color);border-radius:2px;color:var(--tooltip-error-color);font-size:12px;line-height:16px;opacity:.75}.djs-tooltip-error:hover{opacity:1}.djs-search-container{position:absolute;top:20px;left:0;right:0;margin-left:auto;margin-right:auto;width:25%;min-width:300px;max-width:400px;z-index:10;font-size:1.05em;opacity:.9;background:var(--search-container-background-color);border:solid 1px var(--search-container-border-color);border-radius:2px;box-shadow:0 0 0 2px var(--search-container-box-shadow-color),0 0 0 1px var(--search-container-box-shadow-inset-color) inset}.djs-search-container:not(.open){display:none}.djs-search-input input{font-size:1.05em;width:100%;padding:6px 10px;border:1px solid var(--search-input-border-color);box-sizing:border-box}.djs-search-input input:focus{outline:none;border-color:var(--search-input-border-color)}.djs-search-results{position:relative;overflow-y:auto;max-height:200px}.djs-search-results:hover{cursor:pointer}.djs-search-result{width:100%;padding:6px 10px;background:#fff;border-bottom:solid 1px var(--search-result-border-color);border-radius:1px}.djs-search-highlight{color:var(--search-result-highlight-color)}.djs-search-result-primary{margin:0 0 10px}.djs-search-result-secondary{font-family:monospace;margin:0}.djs-search-result:hover,.djs-search-result-selected,.djs-search-result-selected:hover,.djs-search-overlay{background:var(--search-result-selected-color)}.djs-element-hidden,.djs-element-hidden .djs-hit,.djs-element-hidden .djs-outline,.djs-label-hidden .djs-label{display:none!important}@font-face{font-family:bpmn;src:url(bpmn.5d33bee45f1fb468.eot?26374340);src:url(bpmn.5d33bee45f1fb468.eot?26374340#iefix) format("embedded-opentype"),url(bpmn.67058807b4bcf238.woff2?26374340) format("woff2"),url(bpmn.e9e7d07618d46ca6.woff?26374340) format("woff"),url(bpmn.b5c9250d7d4947c4.ttf?26374340) format("truetype"),url(bpmn.74eea12b52b25cb2.svg?26374340#bpmn) format("svg");font-weight:400;font-style:normal}[class^=bpmn-icon-]:before,[class*=" bpmn-icon-"]:before{font-family:bpmn;font-style:normal;font-weight:400;speak:never;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bpmn-icon-screw-wrench:before{content:"\e800"}.bpmn-icon-trash:before{content:"\e801"}.bpmn-icon-conditional-flow:before{content:"\e802"}.bpmn-icon-default-flow:before{content:"\e803"}.bpmn-icon-gateway-parallel:before{content:"\e804"}.bpmn-icon-intermediate-event-catch-cancel:before{content:"\e805"}.bpmn-icon-intermediate-event-catch-non-interrupting-message:before{content:"\e806"}.bpmn-icon-start-event-compensation:before{content:"\e807"}.bpmn-icon-start-event-non-interrupting-parallel-multiple:before{content:"\e808"}.bpmn-icon-loop-marker:before{content:"\e809"}.bpmn-icon-parallel-mi-marker:before{content:"\e80a"}.bpmn-icon-start-event-non-interrupting-signal:before{content:"\e80b"}.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before{content:"\e80c"}.bpmn-icon-intermediate-event-catch-parallel-multiple:before{content:"\e80d"}.bpmn-icon-intermediate-event-catch-compensation:before{content:"\e80e"}.bpmn-icon-gateway-xor:before{content:"\e80f"}.bpmn-icon-connection:before{content:"\e810"}.bpmn-icon-end-event-cancel:before{content:"\e811"}.bpmn-icon-intermediate-event-catch-condition:before{content:"\e812"}.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before{content:"\e813"}.bpmn-icon-start-event-condition:before{content:"\e814"}.bpmn-icon-start-event-non-interrupting-timer:before{content:"\e815"}.bpmn-icon-sequential-mi-marker:before{content:"\e816"}.bpmn-icon-user-task:before{content:"\e817"}.bpmn-icon-business-rule:before{content:"\e818"}.bpmn-icon-sub-process-marker:before{content:"\e819"}.bpmn-icon-start-event-parallel-multiple:before{content:"\e81a"}.bpmn-icon-start-event-error:before{content:"\e81b"}.bpmn-icon-intermediate-event-catch-signal:before{content:"\e81c"}.bpmn-icon-intermediate-event-catch-error:before{content:"\e81d"}.bpmn-icon-end-event-compensation:before{content:"\e81e"}.bpmn-icon-subprocess-collapsed:before{content:"\e81f"}.bpmn-icon-subprocess-expanded:before{content:"\e820"}.bpmn-icon-task:before{content:"\e821"}.bpmn-icon-end-event-error:before{content:"\e822"}.bpmn-icon-intermediate-event-catch-escalation:before{content:"\e823"}.bpmn-icon-intermediate-event-catch-timer:before{content:"\e824"}.bpmn-icon-start-event-escalation:before{content:"\e825"}.bpmn-icon-start-event-signal:before{content:"\e826"}.bpmn-icon-business-rule-task:before{content:"\e827"}.bpmn-icon-manual:before{content:"\e828"}.bpmn-icon-receive:before{content:"\e829"}.bpmn-icon-call-activity:before{content:"\e82a"}.bpmn-icon-start-event-timer:before{content:"\e82b"}.bpmn-icon-start-event-message:before{content:"\e82c"}.bpmn-icon-intermediate-event-none:before{content:"\e82d"}.bpmn-icon-intermediate-event-catch-link:before{content:"\e82e"}.bpmn-icon-end-event-escalation:before{content:"\e82f"}.bpmn-icon-text-annotation:before{content:"\e830"}.bpmn-icon-bpmn-io:before{content:"\e831"}.bpmn-icon-gateway-complex:before{content:"\e832"}.bpmn-icon-gateway-eventbased:before{content:"\e833"}.bpmn-icon-gateway-none:before{content:"\e834"}.bpmn-icon-gateway-or:before{content:"\e835"}.bpmn-icon-end-event-terminate:before{content:"\e836"}.bpmn-icon-end-event-signal:before{content:"\e837"}.bpmn-icon-end-event-none:before{content:"\e838"}.bpmn-icon-end-event-multiple:before{content:"\e839"}.bpmn-icon-end-event-message:before{content:"\e83a"}.bpmn-icon-end-event-link:before{content:"\e83b"}.bpmn-icon-intermediate-event-catch-message:before{content:"\e83c"}.bpmn-icon-intermediate-event-throw-compensation:before{content:"\e83d"}.bpmn-icon-start-event-multiple:before{content:"\e83e"}.bpmn-icon-script:before{content:"\e83f"}.bpmn-icon-manual-task:before{content:"\e840"}.bpmn-icon-send:before{content:"\e841"}.bpmn-icon-service:before{content:"\e842"}.bpmn-icon-receive-task:before{content:"\e843"}.bpmn-icon-user:before{content:"\e844"}.bpmn-icon-start-event-none:before{content:"\e845"}.bpmn-icon-intermediate-event-throw-escalation:before{content:"\e846"}.bpmn-icon-intermediate-event-catch-multiple:before{content:"\e847"}.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before{content:"\e848"}.bpmn-icon-intermediate-event-throw-link:before{content:"\e849"}.bpmn-icon-start-event-non-interrupting-condition:before{content:"\e84a"}.bpmn-icon-data-object:before{content:"\e84b"}.bpmn-icon-script-task:before{content:"\e84c"}.bpmn-icon-send-task:before{content:"\e84d"}.bpmn-icon-data-store:before{content:"\e84e"}.bpmn-icon-start-event-non-interrupting-escalation:before{content:"\e84f"}.bpmn-icon-intermediate-event-throw-message:before{content:"\e850"}.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before{content:"\e851"}.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before{content:"\e852"}.bpmn-icon-intermediate-event-throw-multiple:before{content:"\e853"}.bpmn-icon-start-event-non-interrupting-message:before{content:"\e854"}.bpmn-icon-ad-hoc-marker:before{content:"\e855"}.bpmn-icon-service-task:before{content:"\e856"}.bpmn-icon-task-none:before{content:"\e857"}.bpmn-icon-compensation-marker:before{content:"\e858"}.bpmn-icon-start-event-non-interrupting-multiple:before{content:"\e859"}.bpmn-icon-intermediate-event-throw-signal:before{content:"\e85a"}.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before{content:"\e85b"}.bpmn-icon-participant:before{content:"\e85c"}.bpmn-icon-event-subprocess-expanded:before{content:"\e85d"}.bpmn-icon-lane-insert-below:before{content:"\e85e"}.bpmn-icon-space-tool:before{content:"\e85f"}.bpmn-icon-connection-multi:before{content:"\e860"}.bpmn-icon-lane:before{content:"\e861"}.bpmn-icon-lasso-tool:before{content:"\e862"}.bpmn-icon-lane-insert-above:before{content:"\e863"}.bpmn-icon-lane-divide-three:before{content:"\e864"}.bpmn-icon-lane-divide-two:before{content:"\e865"}.bpmn-icon-data-input:before{content:"\e866"}.bpmn-icon-data-output:before{content:"\e867"}.bpmn-icon-hand-tool:before{content:"\e868"}.bpmn-icon-group:before{content:"\e869"}.bpmn-icon-transaction:before{content:"\e8c4"}@font-face{font-family:Material Icons;font-style:normal;font-weight:400;font-display:block;src:url(material-icons.59322316b3fd6063.woff2) format("woff2"),url(material-icons.4ad034d2c499d9b6.woff) format("woff")}.material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Outlined;font-style:normal;font-weight:400;font-display:block;src:url(material-icons-outlined.f86cb7b0aa53f0fe.woff2) format("woff2"),url(material-icons-outlined.78a93b2079680a08.woff) format("woff")}.material-icons-outlined{font-family:Material Icons Outlined;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Round;font-style:normal;font-weight:400;font-display:block;src:url(material-icons-round.b10ec9db5b7fbc74.woff2) format("woff2"),url(material-icons-round.92dc7ca2f4c591e7.woff) format("woff")}.material-icons-round{font-family:Material Icons Round;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Sharp;font-style:normal;font-weight:400;font-display:block;src:url(material-icons-sharp.3885863ee4746422.woff2) format("woff2"),url(material-icons-sharp.a71cb2bf66c604de.woff) format("woff")}.material-icons-sharp{font-family:Material Icons Sharp;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Material Icons Two Tone;font-style:normal;font-weight:400;font-display:block;src:url(material-icons-two-tone.675bd578bd14533e.woff2) format("woff2"),url(material-icons-two-tone.588d63134de807a7.woff) format("woff")}.material-icons-two-tone{font-family:Material Icons Two Tone;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}html{--mat-badge-text-font: Roboto, sans-serif;--mat-badge-text-size: 12px;--mat-badge-text-weight: 600;--mat-badge-small-size-text-size: 9px;--mat-badge-large-size-text-size: 24px}.mat-h1,.mat-headline-5,.mat-typography .mat-h1,.mat-typography .mat-headline-5,.mat-typography h1{font:400 24px/32px Roboto,sans-serif;letter-spacing:normal;margin:0 0 16px}.mat-h2,.mat-headline-6,.mat-typography .mat-h2,.mat-typography .mat-headline-6,.mat-typography h2{font:500 20px/32px Roboto,sans-serif;letter-spacing:.0125em;margin:0 0 16px}.mat-h3,.mat-subtitle-1,.mat-typography .mat-h3,.mat-typography .mat-subtitle-1,.mat-typography h3{font:400 16px/28px Roboto,sans-serif;letter-spacing:.009375em;margin:0 0 16px}.mat-h4,.mat-body-1,.mat-typography .mat-h4,.mat-typography .mat-body-1,.mat-typography h4{font:400 16px/24px Roboto,sans-serif;letter-spacing:.03125em;margin:0 0 16px}.mat-h5,.mat-typography .mat-h5,.mat-typography h5{font:400 11.62px/20px Roboto,sans-serif;margin:0 0 12px}.mat-h6,.mat-typography .mat-h6,.mat-typography h6{font:400 9.38px/20px Roboto,sans-serif;margin:0 0 12px}.mat-body-strong,.mat-subtitle-2,.mat-typography .mat-body-strong,.mat-typography .mat-subtitle-2{font:500 14px/22px Roboto,sans-serif;letter-spacing:.0071428571em}.mat-body,.mat-body-2,.mat-typography .mat-body,.mat-typography .mat-body-2,.mat-typography{font:400 14px/20px Roboto,sans-serif;letter-spacing:.0178571429em}.mat-body p,.mat-body-2 p,.mat-typography .mat-body p,.mat-typography .mat-body-2 p,.mat-typography p{margin:0 0 12px}.mat-small,.mat-caption,.mat-typography .mat-small,.mat-typography .mat-caption{font:400 12px/20px Roboto,sans-serif;letter-spacing:.0333333333em}.mat-headline-1,.mat-typography .mat-headline-1{font:300 96px/96px Roboto,sans-serif;letter-spacing:-.015625em;margin:0 0 56px}.mat-headline-2,.mat-typography .mat-headline-2{font:300 60px/60px Roboto,sans-serif;letter-spacing:-.0083333333em;margin:0 0 64px}.mat-headline-3,.mat-typography .mat-headline-3{font:400 48px/50px Roboto,sans-serif;letter-spacing:normal;margin:0 0 64px}.mat-headline-4,.mat-typography .mat-headline-4{font:400 34px/40px Roboto,sans-serif;letter-spacing:.0073529412em;margin:0 0 64px}html{--mat-bottom-sheet-container-text-font: Roboto, sans-serif;--mat-bottom-sheet-container-text-line-height: 20px;--mat-bottom-sheet-container-text-size: 14px;--mat-bottom-sheet-container-text-tracking: .0178571429em;--mat-bottom-sheet-container-text-weight: 400}html{--mat-legacy-button-toggle-label-text-font: Roboto, sans-serif;--mat-legacy-button-toggle-label-text-line-height: 24px;--mat-legacy-button-toggle-label-text-size: 16px;--mat-legacy-button-toggle-label-text-tracking: .03125em;--mat-legacy-button-toggle-label-text-weight: 400;--mat-standard-button-toggle-label-text-font: Roboto, sans-serif;--mat-standard-button-toggle-label-text-line-height: 24px;--mat-standard-button-toggle-label-text-size: 16px;--mat-standard-button-toggle-label-text-tracking: .03125em;--mat-standard-button-toggle-label-text-weight: 400}html{--mat-datepicker-calendar-text-font: Roboto, sans-serif;--mat-datepicker-calendar-text-size: 13px;--mat-datepicker-calendar-body-label-text-size: 14px;--mat-datepicker-calendar-body-label-text-weight: 500;--mat-datepicker-calendar-period-button-text-size: 14px;--mat-datepicker-calendar-period-button-text-weight: 500;--mat-datepicker-calendar-header-text-size: 11px;--mat-datepicker-calendar-header-text-weight: 400}html{--mat-expansion-header-text-font: Roboto, sans-serif;--mat-expansion-header-text-size: 14px;--mat-expansion-header-text-weight: 500;--mat-expansion-header-text-line-height: inherit;--mat-expansion-header-text-tracking: inherit;--mat-expansion-container-text-font: Roboto, sans-serif;--mat-expansion-container-text-line-height: 20px;--mat-expansion-container-text-size: 14px;--mat-expansion-container-text-tracking: .0178571429em;--mat-expansion-container-text-weight: 400}html{--mat-grid-list-tile-header-primary-text-size: 14px;--mat-grid-list-tile-header-secondary-text-size: 12px;--mat-grid-list-tile-footer-primary-text-size: 14px;--mat-grid-list-tile-footer-secondary-text-size: 12px}html{--mat-stepper-container-text-font: Roboto, sans-serif;--mat-stepper-header-label-text-font: Roboto, sans-serif;--mat-stepper-header-label-text-size: 14px;--mat-stepper-header-label-text-weight: 400;--mat-stepper-header-error-state-label-text-size: 16px;--mat-stepper-header-selected-state-label-text-size: 16px;--mat-stepper-header-selected-state-label-text-weight: 400}html{--mat-toolbar-title-text-font: Roboto, sans-serif;--mat-toolbar-title-text-line-height: 32px;--mat-toolbar-title-text-size: 20px;--mat-toolbar-title-text-tracking: .0125em;--mat-toolbar-title-text-weight: 500}html{--mat-tree-node-text-font: Roboto, sans-serif;--mat-tree-node-text-size: 14px;--mat-tree-node-text-weight: 400}html{--mat-option-label-text-font: Roboto, sans-serif;--mat-option-label-text-line-height: 24px;--mat-option-label-text-size: 16px;--mat-option-label-text-tracking: .03125em;--mat-option-label-text-weight: 400}html{--mat-optgroup-label-text-font: Roboto, sans-serif;--mat-optgroup-label-text-line-height: 24px;--mat-optgroup-label-text-size: 16px;--mat-optgroup-label-text-tracking: .03125em;--mat-optgroup-label-text-weight: 400}html{--mat-card-title-text-font: Roboto, sans-serif;--mat-card-title-text-line-height: 32px;--mat-card-title-text-size: 20px;--mat-card-title-text-tracking: .0125em;--mat-card-title-text-weight: 500;--mat-card-subtitle-text-font: Roboto, sans-serif;--mat-card-subtitle-text-line-height: 22px;--mat-card-subtitle-text-size: 14px;--mat-card-subtitle-text-tracking: .0071428571em;--mat-card-subtitle-text-weight: 500}html{--mdc-plain-tooltip-supporting-text-font: Roboto, sans-serif;--mdc-plain-tooltip-supporting-text-size: 12px;--mdc-plain-tooltip-supporting-text-weight: 400;--mdc-plain-tooltip-supporting-text-tracking: .0333333333em}html{--mdc-filled-text-field-label-text-font: Roboto, sans-serif;--mdc-filled-text-field-label-text-size: 16px;--mdc-filled-text-field-label-text-tracking: .03125em;--mdc-filled-text-field-label-text-weight: 400;--mdc-outlined-text-field-label-text-font: Roboto, sans-serif;--mdc-outlined-text-field-label-text-size: 16px;--mdc-outlined-text-field-label-text-tracking: .03125em;--mdc-outlined-text-field-label-text-weight: 400;--mat-form-field-container-text-font: Roboto, sans-serif;--mat-form-field-container-text-line-height: 24px;--mat-form-field-container-text-size: 16px;--mat-form-field-container-text-tracking: .03125em;--mat-form-field-container-text-weight: 400;--mat-form-field-outlined-label-text-populated-size: 16px;--mat-form-field-subscript-text-font: Roboto, sans-serif;--mat-form-field-subscript-text-line-height: 20px;--mat-form-field-subscript-text-size: 12px;--mat-form-field-subscript-text-tracking: .0333333333em;--mat-form-field-subscript-text-weight: 400}html{--mat-select-trigger-text-font: Roboto, sans-serif;--mat-select-trigger-text-line-height: 24px;--mat-select-trigger-text-size: 16px;--mat-select-trigger-text-tracking: .03125em;--mat-select-trigger-text-weight: 400}html{--mdc-dialog-subhead-font: Roboto, sans-serif;--mdc-dialog-subhead-line-height: 32px;--mdc-dialog-subhead-size: 20px;--mdc-dialog-subhead-weight: 500;--mdc-dialog-subhead-tracking: .0125em;--mdc-dialog-supporting-text-font: Roboto, sans-serif;--mdc-dialog-supporting-text-line-height: 24px;--mdc-dialog-supporting-text-size: 16px;--mdc-dialog-supporting-text-weight: 400;--mdc-dialog-supporting-text-tracking: .03125em}.mat-mdc-standard-chip{--mdc-chip-label-text-font: Roboto, sans-serif;--mdc-chip-label-text-line-height: 20px;--mdc-chip-label-text-size: 14px;--mdc-chip-label-text-tracking: .0178571429em;--mdc-chip-label-text-weight: 400}html .mat-mdc-slide-toggle,.mat-mdc-radio-button{--mdc-form-field-label-text-font: Roboto, sans-serif;--mdc-form-field-label-text-line-height: 20px;--mdc-form-field-label-text-size: 14px;--mdc-form-field-label-text-tracking: .0178571429em;--mdc-form-field-label-text-weight: 400}html{--mdc-slider-label-label-text-font: Roboto, sans-serif;--mdc-slider-label-label-text-size: 14px;--mdc-slider-label-label-text-line-height: 22px;--mdc-slider-label-label-text-tracking: .0071428571em;--mdc-slider-label-label-text-weight: 500}html{--mat-menu-item-label-text-font: Roboto, sans-serif;--mat-menu-item-label-text-size: 16px;--mat-menu-item-label-text-tracking: .03125em;--mat-menu-item-label-text-line-height: 24px;--mat-menu-item-label-text-weight: 400}html{--mdc-list-list-item-label-text-font: Roboto, sans-serif;--mdc-list-list-item-label-text-line-height: 24px;--mdc-list-list-item-label-text-size: 16px;--mdc-list-list-item-label-text-tracking: .03125em;--mdc-list-list-item-label-text-weight: 400;--mdc-list-list-item-supporting-text-font: Roboto, sans-serif;--mdc-list-list-item-supporting-text-line-height: 20px;--mdc-list-list-item-supporting-text-size: 14px;--mdc-list-list-item-supporting-text-tracking: .0178571429em;--mdc-list-list-item-supporting-text-weight: 400;--mdc-list-list-item-trailing-supporting-text-font: Roboto, sans-serif;--mdc-list-list-item-trailing-supporting-text-line-height: 20px;--mdc-list-list-item-trailing-supporting-text-size: 12px;--mdc-list-list-item-trailing-supporting-text-tracking: .0333333333em;--mdc-list-list-item-trailing-supporting-text-weight: 400}.mdc-list-group__subheader{font:400 16px/28px Roboto,sans-serif;letter-spacing:.009375em}html{--mat-paginator-container-text-font: Roboto, sans-serif;--mat-paginator-container-text-line-height: 20px;--mat-paginator-container-text-size: 12px;--mat-paginator-container-text-tracking: .0333333333em;--mat-paginator-container-text-weight: 400;--mat-paginator-select-trigger-text-size: 12px}.mat-mdc-tab-header{--mat-tab-header-label-text-font: Roboto, sans-serif;--mat-tab-header-label-text-size: 14px;--mat-tab-header-label-text-tracking: .0892857143em;--mat-tab-header-label-text-line-height: 36px;--mat-tab-header-label-text-weight: 500}.mat-mdc-checkbox{--mdc-form-field-label-text-font: Roboto, sans-serif;--mdc-form-field-label-text-line-height: 20px;--mdc-form-field-label-text-size: 14px;--mdc-form-field-label-text-tracking: .0178571429em;--mdc-form-field-label-text-weight: 400}html{--mdc-text-button-label-text-font: Roboto, sans-serif;--mdc-text-button-label-text-size: 14px;--mdc-text-button-label-text-tracking: .0892857143em;--mdc-text-button-label-text-weight: 500;--mdc-text-button-label-text-transform: none;--mdc-filled-button-label-text-font: Roboto, sans-serif;--mdc-filled-button-label-text-size: 14px;--mdc-filled-button-label-text-tracking: .0892857143em;--mdc-filled-button-label-text-weight: 500;--mdc-filled-button-label-text-transform: none;--mdc-outlined-button-label-text-font: Roboto, sans-serif;--mdc-outlined-button-label-text-size: 14px;--mdc-outlined-button-label-text-tracking: .0892857143em;--mdc-outlined-button-label-text-weight: 500;--mdc-outlined-button-label-text-transform: none;--mdc-protected-button-label-text-font: Roboto, sans-serif;--mdc-protected-button-label-text-size: 14px;--mdc-protected-button-label-text-tracking: .0892857143em;--mdc-protected-button-label-text-weight: 500;--mdc-protected-button-label-text-transform: none}html{--mdc-extended-fab-label-text-font: Roboto, sans-serif;--mdc-extended-fab-label-text-size: 14px;--mdc-extended-fab-label-text-tracking: .0892857143em;--mdc-extended-fab-label-text-weight: 500}html{--mdc-snackbar-supporting-text-font: Roboto, sans-serif;--mdc-snackbar-supporting-text-line-height: 20px;--mdc-snackbar-supporting-text-size: 14px;--mdc-snackbar-supporting-text-weight: 400}html{--mat-table-header-headline-font: Roboto, sans-serif;--mat-table-header-headline-line-height: 22px;--mat-table-header-headline-size: 14px;--mat-table-header-headline-weight: 500;--mat-table-header-headline-tracking: .0071428571em;--mat-table-row-item-label-text-font: Roboto, sans-serif;--mat-table-row-item-label-text-line-height: 20px;--mat-table-row-item-label-text-size: 14px;--mat-table-row-item-label-text-weight: 400;--mat-table-row-item-label-text-tracking: .0178571429em;--mat-table-footer-supporting-text-font: Roboto, sans-serif;--mat-table-footer-supporting-text-line-height: 20px;--mat-table-footer-supporting-text-size: 14px;--mat-table-footer-supporting-text-weight: 400;--mat-table-footer-supporting-text-tracking: .0178571429em}.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0);background-color:var(--mat-ripple-color, rgba(0, 0, 0, .1))}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-app-background{background-color:var(--mat-app-background-color, transparent);color:var(--mat-app-text-color, inherit)}html{--mat-ripple-color: rgba(0, 0, 0, .1)}html{--mat-option-selected-state-label-text-color: #00bcd4;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-accent{--mat-option-selected-state-label-text-color: #ff4081;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-warn{--mat-option-selected-state-label-text-color: #f44336;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}html{--mat-optgroup-label-text-color: rgba(0, 0, 0, .87)}.mat-primary{--mat-full-pseudo-checkbox-selected-icon-color: #00bcd4;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #00bcd4;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}html,.mat-accent{--mat-full-pseudo-checkbox-selected-icon-color: #ff4081;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #ff4081;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}.mat-warn{--mat-full-pseudo-checkbox-selected-icon-color: #f44336;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #f44336;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}html{--mat-app-background-color: #fafafa;--mat-app-text-color: rgba(0, 0, 0, .87)}.mat-elevation-z0,.mat-mdc-elevation-specific.mat-elevation-z0{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.mat-elevation-z1,.mat-mdc-elevation-specific.mat-elevation-z1{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.mat-elevation-z2,.mat-mdc-elevation-specific.mat-elevation-z2{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-elevation-z3,.mat-mdc-elevation-specific.mat-elevation-z3{box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f}.mat-elevation-z4,.mat-mdc-elevation-specific.mat-elevation-z4{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.mat-elevation-z5,.mat-mdc-elevation-specific.mat-elevation-z5{box-shadow:0 3px 5px -1px #0003,0 5px 8px #00000024,0 1px 14px #0000001f}.mat-elevation-z6,.mat-mdc-elevation-specific.mat-elevation-z6{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.mat-elevation-z7,.mat-mdc-elevation-specific.mat-elevation-z7{box-shadow:0 4px 5px -2px #0003,0 7px 10px 1px #00000024,0 2px 16px 1px #0000001f}.mat-elevation-z8,.mat-mdc-elevation-specific.mat-elevation-z8{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.mat-elevation-z9,.mat-mdc-elevation-specific.mat-elevation-z9{box-shadow:0 5px 6px -3px #0003,0 9px 12px 1px #00000024,0 3px 16px 2px #0000001f}.mat-elevation-z10,.mat-mdc-elevation-specific.mat-elevation-z10{box-shadow:0 6px 6px -3px #0003,0 10px 14px 1px #00000024,0 4px 18px 3px #0000001f}.mat-elevation-z11,.mat-mdc-elevation-specific.mat-elevation-z11{box-shadow:0 6px 7px -4px #0003,0 11px 15px 1px #00000024,0 4px 20px 3px #0000001f}.mat-elevation-z12,.mat-mdc-elevation-specific.mat-elevation-z12{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.mat-elevation-z13,.mat-mdc-elevation-specific.mat-elevation-z13{box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.mat-elevation-z14,.mat-mdc-elevation-specific.mat-elevation-z14{box-shadow:0 7px 9px -4px #0003,0 14px 21px 2px #00000024,0 5px 26px 4px #0000001f}.mat-elevation-z15,.mat-mdc-elevation-specific.mat-elevation-z15{box-shadow:0 8px 9px -5px #0003,0 15px 22px 2px #00000024,0 6px 28px 5px #0000001f}.mat-elevation-z16,.mat-mdc-elevation-specific.mat-elevation-z16{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.mat-elevation-z17,.mat-mdc-elevation-specific.mat-elevation-z17{box-shadow:0 8px 11px -5px #0003,0 17px 26px 2px #00000024,0 6px 32px 5px #0000001f}.mat-elevation-z18,.mat-mdc-elevation-specific.mat-elevation-z18{box-shadow:0 9px 11px -5px #0003,0 18px 28px 2px #00000024,0 7px 34px 6px #0000001f}.mat-elevation-z19,.mat-mdc-elevation-specific.mat-elevation-z19{box-shadow:0 9px 12px -6px #0003,0 19px 29px 2px #00000024,0 7px 36px 6px #0000001f}.mat-elevation-z20,.mat-mdc-elevation-specific.mat-elevation-z20{box-shadow:0 10px 13px -6px #0003,0 20px 31px 3px #00000024,0 8px 38px 7px #0000001f}.mat-elevation-z21,.mat-mdc-elevation-specific.mat-elevation-z21{box-shadow:0 10px 13px -6px #0003,0 21px 33px 3px #00000024,0 8px 40px 7px #0000001f}.mat-elevation-z22,.mat-mdc-elevation-specific.mat-elevation-z22{box-shadow:0 10px 14px -6px #0003,0 22px 35px 3px #00000024,0 8px 42px 7px #0000001f}.mat-elevation-z23,.mat-mdc-elevation-specific.mat-elevation-z23{box-shadow:0 11px 14px -7px #0003,0 23px 36px 3px #00000024,0 9px 44px 8px #0000001f}.mat-elevation-z24,.mat-mdc-elevation-specific.mat-elevation-z24{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.mat-theme-loaded-marker{display:none}html{--mdc-elevated-card-container-shape: 4px;--mdc-outlined-card-container-shape: 4px;--mdc-outlined-card-outline-width: 1px}html{--mdc-elevated-card-container-color: white;--mdc-elevated-card-container-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-outlined-card-container-color: white;--mdc-outlined-card-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-card-container-elevation: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-card-subtitle-text-color: rgba(0, 0, 0, .54)}html{--mdc-linear-progress-active-indicator-height: 4px;--mdc-linear-progress-track-height: 4px;--mdc-linear-progress-track-shape: 0}.mat-mdc-progress-bar{--mdc-linear-progress-active-indicator-color: #00bcd4;--mdc-linear-progress-track-color: rgba(0, 188, 212, .25)}.mat-mdc-progress-bar.mat-accent{--mdc-linear-progress-active-indicator-color: #ff4081;--mdc-linear-progress-track-color: rgba(255, 64, 129, .25)}.mat-mdc-progress-bar.mat-warn{--mdc-linear-progress-active-indicator-color: #f44336;--mdc-linear-progress-track-color: rgba(244, 67, 54, .25)}html{--mdc-plain-tooltip-container-shape: 4px;--mdc-plain-tooltip-supporting-text-line-height: 16px}html{--mdc-plain-tooltip-container-color: #616161;--mdc-plain-tooltip-supporting-text-color: #fff}html{--mdc-filled-text-field-active-indicator-height: 1px;--mdc-filled-text-field-focus-active-indicator-height: 2px;--mdc-filled-text-field-container-shape: 4px;--mdc-outlined-text-field-outline-width: 1px;--mdc-outlined-text-field-focus-outline-width: 2px;--mdc-outlined-text-field-container-shape: 4px}html{--mdc-filled-text-field-caret-color: #00bcd4;--mdc-filled-text-field-focus-active-indicator-color: #00bcd4;--mdc-filled-text-field-focus-label-text-color: rgba(0, 188, 212, .87);--mdc-filled-text-field-container-color: whitesmoke;--mdc-filled-text-field-disabled-container-color: #fafafa;--mdc-filled-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-hover-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-error-hover-label-text-color: #f44336;--mdc-filled-text-field-error-focus-label-text-color: #f44336;--mdc-filled-text-field-error-label-text-color: #f44336;--mdc-filled-text-field-error-caret-color: #f44336;--mdc-filled-text-field-active-indicator-color: rgba(0, 0, 0, .42);--mdc-filled-text-field-disabled-active-indicator-color: rgba(0, 0, 0, .06);--mdc-filled-text-field-hover-active-indicator-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-error-active-indicator-color: #f44336;--mdc-filled-text-field-error-focus-active-indicator-color: #f44336;--mdc-filled-text-field-error-hover-active-indicator-color: #f44336;--mdc-outlined-text-field-caret-color: #00bcd4;--mdc-outlined-text-field-focus-outline-color: #00bcd4;--mdc-outlined-text-field-focus-label-text-color: rgba(0, 188, 212, .87);--mdc-outlined-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-hover-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-error-caret-color: #f44336;--mdc-outlined-text-field-error-focus-label-text-color: #f44336;--mdc-outlined-text-field-error-label-text-color: #f44336;--mdc-outlined-text-field-error-hover-label-text-color: #f44336;--mdc-outlined-text-field-outline-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-disabled-outline-color: rgba(0, 0, 0, .06);--mdc-outlined-text-field-hover-outline-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-error-focus-outline-color: #f44336;--mdc-outlined-text-field-error-hover-outline-color: #f44336;--mdc-outlined-text-field-error-outline-color: #f44336;--mat-form-field-focus-select-arrow-color: rgba(0, 188, 212, .87);--mat-form-field-disabled-input-text-placeholder-color: rgba(0, 0, 0, .38);--mat-form-field-state-layer-color: rgba(0, 0, 0, .87);--mat-form-field-error-text-color: #f44336;--mat-form-field-select-option-text-color: inherit;--mat-form-field-select-disabled-option-text-color: GrayText;--mat-form-field-leading-icon-color: unset;--mat-form-field-disabled-leading-icon-color: unset;--mat-form-field-trailing-icon-color: unset;--mat-form-field-disabled-trailing-icon-color: unset;--mat-form-field-error-focus-trailing-icon-color: unset;--mat-form-field-error-hover-trailing-icon-color: unset;--mat-form-field-error-trailing-icon-color: unset;--mat-form-field-enabled-select-arrow-color: rgba(0, 0, 0, .54);--mat-form-field-disabled-select-arrow-color: rgba(0, 0, 0, .38);--mat-form-field-hover-state-layer-opacity: .04;--mat-form-field-focus-state-layer-opacity: .08}.mat-mdc-form-field.mat-accent{--mdc-filled-text-field-caret-color: #ff4081;--mdc-filled-text-field-focus-active-indicator-color: #ff4081;--mdc-filled-text-field-focus-label-text-color: rgba(255, 64, 129, .87);--mdc-outlined-text-field-caret-color: #ff4081;--mdc-outlined-text-field-focus-outline-color: #ff4081;--mdc-outlined-text-field-focus-label-text-color: rgba(255, 64, 129, .87);--mat-form-field-focus-select-arrow-color: rgba(255, 64, 129, .87)}.mat-mdc-form-field.mat-warn{--mdc-filled-text-field-caret-color: #f44336;--mdc-filled-text-field-focus-active-indicator-color: #f44336;--mdc-filled-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mdc-outlined-text-field-caret-color: #f44336;--mdc-outlined-text-field-focus-outline-color: #f44336;--mdc-outlined-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mat-form-field-focus-select-arrow-color: rgba(244, 67, 54, .87)}html{--mat-form-field-container-height: 56px;--mat-form-field-filled-label-display: block;--mat-form-field-container-vertical-padding: 16px;--mat-form-field-filled-with-label-container-padding-top: 24px;--mat-form-field-filled-with-label-container-padding-bottom: 8px}html{--mat-select-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12)}html{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(0, 188, 212, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html .mat-mdc-form-field.mat-accent{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(255, 64, 129, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html .mat-mdc-form-field.mat-warn{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(244, 67, 54, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html{--mat-select-arrow-transform: translateY(-8px)}html{--mat-autocomplete-container-shape: 4px;--mat-autocomplete-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12)}html{--mat-autocomplete-background-color: white}html{--mdc-dialog-container-elevation-shadow: 0px 11px 15px -7px rgba(0, 0, 0, .2), 0px 24px 38px 3px rgba(0, 0, 0, .14), 0px 9px 46px 8px rgba(0, 0, 0, .12);--mdc-dialog-container-shadow-color: #000;--mdc-dialog-container-shape: 4px;--mat-dialog-container-max-width: 80vw;--mat-dialog-container-small-max-width: 80vw;--mat-dialog-container-min-width: 0;--mat-dialog-actions-alignment: start;--mat-dialog-actions-padding: 8px;--mat-dialog-content-padding: 20px 24px;--mat-dialog-with-actions-content-padding: 20px 24px;--mat-dialog-headline-padding: 0 24px 9px}html{--mdc-dialog-container-color: white;--mdc-dialog-subhead-color: rgba(0, 0, 0, .87);--mdc-dialog-supporting-text-color: rgba(0, 0, 0, .6)}.mat-mdc-standard-chip{--mdc-chip-container-shape-family: rounded;--mdc-chip-container-shape-radius: 16px 16px 16px 16px;--mdc-chip-with-avatar-avatar-shape-family: rounded;--mdc-chip-with-avatar-avatar-shape-radius: 14px 14px 14px 14px;--mdc-chip-with-avatar-avatar-size: 28px;--mdc-chip-with-icon-icon-size: 18px;--mdc-chip-outline-width: 0;--mdc-chip-outline-color: transparent;--mdc-chip-disabled-outline-color: transparent;--mdc-chip-focus-outline-color: transparent;--mdc-chip-hover-state-layer-opacity: .04;--mdc-chip-with-avatar-disabled-avatar-opacity: 1;--mdc-chip-flat-selected-outline-width: 0;--mdc-chip-selected-hover-state-layer-opacity: .04;--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity: 1;--mdc-chip-with-icon-disabled-icon-opacity: 1;--mat-chip-disabled-container-opacity: .4;--mat-chip-trailing-action-opacity: .54;--mat-chip-trailing-action-focus-opacity: 1;--mat-chip-trailing-action-state-layer-color: transparent;--mat-chip-selected-trailing-action-state-layer-color: transparent;--mat-chip-trailing-action-hover-state-layer-opacity: 0;--mat-chip-trailing-action-focus-state-layer-opacity: 0}.mat-mdc-standard-chip{--mdc-chip-disabled-label-text-color: #212121;--mdc-chip-elevated-container-color: #e0e0e0;--mdc-chip-elevated-selected-container-color: #e0e0e0;--mdc-chip-elevated-disabled-container-color: #e0e0e0;--mdc-chip-flat-disabled-selected-container-color: #e0e0e0;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: #212121;--mdc-chip-selected-label-text-color: #212121;--mdc-chip-with-icon-icon-color: #212121;--mdc-chip-with-icon-disabled-icon-color: #212121;--mdc-chip-with-icon-selected-icon-color: #212121;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: #212121;--mdc-chip-with-trailing-icon-trailing-icon-color: #212121;--mat-chip-selected-disabled-trailing-icon-color: #212121;--mat-chip-selected-trailing-icon-color: #212121}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-primary,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-primary{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #00bcd4;--mdc-chip-elevated-selected-container-color: #00bcd4;--mdc-chip-elevated-disabled-container-color: #00bcd4;--mdc-chip-flat-disabled-selected-container-color: #00bcd4;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-selected-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white;--mat-chip-selected-disabled-trailing-icon-color: white;--mat-chip-selected-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-accent,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-accent{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #ff4081;--mdc-chip-elevated-selected-container-color: #ff4081;--mdc-chip-elevated-disabled-container-color: #ff4081;--mdc-chip-flat-disabled-selected-container-color: #ff4081;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-selected-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white;--mat-chip-selected-disabled-trailing-icon-color: white;--mat-chip-selected-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-warn,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-warn{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #f44336;--mdc-chip-elevated-selected-container-color: #f44336;--mdc-chip-elevated-disabled-container-color: #f44336;--mdc-chip-flat-disabled-selected-container-color: #f44336;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-selected-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white;--mat-chip-selected-disabled-trailing-icon-color: white;--mat-chip-selected-trailing-icon-color: white}.mat-mdc-chip.mat-mdc-standard-chip{--mdc-chip-container-height: 32px}html{--mdc-switch-disabled-selected-icon-opacity: .38;--mdc-switch-disabled-track-opacity: .12;--mdc-switch-disabled-unselected-icon-opacity: .38;--mdc-switch-handle-height: 20px;--mdc-switch-handle-shape: 10px;--mdc-switch-handle-width: 20px;--mdc-switch-selected-icon-size: 18px;--mdc-switch-track-height: 14px;--mdc-switch-track-shape: 7px;--mdc-switch-track-width: 36px;--mdc-switch-unselected-icon-size: 18px;--mdc-switch-selected-focus-state-layer-opacity: .12;--mdc-switch-selected-hover-state-layer-opacity: .04;--mdc-switch-selected-pressed-state-layer-opacity: .1;--mdc-switch-unselected-focus-state-layer-opacity: .12;--mdc-switch-unselected-hover-state-layer-opacity: .04;--mdc-switch-unselected-pressed-state-layer-opacity: .1;--mat-switch-disabled-selected-handle-opacity: .38;--mat-switch-disabled-unselected-handle-opacity: .38;--mat-switch-unselected-handle-size: 20px;--mat-switch-selected-handle-size: 20px;--mat-switch-pressed-handle-size: 20px;--mat-switch-with-icon-handle-size: 20px;--mat-switch-selected-handle-horizontal-margin: 0;--mat-switch-selected-with-icon-handle-horizontal-margin: 0;--mat-switch-selected-pressed-handle-horizontal-margin: 0;--mat-switch-unselected-handle-horizontal-margin: 0;--mat-switch-unselected-with-icon-handle-horizontal-margin: 0;--mat-switch-unselected-pressed-handle-horizontal-margin: 0;--mat-switch-visible-track-opacity: 1;--mat-switch-hidden-track-opacity: 1;--mat-switch-visible-track-transition: transform 75ms 0ms cubic-bezier(0, 0, .2, 1);--mat-switch-hidden-track-transition: transform 75ms 0ms cubic-bezier(.4, 0, .6, 1);--mat-switch-track-outline-width: 1px;--mat-switch-track-outline-color: transparent;--mat-switch-selected-track-outline-width: 1px;--mat-switch-disabled-unselected-track-outline-width: 1px;--mat-switch-disabled-unselected-track-outline-color: transparent}html{--mdc-switch-selected-focus-state-layer-color: #00acc1;--mdc-switch-selected-handle-color: #00acc1;--mdc-switch-selected-hover-state-layer-color: #00acc1;--mdc-switch-selected-pressed-state-layer-color: #00acc1;--mdc-switch-selected-focus-handle-color: #006064;--mdc-switch-selected-hover-handle-color: #006064;--mdc-switch-selected-pressed-handle-color: #006064;--mdc-switch-selected-focus-track-color: #4dd0e1;--mdc-switch-selected-hover-track-color: #4dd0e1;--mdc-switch-selected-pressed-track-color: #4dd0e1;--mdc-switch-selected-track-color: #4dd0e1;--mdc-switch-disabled-selected-handle-color: #424242;--mdc-switch-disabled-selected-icon-color: #fff;--mdc-switch-disabled-selected-track-color: #424242;--mdc-switch-disabled-unselected-handle-color: #424242;--mdc-switch-disabled-unselected-icon-color: #fff;--mdc-switch-disabled-unselected-track-color: #424242;--mdc-switch-handle-surface-color: var(--mdc-theme-surface, #fff);--mdc-switch-handle-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-switch-handle-shadow-color: black;--mdc-switch-disabled-handle-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-switch-selected-icon-color: #fff;--mdc-switch-unselected-focus-handle-color: #212121;--mdc-switch-unselected-focus-state-layer-color: #424242;--mdc-switch-unselected-focus-track-color: #e0e0e0;--mdc-switch-unselected-handle-color: #616161;--mdc-switch-unselected-hover-handle-color: #212121;--mdc-switch-unselected-hover-state-layer-color: #424242;--mdc-switch-unselected-hover-track-color: #e0e0e0;--mdc-switch-unselected-icon-color: #fff;--mdc-switch-unselected-pressed-handle-color: #212121;--mdc-switch-unselected-pressed-state-layer-color: #424242;--mdc-switch-unselected-pressed-track-color: #e0e0e0;--mdc-switch-unselected-track-color: #e0e0e0;--mdc-switch-disabled-label-text-color: rgba(0, 0, 0, .38)}html .mat-mdc-slide-toggle{--mdc-form-field-label-text-color: rgba(0, 0, 0, .87)}html .mat-mdc-slide-toggle.mat-accent{--mdc-switch-selected-focus-state-layer-color: #d81b60;--mdc-switch-selected-handle-color: #d81b60;--mdc-switch-selected-hover-state-layer-color: #d81b60;--mdc-switch-selected-pressed-state-layer-color: #d81b60;--mdc-switch-selected-focus-handle-color: #880e4f;--mdc-switch-selected-hover-handle-color: #880e4f;--mdc-switch-selected-pressed-handle-color: #880e4f;--mdc-switch-selected-focus-track-color: #f06292;--mdc-switch-selected-hover-track-color: #f06292;--mdc-switch-selected-pressed-track-color: #f06292;--mdc-switch-selected-track-color: #f06292}html .mat-mdc-slide-toggle.mat-warn{--mdc-switch-selected-focus-state-layer-color: #e53935;--mdc-switch-selected-handle-color: #e53935;--mdc-switch-selected-hover-state-layer-color: #e53935;--mdc-switch-selected-pressed-state-layer-color: #e53935;--mdc-switch-selected-focus-handle-color: #b71c1c;--mdc-switch-selected-hover-handle-color: #b71c1c;--mdc-switch-selected-pressed-handle-color: #b71c1c;--mdc-switch-selected-focus-track-color: #e57373;--mdc-switch-selected-hover-track-color: #e57373;--mdc-switch-selected-pressed-track-color: #e57373;--mdc-switch-selected-track-color: #e57373}html{--mdc-switch-state-layer-size: 40px}html{--mdc-radio-disabled-selected-icon-opacity: .38;--mdc-radio-disabled-unselected-icon-opacity: .38;--mdc-radio-state-layer-size: 40px}.mat-mdc-radio-button{--mdc-form-field-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-radio-button.mat-primary{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #00bcd4;--mdc-radio-selected-hover-icon-color: #00bcd4;--mdc-radio-selected-icon-color: #00bcd4;--mdc-radio-selected-pressed-icon-color: #00bcd4;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #00bcd4;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-accent{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #ff4081;--mdc-radio-selected-hover-icon-color: #ff4081;--mdc-radio-selected-icon-color: #ff4081;--mdc-radio-selected-pressed-icon-color: #ff4081;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #ff4081;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-warn{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #f44336;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}html{--mdc-radio-state-layer-size: 40px;--mat-radio-touch-target-display: block}html{--mat-slider-value-indicator-width: auto;--mat-slider-value-indicator-height: 32px;--mat-slider-value-indicator-caret-display: block;--mat-slider-value-indicator-border-radius: 4px;--mat-slider-value-indicator-padding: 0 12px;--mat-slider-value-indicator-text-transform: none;--mat-slider-value-indicator-container-transform: translateX(-50%);--mdc-slider-active-track-height: 6px;--mdc-slider-active-track-shape: 9999px;--mdc-slider-handle-height: 20px;--mdc-slider-handle-shape: 50%;--mdc-slider-handle-width: 20px;--mdc-slider-inactive-track-height: 4px;--mdc-slider-inactive-track-shape: 9999px;--mdc-slider-with-overlap-handle-outline-width: 1px;--mdc-slider-with-tick-marks-active-container-opacity: .6;--mdc-slider-with-tick-marks-container-shape: 50%;--mdc-slider-with-tick-marks-container-size: 2px;--mdc-slider-with-tick-marks-inactive-container-opacity: .6}html{--mdc-slider-handle-color: #00bcd4;--mdc-slider-focus-handle-color: #00bcd4;--mdc-slider-hover-handle-color: #00bcd4;--mdc-slider-active-track-color: #00bcd4;--mdc-slider-inactive-track-color: #00bcd4;--mdc-slider-with-tick-marks-inactive-container-color: #00bcd4;--mdc-slider-with-tick-marks-active-container-color: white;--mdc-slider-disabled-active-track-color: #000;--mdc-slider-disabled-handle-color: #000;--mdc-slider-disabled-inactive-track-color: #000;--mdc-slider-label-container-color: #000;--mdc-slider-label-label-text-color: #fff;--mdc-slider-with-overlap-handle-outline-color: #fff;--mdc-slider-with-tick-marks-disabled-container-color: #000;--mdc-slider-handle-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-slider-ripple-color: #00bcd4;--mat-slider-hover-state-layer-color: rgba(0, 188, 212, .05);--mat-slider-focus-state-layer-color: rgba(0, 188, 212, .2);--mat-slider-value-indicator-opacity: .6}html .mat-accent{--mat-slider-ripple-color: #ff4081;--mat-slider-hover-state-layer-color: rgba(255, 64, 129, .05);--mat-slider-focus-state-layer-color: rgba(255, 64, 129, .2);--mdc-slider-handle-color: #ff4081;--mdc-slider-focus-handle-color: #ff4081;--mdc-slider-hover-handle-color: #ff4081;--mdc-slider-active-track-color: #ff4081;--mdc-slider-inactive-track-color: #ff4081;--mdc-slider-with-tick-marks-inactive-container-color: #ff4081;--mdc-slider-with-tick-marks-active-container-color: white}html .mat-warn{--mat-slider-ripple-color: #f44336;--mat-slider-hover-state-layer-color: rgba(244, 67, 54, .05);--mat-slider-focus-state-layer-color: rgba(244, 67, 54, .2);--mdc-slider-handle-color: #f44336;--mdc-slider-focus-handle-color: #f44336;--mdc-slider-hover-handle-color: #f44336;--mdc-slider-active-track-color: #f44336;--mdc-slider-inactive-track-color: #f44336;--mdc-slider-with-tick-marks-inactive-container-color: #f44336;--mdc-slider-with-tick-marks-active-container-color: white}html{--mat-menu-container-shape: 4px;--mat-menu-divider-bottom-spacing: 0;--mat-menu-divider-top-spacing: 0;--mat-menu-item-spacing: 16px;--mat-menu-item-icon-size: 24px;--mat-menu-item-leading-spacing: 16px;--mat-menu-item-trailing-spacing: 16px;--mat-menu-item-with-icon-leading-spacing: 16px;--mat-menu-item-with-icon-trailing-spacing: 16px}html{--mat-menu-item-label-text-color: rgba(0, 0, 0, .87);--mat-menu-item-icon-color: rgba(0, 0, 0, .87);--mat-menu-item-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-item-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-container-color: white;--mat-menu-divider-color: rgba(0, 0, 0, .12)}html{--mdc-list-list-item-container-shape: 0;--mdc-list-list-item-leading-avatar-shape: 50%;--mdc-list-list-item-container-color: transparent;--mdc-list-list-item-selected-container-color: transparent;--mdc-list-list-item-leading-avatar-color: transparent;--mdc-list-list-item-leading-icon-size: 24px;--mdc-list-list-item-leading-avatar-size: 40px;--mdc-list-list-item-trailing-icon-size: 24px;--mdc-list-list-item-disabled-state-layer-color: transparent;--mdc-list-list-item-disabled-state-layer-opacity: 0;--mdc-list-list-item-disabled-label-text-opacity: .38;--mdc-list-list-item-disabled-leading-icon-opacity: .38;--mdc-list-list-item-disabled-trailing-icon-opacity: .38;--mat-list-active-indicator-color: transparent;--mat-list-active-indicator-shape: 0}html{--mdc-list-list-item-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-supporting-text-color: rgba(0, 0, 0, .54);--mdc-list-list-item-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-supporting-text-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-selected-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-disabled-label-text-color: black;--mdc-list-list-item-disabled-leading-icon-color: black;--mdc-list-list-item-disabled-trailing-icon-color: black;--mdc-list-list-item-hover-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-hover-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-focus-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-state-layer-color: black;--mdc-list-list-item-hover-state-layer-opacity: .04;--mdc-list-list-item-focus-state-layer-color: black;--mdc-list-list-item-focus-state-layer-opacity: .12}.mdc-list-item__start,.mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #00bcd4;--mdc-radio-selected-hover-icon-color: #00bcd4;--mdc-radio-selected-icon-color: #00bcd4;--mdc-radio-selected-pressed-icon-color: #00bcd4}.mat-accent .mdc-list-item__start,.mat-accent .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #ff4081;--mdc-radio-selected-hover-icon-color: #ff4081;--mdc-radio-selected-icon-color: #ff4081;--mdc-radio-selected-pressed-icon-color: #ff4081}.mat-warn .mdc-list-item__start,.mat-warn .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336}.mat-mdc-list-option{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #00bcd4;--mdc-checkbox-selected-hover-icon-color: #00bcd4;--mdc-checkbox-selected-icon-color: #00bcd4;--mdc-checkbox-selected-pressed-icon-color: #00bcd4;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #00bcd4;--mdc-checkbox-selected-hover-state-layer-color: #00bcd4;--mdc-checkbox-selected-pressed-state-layer-color: #00bcd4;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-accent{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #ff4081;--mdc-checkbox-selected-hover-icon-color: #ff4081;--mdc-checkbox-selected-icon-color: #ff4081;--mdc-checkbox-selected-pressed-icon-color: #ff4081;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #ff4081;--mdc-checkbox-selected-hover-state-layer-color: #ff4081;--mdc-checkbox-selected-pressed-state-layer-color: #ff4081;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-warn{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#00bcd4}.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__content,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__end{opacity:1}html{--mdc-list-list-item-one-line-container-height: 48px;--mdc-list-list-item-two-line-container-height: 64px;--mdc-list-list-item-three-line-container-height: 88px;--mat-list-list-item-leading-icon-start-space: 16px;--mat-list-list-item-leading-icon-end-space: 32px}.mdc-list-item__start,.mdc-list-item__end{--mdc-radio-state-layer-size: 40px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}html{--mat-paginator-container-text-color: rgba(0, 0, 0, .87);--mat-paginator-container-background-color: white;--mat-paginator-enabled-icon-color: rgba(0, 0, 0, .54);--mat-paginator-disabled-icon-color: rgba(0, 0, 0, .12)}html{--mat-paginator-container-size: 56px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px}html{--mdc-tab-indicator-active-indicator-height: 2px;--mdc-tab-indicator-active-indicator-shape: 0;--mdc-secondary-navigation-tab-container-height: 48px;--mat-tab-header-divider-color: transparent;--mat-tab-header-divider-height: 0}.mat-mdc-tab-group,.mat-mdc-tab-nav-bar{--mdc-tab-indicator-active-indicator-color: #00bcd4;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: black;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #00bcd4;--mat-tab-header-active-ripple-color: #00bcd4;--mat-tab-header-inactive-ripple-color: #00bcd4;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #00bcd4;--mat-tab-header-active-hover-label-text-color: #00bcd4;--mat-tab-header-active-focus-indicator-color: #00bcd4;--mat-tab-header-active-hover-indicator-color: #00bcd4}.mat-mdc-tab-group.mat-accent,.mat-mdc-tab-nav-bar.mat-accent{--mdc-tab-indicator-active-indicator-color: #ff4081;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: black;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #ff4081;--mat-tab-header-active-ripple-color: #ff4081;--mat-tab-header-inactive-ripple-color: #ff4081;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #ff4081;--mat-tab-header-active-hover-label-text-color: #ff4081;--mat-tab-header-active-focus-indicator-color: #ff4081;--mat-tab-header-active-hover-indicator-color: #ff4081}.mat-mdc-tab-group.mat-warn,.mat-mdc-tab-nav-bar.mat-warn{--mdc-tab-indicator-active-indicator-color: #f44336;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: black;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #f44336;--mat-tab-header-active-ripple-color: #f44336;--mat-tab-header-inactive-ripple-color: #f44336;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #f44336;--mat-tab-header-active-hover-label-text-color: #f44336;--mat-tab-header-active-focus-indicator-color: #f44336;--mat-tab-header-active-hover-indicator-color: #f44336}.mat-mdc-tab-group.mat-background-primary,.mat-mdc-tab-nav-bar.mat-background-primary{--mat-tab-header-with-background-background-color: #00bcd4;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-accent,.mat-mdc-tab-nav-bar.mat-background-accent{--mat-tab-header-with-background-background-color: #ff4081;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-warn,.mat-mdc-tab-nav-bar.mat-background-warn{--mat-tab-header-with-background-background-color: #f44336;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-header{--mdc-secondary-navigation-tab-container-height: 48px}html{--mdc-checkbox-disabled-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-state-layer-opacity: .16;--mdc-checkbox-selected-hover-state-layer-opacity: .04;--mdc-checkbox-selected-pressed-state-layer-opacity: .16;--mdc-checkbox-unselected-focus-state-layer-opacity: .16;--mdc-checkbox-unselected-hover-state-layer-opacity: .04;--mdc-checkbox-unselected-pressed-state-layer-opacity: .16}html{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #ff4081;--mdc-checkbox-selected-hover-icon-color: #ff4081;--mdc-checkbox-selected-icon-color: #ff4081;--mdc-checkbox-selected-pressed-icon-color: #ff4081;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #ff4081;--mdc-checkbox-selected-hover-state-layer-color: #ff4081;--mdc-checkbox-selected-pressed-state-layer-color: #ff4081;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black;--mat-checkbox-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-checkbox{--mdc-form-field-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-checkbox.mat-primary{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #00bcd4;--mdc-checkbox-selected-hover-icon-color: #00bcd4;--mdc-checkbox-selected-icon-color: #00bcd4;--mdc-checkbox-selected-pressed-icon-color: #00bcd4;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #00bcd4;--mdc-checkbox-selected-hover-state-layer-color: #00bcd4;--mdc-checkbox-selected-pressed-state-layer-color: #00bcd4;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-warn{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}html{--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-touch-target-display: block}html{--mdc-text-button-container-shape: 4px;--mdc-text-button-keep-touch-target: false;--mdc-filled-button-container-shape: 4px;--mdc-filled-button-keep-touch-target: false;--mdc-protected-button-container-shape: 4px;--mdc-protected-button-keep-touch-target: false;--mdc-outlined-button-keep-touch-target: false;--mdc-outlined-button-outline-width: 1px;--mdc-outlined-button-container-shape: 4px;--mat-text-button-horizontal-padding: 8px;--mat-text-button-with-icon-horizontal-padding: 8px;--mat-text-button-icon-spacing: 8px;--mat-text-button-icon-offset: 0;--mat-filled-button-horizontal-padding: 16px;--mat-filled-button-icon-spacing: 8px;--mat-filled-button-icon-offset: -4px;--mat-protected-button-horizontal-padding: 16px;--mat-protected-button-icon-spacing: 8px;--mat-protected-button-icon-offset: -4px;--mat-outlined-button-horizontal-padding: 15px;--mat-outlined-button-icon-spacing: 8px;--mat-outlined-button-icon-offset: -4px}html{--mdc-text-button-label-text-color: black;--mdc-text-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mat-text-button-state-layer-color: black;--mat-text-button-disabled-state-layer-color: black;--mat-text-button-ripple-color: rgba(0, 0, 0, .1);--mat-text-button-hover-state-layer-opacity: .04;--mat-text-button-focus-state-layer-opacity: .12;--mat-text-button-pressed-state-layer-opacity: .12;--mdc-filled-button-container-color: white;--mdc-filled-button-label-text-color: black;--mdc-filled-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mat-filled-button-state-layer-color: black;--mat-filled-button-disabled-state-layer-color: black;--mat-filled-button-ripple-color: rgba(0, 0, 0, .1);--mat-filled-button-hover-state-layer-opacity: .04;--mat-filled-button-focus-state-layer-opacity: .12;--mat-filled-button-pressed-state-layer-opacity: .12;--mdc-protected-button-container-color: white;--mdc-protected-button-label-text-color: black;--mdc-protected-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-protected-button-container-elevation-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12);--mdc-protected-button-disabled-container-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-protected-button-focus-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mdc-protected-button-hover-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mdc-protected-button-pressed-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-protected-button-container-shadow-color: #000;--mat-protected-button-state-layer-color: black;--mat-protected-button-disabled-state-layer-color: black;--mat-protected-button-ripple-color: rgba(0, 0, 0, .1);--mat-protected-button-hover-state-layer-opacity: .04;--mat-protected-button-focus-state-layer-opacity: .12;--mat-protected-button-pressed-state-layer-opacity: .12;--mdc-outlined-button-disabled-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-label-text-color: black;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: black;--mat-outlined-button-disabled-state-layer-color: black;--mat-outlined-button-ripple-color: rgba(0, 0, 0, .1);--mat-outlined-button-hover-state-layer-opacity: .04;--mat-outlined-button-focus-state-layer-opacity: .12;--mat-outlined-button-pressed-state-layer-opacity: .12}.mat-mdc-button.mat-primary{--mdc-text-button-label-text-color: #00bcd4;--mat-text-button-state-layer-color: #00bcd4;--mat-text-button-ripple-color: rgba(0, 188, 212, .1)}.mat-mdc-button.mat-accent{--mdc-text-button-label-text-color: #ff4081;--mat-text-button-state-layer-color: #ff4081;--mat-text-button-ripple-color: rgba(255, 64, 129, .1)}.mat-mdc-button.mat-warn{--mdc-text-button-label-text-color: #f44336;--mat-text-button-state-layer-color: #f44336;--mat-text-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-unelevated-button.mat-primary{--mdc-filled-button-container-color: #00bcd4;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-unelevated-button.mat-accent{--mdc-filled-button-container-color: #ff4081;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-unelevated-button.mat-warn{--mdc-filled-button-container-color: #f44336;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-primary{--mdc-protected-button-container-color: #00bcd4;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-accent{--mdc-protected-button-container-color: #ff4081;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-warn{--mdc-protected-button-container-color: #f44336;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-outlined-button.mat-primary{--mdc-outlined-button-label-text-color: #00bcd4;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #00bcd4;--mat-outlined-button-ripple-color: rgba(0, 188, 212, .1)}.mat-mdc-outlined-button.mat-accent{--mdc-outlined-button-label-text-color: #ff4081;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #ff4081;--mat-outlined-button-ripple-color: rgba(255, 64, 129, .1)}.mat-mdc-outlined-button.mat-warn{--mdc-outlined-button-label-text-color: #f44336;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #f44336;--mat-outlined-button-ripple-color: rgba(244, 67, 54, .1)}html{--mdc-text-button-container-height: 36px;--mdc-filled-button-container-height: 36px;--mdc-outlined-button-container-height: 36px;--mdc-protected-button-container-height: 36px;--mat-text-button-touch-target-display: block;--mat-filled-button-touch-target-display: block;--mat-protected-button-touch-target-display: block;--mat-outlined-button-touch-target-display: block}html{--mdc-icon-button-icon-size: 24px}html{--mdc-icon-button-icon-color: inherit;--mdc-icon-button-disabled-icon-color: rgba(0, 0, 0, .38);--mat-icon-button-state-layer-color: black;--mat-icon-button-disabled-state-layer-color: black;--mat-icon-button-ripple-color: rgba(0, 0, 0, .1);--mat-icon-button-hover-state-layer-opacity: .04;--mat-icon-button-focus-state-layer-opacity: .12;--mat-icon-button-pressed-state-layer-opacity: .12}html .mat-mdc-icon-button.mat-primary{--mdc-icon-button-icon-color: #00bcd4;--mat-icon-button-state-layer-color: #00bcd4;--mat-icon-button-ripple-color: rgba(0, 188, 212, .1)}html .mat-mdc-icon-button.mat-accent{--mdc-icon-button-icon-color: #ff4081;--mat-icon-button-state-layer-color: #ff4081;--mat-icon-button-ripple-color: rgba(255, 64, 129, .1)}html .mat-mdc-icon-button.mat-warn{--mdc-icon-button-icon-color: #f44336;--mat-icon-button-state-layer-color: #f44336;--mat-icon-button-ripple-color: rgba(244, 67, 54, .1)}html{--mat-icon-button-touch-target-display: block}.mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 48px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:12px}html{--mdc-fab-container-shape: 50%;--mdc-fab-icon-size: 24px;--mdc-fab-small-container-shape: 50%;--mdc-fab-small-icon-size: 24px;--mdc-extended-fab-container-height: 48px;--mdc-extended-fab-container-shape: 24px}html{--mdc-fab-container-color: white;--mdc-fab-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mdc-fab-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mdc-fab-container-shadow-color: #000;--mat-fab-foreground-color: black;--mat-fab-state-layer-color: black;--mat-fab-disabled-state-layer-color: black;--mat-fab-ripple-color: rgba(0, 0, 0, .1);--mat-fab-hover-state-layer-opacity: .04;--mat-fab-focus-state-layer-opacity: .12;--mat-fab-pressed-state-layer-opacity: .12;--mat-fab-disabled-state-container-color: rgba(0, 0, 0, .12);--mat-fab-disabled-state-foreground-color: rgba(0, 0, 0, .38);--mdc-fab-small-container-color: white;--mdc-fab-small-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mdc-fab-small-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-small-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-small-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mdc-fab-small-container-shadow-color: #000;--mat-fab-small-foreground-color: black;--mat-fab-small-state-layer-color: black;--mat-fab-small-disabled-state-layer-color: black;--mat-fab-small-ripple-color: rgba(0, 0, 0, .1);--mat-fab-small-hover-state-layer-opacity: .04;--mat-fab-small-focus-state-layer-opacity: .12;--mat-fab-small-pressed-state-layer-opacity: .12;--mat-fab-small-disabled-state-container-color: rgba(0, 0, 0, .12);--mat-fab-small-disabled-state-foreground-color: rgba(0, 0, 0, .38);--mdc-extended-fab-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mdc-extended-fab-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-extended-fab-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-extended-fab-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mdc-extended-fab-container-shadow-color: #000}html .mat-mdc-fab.mat-primary{--mdc-fab-container-color: #00bcd4;--mat-fab-foreground-color: white;--mat-fab-state-layer-color: white;--mat-fab-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-fab.mat-accent{--mdc-fab-container-color: #ff4081;--mat-fab-foreground-color: white;--mat-fab-state-layer-color: white;--mat-fab-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-fab.mat-warn{--mdc-fab-container-color: #f44336;--mat-fab-foreground-color: white;--mat-fab-state-layer-color: white;--mat-fab-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-mini-fab.mat-primary{--mdc-fab-small-container-color: #00bcd4;--mat-fab-small-foreground-color: white;--mat-fab-small-state-layer-color: white;--mat-fab-small-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-mini-fab.mat-accent{--mdc-fab-small-container-color: #ff4081;--mat-fab-small-foreground-color: white;--mat-fab-small-state-layer-color: white;--mat-fab-small-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-mini-fab.mat-warn{--mdc-fab-small-container-color: #f44336;--mat-fab-small-foreground-color: white;--mat-fab-small-state-layer-color: white;--mat-fab-small-ripple-color: rgba(255, 255, 255, .1)}html{--mat-fab-touch-target-display: block;--mat-fab-small-touch-target-display: block}html{--mdc-snackbar-container-shape: 4px}html{--mdc-snackbar-container-color: #333333;--mdc-snackbar-supporting-text-color: rgba(255, 255, 255, .87);--mat-snack-bar-button-color: #ff4081}html{--mat-table-row-item-outline-width: 1px}html{--mat-table-background-color: white;--mat-table-header-headline-color: rgba(0, 0, 0, .87);--mat-table-row-item-label-text-color: rgba(0, 0, 0, .87);--mat-table-row-item-outline-color: rgba(0, 0, 0, .12)}html{--mat-table-header-container-height: 56px;--mat-table-footer-container-height: 52px;--mat-table-row-item-container-height: 52px}html{--mdc-circular-progress-active-indicator-width: 4px;--mdc-circular-progress-size: 48px}html{--mdc-circular-progress-active-indicator-color: #00bcd4}html .mat-accent{--mdc-circular-progress-active-indicator-color: #ff4081}html .mat-warn{--mdc-circular-progress-active-indicator-color: #f44336}html{--mat-badge-container-shape: 50%;--mat-badge-container-size: unset;--mat-badge-small-size-container-size: unset;--mat-badge-large-size-container-size: unset;--mat-badge-legacy-container-size: 22px;--mat-badge-legacy-small-size-container-size: 16px;--mat-badge-legacy-large-size-container-size: 28px;--mat-badge-container-offset: -11px 0;--mat-badge-small-size-container-offset: -8px 0;--mat-badge-large-size-container-offset: -14px 0;--mat-badge-container-overlap-offset: -11px;--mat-badge-small-size-container-overlap-offset: -8px;--mat-badge-large-size-container-overlap-offset: -14px;--mat-badge-container-padding: 0;--mat-badge-small-size-container-padding: 0;--mat-badge-large-size-container-padding: 0}html{--mat-badge-background-color: #00bcd4;--mat-badge-text-color: white;--mat-badge-disabled-state-background-color: #b9b9b9;--mat-badge-disabled-state-text-color: rgba(0, 0, 0, .38)}.mat-badge-accent{--mat-badge-background-color: #ff4081;--mat-badge-text-color: white}.mat-badge-warn{--mat-badge-background-color: #f44336;--mat-badge-text-color: white}html{--mat-bottom-sheet-container-shape: 4px}html{--mat-bottom-sheet-container-text-color: rgba(0, 0, 0, .87);--mat-bottom-sheet-container-background-color: white}html{--mat-legacy-button-toggle-height: 36px;--mat-legacy-button-toggle-shape: 2px;--mat-legacy-button-toggle-focus-state-layer-opacity: 1;--mat-standard-button-toggle-shape: 4px;--mat-standard-button-toggle-hover-state-layer-opacity: .04;--mat-standard-button-toggle-focus-state-layer-opacity: .12}html{--mat-legacy-button-toggle-text-color: rgba(0, 0, 0, .38);--mat-legacy-button-toggle-state-layer-color: rgba(0, 0, 0, .12);--mat-legacy-button-toggle-selected-state-text-color: rgba(0, 0, 0, .54);--mat-legacy-button-toggle-selected-state-background-color: #e0e0e0;--mat-legacy-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-legacy-button-toggle-disabled-state-background-color: #eeeeee;--mat-legacy-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-background-color: white;--mat-standard-button-toggle-state-layer-color: black;--mat-standard-button-toggle-selected-state-background-color: #e0e0e0;--mat-standard-button-toggle-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-standard-button-toggle-disabled-state-background-color: white;--mat-standard-button-toggle-disabled-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-divider-color: #e0e0e0}html{--mat-standard-button-toggle-height: 48px}html{--mat-datepicker-calendar-container-shape: 4px;--mat-datepicker-calendar-container-touch-shape: 4px;--mat-datepicker-calendar-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mat-datepicker-calendar-container-touch-elevation-shadow: 0px 11px 15px -7px rgba(0, 0, 0, .2), 0px 24px 38px 3px rgba(0, 0, 0, .14), 0px 9px 46px 8px rgba(0, 0, 0, .12)}html{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #00bcd4;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(0, 188, 212, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(0, 188, 212, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(0, 188, 212, .3);--mat-datepicker-toggle-active-state-icon-color: #00bcd4;--mat-datepicker-calendar-date-in-range-state-background-color: rgba(0, 188, 212, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e;--mat-datepicker-toggle-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-body-label-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-period-button-text-color: black;--mat-datepicker-calendar-period-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-navigation-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-header-divider-color: rgba(0, 0, 0, .12);--mat-datepicker-calendar-header-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-date-today-outline-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-today-disabled-state-outline-color: rgba(0, 0, 0, .18);--mat-datepicker-calendar-date-text-color: rgba(0, 0, 0, .87);--mat-datepicker-calendar-date-outline-color: transparent;--mat-datepicker-calendar-date-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-preview-state-outline-color: rgba(0, 0, 0, .24);--mat-datepicker-range-input-separator-color: rgba(0, 0, 0, .87);--mat-datepicker-range-input-disabled-state-separator-color: rgba(0, 0, 0, .38);--mat-datepicker-range-input-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-container-background-color: white;--mat-datepicker-calendar-container-text-color: rgba(0, 0, 0, .87)}.mat-datepicker-content.mat-accent{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #ff4081;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(255, 64, 129, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(255, 64, 129, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(255, 64, 129, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(255, 64, 129, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-content.mat-warn{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #f44336;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(244, 67, 54, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(244, 67, 54, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-toggle-active.mat-accent{--mat-datepicker-toggle-active-state-icon-color: #ff4081}.mat-datepicker-toggle-active.mat-warn{--mat-datepicker-toggle-active-state-icon-color: #f44336}.mat-calendar-controls{--mat-icon-button-touch-target-display: none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 40px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:8px}html{--mat-divider-width: 1px}html{--mat-divider-color: rgba(0, 0, 0, .12)}html{--mat-expansion-container-shape: 4px;--mat-expansion-legacy-header-indicator-display: inline-block;--mat-expansion-header-indicator-display: none}html{--mat-expansion-container-background-color: white;--mat-expansion-container-text-color: rgba(0, 0, 0, .87);--mat-expansion-actions-divider-color: rgba(0, 0, 0, .12);--mat-expansion-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-expansion-header-text-color: rgba(0, 0, 0, .87);--mat-expansion-header-description-color: rgba(0, 0, 0, .54);--mat-expansion-header-indicator-color: rgba(0, 0, 0, .54)}html{--mat-expansion-header-collapsed-state-height: 48px;--mat-expansion-header-expanded-state-height: 64px}html{--mat-icon-color: inherit}.mat-icon.mat-primary{--mat-icon-color: #00bcd4}.mat-icon.mat-accent{--mat-icon-color: #ff4081}.mat-icon.mat-warn{--mat-icon-color: #f44336}html{--mat-sidenav-container-shape: 0;--mat-sidenav-container-elevation-shadow: 0px 8px 10px -5px rgba(0, 0, 0, .2), 0px 16px 24px 2px rgba(0, 0, 0, .14), 0px 6px 30px 5px rgba(0, 0, 0, .12);--mat-sidenav-container-width: auto}html{--mat-sidenav-container-divider-color: rgba(0, 0, 0, .12);--mat-sidenav-container-background-color: white;--mat-sidenav-container-text-color: rgba(0, 0, 0, .87);--mat-sidenav-content-background-color: #fafafa;--mat-sidenav-content-text-color: rgba(0, 0, 0, .87);--mat-sidenav-scrim-color: rgba(0, 0, 0, .6)}html{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #00bcd4;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #00bcd4;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #00bcd4;--mat-stepper-header-edit-state-icon-foreground-color: white;--mat-stepper-container-color: white;--mat-stepper-line-color: rgba(0, 0, 0, .12);--mat-stepper-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-optional-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-selected-state-label-text-color: rgba(0, 0, 0, .87);--mat-stepper-header-error-state-label-text-color: #f44336;--mat-stepper-header-icon-background-color: rgba(0, 0, 0, .54);--mat-stepper-header-error-state-icon-foreground-color: #f44336;--mat-stepper-header-error-state-icon-background-color: transparent}html .mat-step-header.mat-accent{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #ff4081;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #ff4081;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #ff4081;--mat-stepper-header-edit-state-icon-foreground-color: white}html .mat-step-header.mat-warn{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #f44336;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #f44336;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #f44336;--mat-stepper-header-edit-state-icon-foreground-color: white}html{--mat-stepper-header-height: 72px}html{--mat-sort-arrow-color: #757575}html{--mat-toolbar-container-background-color: whitesmoke;--mat-toolbar-container-text-color: rgba(0, 0, 0, .87)}.mat-toolbar.mat-primary{--mat-toolbar-container-background-color: #00bcd4;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-accent{--mat-toolbar-container-background-color: #ff4081;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-warn{--mat-toolbar-container-background-color: #f44336;--mat-toolbar-container-text-color: white}html{--mat-toolbar-standard-height: 64px;--mat-toolbar-mobile-height: 56px}html{--mat-tree-container-background-color: white;--mat-tree-node-text-color: rgba(0, 0, 0, .87)}html{--mat-tree-node-min-height: 48px}@font-face{font-family:Roboto;font-style:normal;font-weight:700;src:local("Roboto-Regular"),url(Roboto-Regular.acbcb575c528bd7d.woff)}html,body{height:100%}body{margin:0;font-family:Roboto,Helvetica Neue,Arial,sans-serif}.smallScrollbar{scrollbar-width:thin}.smallScrollbar *::-webkit-scrollbar{width:12px}.headline{font-size:17pt;height:40px;cursor:pointer}.headerButton{background-color:transparent;border:none}.spacer{flex:1 1 auto}.mr-1{margin-right:8px!important}.mr-10{margin-right:10px!important}.materialIconButton{font-size:24px!important;padding-left:5px;padding-right:5px;margin-top:9px}.toolbar{height:65px}app-root{display:block;height:100%}a{color:#880e4f}mat-dialog-actions.mdc-dialog__actions{padding:0 24px 20px;justify-content:end}.mat-mdc-snack-bar-container.snackbar_success{--mdc-snackbar-container-color: darkgreen;--mat-mdc-snack-bar-button-color: #fff;--mdc-snackbar-supporting-text-color: #fff}.mat-mdc-snack-bar-container.snackbar_warning{--mdc-snackbar-container-color: darkorange;--mat-mdc-snack-bar-button-color: black;--mdc-snackbar-supporting-text-color: #fff}.mat-mdc-snack-bar-container.snackbar_error{--mdc-snackbar-container-color: #d04437;--mat-mdc-snack-bar-button-color: #fff;--mdc-snackbar-supporting-text-color: #fff}.mat-mdc-snack-bar-container.snackbar_info{--mdc-snackbar-container-color: #42aebb;--mat-mdc-snack-bar-button-color: black;--mdc-snackbar-supporting-text-color: #fff}.djs-overlay-context-pad{width:120px;height:238px;overflow-y:auto}.djs-context-pad.open{border:solid 1px rgba(128,128,128,.3294117647)}.djs-context-pad.open>.group{border:solid 1px rgba(128,128,128,.3294117647);padding:1px;background-color:#fff}.djs-palette{position:absolute;left:20px;top:20px;box-sizing:border-box;width:32px}.djs-palette .separator{margin:0 2px;padding-top:0;border:none;border-bottom:solid 1px #ddd;clear:both}.djs-palette .entry:before{vertical-align:middle}.djs-palette .djs-palette-toggle{cursor:pointer}.djs-palette .entry,.djs-palette .djs-palette-toggle{color:#333;font-size:26px;text-align:center}.djs-palette .entry{float:left}.djs-palette .entry img{max-width:100%}.djs-palette .djs-palette-entries:after{content:"";display:table;clear:both}.djs-palette .djs-palette-toggle:hover{background:#666}.djs-palette .entry:hover{fill:#42aebb}.djs-palette .entry,.djs-palette .djs-palette-toggle{width:30px;height:30px;line-height:30px;cursor:default}.djs-palette.two-column.open{width:64px}.djs-palette:not(.open) .djs-palette-entries{display:none}.djs-palette:not(.open){overflow:hidden}.djs-palette.open .djs-palette-toggle{display:none}.djs-outline{fill:none;visibility:hidden}.djs-element.hover .djs-outline,.djs-element.selected .djs-outline{visibility:visible;shape-rendering:crispEdges;stroke-dasharray:3,3}.djs-element.selected .djs-outline{stroke:#88f;stroke-width:1px}.djs-element.hover .djs-outline{stroke:#42aebb}.djs-element.attach-ok .djs-visual>:nth-child(1){stroke:#42aebb!important}.djs-lasso-overlay,.djs-resize-overlay{stroke:#42aebb}.djs-dragger .djs-visual circle,.djs-dragger .djs-visual path,.djs-dragger .djs-visual polygon,.djs-dragger .djs-visual polyline,.djs-dragger .djs-visual rect,.djs-dragger .djs-visual text{fill:none!important;stroke:#42aebb!important}.djs-snap-line{stroke:#42aebb;stroke:#ffc34280}.djs-palette .entry:hover{color:#42aebb}.djs-palette .highlighted-entry{color:#42aebb!important}.djs-context-pad .entry:hover{background:#42aebb}.djs-popup .djs-popup-header .entry.active{color:#42aebb;border:solid 1px #42aebb;background-color:#f6f6f6}.djs-popup-body .entry{width:auto!important}.djs-segment-dragger:hover .djs-visual,.djs-segment-dragger.djs-dragging .djs-visual,.djs-bendpoint:hover .djs-visual,.djs-bendpoint.floating .djs-visual{fill:#42aebb;stroke-opacity:.5;stroke:#000}.djs-segment-dragger.djs-dragging .djs-visual,.djs-bendpoint.djs-dragging .djs-visual{fill:#42aebb}.djs-tooltip-error>*{color:#42aebb;border-left:solid 5px #42aebb}.djs-search-input input:focus{outline:none;border-color:#52b415}.djs-search-result:hover{background:#fdffd6}.djs-search-result-selected,.djs-search-result-selected:hover,.djs-search-overlay{background:#42aebb}.autocomplete-items{border:1px solid #a9a9a9;background-color:#f0f0f0}.autocomplete-active{background-color:#1e90ff!important;color:#fff} diff --git a/app-v2/styles.css b/app-v2/styles.css new file mode 100644 index 0000000..e325e50 --- /dev/null +++ b/app-v2/styles.css @@ -0,0 +1,3814 @@ +/*!*****************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].rules[0].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[5].rules[0].oneOf[0].use[2]!./node_modules/diagram-js/assets/diagram-js.css?ngGlobalStyle ***! + \*****************************************************************************************************************************************************************************************************************************************************/ +/** + * color definitions + */ +.djs-container { + --color-grey-225-10-15: hsl(225, 10%, 15%); + --color-grey-225-10-35: hsl(225, 10%, 35%); + --color-grey-225-10-55: hsl(225, 10%, 55%); + --color-grey-225-10-75: hsl(225, 10%, 75%); + --color-grey-225-10-80: hsl(225, 10%, 80%); + --color-grey-225-10-85: hsl(225, 10%, 85%); + --color-grey-225-10-90: hsl(225, 10%, 90%); + --color-grey-225-10-95: hsl(225, 10%, 95%); + --color-grey-225-10-97: hsl(225, 10%, 97%); + + --color-blue-205-100-45: hsl(205, 100%, 45%); + --color-blue-205-100-45-opacity-30: hsla(205, 100%, 45%, 30%); + --color-blue-205-100-50: hsl(205, 100%, 50%); + --color-blue-205-100-95: hsl(205, 100%, 95%); + + --color-green-150-86-44: hsl(150, 86%, 44%); + + --color-red-360-100-40: hsl(360, 100%, 40%); + --color-red-360-100-45: hsl(360, 100%, 45%); + --color-red-360-100-92: hsl(360, 100%, 92%); + --color-red-360-100-97: hsl(360, 100%, 97%); + + --color-white: hsl(0, 0%, 100%); + --color-black: hsl(0, 0%, 0%); + --color-black-opacity-05: hsla(0, 0%, 0%, 5%); + --color-black-opacity-10: hsla(0, 0%, 0%, 10%); + + --bendpoint-fill-color: var(--color-blue-205-100-45-opacity-30); + --bendpoint-stroke-color: var(--color-blue-205-100-50); + + --context-pad-entry-background-color: var(--color-white); + --context-pad-entry-hover-background-color: var(--color-grey-225-10-95); + + --element-dragger-color: var(--color-blue-205-100-50); + --element-hover-outline-fill-color: var(--color-blue-205-100-45); + --element-selected-outline-stroke-color: var(--color-blue-205-100-50); + + --lasso-fill-color: var(--color-black-opacity-05); + --lasso-stroke-color: var(--color-black); + + --palette-entry-color: var(--color-grey-225-10-15); + --palette-entry-hover-color: var(--color-blue-205-100-45); + --palette-entry-selected-color: var(--color-blue-205-100-50); + --palette-separator-color: var(--color-grey-225-10-75); + --palette-toggle-hover-background-color: var(--color-grey-225-10-55); + --palette-background-color: var(--color-grey-225-10-97); + --palette-border-color: var(--color-grey-225-10-75); + + --popup-body-background-color: var(--color-white); + --popup-header-entry-selected-color: var(--color-blue-205-100-50); + --popup-header-entry-selected-background-color: var(--color-black-opacity-10); + --popup-header-separator-color: var(--color-grey-225-10-75); + --popup-background-color: var(--color-grey-225-10-97); + --popup-border-color: var(--color-grey-225-10-75); + + --resizer-fill-color: var(--color-blue-205-100-45-opacity-30); + --resizer-stroke-color: var(--color-blue-205-100-50); + + --search-container-background-color: var(--color-grey-225-10-97); + --search-container-border-color: var(--color-blue-205-100-50); + --search-container-box-shadow-color: var(--color-blue-205-100-95); + --search-container-box-shadow-inset-color: var(--color-grey-225-10-80); + --search-input-border-color: var(--color-grey-225-10-75); + --search-result-border-color: var(--color-grey-225-10-75); + --search-result-highlight-color: var(--color-black); + --search-result-selected-color: var(--color-blue-205-100-45-opacity-30); + + --shape-attach-allowed-stroke-color: var(--color-blue-205-100-50); + --shape-connect-allowed-fill-color: var(--color-grey-225-10-97); + --shape-drop-allowed-fill-color: var(--color-grey-225-10-97); + --shape-drop-not-allowed-fill-color: var(--color-red-360-100-97); + --shape-resize-preview-stroke-color: var(--color-blue-205-100-50); + + --snap-line-stroke-color: var(--color-blue-205-100-45-opacity-30); + + --space-tool-crosshair-stroke-color: var(--color-black); + + --tooltip-error-background-color: var(--color-red-360-100-97); + --tooltip-error-border-color: var(--color-red-360-100-45); + --tooltip-error-color: var(--color-red-360-100-45); +} + +/** + * outline styles + */ + +.djs-outline { + fill: none; + visibility: hidden; +} + +.djs-element.hover .djs-outline, +.djs-element.selected .djs-outline { + visibility: visible; + shape-rendering: geometricPrecision; + stroke-dasharray: 3,3; +} + +.djs-element.selected .djs-outline { + stroke: var(--element-selected-outline-stroke-color); + stroke-width: 1px; +} + +.djs-element.hover .djs-outline { + stroke: var(--element-hover-outline-fill-color); + stroke-width: 1px; +} + +.djs-shape.connect-ok .djs-visual > :nth-child(1) { + fill: var(--shape-connect-allowed-fill-color) !important; +} + +.djs-shape.connect-not-ok .djs-visual > :nth-child(1), +.djs-shape.drop-not-ok .djs-visual > :nth-child(1) { + fill: var(--shape-drop-not-allowed-fill-color) !important; +} + +.djs-shape.new-parent .djs-visual > :nth-child(1) { + fill: var(--shape-drop-allowed-fill-color) !important; +} + +svg.drop-not-ok { + background: var(--shape-drop-not-allowed-fill-color) !important; +} + +svg.new-parent { + background: var(--shape-drop-allowed-fill-color) !important; +} + +.djs-connection.connect-ok .djs-visual > :nth-child(1), +.djs-connection.drop-ok .djs-visual > :nth-child(1) { + stroke: var(--shape-drop-allowed-fill-color) !important; +} + +.djs-connection.connect-not-ok .djs-visual > :nth-child(1), +.djs-connection.drop-not-ok .djs-visual > :nth-child(1) { + stroke: var(--shape-drop-not-allowed-fill-color) !important; +} + +.drop-not-ok, +.connect-not-ok { + cursor: not-allowed; +} + +.djs-element.attach-ok .djs-visual > :nth-child(1) { + stroke-width: 5px !important; + stroke: var(--shape-attach-allowed-stroke-color) !important; +} + +.djs-frame.connect-not-ok .djs-visual > :nth-child(1), +.djs-frame.drop-not-ok .djs-visual > :nth-child(1) { + stroke-width: 3px !important; + stroke: var(--shape-drop-not-allowed-fill-color) !important; + fill: none !important; +} + +/** +* Selection box style +* +*/ +.djs-lasso-overlay { + fill: var(--lasso-fill-color); + + stroke-dasharray: 5 1 3 1; + stroke: var(--lasso-stroke-color); + + shape-rendering: geometricPrecision; + pointer-events: none; +} + +/** + * Resize styles + */ +.djs-resize-overlay { + fill: none; + + stroke-dasharray: 5 1 3 1; + stroke: var(--shape-resize-preview-stroke-color); + + pointer-events: none; +} + +.djs-resizer-hit { + fill: none; + pointer-events: all; +} + +.djs-resizer-visual { + fill: var(--resizer-fill-color); + stroke-width: 1px; + stroke-opacity: 0.5; + stroke: var(--resizer-stroke-color); + shape-rendering: geometricprecision; +} + +.djs-resizer:hover .djs-resizer-visual { + stroke: var(--resizer-stroke-color); + stroke-opacity: 1; +} + +.djs-cursor-resize-ns, +.djs-resizer-n, +.djs-resizer-s { + cursor: ns-resize; +} + +.djs-cursor-resize-ew, +.djs-resizer-e, +.djs-resizer-w { + cursor: ew-resize; +} + +.djs-cursor-resize-nwse, +.djs-resizer-nw, +.djs-resizer-se { + cursor: nwse-resize; +} + +.djs-cursor-resize-nesw, +.djs-resizer-ne, +.djs-resizer-sw { + cursor: nesw-resize; +} + +.djs-shape.djs-resizing > .djs-outline { + visibility: hidden !important; +} + +.djs-shape.djs-resizing > .djs-resizer { + visibility: hidden; +} + +.djs-dragger > .djs-resizer { + visibility: hidden; +} + +/** + * drag styles + */ +.djs-dragger * { + fill: none !important; + stroke: var(--element-dragger-color) !important; +} + +.djs-dragger tspan, +.djs-dragger text { + fill: var(--element-dragger-color) !important; + stroke: none !important; +} + +marker.djs-dragger circle, +marker.djs-dragger path, +marker.djs-dragger polygon, +marker.djs-dragger polyline, +marker.djs-dragger rect { + fill: var(--element-dragger-color) !important; + stroke: none !important; +} + +marker.djs-dragger text, +marker.djs-dragger tspan { + fill: none !important; + stroke: var(--element-dragger-color) !important; +} + +.djs-dragging { + opacity: 0.3; +} + +.djs-dragging, +.djs-dragging > * { + pointer-events: none !important; +} + +.djs-dragging .djs-context-pad, +.djs-dragging .djs-outline { + display: none !important; +} + +/** + * no pointer events for visual + */ +.djs-visual, +.djs-outline { + pointer-events: none; +} + +.djs-element.attach-ok .djs-hit { + stroke-width: 60px !important; +} + +/** + * all pointer events for hit shape + */ +.djs-element > .djs-hit-all { + pointer-events: all; +} + +.djs-element > .djs-hit-stroke, +.djs-element > .djs-hit-click-stroke { + pointer-events: stroke; +} + +/** + * all pointer events for hit shape + */ +.djs-drag-active .djs-element > .djs-hit-click-stroke { + pointer-events: all; +} + +/** + * shape / connection basic styles + */ +.djs-connection .djs-visual { + stroke-width: 2px; + fill: none; +} + +.djs-cursor-grab { + cursor: grab; +} + +.djs-cursor-grabbing { + cursor: grabbing; +} + +.djs-cursor-crosshair { + cursor: crosshair; +} + +.djs-cursor-move { + cursor: move; +} + +.djs-cursor-resize-ns { + cursor: ns-resize; +} + +.djs-cursor-resize-ew { + cursor: ew-resize; +} + + +/** + * snapping + */ +.djs-snap-line { + stroke: var(--snap-line-stroke-color); + stroke-linecap: round; + stroke-width: 2px; + pointer-events: none; +} + +/** + * snapping + */ +.djs-crosshair { + stroke: var(--space-tool-crosshair-stroke-color); + stroke-linecap: round; + stroke-width: 1px; + pointer-events: none; + shape-rendering: crispEdges; + stroke-dasharray: 5, 5; +} + +/** + * palette + */ + +.djs-palette { + position: absolute; + left: 20px; + top: 20px; + + box-sizing: border-box; + width: 48px; +} + +.djs-palette .separator { + margin: 0 5px; + padding-top: 5px; + + border: none; + border-bottom: solid 1px var(--palette-separator-color); + + clear: both; +} + +.djs-palette .entry:before { + vertical-align: text-bottom; +} + +.djs-palette .djs-palette-toggle { + cursor: pointer; +} + +.djs-palette .entry, +.djs-palette .djs-palette-toggle { + color: var(--palette-entry-color); + font-size: 30px; + + text-align: center; +} + +.djs-palette .entry { + float: left; +} + +.djs-palette .entry img { + max-width: 100%; +} + +.djs-palette .djs-palette-entries:after { + content: ''; + display: table; + clear: both; +} + +.djs-palette .djs-palette-toggle:hover { + background: var(--palette-toggle-hover-background-color); +} + +.djs-palette .entry:hover { + color: var(--palette-entry-hover-color); +} + +.djs-palette .highlighted-entry { + color: var(--palette-entry-selected-color) !important; +} + +.djs-palette .entry, +.djs-palette .djs-palette-toggle { + width: 46px; + height: 46px; + line-height: 46px; + cursor: default; +} + +/** + * Palette open / two-column layout is controlled via + * classes on the palette. Events to hook into palette + * changed life-cycle are available in addition. + */ +.djs-palette.two-column.open { + width: 94px; +} + +.djs-palette:not(.open) .djs-palette-entries { + display: none; +} + +.djs-palette:not(.open) { + overflow: hidden; +} + +.djs-palette.open .djs-palette-toggle { + display: none; +} + +/** + * context-pad + */ +.djs-overlay-context-pad { + width: 72px; + z-index: 100; +} + +.djs-context-pad { + position: absolute; + display: none; + pointer-events: none; + line-height: 1; +} + +.djs-context-pad .entry { + width: 22px; + height: 22px; + text-align: center; + display: inline-block; + font-size: 22px; + margin: 0 2px 2px 0; + + border-radius: 3px; + + cursor: default; + + background-color: var(--context-pad-entry-background-color); + box-shadow: 0 0 2px 1px var(--context-pad-entry-background-color); + pointer-events: all; + vertical-align: middle; +} + +.djs-context-pad .entry:hover { + background: var(--context-pad-entry-hover-background-color); +} + +.djs-context-pad.open { + display: block; +} + +/** + * popup styles + */ +.djs-popup .entry { + line-height: 20px; + white-space: nowrap; + cursor: default; +} + +/* larger font for prefixed icons */ +.djs-popup .entry:before { + vertical-align: middle; + font-size: 20px; +} + +.djs-popup .entry > span { + vertical-align: middle; + font-size: 14px; +} + +.djs-popup .entry:hover, +.djs-popup .entry.active:hover { + background: var(--popup-header-entry-selected-background-color); +} + +.djs-popup .entry.disabled { + background: inherit; +} + +.djs-popup .djs-popup-header .entry { + display: inline-block; + padding: 2px 3px 2px 3px; + + border: solid 1px transparent; + border-radius: 3px; +} + +.djs-popup .djs-popup-header .entry.active { + color: var(--popup-header-entry-selected-color); + border: solid 1px var(--popup-header-entry-selected-color); + background-color: var(--popup-header-entry-selected-background-color); +} + +.djs-popup-body .entry { + padding: 4px 10px 4px 5px; +} + +.djs-popup-body .entry > span { + margin-left: 5px; +} + +.djs-popup-body { + background-color: var(--popup-body-background-color); +} + +.djs-popup-header { + border-bottom: 1px solid var(--popup-header-separator-color); +} + +.djs-popup-header .entry { + margin: 1px; + margin-left: 3px; +} + +.djs-popup-header .entry:last-child { + margin-right: 3px; +} + +/** + * popup / palette styles + */ +.djs-palette { + background: var(--palette-background-color); + border: solid 1px var(--palette-border-color); + border-radius: 2px; +} + +.djs-popup { + background: var(--popup-background-color); + border: solid 1px var(--popup-border-color); + border-radius: 2px; +} + +/** + * touch + */ + +.djs-shape, +.djs-connection { + touch-action: none; +} + +.djs-segment-dragger, +.djs-bendpoint { + display: none; +} + +/** + * bendpoints + */ +.djs-segment-dragger .djs-visual { + display: none; + + fill: var(--bendpoint-fill-color); + stroke: var(--bendpoint-stroke-color); + stroke-width: 1px; + stroke-opacity: 1; +} + +.djs-segment-dragger:hover .djs-visual { + display: block; +} + +.djs-bendpoint .djs-visual { + fill: var(--bendpoint-fill-color); + stroke: var(--bendpoint-stroke-color); + stroke-width: 1px; + stroke-opacity: 0.5; +} + +.djs-segment-dragger:hover, +.djs-bendpoints.hover .djs-segment-dragger, +.djs-bendpoints.selected .djs-segment-dragger, +.djs-bendpoint:hover, +.djs-bendpoints.hover .djs-bendpoint, +.djs-bendpoints.selected .djs-bendpoint { + display: block; +} + +.djs-drag-active .djs-bendpoints * { + display: none; +} + +.djs-bendpoints:not(.hover) .floating { + display: none; +} + +.djs-segment-dragger:hover .djs-visual, +.djs-segment-dragger.djs-dragging .djs-visual, +.djs-bendpoint:hover .djs-visual, +.djs-bendpoint.floating .djs-visual { + fill: var(--bendpoint-fill-color); + stroke: var(--bendpoint-stroke-color); + stroke-opacity: 1; +} + +.djs-bendpoint.floating .djs-hit { + pointer-events: none; +} + +.djs-segment-dragger .djs-hit, +.djs-bendpoint .djs-hit { + fill: none; + pointer-events: all; +} + +.djs-segment-dragger.horizontal .djs-hit { + cursor: ns-resize; +} + +.djs-segment-dragger.vertical .djs-hit { + cursor: ew-resize; +} + +.djs-segment-dragger.djs-dragging .djs-hit { + pointer-events: none; +} + +.djs-updating, +.djs-updating > * { + pointer-events: none !important; +} + +.djs-updating .djs-context-pad, +.djs-updating .djs-outline, +.djs-updating .djs-bendpoint, +.connect-ok .djs-bendpoint, +.connect-not-ok .djs-bendpoint, +.drop-ok .djs-bendpoint, +.drop-not-ok .djs-bendpoint { + display: none !important; +} + +.djs-segment-dragger.djs-dragging, +.djs-bendpoint.djs-dragging { + display: block; + opacity: 1.0; +} + + +/** + * tooltips + */ +.djs-tooltip-error { + width: 160px; + padding: 6px; + + background: var(--tooltip-error-background-color); + border: solid 1px var(--tooltip-error-border-color); + border-radius: 2px; + color: var(--tooltip-error-color); + font-size: 12px; + line-height: 16px; + + opacity: 0.75; +} + +.djs-tooltip-error:hover { + opacity: 1; +} + + +/** + * search pad + */ +.djs-search-container { + position: absolute; + top: 20px; + left: 0; + right: 0; + margin-left: auto; + margin-right: auto; + + width: 25%; + min-width: 300px; + max-width: 400px; + z-index: 10; + + font-size: 1.05em; + opacity: 0.9; + background: var(--search-container-background-color); + border: solid 1px var(--search-container-border-color); + border-radius: 2px; + box-shadow: 0 0 0 2px var(--search-container-box-shadow-color), 0 0 0 1px var(--search-container-box-shadow-inset-color) inset; +} + +.djs-search-container:not(.open) { + display: none; +} + +.djs-search-input input { + font-size: 1.05em; + width: 100%; + padding: 6px 10px; + border: 1px solid var(--search-input-border-color); + box-sizing: border-box; +} + +.djs-search-input input:focus { + outline: none; + border-color: var(--search-input-border-color); +} + +.djs-search-results { + position: relative; + overflow-y: auto; + max-height: 200px; +} + +.djs-search-results:hover { + cursor: pointer; +} + +.djs-search-result { + width: 100%; + padding: 6px 10px; + background: white; + border-bottom: solid 1px var(--search-result-border-color); + border-radius: 1px; +} + +.djs-search-highlight { + color: var(--search-result-highlight-color); +} + +.djs-search-result-primary { + margin: 0 0 10px; +} + +.djs-search-result-secondary { + font-family: monospace; + margin: 0; +} + +.djs-search-result:hover { + background: var(--search-result-selected-color); +} + +.djs-search-result-selected { + background: var(--search-result-selected-color); +} + +.djs-search-result-selected:hover { + background: var(--search-result-selected-color); +} + +.djs-search-overlay { + background: var(--search-result-selected-color); +} + +/** + * hidden styles + */ +.djs-element-hidden, +.djs-element-hidden .djs-hit, +.djs-element-hidden .djs-outline, +.djs-label-hidden .djs-label { + display: none !important; +} + +/*!***************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].rules[0].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[5].rules[0].oneOf[0].use[2]!./node_modules/bpmn-js/dist/assets/bpmn-font/css/bpmn.css?ngGlobalStyle ***! + \***************************************************************************************************************************************************************************************************************************************************************/ +@font-face { + font-family: 'bpmn'; + src: url('bpmn.eot?26374340'); + src: url('bpmn.eot?26374340#iefix') format('embedded-opentype'), + url('bpmn.woff2?26374340') format('woff2'), + url('bpmn.woff?26374340') format('woff'), + url('bpmn.ttf?26374340') format('truetype'), + url('bpmn.svg?26374340#bpmn') format('svg'); + font-weight: normal; + font-style: normal; +} +/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ +/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ +/* +@media screen and (-webkit-min-device-pixel-ratio:0) { + @font-face { + font-family: 'bpmn'; + src: url('../font/bpmn.svg?26374340#bpmn') format('svg'); + } +} +*/ + + [class^="bpmn-icon-"]:before, [class*=" bpmn-icon-"]:before { + font-family: "bpmn"; + font-style: normal; + font-weight: normal; + speak: never; + + display: inline-block; + text-decoration: inherit; + width: 1em; + /* margin-right: .2em; */ + text-align: center; + /* opacity: .8; */ + + /* For safety - reset parent styles, that can break glyph codes*/ + font-variant: normal; + text-transform: none; + + /* fix buttons height, for twitter bootstrap */ + line-height: 1em; + + /* Animation center compensation - margins should be symmetric */ + /* remove if not needed */ + /* margin-left: .2em; */ + + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ + + /* Font smoothing. That was taken from TWBS */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + /* Uncomment for 3D effect */ + /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ +} + +.bpmn-icon-screw-wrench:before { content: '\e800'; } /* '' */ +.bpmn-icon-trash:before { content: '\e801'; } /* '' */ +.bpmn-icon-conditional-flow:before { content: '\e802'; } /* '' */ +.bpmn-icon-default-flow:before { content: '\e803'; } /* '' */ +.bpmn-icon-gateway-parallel:before { content: '\e804'; } /* '' */ +.bpmn-icon-intermediate-event-catch-cancel:before { content: '\e805'; } /* '' */ +.bpmn-icon-intermediate-event-catch-non-interrupting-message:before { content: '\e806'; } /* '' */ +.bpmn-icon-start-event-compensation:before { content: '\e807'; } /* '' */ +.bpmn-icon-start-event-non-interrupting-parallel-multiple:before { content: '\e808'; } /* '' */ +.bpmn-icon-loop-marker:before { content: '\e809'; } /* '' */ +.bpmn-icon-parallel-mi-marker:before { content: '\e80a'; } /* '' */ +.bpmn-icon-start-event-non-interrupting-signal:before { content: '\e80b'; } /* '' */ +.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before { content: '\e80c'; } /* '' */ +.bpmn-icon-intermediate-event-catch-parallel-multiple:before { content: '\e80d'; } /* '' */ +.bpmn-icon-intermediate-event-catch-compensation:before { content: '\e80e'; } /* '' */ +.bpmn-icon-gateway-xor:before { content: '\e80f'; } /* '' */ +.bpmn-icon-connection:before { content: '\e810'; } /* '' */ +.bpmn-icon-end-event-cancel:before { content: '\e811'; } /* '' */ +.bpmn-icon-intermediate-event-catch-condition:before { content: '\e812'; } /* '' */ +.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before { content: '\e813'; } /* '' */ +.bpmn-icon-start-event-condition:before { content: '\e814'; } /* '' */ +.bpmn-icon-start-event-non-interrupting-timer:before { content: '\e815'; } /* '' */ +.bpmn-icon-sequential-mi-marker:before { content: '\e816'; } /* '' */ +.bpmn-icon-user-task:before { content: '\e817'; } /* '' */ +.bpmn-icon-business-rule:before { content: '\e818'; } /* '' */ +.bpmn-icon-sub-process-marker:before { content: '\e819'; } /* '' */ +.bpmn-icon-start-event-parallel-multiple:before { content: '\e81a'; } /* '' */ +.bpmn-icon-start-event-error:before { content: '\e81b'; } /* '' */ +.bpmn-icon-intermediate-event-catch-signal:before { content: '\e81c'; } /* '' */ +.bpmn-icon-intermediate-event-catch-error:before { content: '\e81d'; } /* '' */ +.bpmn-icon-end-event-compensation:before { content: '\e81e'; } /* '' */ +.bpmn-icon-subprocess-collapsed:before { content: '\e81f'; } /* '' */ +.bpmn-icon-subprocess-expanded:before { content: '\e820'; } /* '' */ +.bpmn-icon-task:before { content: '\e821'; } /* '' */ +.bpmn-icon-end-event-error:before { content: '\e822'; } /* '' */ +.bpmn-icon-intermediate-event-catch-escalation:before { content: '\e823'; } /* '' */ +.bpmn-icon-intermediate-event-catch-timer:before { content: '\e824'; } /* '' */ +.bpmn-icon-start-event-escalation:before { content: '\e825'; } /* '' */ +.bpmn-icon-start-event-signal:before { content: '\e826'; } /* '' */ +.bpmn-icon-business-rule-task:before { content: '\e827'; } /* '' */ +.bpmn-icon-manual:before { content: '\e828'; } /* '' */ +.bpmn-icon-receive:before { content: '\e829'; } /* '' */ +.bpmn-icon-call-activity:before { content: '\e82a'; } /* '' */ +.bpmn-icon-start-event-timer:before { content: '\e82b'; } /* '' */ +.bpmn-icon-start-event-message:before { content: '\e82c'; } /* '' */ +.bpmn-icon-intermediate-event-none:before { content: '\e82d'; } /* '' */ +.bpmn-icon-intermediate-event-catch-link:before { content: '\e82e'; } /* '' */ +.bpmn-icon-end-event-escalation:before { content: '\e82f'; } /* '' */ +.bpmn-icon-text-annotation:before { content: '\e830'; } /* '' */ +.bpmn-icon-bpmn-io:before { content: '\e831'; } /* '' */ +.bpmn-icon-gateway-complex:before { content: '\e832'; } /* '' */ +.bpmn-icon-gateway-eventbased:before { content: '\e833'; } /* '' */ +.bpmn-icon-gateway-none:before { content: '\e834'; } /* '' */ +.bpmn-icon-gateway-or:before { content: '\e835'; } /* '' */ +.bpmn-icon-end-event-terminate:before { content: '\e836'; } /* '' */ +.bpmn-icon-end-event-signal:before { content: '\e837'; } /* '' */ +.bpmn-icon-end-event-none:before { content: '\e838'; } /* '' */ +.bpmn-icon-end-event-multiple:before { content: '\e839'; } /* '' */ +.bpmn-icon-end-event-message:before { content: '\e83a'; } /* '' */ +.bpmn-icon-end-event-link:before { content: '\e83b'; } /* '' */ +.bpmn-icon-intermediate-event-catch-message:before { content: '\e83c'; } /* '' */ +.bpmn-icon-intermediate-event-throw-compensation:before { content: '\e83d'; } /* '' */ +.bpmn-icon-start-event-multiple:before { content: '\e83e'; } /* '' */ +.bpmn-icon-script:before { content: '\e83f'; } /* '' */ +.bpmn-icon-manual-task:before { content: '\e840'; } /* '' */ +.bpmn-icon-send:before { content: '\e841'; } /* '' */ +.bpmn-icon-service:before { content: '\e842'; } /* '' */ +.bpmn-icon-receive-task:before { content: '\e843'; } /* '' */ +.bpmn-icon-user:before { content: '\e844'; } /* '' */ +.bpmn-icon-start-event-none:before { content: '\e845'; } /* '' */ +.bpmn-icon-intermediate-event-throw-escalation:before { content: '\e846'; } /* '' */ +.bpmn-icon-intermediate-event-catch-multiple:before { content: '\e847'; } /* '' */ +.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before { content: '\e848'; } /* '' */ +.bpmn-icon-intermediate-event-throw-link:before { content: '\e849'; } /* '' */ +.bpmn-icon-start-event-non-interrupting-condition:before { content: '\e84a'; } /* '' */ +.bpmn-icon-data-object:before { content: '\e84b'; } /* '' */ +.bpmn-icon-script-task:before { content: '\e84c'; } /* '' */ +.bpmn-icon-send-task:before { content: '\e84d'; } /* '' */ +.bpmn-icon-data-store:before { content: '\e84e'; } /* '' */ +.bpmn-icon-start-event-non-interrupting-escalation:before { content: '\e84f'; } /* '' */ +.bpmn-icon-intermediate-event-throw-message:before { content: '\e850'; } /* '' */ +.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before { content: '\e851'; } /* '' */ +.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before { content: '\e852'; } /* '' */ +.bpmn-icon-intermediate-event-throw-multiple:before { content: '\e853'; } /* '' */ +.bpmn-icon-start-event-non-interrupting-message:before { content: '\e854'; } /* '' */ +.bpmn-icon-ad-hoc-marker:before { content: '\e855'; } /* '' */ +.bpmn-icon-service-task:before { content: '\e856'; } /* '' */ +.bpmn-icon-task-none:before { content: '\e857'; } /* '' */ +.bpmn-icon-compensation-marker:before { content: '\e858'; } /* '' */ +.bpmn-icon-start-event-non-interrupting-multiple:before { content: '\e859'; } /* '' */ +.bpmn-icon-intermediate-event-throw-signal:before { content: '\e85a'; } /* '' */ +.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before { content: '\e85b'; } /* '' */ +.bpmn-icon-participant:before { content: '\e85c'; } /* '' */ +.bpmn-icon-event-subprocess-expanded:before { content: '\e85d'; } /* '' */ +.bpmn-icon-lane-insert-below:before { content: '\e85e'; } /* '' */ +.bpmn-icon-space-tool:before { content: '\e85f'; } /* '' */ +.bpmn-icon-connection-multi:before { content: '\e860'; } /* '' */ +.bpmn-icon-lane:before { content: '\e861'; } /* '' */ +.bpmn-icon-lasso-tool:before { content: '\e862'; } /* '' */ +.bpmn-icon-lane-insert-above:before { content: '\e863'; } /* '' */ +.bpmn-icon-lane-divide-three:before { content: '\e864'; } /* '' */ +.bpmn-icon-lane-divide-two:before { content: '\e865'; } /* '' */ +.bpmn-icon-data-input:before { content: '\e866'; } /* '' */ +.bpmn-icon-data-output:before { content: '\e867'; } /* '' */ +.bpmn-icon-hand-tool:before { content: '\e868'; } /* '' */ +.bpmn-icon-group:before { content: '\e869'; } /* '' */ +.bpmn-icon-transaction:before { content: '\e8c4'; } /* '' */ +/*!*************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].rules[0].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].rules[0].oneOf[0].use[2]!./node_modules/material-icons/iconfont/material-icons.css ***! + \*************************************************************************************************************************************************************************************************************************************************/ +@font-face { + font-family: "Material Icons"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url('material-icons.woff2') format("woff2"), url('material-icons.woff') format("woff"); +} +.material-icons { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} + +@font-face { + font-family: "Material Icons Outlined"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url('material-icons-outlined.woff2') format("woff2"), url('material-icons-outlined.woff') format("woff"); +} +.material-icons-outlined { + font-family: "Material Icons Outlined"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} + +@font-face { + font-family: "Material Icons Round"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url('material-icons-round.woff2') format("woff2"), url('material-icons-round.woff') format("woff"); +} +.material-icons-round { + font-family: "Material Icons Round"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} + +@font-face { + font-family: "Material Icons Sharp"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url('material-icons-sharp.woff2') format("woff2"), url('material-icons-sharp.woff') format("woff"); +} +.material-icons-sharp { + font-family: "Material Icons Sharp"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} + +@font-face { + font-family: "Material Icons Two Tone"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url('material-icons-two-tone.woff2') format("woff2"), url('material-icons-two-tone.woff') format("woff"); +} +.material-icons-two-tone { + font-family: "Material Icons Two Tone"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} + +/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[6].rules[0].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[6].rules[0].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[6].rules[1].use[0]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[6].rules[1].use[1]!./src/styles.scss?ngGlobalStyle ***! + \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +html { + --mat-badge-text-font: Roboto, sans-serif; + --mat-badge-text-size: 12px; + --mat-badge-text-weight: 600; + --mat-badge-small-size-text-size: 9px; + --mat-badge-large-size-text-size: 24px; +} + +.mat-h1, +.mat-headline-5, +.mat-typography .mat-h1, +.mat-typography .mat-headline-5, +.mat-typography h1 { + font: 400 24px / 32px Roboto, sans-serif; + letter-spacing: normal; + margin: 0 0 16px; +} + +.mat-h2, +.mat-headline-6, +.mat-typography .mat-h2, +.mat-typography .mat-headline-6, +.mat-typography h2 { + font: 500 20px / 32px Roboto, sans-serif; + letter-spacing: 0.0125em; + margin: 0 0 16px; +} + +.mat-h3, +.mat-subtitle-1, +.mat-typography .mat-h3, +.mat-typography .mat-subtitle-1, +.mat-typography h3 { + font: 400 16px / 28px Roboto, sans-serif; + letter-spacing: 0.009375em; + margin: 0 0 16px; +} + +.mat-h4, +.mat-body-1, +.mat-typography .mat-h4, +.mat-typography .mat-body-1, +.mat-typography h4 { + font: 400 16px / 24px Roboto, sans-serif; + letter-spacing: 0.03125em; + margin: 0 0 16px; +} + +.mat-h5, +.mat-typography .mat-h5, +.mat-typography h5 { + font: 400 calc(14px * 0.83) / 20px Roboto, sans-serif; + margin: 0 0 12px; +} + +.mat-h6, +.mat-typography .mat-h6, +.mat-typography h6 { + font: 400 calc(14px * 0.67) / 20px Roboto, sans-serif; + margin: 0 0 12px; +} + +.mat-body-strong, +.mat-subtitle-2, +.mat-typography .mat-body-strong, +.mat-typography .mat-subtitle-2 { + font: 500 14px / 22px Roboto, sans-serif; + letter-spacing: 0.0071428571em; +} + +.mat-body, +.mat-body-2, +.mat-typography .mat-body, +.mat-typography .mat-body-2, +.mat-typography { + font: 400 14px / 20px Roboto, sans-serif; + letter-spacing: 0.0178571429em; +} +.mat-body p, +.mat-body-2 p, +.mat-typography .mat-body p, +.mat-typography .mat-body-2 p, +.mat-typography p { + margin: 0 0 12px; +} + +.mat-small, +.mat-caption, +.mat-typography .mat-small, +.mat-typography .mat-caption { + font: 400 12px / 20px Roboto, sans-serif; + letter-spacing: 0.0333333333em; +} + +.mat-headline-1, +.mat-typography .mat-headline-1 { + font: 300 96px / 96px Roboto, sans-serif; + letter-spacing: -0.015625em; + margin: 0 0 56px; +} + +.mat-headline-2, +.mat-typography .mat-headline-2 { + font: 300 60px / 60px Roboto, sans-serif; + letter-spacing: -0.0083333333em; + margin: 0 0 64px; +} + +.mat-headline-3, +.mat-typography .mat-headline-3 { + font: 400 48px / 50px Roboto, sans-serif; + letter-spacing: normal; + margin: 0 0 64px; +} + +.mat-headline-4, +.mat-typography .mat-headline-4 { + font: 400 34px / 40px Roboto, sans-serif; + letter-spacing: 0.0073529412em; + margin: 0 0 64px; +} + +html { + --mat-bottom-sheet-container-text-font: Roboto, sans-serif; + --mat-bottom-sheet-container-text-line-height: 20px; + --mat-bottom-sheet-container-text-size: 14px; + --mat-bottom-sheet-container-text-tracking: 0.0178571429em; + --mat-bottom-sheet-container-text-weight: 400; +} + +html { + --mat-legacy-button-toggle-label-text-font: Roboto, sans-serif; + --mat-legacy-button-toggle-label-text-line-height: 24px; + --mat-legacy-button-toggle-label-text-size: 16px; + --mat-legacy-button-toggle-label-text-tracking: 0.03125em; + --mat-legacy-button-toggle-label-text-weight: 400; + --mat-standard-button-toggle-label-text-font: Roboto, sans-serif; + --mat-standard-button-toggle-label-text-line-height: 24px; + --mat-standard-button-toggle-label-text-size: 16px; + --mat-standard-button-toggle-label-text-tracking: 0.03125em; + --mat-standard-button-toggle-label-text-weight: 400; +} + +html { + --mat-datepicker-calendar-text-font: Roboto, sans-serif; + --mat-datepicker-calendar-text-size: 13px; + --mat-datepicker-calendar-body-label-text-size: 14px; + --mat-datepicker-calendar-body-label-text-weight: 500; + --mat-datepicker-calendar-period-button-text-size: 14px; + --mat-datepicker-calendar-period-button-text-weight: 500; + --mat-datepicker-calendar-header-text-size: 11px; + --mat-datepicker-calendar-header-text-weight: 400; +} + +html { + --mat-expansion-header-text-font: Roboto, sans-serif; + --mat-expansion-header-text-size: 14px; + --mat-expansion-header-text-weight: 500; + --mat-expansion-header-text-line-height: inherit; + --mat-expansion-header-text-tracking: inherit; + --mat-expansion-container-text-font: Roboto, sans-serif; + --mat-expansion-container-text-line-height: 20px; + --mat-expansion-container-text-size: 14px; + --mat-expansion-container-text-tracking: 0.0178571429em; + --mat-expansion-container-text-weight: 400; +} + +html { + --mat-grid-list-tile-header-primary-text-size: 14px; + --mat-grid-list-tile-header-secondary-text-size: 12px; + --mat-grid-list-tile-footer-primary-text-size: 14px; + --mat-grid-list-tile-footer-secondary-text-size: 12px; +} + +html { + --mat-stepper-container-text-font: Roboto, sans-serif; + --mat-stepper-header-label-text-font: Roboto, sans-serif; + --mat-stepper-header-label-text-size: 14px; + --mat-stepper-header-label-text-weight: 400; + --mat-stepper-header-error-state-label-text-size: 16px; + --mat-stepper-header-selected-state-label-text-size: 16px; + --mat-stepper-header-selected-state-label-text-weight: 400; +} + +html { + --mat-toolbar-title-text-font: Roboto, sans-serif; + --mat-toolbar-title-text-line-height: 32px; + --mat-toolbar-title-text-size: 20px; + --mat-toolbar-title-text-tracking: 0.0125em; + --mat-toolbar-title-text-weight: 500; +} + +html { + --mat-tree-node-text-font: Roboto, sans-serif; + --mat-tree-node-text-size: 14px; + --mat-tree-node-text-weight: 400; +} + +html { + --mat-option-label-text-font: Roboto, sans-serif; + --mat-option-label-text-line-height: 24px; + --mat-option-label-text-size: 16px; + --mat-option-label-text-tracking: 0.03125em; + --mat-option-label-text-weight: 400; +} + +html { + --mat-optgroup-label-text-font: Roboto, sans-serif; + --mat-optgroup-label-text-line-height: 24px; + --mat-optgroup-label-text-size: 16px; + --mat-optgroup-label-text-tracking: 0.03125em; + --mat-optgroup-label-text-weight: 400; +} + +html { + --mat-card-title-text-font: Roboto, sans-serif; + --mat-card-title-text-line-height: 32px; + --mat-card-title-text-size: 20px; + --mat-card-title-text-tracking: 0.0125em; + --mat-card-title-text-weight: 500; + --mat-card-subtitle-text-font: Roboto, sans-serif; + --mat-card-subtitle-text-line-height: 22px; + --mat-card-subtitle-text-size: 14px; + --mat-card-subtitle-text-tracking: 0.0071428571em; + --mat-card-subtitle-text-weight: 500; +} + +html { + --mdc-plain-tooltip-supporting-text-font: Roboto, sans-serif; + --mdc-plain-tooltip-supporting-text-size: 12px; + --mdc-plain-tooltip-supporting-text-weight: 400; + --mdc-plain-tooltip-supporting-text-tracking: 0.0333333333em; +} + +html { + --mdc-filled-text-field-label-text-font: Roboto, sans-serif; + --mdc-filled-text-field-label-text-size: 16px; + --mdc-filled-text-field-label-text-tracking: 0.03125em; + --mdc-filled-text-field-label-text-weight: 400; + --mdc-outlined-text-field-label-text-font: Roboto, sans-serif; + --mdc-outlined-text-field-label-text-size: 16px; + --mdc-outlined-text-field-label-text-tracking: 0.03125em; + --mdc-outlined-text-field-label-text-weight: 400; + --mat-form-field-container-text-font: Roboto, sans-serif; + --mat-form-field-container-text-line-height: 24px; + --mat-form-field-container-text-size: 16px; + --mat-form-field-container-text-tracking: 0.03125em; + --mat-form-field-container-text-weight: 400; + --mat-form-field-outlined-label-text-populated-size: 16px; + --mat-form-field-subscript-text-font: Roboto, sans-serif; + --mat-form-field-subscript-text-line-height: 20px; + --mat-form-field-subscript-text-size: 12px; + --mat-form-field-subscript-text-tracking: 0.0333333333em; + --mat-form-field-subscript-text-weight: 400; +} + +html { + --mat-select-trigger-text-font: Roboto, sans-serif; + --mat-select-trigger-text-line-height: 24px; + --mat-select-trigger-text-size: 16px; + --mat-select-trigger-text-tracking: 0.03125em; + --mat-select-trigger-text-weight: 400; +} + +html { + --mdc-dialog-subhead-font: Roboto, sans-serif; + --mdc-dialog-subhead-line-height: 32px; + --mdc-dialog-subhead-size: 20px; + --mdc-dialog-subhead-weight: 500; + --mdc-dialog-subhead-tracking: 0.0125em; + --mdc-dialog-supporting-text-font: Roboto, sans-serif; + --mdc-dialog-supporting-text-line-height: 24px; + --mdc-dialog-supporting-text-size: 16px; + --mdc-dialog-supporting-text-weight: 400; + --mdc-dialog-supporting-text-tracking: 0.03125em; +} + +.mat-mdc-standard-chip { + --mdc-chip-label-text-font: Roboto, sans-serif; + --mdc-chip-label-text-line-height: 20px; + --mdc-chip-label-text-size: 14px; + --mdc-chip-label-text-tracking: 0.0178571429em; + --mdc-chip-label-text-weight: 400; +} + +html .mat-mdc-slide-toggle { + --mdc-form-field-label-text-font: Roboto, sans-serif; + --mdc-form-field-label-text-line-height: 20px; + --mdc-form-field-label-text-size: 14px; + --mdc-form-field-label-text-tracking: 0.0178571429em; + --mdc-form-field-label-text-weight: 400; +} + +.mat-mdc-radio-button { + --mdc-form-field-label-text-font: Roboto, sans-serif; + --mdc-form-field-label-text-line-height: 20px; + --mdc-form-field-label-text-size: 14px; + --mdc-form-field-label-text-tracking: 0.0178571429em; + --mdc-form-field-label-text-weight: 400; +} + +html { + --mdc-slider-label-label-text-font: Roboto, sans-serif; + --mdc-slider-label-label-text-size: 14px; + --mdc-slider-label-label-text-line-height: 22px; + --mdc-slider-label-label-text-tracking: 0.0071428571em; + --mdc-slider-label-label-text-weight: 500; +} + +html { + --mat-menu-item-label-text-font: Roboto, sans-serif; + --mat-menu-item-label-text-size: 16px; + --mat-menu-item-label-text-tracking: 0.03125em; + --mat-menu-item-label-text-line-height: 24px; + --mat-menu-item-label-text-weight: 400; +} + +html { + --mdc-list-list-item-label-text-font: Roboto, sans-serif; + --mdc-list-list-item-label-text-line-height: 24px; + --mdc-list-list-item-label-text-size: 16px; + --mdc-list-list-item-label-text-tracking: 0.03125em; + --mdc-list-list-item-label-text-weight: 400; + --mdc-list-list-item-supporting-text-font: Roboto, sans-serif; + --mdc-list-list-item-supporting-text-line-height: 20px; + --mdc-list-list-item-supporting-text-size: 14px; + --mdc-list-list-item-supporting-text-tracking: 0.0178571429em; + --mdc-list-list-item-supporting-text-weight: 400; + --mdc-list-list-item-trailing-supporting-text-font: Roboto, sans-serif; + --mdc-list-list-item-trailing-supporting-text-line-height: 20px; + --mdc-list-list-item-trailing-supporting-text-size: 12px; + --mdc-list-list-item-trailing-supporting-text-tracking: 0.0333333333em; + --mdc-list-list-item-trailing-supporting-text-weight: 400; +} + +.mdc-list-group__subheader { + font: 400 16px / 28px Roboto, sans-serif; + letter-spacing: 0.009375em; +} + +html { + --mat-paginator-container-text-font: Roboto, sans-serif; + --mat-paginator-container-text-line-height: 20px; + --mat-paginator-container-text-size: 12px; + --mat-paginator-container-text-tracking: 0.0333333333em; + --mat-paginator-container-text-weight: 400; + --mat-paginator-select-trigger-text-size: 12px; +} + +.mat-mdc-tab-header { + --mat-tab-header-label-text-font: Roboto, sans-serif; + --mat-tab-header-label-text-size: 14px; + --mat-tab-header-label-text-tracking: 0.0892857143em; + --mat-tab-header-label-text-line-height: 36px; + --mat-tab-header-label-text-weight: 500; +} + +.mat-mdc-checkbox { + --mdc-form-field-label-text-font: Roboto, sans-serif; + --mdc-form-field-label-text-line-height: 20px; + --mdc-form-field-label-text-size: 14px; + --mdc-form-field-label-text-tracking: 0.0178571429em; + --mdc-form-field-label-text-weight: 400; +} + +html { + --mdc-text-button-label-text-font: Roboto, sans-serif; + --mdc-text-button-label-text-size: 14px; + --mdc-text-button-label-text-tracking: 0.0892857143em; + --mdc-text-button-label-text-weight: 500; + --mdc-text-button-label-text-transform: none; + --mdc-filled-button-label-text-font: Roboto, sans-serif; + --mdc-filled-button-label-text-size: 14px; + --mdc-filled-button-label-text-tracking: 0.0892857143em; + --mdc-filled-button-label-text-weight: 500; + --mdc-filled-button-label-text-transform: none; + --mdc-outlined-button-label-text-font: Roboto, sans-serif; + --mdc-outlined-button-label-text-size: 14px; + --mdc-outlined-button-label-text-tracking: 0.0892857143em; + --mdc-outlined-button-label-text-weight: 500; + --mdc-outlined-button-label-text-transform: none; + --mdc-protected-button-label-text-font: Roboto, sans-serif; + --mdc-protected-button-label-text-size: 14px; + --mdc-protected-button-label-text-tracking: 0.0892857143em; + --mdc-protected-button-label-text-weight: 500; + --mdc-protected-button-label-text-transform: none; +} + +html { + --mdc-extended-fab-label-text-font: Roboto, sans-serif; + --mdc-extended-fab-label-text-size: 14px; + --mdc-extended-fab-label-text-tracking: 0.0892857143em; + --mdc-extended-fab-label-text-weight: 500; +} + +html { + --mdc-snackbar-supporting-text-font: Roboto, sans-serif; + --mdc-snackbar-supporting-text-line-height: 20px; + --mdc-snackbar-supporting-text-size: 14px; + --mdc-snackbar-supporting-text-weight: 400; +} + +html { + --mat-table-header-headline-font: Roboto, sans-serif; + --mat-table-header-headline-line-height: 22px; + --mat-table-header-headline-size: 14px; + --mat-table-header-headline-weight: 500; + --mat-table-header-headline-tracking: 0.0071428571em; + --mat-table-row-item-label-text-font: Roboto, sans-serif; + --mat-table-row-item-label-text-line-height: 20px; + --mat-table-row-item-label-text-size: 14px; + --mat-table-row-item-label-text-weight: 400; + --mat-table-row-item-label-text-tracking: 0.0178571429em; + --mat-table-footer-supporting-text-font: Roboto, sans-serif; + --mat-table-footer-supporting-text-line-height: 20px; + --mat-table-footer-supporting-text-size: 14px; + --mat-table-footer-supporting-text-weight: 400; + --mat-table-footer-supporting-text-tracking: 0.0178571429em; +} + +.mat-ripple { + overflow: hidden; + position: relative; +} +.mat-ripple:not(:empty) { + transform: translateZ(0); +} + +.mat-ripple.mat-ripple-unbounded { + overflow: visible; +} + +.mat-ripple-element { + position: absolute; + border-radius: 50%; + pointer-events: none; + transition: opacity, transform 0ms cubic-bezier(0, 0, 0.2, 1); + transform: scale3d(0, 0, 0); + background-color: var(--mat-ripple-color, rgba(0, 0, 0, 0.1)); +} +.cdk-high-contrast-active .mat-ripple-element { + display: none; +} + +.cdk-visually-hidden { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; + white-space: nowrap; + outline: 0; + -webkit-appearance: none; + -moz-appearance: none; + left: 0; +} +[dir=rtl] .cdk-visually-hidden { + left: auto; + right: 0; +} + +.cdk-overlay-container, .cdk-global-overlay-wrapper { + pointer-events: none; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.cdk-overlay-container { + position: fixed; + z-index: 1000; +} +.cdk-overlay-container:empty { + display: none; +} + +.cdk-global-overlay-wrapper { + display: flex; + position: absolute; + z-index: 1000; +} + +.cdk-overlay-pane { + position: absolute; + pointer-events: auto; + box-sizing: border-box; + z-index: 1000; + display: flex; + max-width: 100%; + max-height: 100%; +} + +.cdk-overlay-backdrop { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 1000; + pointer-events: auto; + -webkit-tap-highlight-color: transparent; + transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1); + opacity: 0; +} +.cdk-overlay-backdrop.cdk-overlay-backdrop-showing { + opacity: 1; +} +.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing { + opacity: 0.6; +} + +.cdk-overlay-dark-backdrop { + background: rgba(0, 0, 0, 0.32); +} + +.cdk-overlay-transparent-backdrop { + transition: visibility 1ms linear, opacity 1ms linear; + visibility: hidden; + opacity: 1; +} +.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing { + opacity: 0; + visibility: visible; +} + +.cdk-overlay-backdrop-noop-animation { + transition: none; +} + +.cdk-overlay-connected-position-bounding-box { + position: absolute; + z-index: 1000; + display: flex; + flex-direction: column; + min-width: 1px; + min-height: 1px; +} + +.cdk-global-scrollblock { + position: fixed; + width: 100%; + overflow-y: scroll; +} + +textarea.cdk-textarea-autosize { + resize: none; +} + +textarea.cdk-textarea-autosize-measuring { + padding: 2px 0 !important; + box-sizing: content-box !important; + height: auto !important; + overflow: hidden !important; +} + +textarea.cdk-textarea-autosize-measuring-firefox { + padding: 2px 0 !important; + box-sizing: content-box !important; + height: 0 !important; +} + +@keyframes cdk-text-field-autofill-start { /*!*/ } +@keyframes cdk-text-field-autofill-end { /*!*/ } +.cdk-text-field-autofill-monitored:-webkit-autofill { + animation: cdk-text-field-autofill-start 0s 1ms; +} + +.cdk-text-field-autofill-monitored:not(:-webkit-autofill) { + animation: cdk-text-field-autofill-end 0s 1ms; +} + +.mat-focus-indicator { + position: relative; +} +.mat-focus-indicator::before { + top: 0; + left: 0; + right: 0; + bottom: 0; + position: absolute; + box-sizing: border-box; + pointer-events: none; + display: var(--mat-focus-indicator-display, none); + border: var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent); + border-radius: var(--mat-focus-indicator-border-radius, 4px); +} +.mat-focus-indicator:focus::before { + content: ""; +} + +.cdk-high-contrast-active { + --mat-focus-indicator-display: block; +} + +.mat-mdc-focus-indicator { + position: relative; +} +.mat-mdc-focus-indicator::before { + top: 0; + left: 0; + right: 0; + bottom: 0; + position: absolute; + box-sizing: border-box; + pointer-events: none; + display: var(--mat-mdc-focus-indicator-display, none); + border: var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent); + border-radius: var(--mat-mdc-focus-indicator-border-radius, 4px); +} +.mat-mdc-focus-indicator:focus::before { + content: ""; +} + +.cdk-high-contrast-active { + --mat-mdc-focus-indicator-display: block; +} + +.mat-app-background { + background-color: var(--mat-app-background-color, transparent); + color: var(--mat-app-text-color, inherit); +} + +html { + --mat-ripple-color: rgba(0, 0, 0, 0.1); +} + +html { + --mat-option-selected-state-label-text-color: #00bcd4; + --mat-option-label-text-color: rgba(0, 0, 0, 0.87); + --mat-option-hover-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-option-focus-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-option-selected-state-layer-color: rgba(0, 0, 0, 0.04); +} + +.mat-accent { + --mat-option-selected-state-label-text-color: #ff4081; + --mat-option-label-text-color: rgba(0, 0, 0, 0.87); + --mat-option-hover-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-option-focus-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-option-selected-state-layer-color: rgba(0, 0, 0, 0.04); +} + +.mat-warn { + --mat-option-selected-state-label-text-color: #f44336; + --mat-option-label-text-color: rgba(0, 0, 0, 0.87); + --mat-option-hover-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-option-focus-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-option-selected-state-layer-color: rgba(0, 0, 0, 0.04); +} + +html { + --mat-optgroup-label-text-color: rgba(0, 0, 0, 0.87); +} + +.mat-primary { + --mat-full-pseudo-checkbox-selected-icon-color: #00bcd4; + --mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa; + --mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa; + --mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0; + --mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0; + --mat-minimal-pseudo-checkbox-selected-checkmark-color: #00bcd4; + --mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0; +} + +html { + --mat-full-pseudo-checkbox-selected-icon-color: #ff4081; + --mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa; + --mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa; + --mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0; + --mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0; + --mat-minimal-pseudo-checkbox-selected-checkmark-color: #ff4081; + --mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0; +} + +.mat-accent { + --mat-full-pseudo-checkbox-selected-icon-color: #ff4081; + --mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa; + --mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa; + --mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0; + --mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0; + --mat-minimal-pseudo-checkbox-selected-checkmark-color: #ff4081; + --mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0; +} + +.mat-warn { + --mat-full-pseudo-checkbox-selected-icon-color: #f44336; + --mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa; + --mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa; + --mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0; + --mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0; + --mat-minimal-pseudo-checkbox-selected-checkmark-color: #f44336; + --mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0; +} + +html { + --mat-app-background-color: #fafafa; + --mat-app-text-color: rgba(0, 0, 0, 0.87); +} + +.mat-elevation-z0, .mat-mdc-elevation-specific.mat-elevation-z0 { + box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z1, .mat-mdc-elevation-specific.mat-elevation-z1 { + box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z2, .mat-mdc-elevation-specific.mat-elevation-z2 { + box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z3, .mat-mdc-elevation-specific.mat-elevation-z3 { + box-shadow: 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z4, .mat-mdc-elevation-specific.mat-elevation-z4 { + box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z5, .mat-mdc-elevation-specific.mat-elevation-z5 { + box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 5px 8px 0px rgba(0, 0, 0, 0.14), 0px 1px 14px 0px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z6, .mat-mdc-elevation-specific.mat-elevation-z6 { + box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z7, .mat-mdc-elevation-specific.mat-elevation-z7 { + box-shadow: 0px 4px 5px -2px rgba(0, 0, 0, 0.2), 0px 7px 10px 1px rgba(0, 0, 0, 0.14), 0px 2px 16px 1px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z8, .mat-mdc-elevation-specific.mat-elevation-z8 { + box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z9, .mat-mdc-elevation-specific.mat-elevation-z9 { + box-shadow: 0px 5px 6px -3px rgba(0, 0, 0, 0.2), 0px 9px 12px 1px rgba(0, 0, 0, 0.14), 0px 3px 16px 2px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z10, .mat-mdc-elevation-specific.mat-elevation-z10 { + box-shadow: 0px 6px 6px -3px rgba(0, 0, 0, 0.2), 0px 10px 14px 1px rgba(0, 0, 0, 0.14), 0px 4px 18px 3px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z11, .mat-mdc-elevation-specific.mat-elevation-z11 { + box-shadow: 0px 6px 7px -4px rgba(0, 0, 0, 0.2), 0px 11px 15px 1px rgba(0, 0, 0, 0.14), 0px 4px 20px 3px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z12, .mat-mdc-elevation-specific.mat-elevation-z12 { + box-shadow: 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z13, .mat-mdc-elevation-specific.mat-elevation-z13 { + box-shadow: 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 13px 19px 2px rgba(0, 0, 0, 0.14), 0px 5px 24px 4px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z14, .mat-mdc-elevation-specific.mat-elevation-z14 { + box-shadow: 0px 7px 9px -4px rgba(0, 0, 0, 0.2), 0px 14px 21px 2px rgba(0, 0, 0, 0.14), 0px 5px 26px 4px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z15, .mat-mdc-elevation-specific.mat-elevation-z15 { + box-shadow: 0px 8px 9px -5px rgba(0, 0, 0, 0.2), 0px 15px 22px 2px rgba(0, 0, 0, 0.14), 0px 6px 28px 5px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z16, .mat-mdc-elevation-specific.mat-elevation-z16 { + box-shadow: 0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z17, .mat-mdc-elevation-specific.mat-elevation-z17 { + box-shadow: 0px 8px 11px -5px rgba(0, 0, 0, 0.2), 0px 17px 26px 2px rgba(0, 0, 0, 0.14), 0px 6px 32px 5px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z18, .mat-mdc-elevation-specific.mat-elevation-z18 { + box-shadow: 0px 9px 11px -5px rgba(0, 0, 0, 0.2), 0px 18px 28px 2px rgba(0, 0, 0, 0.14), 0px 7px 34px 6px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z19, .mat-mdc-elevation-specific.mat-elevation-z19 { + box-shadow: 0px 9px 12px -6px rgba(0, 0, 0, 0.2), 0px 19px 29px 2px rgba(0, 0, 0, 0.14), 0px 7px 36px 6px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z20, .mat-mdc-elevation-specific.mat-elevation-z20 { + box-shadow: 0px 10px 13px -6px rgba(0, 0, 0, 0.2), 0px 20px 31px 3px rgba(0, 0, 0, 0.14), 0px 8px 38px 7px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z21, .mat-mdc-elevation-specific.mat-elevation-z21 { + box-shadow: 0px 10px 13px -6px rgba(0, 0, 0, 0.2), 0px 21px 33px 3px rgba(0, 0, 0, 0.14), 0px 8px 40px 7px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z22, .mat-mdc-elevation-specific.mat-elevation-z22 { + box-shadow: 0px 10px 14px -6px rgba(0, 0, 0, 0.2), 0px 22px 35px 3px rgba(0, 0, 0, 0.14), 0px 8px 42px 7px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z23, .mat-mdc-elevation-specific.mat-elevation-z23 { + box-shadow: 0px 11px 14px -7px rgba(0, 0, 0, 0.2), 0px 23px 36px 3px rgba(0, 0, 0, 0.14), 0px 9px 44px 8px rgba(0, 0, 0, 0.12); +} + +.mat-elevation-z24, .mat-mdc-elevation-specific.mat-elevation-z24 { + box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12); +} + +.mat-theme-loaded-marker { + display: none; +} + +html { + --mdc-elevated-card-container-shape: 4px; + --mdc-outlined-card-container-shape: 4px; + --mdc-outlined-card-outline-width: 1px; +} + +html { + --mdc-elevated-card-container-color: white; + --mdc-elevated-card-container-elevation: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); + --mdc-outlined-card-container-color: white; + --mdc-outlined-card-outline-color: rgba(0, 0, 0, 0.12); + --mdc-outlined-card-container-elevation: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12); + --mat-card-subtitle-text-color: rgba(0, 0, 0, 0.54); +} + +html { + --mdc-linear-progress-active-indicator-height: 4px; + --mdc-linear-progress-track-height: 4px; + --mdc-linear-progress-track-shape: 0; +} + +.mat-mdc-progress-bar { + --mdc-linear-progress-active-indicator-color: #00bcd4; + --mdc-linear-progress-track-color: rgba(0, 188, 212, 0.25); +} +.mat-mdc-progress-bar.mat-accent { + --mdc-linear-progress-active-indicator-color: #ff4081; + --mdc-linear-progress-track-color: rgba(255, 64, 129, 0.25); +} +.mat-mdc-progress-bar.mat-warn { + --mdc-linear-progress-active-indicator-color: #f44336; + --mdc-linear-progress-track-color: rgba(244, 67, 54, 0.25); +} + +html { + --mdc-plain-tooltip-container-shape: 4px; + --mdc-plain-tooltip-supporting-text-line-height: 16px; +} + +html { + --mdc-plain-tooltip-container-color: #616161; + --mdc-plain-tooltip-supporting-text-color: #fff; +} + +html { + --mdc-filled-text-field-active-indicator-height: 1px; + --mdc-filled-text-field-focus-active-indicator-height: 2px; + --mdc-filled-text-field-container-shape: 4px; + --mdc-outlined-text-field-outline-width: 1px; + --mdc-outlined-text-field-focus-outline-width: 2px; + --mdc-outlined-text-field-container-shape: 4px; +} + +html { + --mdc-filled-text-field-caret-color: #00bcd4; + --mdc-filled-text-field-focus-active-indicator-color: #00bcd4; + --mdc-filled-text-field-focus-label-text-color: rgba(0, 188, 212, 0.87); + --mdc-filled-text-field-container-color: whitesmoke; + --mdc-filled-text-field-disabled-container-color: #fafafa; + --mdc-filled-text-field-label-text-color: rgba(0, 0, 0, 0.6); + --mdc-filled-text-field-hover-label-text-color: rgba(0, 0, 0, 0.6); + --mdc-filled-text-field-disabled-label-text-color: rgba(0, 0, 0, 0.38); + --mdc-filled-text-field-input-text-color: rgba(0, 0, 0, 0.87); + --mdc-filled-text-field-disabled-input-text-color: rgba(0, 0, 0, 0.38); + --mdc-filled-text-field-input-text-placeholder-color: rgba(0, 0, 0, 0.6); + --mdc-filled-text-field-error-hover-label-text-color: #f44336; + --mdc-filled-text-field-error-focus-label-text-color: #f44336; + --mdc-filled-text-field-error-label-text-color: #f44336; + --mdc-filled-text-field-error-caret-color: #f44336; + --mdc-filled-text-field-active-indicator-color: rgba(0, 0, 0, 0.42); + --mdc-filled-text-field-disabled-active-indicator-color: rgba(0, 0, 0, 0.06); + --mdc-filled-text-field-hover-active-indicator-color: rgba(0, 0, 0, 0.87); + --mdc-filled-text-field-error-active-indicator-color: #f44336; + --mdc-filled-text-field-error-focus-active-indicator-color: #f44336; + --mdc-filled-text-field-error-hover-active-indicator-color: #f44336; + --mdc-outlined-text-field-caret-color: #00bcd4; + --mdc-outlined-text-field-focus-outline-color: #00bcd4; + --mdc-outlined-text-field-focus-label-text-color: rgba(0, 188, 212, 0.87); + --mdc-outlined-text-field-label-text-color: rgba(0, 0, 0, 0.6); + --mdc-outlined-text-field-hover-label-text-color: rgba(0, 0, 0, 0.6); + --mdc-outlined-text-field-disabled-label-text-color: rgba(0, 0, 0, 0.38); + --mdc-outlined-text-field-input-text-color: rgba(0, 0, 0, 0.87); + --mdc-outlined-text-field-disabled-input-text-color: rgba(0, 0, 0, 0.38); + --mdc-outlined-text-field-input-text-placeholder-color: rgba(0, 0, 0, 0.6); + --mdc-outlined-text-field-error-caret-color: #f44336; + --mdc-outlined-text-field-error-focus-label-text-color: #f44336; + --mdc-outlined-text-field-error-label-text-color: #f44336; + --mdc-outlined-text-field-error-hover-label-text-color: #f44336; + --mdc-outlined-text-field-outline-color: rgba(0, 0, 0, 0.38); + --mdc-outlined-text-field-disabled-outline-color: rgba(0, 0, 0, 0.06); + --mdc-outlined-text-field-hover-outline-color: rgba(0, 0, 0, 0.87); + --mdc-outlined-text-field-error-focus-outline-color: #f44336; + --mdc-outlined-text-field-error-hover-outline-color: #f44336; + --mdc-outlined-text-field-error-outline-color: #f44336; + --mat-form-field-focus-select-arrow-color: rgba(0, 188, 212, 0.87); + --mat-form-field-disabled-input-text-placeholder-color: rgba(0, 0, 0, 0.38); + --mat-form-field-state-layer-color: rgba(0, 0, 0, 0.87); + --mat-form-field-error-text-color: #f44336; + --mat-form-field-select-option-text-color: inherit; + --mat-form-field-select-disabled-option-text-color: GrayText; + --mat-form-field-leading-icon-color: unset; + --mat-form-field-disabled-leading-icon-color: unset; + --mat-form-field-trailing-icon-color: unset; + --mat-form-field-disabled-trailing-icon-color: unset; + --mat-form-field-error-focus-trailing-icon-color: unset; + --mat-form-field-error-hover-trailing-icon-color: unset; + --mat-form-field-error-trailing-icon-color: unset; + --mat-form-field-enabled-select-arrow-color: rgba(0, 0, 0, 0.54); + --mat-form-field-disabled-select-arrow-color: rgba(0, 0, 0, 0.38); + --mat-form-field-hover-state-layer-opacity: 0.04; + --mat-form-field-focus-state-layer-opacity: 0.08; +} + +.mat-mdc-form-field.mat-accent { + --mdc-filled-text-field-caret-color: #ff4081; + --mdc-filled-text-field-focus-active-indicator-color: #ff4081; + --mdc-filled-text-field-focus-label-text-color: rgba(255, 64, 129, 0.87); + --mdc-outlined-text-field-caret-color: #ff4081; + --mdc-outlined-text-field-focus-outline-color: #ff4081; + --mdc-outlined-text-field-focus-label-text-color: rgba(255, 64, 129, 0.87); + --mat-form-field-focus-select-arrow-color: rgba(255, 64, 129, 0.87); +} + +.mat-mdc-form-field.mat-warn { + --mdc-filled-text-field-caret-color: #f44336; + --mdc-filled-text-field-focus-active-indicator-color: #f44336; + --mdc-filled-text-field-focus-label-text-color: rgba(244, 67, 54, 0.87); + --mdc-outlined-text-field-caret-color: #f44336; + --mdc-outlined-text-field-focus-outline-color: #f44336; + --mdc-outlined-text-field-focus-label-text-color: rgba(244, 67, 54, 0.87); + --mat-form-field-focus-select-arrow-color: rgba(244, 67, 54, 0.87); +} + +html { + --mat-form-field-container-height: 56px; + --mat-form-field-filled-label-display: block; + --mat-form-field-container-vertical-padding: 16px; + --mat-form-field-filled-with-label-container-padding-top: 24px; + --mat-form-field-filled-with-label-container-padding-bottom: 8px; +} + +html { + --mat-select-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); +} + +html { + --mat-select-panel-background-color: white; + --mat-select-enabled-trigger-text-color: rgba(0, 0, 0, 0.87); + --mat-select-disabled-trigger-text-color: rgba(0, 0, 0, 0.38); + --mat-select-placeholder-text-color: rgba(0, 0, 0, 0.6); + --mat-select-enabled-arrow-color: rgba(0, 0, 0, 0.54); + --mat-select-disabled-arrow-color: rgba(0, 0, 0, 0.38); + --mat-select-focused-arrow-color: rgba(0, 188, 212, 0.87); + --mat-select-invalid-arrow-color: rgba(244, 67, 54, 0.87); +} +html .mat-mdc-form-field.mat-accent { + --mat-select-panel-background-color: white; + --mat-select-enabled-trigger-text-color: rgba(0, 0, 0, 0.87); + --mat-select-disabled-trigger-text-color: rgba(0, 0, 0, 0.38); + --mat-select-placeholder-text-color: rgba(0, 0, 0, 0.6); + --mat-select-enabled-arrow-color: rgba(0, 0, 0, 0.54); + --mat-select-disabled-arrow-color: rgba(0, 0, 0, 0.38); + --mat-select-focused-arrow-color: rgba(255, 64, 129, 0.87); + --mat-select-invalid-arrow-color: rgba(244, 67, 54, 0.87); +} +html .mat-mdc-form-field.mat-warn { + --mat-select-panel-background-color: white; + --mat-select-enabled-trigger-text-color: rgba(0, 0, 0, 0.87); + --mat-select-disabled-trigger-text-color: rgba(0, 0, 0, 0.38); + --mat-select-placeholder-text-color: rgba(0, 0, 0, 0.6); + --mat-select-enabled-arrow-color: rgba(0, 0, 0, 0.54); + --mat-select-disabled-arrow-color: rgba(0, 0, 0, 0.38); + --mat-select-focused-arrow-color: rgba(244, 67, 54, 0.87); + --mat-select-invalid-arrow-color: rgba(244, 67, 54, 0.87); +} + +html { + --mat-select-arrow-transform: translateY(-8px); +} + +html { + --mat-autocomplete-container-shape: 4px; + --mat-autocomplete-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); +} + +html { + --mat-autocomplete-background-color: white; +} + +html { + --mdc-dialog-container-elevation-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12); + --mdc-dialog-container-shadow-color: #000; + --mdc-dialog-container-shape: 4px; + --mat-dialog-container-max-width: 80vw; + --mat-dialog-container-small-max-width: 80vw; + --mat-dialog-container-min-width: 0; + --mat-dialog-actions-alignment: start; + --mat-dialog-actions-padding: 8px; + --mat-dialog-content-padding: 20px 24px; + --mat-dialog-with-actions-content-padding: 20px 24px; + --mat-dialog-headline-padding: 0 24px 9px; +} + +html { + --mdc-dialog-container-color: white; + --mdc-dialog-subhead-color: rgba(0, 0, 0, 0.87); + --mdc-dialog-supporting-text-color: rgba(0, 0, 0, 0.6); +} + +.mat-mdc-standard-chip { + --mdc-chip-container-shape-family: rounded; + --mdc-chip-container-shape-radius: 16px 16px 16px 16px; + --mdc-chip-with-avatar-avatar-shape-family: rounded; + --mdc-chip-with-avatar-avatar-shape-radius: 14px 14px 14px 14px; + --mdc-chip-with-avatar-avatar-size: 28px; + --mdc-chip-with-icon-icon-size: 18px; + --mdc-chip-outline-width: 0; + --mdc-chip-outline-color: transparent; + --mdc-chip-disabled-outline-color: transparent; + --mdc-chip-focus-outline-color: transparent; + --mdc-chip-hover-state-layer-opacity: 0.04; + --mdc-chip-with-avatar-disabled-avatar-opacity: 1; + --mdc-chip-flat-selected-outline-width: 0; + --mdc-chip-selected-hover-state-layer-opacity: 0.04; + --mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity: 1; + --mdc-chip-with-icon-disabled-icon-opacity: 1; + --mat-chip-disabled-container-opacity: 0.4; + --mat-chip-trailing-action-opacity: 0.54; + --mat-chip-trailing-action-focus-opacity: 1; + --mat-chip-trailing-action-state-layer-color: transparent; + --mat-chip-selected-trailing-action-state-layer-color: transparent; + --mat-chip-trailing-action-hover-state-layer-opacity: 0; + --mat-chip-trailing-action-focus-state-layer-opacity: 0; +} + +.mat-mdc-standard-chip { + --mdc-chip-disabled-label-text-color: #212121; + --mdc-chip-elevated-container-color: #e0e0e0; + --mdc-chip-elevated-selected-container-color: #e0e0e0; + --mdc-chip-elevated-disabled-container-color: #e0e0e0; + --mdc-chip-flat-disabled-selected-container-color: #e0e0e0; + --mdc-chip-focus-state-layer-color: black; + --mdc-chip-hover-state-layer-color: black; + --mdc-chip-selected-hover-state-layer-color: black; + --mdc-chip-focus-state-layer-opacity: 0.12; + --mdc-chip-selected-focus-state-layer-color: black; + --mdc-chip-selected-focus-state-layer-opacity: 0.12; + --mdc-chip-label-text-color: #212121; + --mdc-chip-selected-label-text-color: #212121; + --mdc-chip-with-icon-icon-color: #212121; + --mdc-chip-with-icon-disabled-icon-color: #212121; + --mdc-chip-with-icon-selected-icon-color: #212121; + --mdc-chip-with-trailing-icon-disabled-trailing-icon-color: #212121; + --mdc-chip-with-trailing-icon-trailing-icon-color: #212121; + --mat-chip-selected-disabled-trailing-icon-color: #212121; + --mat-chip-selected-trailing-icon-color: #212121; +} +.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-primary, .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-primary { + --mdc-chip-disabled-label-text-color: white; + --mdc-chip-elevated-container-color: #00bcd4; + --mdc-chip-elevated-selected-container-color: #00bcd4; + --mdc-chip-elevated-disabled-container-color: #00bcd4; + --mdc-chip-flat-disabled-selected-container-color: #00bcd4; + --mdc-chip-focus-state-layer-color: black; + --mdc-chip-hover-state-layer-color: black; + --mdc-chip-selected-hover-state-layer-color: black; + --mdc-chip-focus-state-layer-opacity: 0.12; + --mdc-chip-selected-focus-state-layer-color: black; + --mdc-chip-selected-focus-state-layer-opacity: 0.12; + --mdc-chip-label-text-color: white; + --mdc-chip-selected-label-text-color: white; + --mdc-chip-with-icon-icon-color: white; + --mdc-chip-with-icon-disabled-icon-color: white; + --mdc-chip-with-icon-selected-icon-color: white; + --mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white; + --mdc-chip-with-trailing-icon-trailing-icon-color: white; + --mat-chip-selected-disabled-trailing-icon-color: white; + --mat-chip-selected-trailing-icon-color: white; +} +.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-accent, .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-accent { + --mdc-chip-disabled-label-text-color: white; + --mdc-chip-elevated-container-color: #ff4081; + --mdc-chip-elevated-selected-container-color: #ff4081; + --mdc-chip-elevated-disabled-container-color: #ff4081; + --mdc-chip-flat-disabled-selected-container-color: #ff4081; + --mdc-chip-focus-state-layer-color: black; + --mdc-chip-hover-state-layer-color: black; + --mdc-chip-selected-hover-state-layer-color: black; + --mdc-chip-focus-state-layer-opacity: 0.12; + --mdc-chip-selected-focus-state-layer-color: black; + --mdc-chip-selected-focus-state-layer-opacity: 0.12; + --mdc-chip-label-text-color: white; + --mdc-chip-selected-label-text-color: white; + --mdc-chip-with-icon-icon-color: white; + --mdc-chip-with-icon-disabled-icon-color: white; + --mdc-chip-with-icon-selected-icon-color: white; + --mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white; + --mdc-chip-with-trailing-icon-trailing-icon-color: white; + --mat-chip-selected-disabled-trailing-icon-color: white; + --mat-chip-selected-trailing-icon-color: white; +} +.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-warn, .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-warn { + --mdc-chip-disabled-label-text-color: white; + --mdc-chip-elevated-container-color: #f44336; + --mdc-chip-elevated-selected-container-color: #f44336; + --mdc-chip-elevated-disabled-container-color: #f44336; + --mdc-chip-flat-disabled-selected-container-color: #f44336; + --mdc-chip-focus-state-layer-color: black; + --mdc-chip-hover-state-layer-color: black; + --mdc-chip-selected-hover-state-layer-color: black; + --mdc-chip-focus-state-layer-opacity: 0.12; + --mdc-chip-selected-focus-state-layer-color: black; + --mdc-chip-selected-focus-state-layer-opacity: 0.12; + --mdc-chip-label-text-color: white; + --mdc-chip-selected-label-text-color: white; + --mdc-chip-with-icon-icon-color: white; + --mdc-chip-with-icon-disabled-icon-color: white; + --mdc-chip-with-icon-selected-icon-color: white; + --mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white; + --mdc-chip-with-trailing-icon-trailing-icon-color: white; + --mat-chip-selected-disabled-trailing-icon-color: white; + --mat-chip-selected-trailing-icon-color: white; +} + +.mat-mdc-chip.mat-mdc-standard-chip { + --mdc-chip-container-height: 32px; +} + +html { + --mdc-switch-disabled-selected-icon-opacity: 0.38; + --mdc-switch-disabled-track-opacity: 0.12; + --mdc-switch-disabled-unselected-icon-opacity: 0.38; + --mdc-switch-handle-height: 20px; + --mdc-switch-handle-shape: 10px; + --mdc-switch-handle-width: 20px; + --mdc-switch-selected-icon-size: 18px; + --mdc-switch-track-height: 14px; + --mdc-switch-track-shape: 7px; + --mdc-switch-track-width: 36px; + --mdc-switch-unselected-icon-size: 18px; + --mdc-switch-selected-focus-state-layer-opacity: 0.12; + --mdc-switch-selected-hover-state-layer-opacity: 0.04; + --mdc-switch-selected-pressed-state-layer-opacity: 0.1; + --mdc-switch-unselected-focus-state-layer-opacity: 0.12; + --mdc-switch-unselected-hover-state-layer-opacity: 0.04; + --mdc-switch-unselected-pressed-state-layer-opacity: 0.1; + --mat-switch-disabled-selected-handle-opacity: 0.38; + --mat-switch-disabled-unselected-handle-opacity: 0.38; + --mat-switch-unselected-handle-size: 20px; + --mat-switch-selected-handle-size: 20px; + --mat-switch-pressed-handle-size: 20px; + --mat-switch-with-icon-handle-size: 20px; + --mat-switch-selected-handle-horizontal-margin: 0; + --mat-switch-selected-with-icon-handle-horizontal-margin: 0; + --mat-switch-selected-pressed-handle-horizontal-margin: 0; + --mat-switch-unselected-handle-horizontal-margin: 0; + --mat-switch-unselected-with-icon-handle-horizontal-margin: 0; + --mat-switch-unselected-pressed-handle-horizontal-margin: 0; + --mat-switch-visible-track-opacity: 1; + --mat-switch-hidden-track-opacity: 1; + --mat-switch-visible-track-transition: transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1); + --mat-switch-hidden-track-transition: transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1); + --mat-switch-track-outline-width: 1px; + --mat-switch-track-outline-color: transparent; + --mat-switch-selected-track-outline-width: 1px; + --mat-switch-disabled-unselected-track-outline-width: 1px; + --mat-switch-disabled-unselected-track-outline-color: transparent; +} + +html { + --mdc-switch-selected-focus-state-layer-color: #00acc1; + --mdc-switch-selected-handle-color: #00acc1; + --mdc-switch-selected-hover-state-layer-color: #00acc1; + --mdc-switch-selected-pressed-state-layer-color: #00acc1; + --mdc-switch-selected-focus-handle-color: #006064; + --mdc-switch-selected-hover-handle-color: #006064; + --mdc-switch-selected-pressed-handle-color: #006064; + --mdc-switch-selected-focus-track-color: #4dd0e1; + --mdc-switch-selected-hover-track-color: #4dd0e1; + --mdc-switch-selected-pressed-track-color: #4dd0e1; + --mdc-switch-selected-track-color: #4dd0e1; + --mdc-switch-disabled-selected-handle-color: #424242; + --mdc-switch-disabled-selected-icon-color: #fff; + --mdc-switch-disabled-selected-track-color: #424242; + --mdc-switch-disabled-unselected-handle-color: #424242; + --mdc-switch-disabled-unselected-icon-color: #fff; + --mdc-switch-disabled-unselected-track-color: #424242; + --mdc-switch-handle-surface-color: var(--mdc-theme-surface, #fff); + --mdc-switch-handle-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); + --mdc-switch-handle-shadow-color: black; + --mdc-switch-disabled-handle-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12); + --mdc-switch-selected-icon-color: #fff; + --mdc-switch-unselected-focus-handle-color: #212121; + --mdc-switch-unselected-focus-state-layer-color: #424242; + --mdc-switch-unselected-focus-track-color: #e0e0e0; + --mdc-switch-unselected-handle-color: #616161; + --mdc-switch-unselected-hover-handle-color: #212121; + --mdc-switch-unselected-hover-state-layer-color: #424242; + --mdc-switch-unselected-hover-track-color: #e0e0e0; + --mdc-switch-unselected-icon-color: #fff; + --mdc-switch-unselected-pressed-handle-color: #212121; + --mdc-switch-unselected-pressed-state-layer-color: #424242; + --mdc-switch-unselected-pressed-track-color: #e0e0e0; + --mdc-switch-unselected-track-color: #e0e0e0; + --mdc-switch-disabled-label-text-color: rgba(0, 0, 0, 0.38); +} +html .mat-mdc-slide-toggle { + --mdc-form-field-label-text-color: rgba(0, 0, 0, 0.87); +} +html .mat-mdc-slide-toggle.mat-accent { + --mdc-switch-selected-focus-state-layer-color: #d81b60; + --mdc-switch-selected-handle-color: #d81b60; + --mdc-switch-selected-hover-state-layer-color: #d81b60; + --mdc-switch-selected-pressed-state-layer-color: #d81b60; + --mdc-switch-selected-focus-handle-color: #880e4f; + --mdc-switch-selected-hover-handle-color: #880e4f; + --mdc-switch-selected-pressed-handle-color: #880e4f; + --mdc-switch-selected-focus-track-color: #f06292; + --mdc-switch-selected-hover-track-color: #f06292; + --mdc-switch-selected-pressed-track-color: #f06292; + --mdc-switch-selected-track-color: #f06292; +} +html .mat-mdc-slide-toggle.mat-warn { + --mdc-switch-selected-focus-state-layer-color: #e53935; + --mdc-switch-selected-handle-color: #e53935; + --mdc-switch-selected-hover-state-layer-color: #e53935; + --mdc-switch-selected-pressed-state-layer-color: #e53935; + --mdc-switch-selected-focus-handle-color: #b71c1c; + --mdc-switch-selected-hover-handle-color: #b71c1c; + --mdc-switch-selected-pressed-handle-color: #b71c1c; + --mdc-switch-selected-focus-track-color: #e57373; + --mdc-switch-selected-hover-track-color: #e57373; + --mdc-switch-selected-pressed-track-color: #e57373; + --mdc-switch-selected-track-color: #e57373; +} + +html { + --mdc-switch-state-layer-size: 40px; +} + +html { + --mdc-radio-disabled-selected-icon-opacity: 0.38; + --mdc-radio-disabled-unselected-icon-opacity: 0.38; + --mdc-radio-state-layer-size: 40px; +} + +.mat-mdc-radio-button { + --mdc-form-field-label-text-color: rgba(0, 0, 0, 0.87); +} +.mat-mdc-radio-button.mat-primary { + --mdc-radio-disabled-selected-icon-color: black; + --mdc-radio-disabled-unselected-icon-color: black; + --mdc-radio-unselected-hover-icon-color: #212121; + --mdc-radio-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-selected-focus-icon-color: #00bcd4; + --mdc-radio-selected-hover-icon-color: #00bcd4; + --mdc-radio-selected-icon-color: #00bcd4; + --mdc-radio-selected-pressed-icon-color: #00bcd4; + --mat-radio-ripple-color: black; + --mat-radio-checked-ripple-color: #00bcd4; + --mat-radio-disabled-label-color: rgba(0, 0, 0, 0.38); +} +.mat-mdc-radio-button.mat-accent { + --mdc-radio-disabled-selected-icon-color: black; + --mdc-radio-disabled-unselected-icon-color: black; + --mdc-radio-unselected-hover-icon-color: #212121; + --mdc-radio-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-selected-focus-icon-color: #ff4081; + --mdc-radio-selected-hover-icon-color: #ff4081; + --mdc-radio-selected-icon-color: #ff4081; + --mdc-radio-selected-pressed-icon-color: #ff4081; + --mat-radio-ripple-color: black; + --mat-radio-checked-ripple-color: #ff4081; + --mat-radio-disabled-label-color: rgba(0, 0, 0, 0.38); +} +.mat-mdc-radio-button.mat-warn { + --mdc-radio-disabled-selected-icon-color: black; + --mdc-radio-disabled-unselected-icon-color: black; + --mdc-radio-unselected-hover-icon-color: #212121; + --mdc-radio-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-selected-focus-icon-color: #f44336; + --mdc-radio-selected-hover-icon-color: #f44336; + --mdc-radio-selected-icon-color: #f44336; + --mdc-radio-selected-pressed-icon-color: #f44336; + --mat-radio-ripple-color: black; + --mat-radio-checked-ripple-color: #f44336; + --mat-radio-disabled-label-color: rgba(0, 0, 0, 0.38); +} + +html { + --mdc-radio-state-layer-size: 40px; + --mat-radio-touch-target-display: block; +} + +html { + --mat-slider-value-indicator-width: auto; + --mat-slider-value-indicator-height: 32px; + --mat-slider-value-indicator-caret-display: block; + --mat-slider-value-indicator-border-radius: 4px; + --mat-slider-value-indicator-padding: 0 12px; + --mat-slider-value-indicator-text-transform: none; + --mat-slider-value-indicator-container-transform: translateX(-50%); + --mdc-slider-active-track-height: 6px; + --mdc-slider-active-track-shape: 9999px; + --mdc-slider-handle-height: 20px; + --mdc-slider-handle-shape: 50%; + --mdc-slider-handle-width: 20px; + --mdc-slider-inactive-track-height: 4px; + --mdc-slider-inactive-track-shape: 9999px; + --mdc-slider-with-overlap-handle-outline-width: 1px; + --mdc-slider-with-tick-marks-active-container-opacity: 0.6; + --mdc-slider-with-tick-marks-container-shape: 50%; + --mdc-slider-with-tick-marks-container-size: 2px; + --mdc-slider-with-tick-marks-inactive-container-opacity: 0.6; +} + +html { + --mdc-slider-handle-color: #00bcd4; + --mdc-slider-focus-handle-color: #00bcd4; + --mdc-slider-hover-handle-color: #00bcd4; + --mdc-slider-active-track-color: #00bcd4; + --mdc-slider-inactive-track-color: #00bcd4; + --mdc-slider-with-tick-marks-inactive-container-color: #00bcd4; + --mdc-slider-with-tick-marks-active-container-color: white; + --mdc-slider-disabled-active-track-color: #000; + --mdc-slider-disabled-handle-color: #000; + --mdc-slider-disabled-inactive-track-color: #000; + --mdc-slider-label-container-color: #000; + --mdc-slider-label-label-text-color: #fff; + --mdc-slider-with-overlap-handle-outline-color: #fff; + --mdc-slider-with-tick-marks-disabled-container-color: #000; + --mdc-slider-handle-elevation: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); + --mat-slider-ripple-color: #00bcd4; + --mat-slider-hover-state-layer-color: rgba(0, 188, 212, 0.05); + --mat-slider-focus-state-layer-color: rgba(0, 188, 212, 0.2); + --mat-slider-value-indicator-opacity: 0.6; +} +html .mat-accent { + --mat-slider-ripple-color: #ff4081; + --mat-slider-hover-state-layer-color: rgba(255, 64, 129, 0.05); + --mat-slider-focus-state-layer-color: rgba(255, 64, 129, 0.2); + --mdc-slider-handle-color: #ff4081; + --mdc-slider-focus-handle-color: #ff4081; + --mdc-slider-hover-handle-color: #ff4081; + --mdc-slider-active-track-color: #ff4081; + --mdc-slider-inactive-track-color: #ff4081; + --mdc-slider-with-tick-marks-inactive-container-color: #ff4081; + --mdc-slider-with-tick-marks-active-container-color: white; +} +html .mat-warn { + --mat-slider-ripple-color: #f44336; + --mat-slider-hover-state-layer-color: rgba(244, 67, 54, 0.05); + --mat-slider-focus-state-layer-color: rgba(244, 67, 54, 0.2); + --mdc-slider-handle-color: #f44336; + --mdc-slider-focus-handle-color: #f44336; + --mdc-slider-hover-handle-color: #f44336; + --mdc-slider-active-track-color: #f44336; + --mdc-slider-inactive-track-color: #f44336; + --mdc-slider-with-tick-marks-inactive-container-color: #f44336; + --mdc-slider-with-tick-marks-active-container-color: white; +} + +html { + --mat-menu-container-shape: 4px; + --mat-menu-divider-bottom-spacing: 0; + --mat-menu-divider-top-spacing: 0; + --mat-menu-item-spacing: 16px; + --mat-menu-item-icon-size: 24px; + --mat-menu-item-leading-spacing: 16px; + --mat-menu-item-trailing-spacing: 16px; + --mat-menu-item-with-icon-leading-spacing: 16px; + --mat-menu-item-with-icon-trailing-spacing: 16px; +} + +html { + --mat-menu-item-label-text-color: rgba(0, 0, 0, 0.87); + --mat-menu-item-icon-color: rgba(0, 0, 0, 0.87); + --mat-menu-item-hover-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-menu-item-focus-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-menu-container-color: white; + --mat-menu-divider-color: rgba(0, 0, 0, 0.12); +} + +html { + --mdc-list-list-item-container-shape: 0; + --mdc-list-list-item-leading-avatar-shape: 50%; + --mdc-list-list-item-container-color: transparent; + --mdc-list-list-item-selected-container-color: transparent; + --mdc-list-list-item-leading-avatar-color: transparent; + --mdc-list-list-item-leading-icon-size: 24px; + --mdc-list-list-item-leading-avatar-size: 40px; + --mdc-list-list-item-trailing-icon-size: 24px; + --mdc-list-list-item-disabled-state-layer-color: transparent; + --mdc-list-list-item-disabled-state-layer-opacity: 0; + --mdc-list-list-item-disabled-label-text-opacity: 0.38; + --mdc-list-list-item-disabled-leading-icon-opacity: 0.38; + --mdc-list-list-item-disabled-trailing-icon-opacity: 0.38; + --mat-list-active-indicator-color: transparent; + --mat-list-active-indicator-shape: 0; +} + +html { + --mdc-list-list-item-label-text-color: rgba(0, 0, 0, 0.87); + --mdc-list-list-item-supporting-text-color: rgba(0, 0, 0, 0.54); + --mdc-list-list-item-leading-icon-color: rgba(0, 0, 0, 0.38); + --mdc-list-list-item-trailing-supporting-text-color: rgba(0, 0, 0, 0.38); + --mdc-list-list-item-trailing-icon-color: rgba(0, 0, 0, 0.38); + --mdc-list-list-item-selected-trailing-icon-color: rgba(0, 0, 0, 0.38); + --mdc-list-list-item-disabled-label-text-color: black; + --mdc-list-list-item-disabled-leading-icon-color: black; + --mdc-list-list-item-disabled-trailing-icon-color: black; + --mdc-list-list-item-hover-label-text-color: rgba(0, 0, 0, 0.87); + --mdc-list-list-item-hover-leading-icon-color: rgba(0, 0, 0, 0.38); + --mdc-list-list-item-hover-trailing-icon-color: rgba(0, 0, 0, 0.38); + --mdc-list-list-item-focus-label-text-color: rgba(0, 0, 0, 0.87); + --mdc-list-list-item-hover-state-layer-color: black; + --mdc-list-list-item-hover-state-layer-opacity: 0.04; + --mdc-list-list-item-focus-state-layer-color: black; + --mdc-list-list-item-focus-state-layer-opacity: 0.12; +} + +.mdc-list-item__start, +.mdc-list-item__end { + --mdc-radio-disabled-selected-icon-color: black; + --mdc-radio-disabled-unselected-icon-color: black; + --mdc-radio-unselected-hover-icon-color: #212121; + --mdc-radio-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-selected-focus-icon-color: #00bcd4; + --mdc-radio-selected-hover-icon-color: #00bcd4; + --mdc-radio-selected-icon-color: #00bcd4; + --mdc-radio-selected-pressed-icon-color: #00bcd4; +} + +.mat-accent .mdc-list-item__start, +.mat-accent .mdc-list-item__end { + --mdc-radio-disabled-selected-icon-color: black; + --mdc-radio-disabled-unselected-icon-color: black; + --mdc-radio-unselected-hover-icon-color: #212121; + --mdc-radio-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-selected-focus-icon-color: #ff4081; + --mdc-radio-selected-hover-icon-color: #ff4081; + --mdc-radio-selected-icon-color: #ff4081; + --mdc-radio-selected-pressed-icon-color: #ff4081; +} + +.mat-warn .mdc-list-item__start, +.mat-warn .mdc-list-item__end { + --mdc-radio-disabled-selected-icon-color: black; + --mdc-radio-disabled-unselected-icon-color: black; + --mdc-radio-unselected-hover-icon-color: #212121; + --mdc-radio-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-radio-selected-focus-icon-color: #f44336; + --mdc-radio-selected-hover-icon-color: #f44336; + --mdc-radio-selected-icon-color: #f44336; + --mdc-radio-selected-pressed-icon-color: #f44336; +} + +.mat-mdc-list-option { + --mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-selected-checkmark-color: white; + --mdc-checkbox-selected-focus-icon-color: #00bcd4; + --mdc-checkbox-selected-hover-icon-color: #00bcd4; + --mdc-checkbox-selected-icon-color: #00bcd4; + --mdc-checkbox-selected-pressed-icon-color: #00bcd4; + --mdc-checkbox-unselected-focus-icon-color: #212121; + --mdc-checkbox-unselected-hover-icon-color: #212121; + --mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-selected-focus-state-layer-color: #00bcd4; + --mdc-checkbox-selected-hover-state-layer-color: #00bcd4; + --mdc-checkbox-selected-pressed-state-layer-color: #00bcd4; + --mdc-checkbox-unselected-focus-state-layer-color: black; + --mdc-checkbox-unselected-hover-state-layer-color: black; + --mdc-checkbox-unselected-pressed-state-layer-color: black; +} + +.mat-mdc-list-option.mat-accent { + --mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-selected-checkmark-color: white; + --mdc-checkbox-selected-focus-icon-color: #ff4081; + --mdc-checkbox-selected-hover-icon-color: #ff4081; + --mdc-checkbox-selected-icon-color: #ff4081; + --mdc-checkbox-selected-pressed-icon-color: #ff4081; + --mdc-checkbox-unselected-focus-icon-color: #212121; + --mdc-checkbox-unselected-hover-icon-color: #212121; + --mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-selected-focus-state-layer-color: #ff4081; + --mdc-checkbox-selected-hover-state-layer-color: #ff4081; + --mdc-checkbox-selected-pressed-state-layer-color: #ff4081; + --mdc-checkbox-unselected-focus-state-layer-color: black; + --mdc-checkbox-unselected-hover-state-layer-color: black; + --mdc-checkbox-unselected-pressed-state-layer-color: black; +} + +.mat-mdc-list-option.mat-warn { + --mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-selected-checkmark-color: white; + --mdc-checkbox-selected-focus-icon-color: #f44336; + --mdc-checkbox-selected-hover-icon-color: #f44336; + --mdc-checkbox-selected-icon-color: #f44336; + --mdc-checkbox-selected-pressed-icon-color: #f44336; + --mdc-checkbox-unselected-focus-icon-color: #212121; + --mdc-checkbox-unselected-hover-icon-color: #212121; + --mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-selected-focus-state-layer-color: #f44336; + --mdc-checkbox-selected-hover-state-layer-color: #f44336; + --mdc-checkbox-selected-pressed-state-layer-color: #f44336; + --mdc-checkbox-unselected-focus-state-layer-color: black; + --mdc-checkbox-unselected-hover-state-layer-color: black; + --mdc-checkbox-unselected-pressed-state-layer-color: black; +} + +.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected .mdc-list-item__primary-text, +.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated .mdc-list-item__primary-text { + color: #00bcd4; +} +.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start, +.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start { + color: #00bcd4; +} + +.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__start, +.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__content, +.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__end { + opacity: 1; +} + +html { + --mdc-list-list-item-one-line-container-height: 48px; + --mdc-list-list-item-two-line-container-height: 64px; + --mdc-list-list-item-three-line-container-height: 88px; + --mat-list-list-item-leading-icon-start-space: 16px; + --mat-list-list-item-leading-icon-end-space: 32px; +} + +.mdc-list-item__start, +.mdc-list-item__end { + --mdc-radio-state-layer-size: 40px; +} + +.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line, .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line, .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line { + height: 56px; +} +.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines, .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines, .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines { + height: 72px; +} + +html { + --mat-paginator-container-text-color: rgba(0, 0, 0, 0.87); + --mat-paginator-container-background-color: white; + --mat-paginator-enabled-icon-color: rgba(0, 0, 0, 0.54); + --mat-paginator-disabled-icon-color: rgba(0, 0, 0, 0.12); +} + +html { + --mat-paginator-container-size: 56px; + --mat-paginator-form-field-container-height: 40px; + --mat-paginator-form-field-container-vertical-padding: 8px; +} + +html { + --mdc-tab-indicator-active-indicator-height: 2px; + --mdc-tab-indicator-active-indicator-shape: 0; + --mdc-secondary-navigation-tab-container-height: 48px; + --mat-tab-header-divider-color: transparent; + --mat-tab-header-divider-height: 0; +} + +.mat-mdc-tab-group, .mat-mdc-tab-nav-bar { + --mdc-tab-indicator-active-indicator-color: #00bcd4; + --mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, 0.38); + --mat-tab-header-pagination-icon-color: black; + --mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, 0.6); + --mat-tab-header-active-label-text-color: #00bcd4; + --mat-tab-header-active-ripple-color: #00bcd4; + --mat-tab-header-inactive-ripple-color: #00bcd4; + --mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, 0.6); + --mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, 0.6); + --mat-tab-header-active-focus-label-text-color: #00bcd4; + --mat-tab-header-active-hover-label-text-color: #00bcd4; + --mat-tab-header-active-focus-indicator-color: #00bcd4; + --mat-tab-header-active-hover-indicator-color: #00bcd4; +} +.mat-mdc-tab-group.mat-accent, .mat-mdc-tab-nav-bar.mat-accent { + --mdc-tab-indicator-active-indicator-color: #ff4081; + --mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, 0.38); + --mat-tab-header-pagination-icon-color: black; + --mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, 0.6); + --mat-tab-header-active-label-text-color: #ff4081; + --mat-tab-header-active-ripple-color: #ff4081; + --mat-tab-header-inactive-ripple-color: #ff4081; + --mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, 0.6); + --mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, 0.6); + --mat-tab-header-active-focus-label-text-color: #ff4081; + --mat-tab-header-active-hover-label-text-color: #ff4081; + --mat-tab-header-active-focus-indicator-color: #ff4081; + --mat-tab-header-active-hover-indicator-color: #ff4081; +} +.mat-mdc-tab-group.mat-warn, .mat-mdc-tab-nav-bar.mat-warn { + --mdc-tab-indicator-active-indicator-color: #f44336; + --mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, 0.38); + --mat-tab-header-pagination-icon-color: black; + --mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, 0.6); + --mat-tab-header-active-label-text-color: #f44336; + --mat-tab-header-active-ripple-color: #f44336; + --mat-tab-header-inactive-ripple-color: #f44336; + --mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, 0.6); + --mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, 0.6); + --mat-tab-header-active-focus-label-text-color: #f44336; + --mat-tab-header-active-hover-label-text-color: #f44336; + --mat-tab-header-active-focus-indicator-color: #f44336; + --mat-tab-header-active-hover-indicator-color: #f44336; +} +.mat-mdc-tab-group.mat-background-primary, .mat-mdc-tab-nav-bar.mat-background-primary { + --mat-tab-header-with-background-background-color: #00bcd4; + --mat-tab-header-with-background-foreground-color: white; +} +.mat-mdc-tab-group.mat-background-accent, .mat-mdc-tab-nav-bar.mat-background-accent { + --mat-tab-header-with-background-background-color: #ff4081; + --mat-tab-header-with-background-foreground-color: white; +} +.mat-mdc-tab-group.mat-background-warn, .mat-mdc-tab-nav-bar.mat-background-warn { + --mat-tab-header-with-background-background-color: #f44336; + --mat-tab-header-with-background-foreground-color: white; +} + +.mat-mdc-tab-header { + --mdc-secondary-navigation-tab-container-height: 48px; +} + +html { + --mdc-checkbox-disabled-selected-checkmark-color: #fff; + --mdc-checkbox-selected-focus-state-layer-opacity: 0.16; + --mdc-checkbox-selected-hover-state-layer-opacity: 0.04; + --mdc-checkbox-selected-pressed-state-layer-opacity: 0.16; + --mdc-checkbox-unselected-focus-state-layer-opacity: 0.16; + --mdc-checkbox-unselected-hover-state-layer-opacity: 0.04; + --mdc-checkbox-unselected-pressed-state-layer-opacity: 0.16; +} + +html { + --mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-selected-checkmark-color: white; + --mdc-checkbox-selected-focus-icon-color: #ff4081; + --mdc-checkbox-selected-hover-icon-color: #ff4081; + --mdc-checkbox-selected-icon-color: #ff4081; + --mdc-checkbox-selected-pressed-icon-color: #ff4081; + --mdc-checkbox-unselected-focus-icon-color: #212121; + --mdc-checkbox-unselected-hover-icon-color: #212121; + --mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-selected-focus-state-layer-color: #ff4081; + --mdc-checkbox-selected-hover-state-layer-color: #ff4081; + --mdc-checkbox-selected-pressed-state-layer-color: #ff4081; + --mdc-checkbox-unselected-focus-state-layer-color: black; + --mdc-checkbox-unselected-hover-state-layer-color: black; + --mdc-checkbox-unselected-pressed-state-layer-color: black; + --mat-checkbox-disabled-label-color: rgba(0, 0, 0, 0.38); +} + +.mat-mdc-checkbox { + --mdc-form-field-label-text-color: rgba(0, 0, 0, 0.87); +} +.mat-mdc-checkbox.mat-primary { + --mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-selected-checkmark-color: white; + --mdc-checkbox-selected-focus-icon-color: #00bcd4; + --mdc-checkbox-selected-hover-icon-color: #00bcd4; + --mdc-checkbox-selected-icon-color: #00bcd4; + --mdc-checkbox-selected-pressed-icon-color: #00bcd4; + --mdc-checkbox-unselected-focus-icon-color: #212121; + --mdc-checkbox-unselected-hover-icon-color: #212121; + --mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-selected-focus-state-layer-color: #00bcd4; + --mdc-checkbox-selected-hover-state-layer-color: #00bcd4; + --mdc-checkbox-selected-pressed-state-layer-color: #00bcd4; + --mdc-checkbox-unselected-focus-state-layer-color: black; + --mdc-checkbox-unselected-hover-state-layer-color: black; + --mdc-checkbox-unselected-pressed-state-layer-color: black; +} +.mat-mdc-checkbox.mat-warn { + --mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, 0.38); + --mdc-checkbox-selected-checkmark-color: white; + --mdc-checkbox-selected-focus-icon-color: #f44336; + --mdc-checkbox-selected-hover-icon-color: #f44336; + --mdc-checkbox-selected-icon-color: #f44336; + --mdc-checkbox-selected-pressed-icon-color: #f44336; + --mdc-checkbox-unselected-focus-icon-color: #212121; + --mdc-checkbox-unselected-hover-icon-color: #212121; + --mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, 0.54); + --mdc-checkbox-selected-focus-state-layer-color: #f44336; + --mdc-checkbox-selected-hover-state-layer-color: #f44336; + --mdc-checkbox-selected-pressed-state-layer-color: #f44336; + --mdc-checkbox-unselected-focus-state-layer-color: black; + --mdc-checkbox-unselected-hover-state-layer-color: black; + --mdc-checkbox-unselected-pressed-state-layer-color: black; +} + +html { + --mdc-checkbox-state-layer-size: 40px; + --mat-checkbox-touch-target-display: block; +} + +html { + --mdc-text-button-container-shape: 4px; + --mdc-text-button-keep-touch-target: false; + --mdc-filled-button-container-shape: 4px; + --mdc-filled-button-keep-touch-target: false; + --mdc-protected-button-container-shape: 4px; + --mdc-protected-button-keep-touch-target: false; + --mdc-outlined-button-keep-touch-target: false; + --mdc-outlined-button-outline-width: 1px; + --mdc-outlined-button-container-shape: 4px; + --mat-text-button-horizontal-padding: 8px; + --mat-text-button-with-icon-horizontal-padding: 8px; + --mat-text-button-icon-spacing: 8px; + --mat-text-button-icon-offset: 0; + --mat-filled-button-horizontal-padding: 16px; + --mat-filled-button-icon-spacing: 8px; + --mat-filled-button-icon-offset: -4px; + --mat-protected-button-horizontal-padding: 16px; + --mat-protected-button-icon-spacing: 8px; + --mat-protected-button-icon-offset: -4px; + --mat-outlined-button-horizontal-padding: 15px; + --mat-outlined-button-icon-spacing: 8px; + --mat-outlined-button-icon-offset: -4px; +} + +html { + --mdc-text-button-label-text-color: black; + --mdc-text-button-disabled-label-text-color: rgba(0, 0, 0, 0.38); + --mat-text-button-state-layer-color: black; + --mat-text-button-disabled-state-layer-color: black; + --mat-text-button-ripple-color: rgba(0, 0, 0, 0.1); + --mat-text-button-hover-state-layer-opacity: 0.04; + --mat-text-button-focus-state-layer-opacity: 0.12; + --mat-text-button-pressed-state-layer-opacity: 0.12; + --mdc-filled-button-container-color: white; + --mdc-filled-button-label-text-color: black; + --mdc-filled-button-disabled-container-color: rgba(0, 0, 0, 0.12); + --mdc-filled-button-disabled-label-text-color: rgba(0, 0, 0, 0.38); + --mat-filled-button-state-layer-color: black; + --mat-filled-button-disabled-state-layer-color: black; + --mat-filled-button-ripple-color: rgba(0, 0, 0, 0.1); + --mat-filled-button-hover-state-layer-opacity: 0.04; + --mat-filled-button-focus-state-layer-opacity: 0.12; + --mat-filled-button-pressed-state-layer-opacity: 0.12; + --mdc-protected-button-container-color: white; + --mdc-protected-button-label-text-color: black; + --mdc-protected-button-disabled-container-color: rgba(0, 0, 0, 0.12); + --mdc-protected-button-disabled-label-text-color: rgba(0, 0, 0, 0.38); + --mdc-protected-button-container-elevation-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); + --mdc-protected-button-disabled-container-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12); + --mdc-protected-button-focus-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); + --mdc-protected-button-hover-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); + --mdc-protected-button-pressed-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); + --mdc-protected-button-container-shadow-color: #000; + --mat-protected-button-state-layer-color: black; + --mat-protected-button-disabled-state-layer-color: black; + --mat-protected-button-ripple-color: rgba(0, 0, 0, 0.1); + --mat-protected-button-hover-state-layer-opacity: 0.04; + --mat-protected-button-focus-state-layer-opacity: 0.12; + --mat-protected-button-pressed-state-layer-opacity: 0.12; + --mdc-outlined-button-disabled-outline-color: rgba(0, 0, 0, 0.12); + --mdc-outlined-button-disabled-label-text-color: rgba(0, 0, 0, 0.38); + --mdc-outlined-button-label-text-color: black; + --mdc-outlined-button-outline-color: rgba(0, 0, 0, 0.12); + --mat-outlined-button-state-layer-color: black; + --mat-outlined-button-disabled-state-layer-color: black; + --mat-outlined-button-ripple-color: rgba(0, 0, 0, 0.1); + --mat-outlined-button-hover-state-layer-opacity: 0.04; + --mat-outlined-button-focus-state-layer-opacity: 0.12; + --mat-outlined-button-pressed-state-layer-opacity: 0.12; +} + +.mat-mdc-button.mat-primary { + --mdc-text-button-label-text-color: #00bcd4; + --mat-text-button-state-layer-color: #00bcd4; + --mat-text-button-ripple-color: rgba(0, 188, 212, 0.1); +} +.mat-mdc-button.mat-accent { + --mdc-text-button-label-text-color: #ff4081; + --mat-text-button-state-layer-color: #ff4081; + --mat-text-button-ripple-color: rgba(255, 64, 129, 0.1); +} +.mat-mdc-button.mat-warn { + --mdc-text-button-label-text-color: #f44336; + --mat-text-button-state-layer-color: #f44336; + --mat-text-button-ripple-color: rgba(244, 67, 54, 0.1); +} + +.mat-mdc-unelevated-button.mat-primary { + --mdc-filled-button-container-color: #00bcd4; + --mdc-filled-button-label-text-color: white; + --mat-filled-button-state-layer-color: white; + --mat-filled-button-ripple-color: rgba(255, 255, 255, 0.1); +} +.mat-mdc-unelevated-button.mat-accent { + --mdc-filled-button-container-color: #ff4081; + --mdc-filled-button-label-text-color: white; + --mat-filled-button-state-layer-color: white; + --mat-filled-button-ripple-color: rgba(255, 255, 255, 0.1); +} +.mat-mdc-unelevated-button.mat-warn { + --mdc-filled-button-container-color: #f44336; + --mdc-filled-button-label-text-color: white; + --mat-filled-button-state-layer-color: white; + --mat-filled-button-ripple-color: rgba(255, 255, 255, 0.1); +} + +.mat-mdc-raised-button.mat-primary { + --mdc-protected-button-container-color: #00bcd4; + --mdc-protected-button-label-text-color: white; + --mat-protected-button-state-layer-color: white; + --mat-protected-button-ripple-color: rgba(255, 255, 255, 0.1); +} +.mat-mdc-raised-button.mat-accent { + --mdc-protected-button-container-color: #ff4081; + --mdc-protected-button-label-text-color: white; + --mat-protected-button-state-layer-color: white; + --mat-protected-button-ripple-color: rgba(255, 255, 255, 0.1); +} +.mat-mdc-raised-button.mat-warn { + --mdc-protected-button-container-color: #f44336; + --mdc-protected-button-label-text-color: white; + --mat-protected-button-state-layer-color: white; + --mat-protected-button-ripple-color: rgba(255, 255, 255, 0.1); +} + +.mat-mdc-outlined-button.mat-primary { + --mdc-outlined-button-label-text-color: #00bcd4; + --mdc-outlined-button-outline-color: rgba(0, 0, 0, 0.12); + --mat-outlined-button-state-layer-color: #00bcd4; + --mat-outlined-button-ripple-color: rgba(0, 188, 212, 0.1); +} +.mat-mdc-outlined-button.mat-accent { + --mdc-outlined-button-label-text-color: #ff4081; + --mdc-outlined-button-outline-color: rgba(0, 0, 0, 0.12); + --mat-outlined-button-state-layer-color: #ff4081; + --mat-outlined-button-ripple-color: rgba(255, 64, 129, 0.1); +} +.mat-mdc-outlined-button.mat-warn { + --mdc-outlined-button-label-text-color: #f44336; + --mdc-outlined-button-outline-color: rgba(0, 0, 0, 0.12); + --mat-outlined-button-state-layer-color: #f44336; + --mat-outlined-button-ripple-color: rgba(244, 67, 54, 0.1); +} + +html { + --mdc-text-button-container-height: 36px; + --mdc-filled-button-container-height: 36px; + --mdc-outlined-button-container-height: 36px; + --mdc-protected-button-container-height: 36px; + --mat-text-button-touch-target-display: block; + --mat-filled-button-touch-target-display: block; + --mat-protected-button-touch-target-display: block; + --mat-outlined-button-touch-target-display: block; +} + +html { + --mdc-icon-button-icon-size: 24px; +} + +html { + --mdc-icon-button-icon-color: inherit; + --mdc-icon-button-disabled-icon-color: rgba(0, 0, 0, 0.38); + --mat-icon-button-state-layer-color: black; + --mat-icon-button-disabled-state-layer-color: black; + --mat-icon-button-ripple-color: rgba(0, 0, 0, 0.1); + --mat-icon-button-hover-state-layer-opacity: 0.04; + --mat-icon-button-focus-state-layer-opacity: 0.12; + --mat-icon-button-pressed-state-layer-opacity: 0.12; +} +html .mat-mdc-icon-button.mat-primary { + --mdc-icon-button-icon-color: #00bcd4; + --mat-icon-button-state-layer-color: #00bcd4; + --mat-icon-button-ripple-color: rgba(0, 188, 212, 0.1); +} +html .mat-mdc-icon-button.mat-accent { + --mdc-icon-button-icon-color: #ff4081; + --mat-icon-button-state-layer-color: #ff4081; + --mat-icon-button-ripple-color: rgba(255, 64, 129, 0.1); +} +html .mat-mdc-icon-button.mat-warn { + --mdc-icon-button-icon-color: #f44336; + --mat-icon-button-state-layer-color: #f44336; + --mat-icon-button-ripple-color: rgba(244, 67, 54, 0.1); +} + +html { + --mat-icon-button-touch-target-display: block; +} + +.mat-mdc-icon-button.mat-mdc-button-base { + --mdc-icon-button-state-layer-size: 48px; + width: var(--mdc-icon-button-state-layer-size); + height: var(--mdc-icon-button-state-layer-size); + padding: 12px; +} + +html { + --mdc-fab-container-shape: 50%; + --mdc-fab-icon-size: 24px; + --mdc-fab-small-container-shape: 50%; + --mdc-fab-small-icon-size: 24px; + --mdc-extended-fab-container-height: 48px; + --mdc-extended-fab-container-shape: 24px; +} + +html { + --mdc-fab-container-color: white; + --mdc-fab-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12); + --mdc-fab-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); + --mdc-fab-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); + --mdc-fab-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12); + --mdc-fab-container-shadow-color: #000; + --mat-fab-foreground-color: black; + --mat-fab-state-layer-color: black; + --mat-fab-disabled-state-layer-color: black; + --mat-fab-ripple-color: rgba(0, 0, 0, 0.1); + --mat-fab-hover-state-layer-opacity: 0.04; + --mat-fab-focus-state-layer-opacity: 0.12; + --mat-fab-pressed-state-layer-opacity: 0.12; + --mat-fab-disabled-state-container-color: rgba(0, 0, 0, 0.12); + --mat-fab-disabled-state-foreground-color: rgba(0, 0, 0, 0.38); + --mdc-fab-small-container-color: white; + --mdc-fab-small-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12); + --mdc-fab-small-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); + --mdc-fab-small-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); + --mdc-fab-small-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12); + --mdc-fab-small-container-shadow-color: #000; + --mat-fab-small-foreground-color: black; + --mat-fab-small-state-layer-color: black; + --mat-fab-small-disabled-state-layer-color: black; + --mat-fab-small-ripple-color: rgba(0, 0, 0, 0.1); + --mat-fab-small-hover-state-layer-opacity: 0.04; + --mat-fab-small-focus-state-layer-opacity: 0.12; + --mat-fab-small-pressed-state-layer-opacity: 0.12; + --mat-fab-small-disabled-state-container-color: rgba(0, 0, 0, 0.12); + --mat-fab-small-disabled-state-foreground-color: rgba(0, 0, 0, 0.38); + --mdc-extended-fab-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12); + --mdc-extended-fab-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); + --mdc-extended-fab-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); + --mdc-extended-fab-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12); + --mdc-extended-fab-container-shadow-color: #000; +} +html .mat-mdc-fab.mat-primary { + --mdc-fab-container-color: #00bcd4; + --mat-fab-foreground-color: white; + --mat-fab-state-layer-color: white; + --mat-fab-ripple-color: rgba(255, 255, 255, 0.1); +} +html .mat-mdc-fab.mat-accent { + --mdc-fab-container-color: #ff4081; + --mat-fab-foreground-color: white; + --mat-fab-state-layer-color: white; + --mat-fab-ripple-color: rgba(255, 255, 255, 0.1); +} +html .mat-mdc-fab.mat-warn { + --mdc-fab-container-color: #f44336; + --mat-fab-foreground-color: white; + --mat-fab-state-layer-color: white; + --mat-fab-ripple-color: rgba(255, 255, 255, 0.1); +} +html .mat-mdc-mini-fab.mat-primary { + --mdc-fab-small-container-color: #00bcd4; + --mat-fab-small-foreground-color: white; + --mat-fab-small-state-layer-color: white; + --mat-fab-small-ripple-color: rgba(255, 255, 255, 0.1); +} +html .mat-mdc-mini-fab.mat-accent { + --mdc-fab-small-container-color: #ff4081; + --mat-fab-small-foreground-color: white; + --mat-fab-small-state-layer-color: white; + --mat-fab-small-ripple-color: rgba(255, 255, 255, 0.1); +} +html .mat-mdc-mini-fab.mat-warn { + --mdc-fab-small-container-color: #f44336; + --mat-fab-small-foreground-color: white; + --mat-fab-small-state-layer-color: white; + --mat-fab-small-ripple-color: rgba(255, 255, 255, 0.1); +} + +html { + --mat-fab-touch-target-display: block; + --mat-fab-small-touch-target-display: block; +} + +html { + --mdc-snackbar-container-shape: 4px; +} + +html { + --mdc-snackbar-container-color: #333333; + --mdc-snackbar-supporting-text-color: rgba(255, 255, 255, 0.87); + --mat-snack-bar-button-color: #ff4081; +} + +html { + --mat-table-row-item-outline-width: 1px; +} + +html { + --mat-table-background-color: white; + --mat-table-header-headline-color: rgba(0, 0, 0, 0.87); + --mat-table-row-item-label-text-color: rgba(0, 0, 0, 0.87); + --mat-table-row-item-outline-color: rgba(0, 0, 0, 0.12); +} + +html { + --mat-table-header-container-height: 56px; + --mat-table-footer-container-height: 52px; + --mat-table-row-item-container-height: 52px; +} + +html { + --mdc-circular-progress-active-indicator-width: 4px; + --mdc-circular-progress-size: 48px; +} + +html { + --mdc-circular-progress-active-indicator-color: #00bcd4; +} +html .mat-accent { + --mdc-circular-progress-active-indicator-color: #ff4081; +} +html .mat-warn { + --mdc-circular-progress-active-indicator-color: #f44336; +} + +html { + --mat-badge-container-shape: 50%; + --mat-badge-container-size: unset; + --mat-badge-small-size-container-size: unset; + --mat-badge-large-size-container-size: unset; + --mat-badge-legacy-container-size: 22px; + --mat-badge-legacy-small-size-container-size: 16px; + --mat-badge-legacy-large-size-container-size: 28px; + --mat-badge-container-offset: -11px 0; + --mat-badge-small-size-container-offset: -8px 0; + --mat-badge-large-size-container-offset: -14px 0; + --mat-badge-container-overlap-offset: -11px; + --mat-badge-small-size-container-overlap-offset: -8px; + --mat-badge-large-size-container-overlap-offset: -14px; + --mat-badge-container-padding: 0; + --mat-badge-small-size-container-padding: 0; + --mat-badge-large-size-container-padding: 0; +} + +html { + --mat-badge-background-color: #00bcd4; + --mat-badge-text-color: white; + --mat-badge-disabled-state-background-color: #b9b9b9; + --mat-badge-disabled-state-text-color: rgba(0, 0, 0, 0.38); +} + +.mat-badge-accent { + --mat-badge-background-color: #ff4081; + --mat-badge-text-color: white; +} + +.mat-badge-warn { + --mat-badge-background-color: #f44336; + --mat-badge-text-color: white; +} + +html { + --mat-bottom-sheet-container-shape: 4px; +} + +html { + --mat-bottom-sheet-container-text-color: rgba(0, 0, 0, 0.87); + --mat-bottom-sheet-container-background-color: white; +} + +html { + --mat-legacy-button-toggle-height: 36px; + --mat-legacy-button-toggle-shape: 2px; + --mat-legacy-button-toggle-focus-state-layer-opacity: 1; + --mat-standard-button-toggle-shape: 4px; + --mat-standard-button-toggle-hover-state-layer-opacity: 0.04; + --mat-standard-button-toggle-focus-state-layer-opacity: 0.12; +} + +html { + --mat-legacy-button-toggle-text-color: rgba(0, 0, 0, 0.38); + --mat-legacy-button-toggle-state-layer-color: rgba(0, 0, 0, 0.12); + --mat-legacy-button-toggle-selected-state-text-color: rgba(0, 0, 0, 0.54); + --mat-legacy-button-toggle-selected-state-background-color: #e0e0e0; + --mat-legacy-button-toggle-disabled-state-text-color: rgba(0, 0, 0, 0.26); + --mat-legacy-button-toggle-disabled-state-background-color: #eeeeee; + --mat-legacy-button-toggle-disabled-selected-state-background-color: #bdbdbd; + --mat-standard-button-toggle-text-color: rgba(0, 0, 0, 0.87); + --mat-standard-button-toggle-background-color: white; + --mat-standard-button-toggle-state-layer-color: black; + --mat-standard-button-toggle-selected-state-background-color: #e0e0e0; + --mat-standard-button-toggle-selected-state-text-color: rgba(0, 0, 0, 0.87); + --mat-standard-button-toggle-disabled-state-text-color: rgba(0, 0, 0, 0.26); + --mat-standard-button-toggle-disabled-state-background-color: white; + --mat-standard-button-toggle-disabled-selected-state-text-color: rgba(0, 0, 0, 0.87); + --mat-standard-button-toggle-disabled-selected-state-background-color: #bdbdbd; + --mat-standard-button-toggle-divider-color: #e0e0e0; +} + +html { + --mat-standard-button-toggle-height: 48px; +} + +html { + --mat-datepicker-calendar-container-shape: 4px; + --mat-datepicker-calendar-container-touch-shape: 4px; + --mat-datepicker-calendar-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); + --mat-datepicker-calendar-container-touch-elevation-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12); +} + +html { + --mat-datepicker-calendar-date-selected-state-text-color: white; + --mat-datepicker-calendar-date-selected-state-background-color: #00bcd4; + --mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(0, 188, 212, 0.4); + --mat-datepicker-calendar-date-today-selected-state-outline-color: white; + --mat-datepicker-calendar-date-focus-state-background-color: rgba(0, 188, 212, 0.3); + --mat-datepicker-calendar-date-hover-state-background-color: rgba(0, 188, 212, 0.3); + --mat-datepicker-toggle-active-state-icon-color: #00bcd4; + --mat-datepicker-calendar-date-in-range-state-background-color: rgba(0, 188, 212, 0.2); + --mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, 0.2); + --mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5; + --mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e; + --mat-datepicker-toggle-icon-color: rgba(0, 0, 0, 0.54); + --mat-datepicker-calendar-body-label-text-color: rgba(0, 0, 0, 0.54); + --mat-datepicker-calendar-period-button-text-color: black; + --mat-datepicker-calendar-period-button-icon-color: rgba(0, 0, 0, 0.54); + --mat-datepicker-calendar-navigation-button-icon-color: rgba(0, 0, 0, 0.54); + --mat-datepicker-calendar-header-divider-color: rgba(0, 0, 0, 0.12); + --mat-datepicker-calendar-header-text-color: rgba(0, 0, 0, 0.54); + --mat-datepicker-calendar-date-today-outline-color: rgba(0, 0, 0, 0.38); + --mat-datepicker-calendar-date-today-disabled-state-outline-color: rgba(0, 0, 0, 0.18); + --mat-datepicker-calendar-date-text-color: rgba(0, 0, 0, 0.87); + --mat-datepicker-calendar-date-outline-color: transparent; + --mat-datepicker-calendar-date-disabled-state-text-color: rgba(0, 0, 0, 0.38); + --mat-datepicker-calendar-date-preview-state-outline-color: rgba(0, 0, 0, 0.24); + --mat-datepicker-range-input-separator-color: rgba(0, 0, 0, 0.87); + --mat-datepicker-range-input-disabled-state-separator-color: rgba(0, 0, 0, 0.38); + --mat-datepicker-range-input-disabled-state-text-color: rgba(0, 0, 0, 0.38); + --mat-datepicker-calendar-container-background-color: white; + --mat-datepicker-calendar-container-text-color: rgba(0, 0, 0, 0.87); +} + +.mat-datepicker-content.mat-accent { + --mat-datepicker-calendar-date-selected-state-text-color: white; + --mat-datepicker-calendar-date-selected-state-background-color: #ff4081; + --mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(255, 64, 129, 0.4); + --mat-datepicker-calendar-date-today-selected-state-outline-color: white; + --mat-datepicker-calendar-date-focus-state-background-color: rgba(255, 64, 129, 0.3); + --mat-datepicker-calendar-date-hover-state-background-color: rgba(255, 64, 129, 0.3); + --mat-datepicker-calendar-date-in-range-state-background-color: rgba(255, 64, 129, 0.2); + --mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, 0.2); + --mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5; + --mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e; +} +.mat-datepicker-content.mat-warn { + --mat-datepicker-calendar-date-selected-state-text-color: white; + --mat-datepicker-calendar-date-selected-state-background-color: #f44336; + --mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(244, 67, 54, 0.4); + --mat-datepicker-calendar-date-today-selected-state-outline-color: white; + --mat-datepicker-calendar-date-focus-state-background-color: rgba(244, 67, 54, 0.3); + --mat-datepicker-calendar-date-hover-state-background-color: rgba(244, 67, 54, 0.3); + --mat-datepicker-calendar-date-in-range-state-background-color: rgba(244, 67, 54, 0.2); + --mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, 0.2); + --mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5; + --mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e; +} + +.mat-datepicker-toggle-active.mat-accent { + --mat-datepicker-toggle-active-state-icon-color: #ff4081; +} +.mat-datepicker-toggle-active.mat-warn { + --mat-datepicker-toggle-active-state-icon-color: #f44336; +} + +.mat-calendar-controls { + --mat-icon-button-touch-target-display: none; +} +.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base { + --mdc-icon-button-state-layer-size: 40px; + width: var(--mdc-icon-button-state-layer-size); + height: var(--mdc-icon-button-state-layer-size); + padding: 8px; +} + +html { + --mat-divider-width: 1px; +} + +html { + --mat-divider-color: rgba(0, 0, 0, 0.12); +} + +html { + --mat-expansion-container-shape: 4px; + --mat-expansion-legacy-header-indicator-display: inline-block; + --mat-expansion-header-indicator-display: none; +} + +html { + --mat-expansion-container-background-color: white; + --mat-expansion-container-text-color: rgba(0, 0, 0, 0.87); + --mat-expansion-actions-divider-color: rgba(0, 0, 0, 0.12); + --mat-expansion-header-hover-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-expansion-header-focus-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-expansion-header-disabled-state-text-color: rgba(0, 0, 0, 0.26); + --mat-expansion-header-text-color: rgba(0, 0, 0, 0.87); + --mat-expansion-header-description-color: rgba(0, 0, 0, 0.54); + --mat-expansion-header-indicator-color: rgba(0, 0, 0, 0.54); +} + +html { + --mat-expansion-header-collapsed-state-height: 48px; + --mat-expansion-header-expanded-state-height: 64px; +} + +html { + --mat-icon-color: inherit; +} + +.mat-icon.mat-primary { + --mat-icon-color: #00bcd4; +} +.mat-icon.mat-accent { + --mat-icon-color: #ff4081; +} +.mat-icon.mat-warn { + --mat-icon-color: #f44336; +} + +html { + --mat-sidenav-container-shape: 0; + --mat-sidenav-container-elevation-shadow: 0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12); + --mat-sidenav-container-width: auto; +} + +html { + --mat-sidenav-container-divider-color: rgba(0, 0, 0, 0.12); + --mat-sidenav-container-background-color: white; + --mat-sidenav-container-text-color: rgba(0, 0, 0, 0.87); + --mat-sidenav-content-background-color: #fafafa; + --mat-sidenav-content-text-color: rgba(0, 0, 0, 0.87); + --mat-sidenav-scrim-color: rgba(0, 0, 0, 0.6); +} + +html { + --mat-stepper-header-icon-foreground-color: white; + --mat-stepper-header-selected-state-icon-background-color: #00bcd4; + --mat-stepper-header-selected-state-icon-foreground-color: white; + --mat-stepper-header-done-state-icon-background-color: #00bcd4; + --mat-stepper-header-done-state-icon-foreground-color: white; + --mat-stepper-header-edit-state-icon-background-color: #00bcd4; + --mat-stepper-header-edit-state-icon-foreground-color: white; + --mat-stepper-container-color: white; + --mat-stepper-line-color: rgba(0, 0, 0, 0.12); + --mat-stepper-header-hover-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-stepper-header-focus-state-layer-color: rgba(0, 0, 0, 0.04); + --mat-stepper-header-label-text-color: rgba(0, 0, 0, 0.54); + --mat-stepper-header-optional-label-text-color: rgba(0, 0, 0, 0.54); + --mat-stepper-header-selected-state-label-text-color: rgba(0, 0, 0, 0.87); + --mat-stepper-header-error-state-label-text-color: #f44336; + --mat-stepper-header-icon-background-color: rgba(0, 0, 0, 0.54); + --mat-stepper-header-error-state-icon-foreground-color: #f44336; + --mat-stepper-header-error-state-icon-background-color: transparent; +} +html .mat-step-header.mat-accent { + --mat-stepper-header-icon-foreground-color: white; + --mat-stepper-header-selected-state-icon-background-color: #ff4081; + --mat-stepper-header-selected-state-icon-foreground-color: white; + --mat-stepper-header-done-state-icon-background-color: #ff4081; + --mat-stepper-header-done-state-icon-foreground-color: white; + --mat-stepper-header-edit-state-icon-background-color: #ff4081; + --mat-stepper-header-edit-state-icon-foreground-color: white; +} +html .mat-step-header.mat-warn { + --mat-stepper-header-icon-foreground-color: white; + --mat-stepper-header-selected-state-icon-background-color: #f44336; + --mat-stepper-header-selected-state-icon-foreground-color: white; + --mat-stepper-header-done-state-icon-background-color: #f44336; + --mat-stepper-header-done-state-icon-foreground-color: white; + --mat-stepper-header-edit-state-icon-background-color: #f44336; + --mat-stepper-header-edit-state-icon-foreground-color: white; +} + +html { + --mat-stepper-header-height: 72px; +} + +html { + --mat-sort-arrow-color: #757575; +} + +html { + --mat-toolbar-container-background-color: whitesmoke; + --mat-toolbar-container-text-color: rgba(0, 0, 0, 0.87); +} + +.mat-toolbar.mat-primary { + --mat-toolbar-container-background-color: #00bcd4; + --mat-toolbar-container-text-color: white; +} +.mat-toolbar.mat-accent { + --mat-toolbar-container-background-color: #ff4081; + --mat-toolbar-container-text-color: white; +} +.mat-toolbar.mat-warn { + --mat-toolbar-container-background-color: #f44336; + --mat-toolbar-container-text-color: white; +} + +html { + --mat-toolbar-standard-height: 64px; + --mat-toolbar-mobile-height: 56px; +} + +html { + --mat-tree-container-background-color: white; + --mat-tree-node-text-color: rgba(0, 0, 0, 0.87); +} + +html { + --mat-tree-node-min-height: 48px; +} + +/* FONTS */ +@font-face { + font-family: Roboto; + font-style: normal; + font-weight: 700; + src: local("Roboto-Regular"), url('Roboto-Regular.woff'); +} +/* You can add global styles to this file, and also import other style files */ +html, +body { + height: 100%; +} + +body { + margin: 0; + font-family: Roboto, "Helvetica Neue", Arial, sans-serif; +} + +.smallScrollbar { + /* Works on Firefox */ + scrollbar-width: thin; + /* Works on Chrome, Edge, and Safari */ +} +.smallScrollbar *::-webkit-scrollbar { + width: 12px; +} + +.headline { + font-size: 17pt; + height: 40px; + cursor: pointer; +} + +.headerButton { + background-color: transparent; + border: none; +} + +.spacer { + flex: 1 1 auto; +} + +.mr-1 { + margin-right: 8px !important; +} + +.mr-10 { + margin-right: 10px !important; +} + +.materialIconButton { + font-size: 24px !important; + padding-left: 5px; + padding-right: 5px; + margin-top: 9px; +} + +.toolbar { + height: 65px; +} + +app-root { + display: block; + height: 100%; +} + +a { + color: #880e4f; +} + +/* Material Design */ +mat-dialog-actions.mdc-dialog__actions { + padding: 0 24px 20px 24px; + justify-content: end; +} + +/* Snackbar */ +.mat-mdc-snack-bar-container.snackbar_success { + --mdc-snackbar-container-color: darkgreen; + --mat-mdc-snack-bar-button-color: #fff; + --mdc-snackbar-supporting-text-color: #fff; +} +.mat-mdc-snack-bar-container.snackbar_warning { + --mdc-snackbar-container-color: darkorange; + --mat-mdc-snack-bar-button-color: black; + --mdc-snackbar-supporting-text-color: #fff; +} +.mat-mdc-snack-bar-container.snackbar_error { + --mdc-snackbar-container-color: #d04437; + --mat-mdc-snack-bar-button-color: #fff; + --mdc-snackbar-supporting-text-color: #fff; +} +.mat-mdc-snack-bar-container.snackbar_info { + --mdc-snackbar-container-color: #42aebb; + --mat-mdc-snack-bar-button-color: black; + --mdc-snackbar-supporting-text-color: #fff; +} + +/* BPMN elements */ +.djs-overlay-context-pad { + width: 120px; + height: 238px; + overflow-y: auto; +} + +.djs-context-pad.open { + border: solid 1px rgba(128, 128, 128, 0.3294117647); +} + +.djs-context-pad.open > .group { + border: solid 1px rgba(128, 128, 128, 0.3294117647); + padding: 1px; + background-color: white; +} + +/** + * from bpmn.io + */ +/** + * palette + */ +.djs-palette { + position: absolute; + left: 20px; + top: 20px; + box-sizing: border-box; + width: 32px; +} + +.djs-palette .separator { + margin: 0 2px; + padding-top: 0; + border: none; + border-bottom: solid 1px #ddd; + clear: both; +} + +.djs-palette .entry:before { + vertical-align: middle; +} + +.djs-palette .djs-palette-toggle { + cursor: pointer; +} + +.djs-palette .entry, +.djs-palette .djs-palette-toggle { + color: #333; + font-size: 26px; + text-align: center; +} + +.djs-palette .entry { + float: left; +} + +.djs-palette .entry img { + max-width: 100%; +} + +.djs-palette .djs-palette-entries:after { + content: ""; + display: table; + clear: both; +} + +.djs-palette .djs-palette-toggle:hover { + background: #666; +} + +.djs-palette .entry:hover { + fill: #42aebb; +} + +.djs-palette .highlighted-entry { + color: #42aebb !important; +} + +.djs-palette .entry, +.djs-palette .djs-palette-toggle { + width: 30px; + height: 30px; + line-height: 30px; + cursor: default; +} + +/** + * Palette open / two-column layout is controlled via + * classes on the palette. Events to hook into palette + * changed life-cycle are available in addition. + */ +.djs-palette.two-column.open { + width: 64px; +} + +.djs-palette:not(.open) .djs-palette-entries { + display: none; +} + +.djs-palette:not(.open) { + overflow: hidden; +} + +.djs-palette.open .djs-palette-toggle { + display: none; +} + +/** + * outline styles + */ +.djs-outline { + fill: none; + visibility: hidden; +} + +.djs-element.hover .djs-outline, +.djs-element.selected .djs-outline { + visibility: visible; + shape-rendering: crispEdges; + stroke-dasharray: 3, 3; +} + +.djs-element.selected .djs-outline { + stroke: #8888ff; + stroke-width: 1px; +} + +.djs-element.hover .djs-outline { + stroke: #42aebb; +} + +.djs-element.attach-ok .djs-visual > :nth-child(1) { + stroke: #42aebb !important; +} + +/** +* Selection box style +* +*/ +.djs-lasso-overlay { + stroke: #42aebb; +} + +/** + * Resize styles + */ +.djs-resize-overlay { + stroke: #42aebb; +} + +/** + * drag styles + */ +.djs-dragger .djs-visual circle, +.djs-dragger .djs-visual path, +.djs-dragger .djs-visual polygon, +.djs-dragger .djs-visual polyline, +.djs-dragger .djs-visual rect, +.djs-dragger .djs-visual text { + fill: none !important; + stroke: #42aebb !important; +} + +/** + * snapping + */ +.djs-snap-line { + stroke: #42aebb; + stroke: rgba(255, 195, 66, 0.5); +} + +.djs-palette .entry:hover { + color: #42aebb; +} + +.djs-palette .highlighted-entry { + color: #42aebb !important; +} + +.djs-context-pad .entry:hover { + background: #42aebb; +} + +.djs-popup .djs-popup-header .entry.active { + color: #42aebb; + border: solid 1px #42aebb; + background-color: #f6f6f6; +} + +.djs-popup-body .entry { + width: auto !important; +} + +.djs-segment-dragger:hover .djs-visual, +.djs-segment-dragger.djs-dragging .djs-visual, +.djs-bendpoint:hover .djs-visual, +.djs-bendpoint.floating .djs-visual { + fill: #42aebb; + stroke-opacity: 0.5; + stroke: black; +} + +.djs-segment-dragger.djs-dragging .djs-visual, +.djs-bendpoint.djs-dragging .djs-visual { + fill: #42aebb; +} + +.djs-tooltip-error > * { + color: #42aebb; + border-left: solid 5px #42aebb; +} + +.djs-search-input input:focus { + outline: none; + border-color: #52b415; +} + +.djs-search-result:hover { + background: #fdffd6; +} + +.djs-search-result-selected { + background: #42aebb; +} + +.djs-search-result-selected:hover { + background: #42aebb; +} + +.djs-search-overlay { + background: #42aebb; +} + +.autocomplete-items { + border: 1px solid #a9a9a9; + background-color: #f0f0f0; +} + +.autocomplete-active { + background-color: DodgerBlue !important; + color: #ffffff; +} + +/*# sourceMappingURL=styles.css.map*/ \ No newline at end of file diff --git a/app-v2/styles.css.map b/app-v2/styles.css.map new file mode 100644 index 0000000..15c81e9 --- /dev/null +++ b/app-v2/styles.css.map @@ -0,0 +1 @@ +{"version":3,"file":"styles.css","mappings":";;;AAAA;;EAEE;AACF;EACE,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;EAC1C,0CAA0C;;EAE1C,4CAA4C;EAC5C,6DAA6D;EAC7D,4CAA4C;EAC5C,4CAA4C;;EAE5C,2CAA2C;;EAE3C,2CAA2C;EAC3C,2CAA2C;EAC3C,2CAA2C;EAC3C,2CAA2C;;EAE3C,+BAA+B;EAC/B,6BAA6B;EAC7B,6CAA6C;EAC7C,8CAA8C;;EAE9C,+DAA+D;EAC/D,sDAAsD;;EAEtD,wDAAwD;EACxD,uEAAuE;;EAEvE,qDAAqD;EACrD,gEAAgE;EAChE,qEAAqE;;EAErE,iDAAiD;EACjD,wCAAwC;;EAExC,kDAAkD;EAClD,yDAAyD;EACzD,4DAA4D;EAC5D,sDAAsD;EACtD,oEAAoE;EACpE,uDAAuD;EACvD,mDAAmD;;EAEnD,iDAAiD;EACjD,iEAAiE;EACjE,6EAA6E;EAC7E,2DAA2D;EAC3D,qDAAqD;EACrD,iDAAiD;;EAEjD,6DAA6D;EAC7D,oDAAoD;;EAEpD,gEAAgE;EAChE,6DAA6D;EAC7D,iEAAiE;EACjE,sEAAsE;EACtE,wDAAwD;EACxD,yDAAyD;EACzD,mDAAmD;EACnD,uEAAuE;;EAEvE,iEAAiE;EACjE,+DAA+D;EAC/D,4DAA4D;EAC5D,gEAAgE;EAChE,iEAAiE;;EAEjE,iEAAiE;;EAEjE,uDAAuD;;EAEvD,6DAA6D;EAC7D,yDAAyD;EACzD,kDAAkD;AACpD;;AAEA;;EAEE;;AAEF;EACE,UAAU;EACV,kBAAkB;AACpB;;AAEA;;EAEE,mBAAmB;EACnB,mCAAmC;EACnC,qBAAqB;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A;EACA;EAEA;AAiwEF;;AA9vEA;EACE;AAiwEF;;AA9vEA;EACE;AAiwEF;;AA9vEA;;EAEE;EACA;EAEA;AAgwEF;;AA7vEA;EACE;AAgwEF;;AA7vEA;EACE;AAgwEF;;AA7vEA;EACE;EACA;EACA;AAgwEF;;AA7vEA;EACE;AAgwEF;;AA7vEA;EACE;AAgwEF;;AA7vEA;EACE;AAgwEF;;AA7vEA;;EAEE;EACA;EACA;EACA;AAgwEF;;AA7vEA;;;;EAAA;AAKA;EACE;AAgwEF;;AA7vEA;EACE;AAgwEF;;AA7vEA;EACE;AAgwEF;;AA7vEA;EACE;AAgwEF;;AA7vEA;;EAAA;AAIA;EACE;EACA;AA+vEF;;AA5vEA;;EAEE;EACA;EACA;AA+vEF;;AA5vEA;EACE;EACA;AA+vEF;;AA5vEA;EACE;AA+vEF;;AA5vEA;EACE;AA+vEF;;AA5vEA;;;CAAA;AAIA;EACE;AA+vEF;;AA5vEA;;EAAA;AAGA;EACE;AA+vEF;;AA5vEA;;EAAA;AAGA;;;;;;EAME;EACA;AA+vEF;;AA5vEA;;EAAA;AAGA;EACE;EACA;AA+vEF;;AA5vEA;EACE;AA+vEF;;AA5vEA;EACE;AA+vEF;;AA5vEA;EACE;AA+vEF;;AA5vEA;EACE;EACA;EACA;AA+vEF;;AA5vEA;EACE;AA+vEF;;AA5vEA;;;;EAIE;EACA;EACA;AA+vEF;;AA5vEA;;EAEE;AA+vEF;;AA5vEA;EACE;EACA;AA+vEF;;AA5vEA;EACE;EACA;AA+vEF;;AA5vEA;EACE;AA+vEF;;AA5vEA;EACE;AA+vEF;;AA5vEA;EACE;AA+vEF;;AA5vEA;EACE;AA+vEF;;AA5vEA;EACE;EACA;AA+vEF;;AA5vEA;EACE;EACA;AA+vEF,C","sources":["./node_modules/diagram-js/assets/diagram-js.css","./node_modules/bpmn-js/dist/assets/bpmn-font/css/bpmn.css","./node_modules/material-icons/iconfont/material-icons.css","./node_modules/@angular/material/core/style/_sass-utils.scss","./node_modules/@material/theme/_css.scss","./src/styles.scss","./node_modules/@angular/material/core/typography/_typography.scss","./node_modules/@angular/material/core/typography/_typography-utils.scss","./node_modules/@angular/material/chips/_chips-theme.scss","./node_modules/@angular/material/slide-toggle/_slide-toggle-theme.scss","./node_modules/@angular/material/radio/_radio-theme.scss","./node_modules/@angular/material/list/_list-theme.scss","./node_modules/@angular/material/tabs/_tabs-theme.scss","./node_modules/@angular/material/checkbox/_checkbox-theme.scss","./node_modules/@angular/material/core/ripple/_ripple.scss","./node_modules/@angular/cdk/a11y/_index.scss","./node_modules/@angular/cdk/overlay/_index.scss","./node_modules/@angular/cdk/text-field/_index.scss","./node_modules/@angular/material/core/focus-indicators/_private.scss","./node_modules/@angular/material/core/style/_layout-common.scss","./node_modules/@angular/material/core/_core.scss","./node_modules/@angular/material/core/option/_option-theme.scss","./node_modules/@angular/material/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss","./node_modules/@angular/material/core/_core-theme.scss","./node_modules/@angular/material/progress-bar/_progress-bar-theme.scss","./node_modules/@angular/material/form-field/_form-field-theme.scss","./node_modules/@angular/material/select/_select-theme.scss","./node_modules/@angular/material/slider/_slider-theme.scss","./node_modules/@material/list/_list.scss","./node_modules/@angular/material/button/_button-theme.scss","./node_modules/@angular/material/button/_icon-button-theme.scss","./node_modules/@angular/material/button/_fab-theme.scss","./node_modules/@angular/material/progress-spinner/_progress-spinner-theme.scss","./node_modules/@angular/material/badge/_badge-theme.scss","./node_modules/@angular/material/datepicker/_datepicker-theme.scss","./node_modules/@angular/material/icon/_icon-theme.scss","./node_modules/@angular/material/stepper/_stepper-theme.scss","./node_modules/@angular/material/toolbar/_toolbar-theme.scss"],"sourcesContent":["/**\n * color definitions\n */\n.djs-container {\n --color-grey-225-10-15: hsl(225, 10%, 15%);\n --color-grey-225-10-35: hsl(225, 10%, 35%);\n --color-grey-225-10-55: hsl(225, 10%, 55%);\n --color-grey-225-10-75: hsl(225, 10%, 75%);\n --color-grey-225-10-80: hsl(225, 10%, 80%);\n --color-grey-225-10-85: hsl(225, 10%, 85%);\n --color-grey-225-10-90: hsl(225, 10%, 90%);\n --color-grey-225-10-95: hsl(225, 10%, 95%); \n --color-grey-225-10-97: hsl(225, 10%, 97%);\n\n --color-blue-205-100-45: hsl(205, 100%, 45%);\n --color-blue-205-100-45-opacity-30: hsla(205, 100%, 45%, 30%);\n --color-blue-205-100-50: hsl(205, 100%, 50%);\n --color-blue-205-100-95: hsl(205, 100%, 95%);\n\n --color-green-150-86-44: hsl(150, 86%, 44%);\n\n --color-red-360-100-40: hsl(360, 100%, 40%);\n --color-red-360-100-45: hsl(360, 100%, 45%);\n --color-red-360-100-92: hsl(360, 100%, 92%);\n --color-red-360-100-97: hsl(360, 100%, 97%);\n\n --color-white: hsl(0, 0%, 100%);\n --color-black: hsl(0, 0%, 0%); \n --color-black-opacity-05: hsla(0, 0%, 0%, 5%); \n --color-black-opacity-10: hsla(0, 0%, 0%, 10%);\n\n --bendpoint-fill-color: var(--color-blue-205-100-45-opacity-30);\n --bendpoint-stroke-color: var(--color-blue-205-100-50);\n\n --context-pad-entry-background-color: var(--color-white);\n --context-pad-entry-hover-background-color: var(--color-grey-225-10-95);\n\n --element-dragger-color: var(--color-blue-205-100-50);\n --element-hover-outline-fill-color: var(--color-blue-205-100-45);\n --element-selected-outline-stroke-color: var(--color-blue-205-100-50);\n\n --lasso-fill-color: var(--color-black-opacity-05);\n --lasso-stroke-color: var(--color-black);\n\n --palette-entry-color: var(--color-grey-225-10-15);\n --palette-entry-hover-color: var(--color-blue-205-100-45);\n --palette-entry-selected-color: var(--color-blue-205-100-50);\n --palette-separator-color: var(--color-grey-225-10-75);\n --palette-toggle-hover-background-color: var(--color-grey-225-10-55);\n --palette-background-color: var(--color-grey-225-10-97);\n --palette-border-color: var(--color-grey-225-10-75);\n\n --popup-body-background-color: var(--color-white);\n --popup-header-entry-selected-color: var(--color-blue-205-100-50);\n --popup-header-entry-selected-background-color: var(--color-black-opacity-10);\n --popup-header-separator-color: var(--color-grey-225-10-75);\n --popup-background-color: var(--color-grey-225-10-97);\n --popup-border-color: var(--color-grey-225-10-75);\n\n --resizer-fill-color: var(--color-blue-205-100-45-opacity-30);\n --resizer-stroke-color: var(--color-blue-205-100-50);\n\n --search-container-background-color: var(--color-grey-225-10-97);\n --search-container-border-color: var(--color-blue-205-100-50);\n --search-container-box-shadow-color: var(--color-blue-205-100-95);\n --search-container-box-shadow-inset-color: var(--color-grey-225-10-80);\n --search-input-border-color: var(--color-grey-225-10-75);\n --search-result-border-color: var(--color-grey-225-10-75);\n --search-result-highlight-color: var(--color-black);\n --search-result-selected-color: var(--color-blue-205-100-45-opacity-30);\n\n --shape-attach-allowed-stroke-color: var(--color-blue-205-100-50);\n --shape-connect-allowed-fill-color: var(--color-grey-225-10-97);\n --shape-drop-allowed-fill-color: var(--color-grey-225-10-97);\n --shape-drop-not-allowed-fill-color: var(--color-red-360-100-97);\n --shape-resize-preview-stroke-color: var(--color-blue-205-100-50);\n\n --snap-line-stroke-color: var(--color-blue-205-100-45-opacity-30);\n\n --space-tool-crosshair-stroke-color: var(--color-black);\n\n --tooltip-error-background-color: var(--color-red-360-100-97);\n --tooltip-error-border-color: var(--color-red-360-100-45);\n --tooltip-error-color: var(--color-red-360-100-45);\n}\n\n/**\n * outline styles\n */\n\n.djs-outline {\n fill: none;\n visibility: hidden;\n}\n\n.djs-element.hover .djs-outline,\n.djs-element.selected .djs-outline {\n visibility: visible;\n shape-rendering: geometricPrecision;\n stroke-dasharray: 3,3;\n}\n\n.djs-element.selected .djs-outline {\n stroke: var(--element-selected-outline-stroke-color);\n stroke-width: 1px;\n}\n\n.djs-element.hover .djs-outline {\n stroke: var(--element-hover-outline-fill-color);\n stroke-width: 1px;\n}\n\n.djs-shape.connect-ok .djs-visual > :nth-child(1) {\n fill: var(--shape-connect-allowed-fill-color) !important;\n}\n\n.djs-shape.connect-not-ok .djs-visual > :nth-child(1),\n.djs-shape.drop-not-ok .djs-visual > :nth-child(1) {\n fill: var(--shape-drop-not-allowed-fill-color) !important;\n}\n\n.djs-shape.new-parent .djs-visual > :nth-child(1) {\n fill: var(--shape-drop-allowed-fill-color) !important;\n}\n\nsvg.drop-not-ok {\n background: var(--shape-drop-not-allowed-fill-color) !important;\n}\n\nsvg.new-parent {\n background: var(--shape-drop-allowed-fill-color) !important;\n}\n\n.djs-connection.connect-ok .djs-visual > :nth-child(1),\n.djs-connection.drop-ok .djs-visual > :nth-child(1) {\n stroke: var(--shape-drop-allowed-fill-color) !important;\n}\n\n.djs-connection.connect-not-ok .djs-visual > :nth-child(1),\n.djs-connection.drop-not-ok .djs-visual > :nth-child(1) {\n stroke: var(--shape-drop-not-allowed-fill-color) !important;\n}\n\n.drop-not-ok,\n.connect-not-ok {\n cursor: not-allowed;\n}\n\n.djs-element.attach-ok .djs-visual > :nth-child(1) {\n stroke-width: 5px !important;\n stroke: var(--shape-attach-allowed-stroke-color) !important;\n}\n\n.djs-frame.connect-not-ok .djs-visual > :nth-child(1),\n.djs-frame.drop-not-ok .djs-visual > :nth-child(1) {\n stroke-width: 3px !important;\n stroke: var(--shape-drop-not-allowed-fill-color) !important;\n fill: none !important;\n}\n\n/**\n* Selection box style\n*\n*/\n.djs-lasso-overlay {\n fill: var(--lasso-fill-color);\n\n stroke-dasharray: 5 1 3 1;\n stroke: var(--lasso-stroke-color);\n\n shape-rendering: geometricPrecision;\n pointer-events: none;\n}\n\n/**\n * Resize styles\n */\n.djs-resize-overlay {\n fill: none;\n\n stroke-dasharray: 5 1 3 1;\n stroke: var(--shape-resize-preview-stroke-color);\n\n pointer-events: none;\n}\n\n.djs-resizer-hit {\n fill: none;\n pointer-events: all;\n}\n\n.djs-resizer-visual {\n fill: var(--resizer-fill-color);\n stroke-width: 1px;\n stroke-opacity: 0.5;\n stroke: var(--resizer-stroke-color);\n shape-rendering: geometricprecision;\n}\n\n.djs-resizer:hover .djs-resizer-visual {\n stroke: var(--resizer-stroke-color);\n stroke-opacity: 1;\n}\n\n.djs-cursor-resize-ns,\n.djs-resizer-n,\n.djs-resizer-s {\n cursor: ns-resize;\n}\n\n.djs-cursor-resize-ew,\n.djs-resizer-e,\n.djs-resizer-w {\n cursor: ew-resize;\n}\n\n.djs-cursor-resize-nwse,\n.djs-resizer-nw,\n.djs-resizer-se {\n cursor: nwse-resize;\n}\n\n.djs-cursor-resize-nesw,\n.djs-resizer-ne,\n.djs-resizer-sw {\n cursor: nesw-resize;\n}\n\n.djs-shape.djs-resizing > .djs-outline {\n visibility: hidden !important;\n}\n\n.djs-shape.djs-resizing > .djs-resizer {\n visibility: hidden;\n}\n\n.djs-dragger > .djs-resizer {\n visibility: hidden;\n}\n\n/**\n * drag styles\n */\n.djs-dragger * {\n fill: none !important;\n stroke: var(--element-dragger-color) !important;\n}\n\n.djs-dragger tspan,\n.djs-dragger text {\n fill: var(--element-dragger-color) !important;\n stroke: none !important;\n}\n\nmarker.djs-dragger circle,\nmarker.djs-dragger path,\nmarker.djs-dragger polygon,\nmarker.djs-dragger polyline,\nmarker.djs-dragger rect {\n fill: var(--element-dragger-color) !important;\n stroke: none !important;\n}\n\nmarker.djs-dragger text,\nmarker.djs-dragger tspan {\n fill: none !important;\n stroke: var(--element-dragger-color) !important;\n}\n\n.djs-dragging {\n opacity: 0.3;\n}\n\n.djs-dragging,\n.djs-dragging > * {\n pointer-events: none !important;\n}\n\n.djs-dragging .djs-context-pad,\n.djs-dragging .djs-outline {\n display: none !important;\n}\n\n/**\n * no pointer events for visual\n */\n.djs-visual,\n.djs-outline {\n pointer-events: none;\n}\n\n.djs-element.attach-ok .djs-hit {\n stroke-width: 60px !important;\n}\n\n/**\n * all pointer events for hit shape\n */\n.djs-element > .djs-hit-all {\n pointer-events: all;\n}\n\n.djs-element > .djs-hit-stroke,\n.djs-element > .djs-hit-click-stroke {\n pointer-events: stroke;\n}\n\n/**\n * all pointer events for hit shape\n */\n.djs-drag-active .djs-element > .djs-hit-click-stroke {\n pointer-events: all;\n}\n\n/**\n * shape / connection basic styles\n */\n.djs-connection .djs-visual {\n stroke-width: 2px;\n fill: none;\n}\n\n.djs-cursor-grab {\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n}\n\n.djs-cursor-grabbing {\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n}\n\n.djs-cursor-crosshair {\n cursor: crosshair;\n}\n\n.djs-cursor-move {\n cursor: move;\n}\n\n.djs-cursor-resize-ns {\n cursor: ns-resize;\n}\n\n.djs-cursor-resize-ew {\n cursor: ew-resize;\n}\n\n\n/**\n * snapping\n */\n.djs-snap-line {\n stroke: var(--snap-line-stroke-color);\n stroke-linecap: round;\n stroke-width: 2px;\n pointer-events: none;\n}\n\n/**\n * snapping\n */\n.djs-crosshair {\n stroke: var(--space-tool-crosshair-stroke-color);\n stroke-linecap: round;\n stroke-width: 1px;\n pointer-events: none;\n shape-rendering: crispEdges;\n stroke-dasharray: 5, 5;\n}\n\n/**\n * palette\n */\n\n.djs-palette {\n position: absolute;\n left: 20px;\n top: 20px;\n\n box-sizing: border-box;\n width: 48px;\n}\n\n.djs-palette .separator {\n margin: 0 5px;\n padding-top: 5px;\n\n border: none;\n border-bottom: solid 1px var(--palette-separator-color);\n\n clear: both;\n}\n\n.djs-palette .entry:before {\n vertical-align: text-bottom;\n}\n\n.djs-palette .djs-palette-toggle {\n cursor: pointer;\n}\n\n.djs-palette .entry,\n.djs-palette .djs-palette-toggle {\n color: var(--palette-entry-color);\n font-size: 30px;\n\n text-align: center;\n}\n\n.djs-palette .entry {\n float: left;\n}\n\n.djs-palette .entry img {\n max-width: 100%;\n}\n\n.djs-palette .djs-palette-entries:after {\n content: '';\n display: table;\n clear: both;\n}\n\n.djs-palette .djs-palette-toggle:hover {\n background: var(--palette-toggle-hover-background-color);\n}\n\n.djs-palette .entry:hover {\n color: var(--palette-entry-hover-color);\n}\n\n.djs-palette .highlighted-entry {\n color: var(--palette-entry-selected-color) !important;\n}\n\n.djs-palette .entry,\n.djs-palette .djs-palette-toggle {\n width: 46px;\n height: 46px;\n line-height: 46px;\n cursor: default;\n}\n\n/**\n * Palette open / two-column layout is controlled via\n * classes on the palette. Events to hook into palette\n * changed life-cycle are available in addition.\n */\n.djs-palette.two-column.open {\n width: 94px;\n}\n\n.djs-palette:not(.open) .djs-palette-entries {\n display: none;\n}\n\n.djs-palette:not(.open) {\n overflow: hidden;\n}\n\n.djs-palette.open .djs-palette-toggle {\n display: none;\n}\n\n/**\n * context-pad\n */\n.djs-overlay-context-pad {\n width: 72px;\n z-index: 100;\n}\n\n.djs-context-pad {\n position: absolute;\n display: none;\n pointer-events: none;\n line-height: 1;\n}\n\n.djs-context-pad .entry {\n width: 22px;\n height: 22px;\n text-align: center;\n display: inline-block;\n font-size: 22px;\n margin: 0 2px 2px 0;\n\n border-radius: 3px;\n\n cursor: default;\n\n background-color: var(--context-pad-entry-background-color);\n box-shadow: 0 0 2px 1px var(--context-pad-entry-background-color);\n pointer-events: all;\n vertical-align: middle;\n}\n\n.djs-context-pad .entry:hover {\n background: var(--context-pad-entry-hover-background-color);\n}\n\n.djs-context-pad.open {\n display: block;\n}\n\n/**\n * popup styles\n */\n.djs-popup .entry {\n line-height: 20px;\n white-space: nowrap;\n cursor: default;\n}\n\n/* larger font for prefixed icons */\n.djs-popup .entry:before {\n vertical-align: middle;\n font-size: 20px;\n}\n\n.djs-popup .entry > span {\n vertical-align: middle;\n font-size: 14px;\n}\n\n.djs-popup .entry:hover,\n.djs-popup .entry.active:hover {\n background: var(--popup-header-entry-selected-background-color);\n}\n\n.djs-popup .entry.disabled {\n background: inherit;\n}\n\n.djs-popup .djs-popup-header .entry {\n display: inline-block;\n padding: 2px 3px 2px 3px;\n\n border: solid 1px transparent;\n border-radius: 3px;\n}\n\n.djs-popup .djs-popup-header .entry.active {\n color: var(--popup-header-entry-selected-color);\n border: solid 1px var(--popup-header-entry-selected-color);\n background-color: var(--popup-header-entry-selected-background-color);\n}\n\n.djs-popup-body .entry {\n padding: 4px 10px 4px 5px;\n}\n\n.djs-popup-body .entry > span {\n margin-left: 5px;\n}\n\n.djs-popup-body {\n background-color: var(--popup-body-background-color);\n}\n\n.djs-popup-header {\n border-bottom: 1px solid var(--popup-header-separator-color);\n}\n\n.djs-popup-header .entry {\n margin: 1px;\n margin-left: 3px;\n}\n\n.djs-popup-header .entry:last-child {\n margin-right: 3px;\n}\n\n/**\n * popup / palette styles\n */\n.djs-palette {\n background: var(--palette-background-color);\n border: solid 1px var(--palette-border-color);\n border-radius: 2px;\n}\n\n.djs-popup {\n background: var(--popup-background-color);\n border: solid 1px var(--popup-border-color);\n border-radius: 2px;\n}\n\n/**\n * touch\n */\n\n.djs-shape,\n.djs-connection {\n touch-action: none;\n}\n\n.djs-segment-dragger,\n.djs-bendpoint {\n display: none;\n}\n\n/**\n * bendpoints\n */\n.djs-segment-dragger .djs-visual {\n display: none;\n\n fill: var(--bendpoint-fill-color);\n stroke: var(--bendpoint-stroke-color);\n stroke-width: 1px;\n stroke-opacity: 1;\n}\n\n.djs-segment-dragger:hover .djs-visual {\n display: block;\n}\n\n.djs-bendpoint .djs-visual {\n fill: var(--bendpoint-fill-color);\n stroke: var(--bendpoint-stroke-color);\n stroke-width: 1px;\n stroke-opacity: 0.5;\n}\n\n.djs-segment-dragger:hover,\n.djs-bendpoints.hover .djs-segment-dragger,\n.djs-bendpoints.selected .djs-segment-dragger,\n.djs-bendpoint:hover,\n.djs-bendpoints.hover .djs-bendpoint,\n.djs-bendpoints.selected .djs-bendpoint {\n display: block;\n}\n\n.djs-drag-active .djs-bendpoints * {\n display: none;\n}\n\n.djs-bendpoints:not(.hover) .floating {\n display: none;\n}\n\n.djs-segment-dragger:hover .djs-visual,\n.djs-segment-dragger.djs-dragging .djs-visual,\n.djs-bendpoint:hover .djs-visual,\n.djs-bendpoint.floating .djs-visual {\n fill: var(--bendpoint-fill-color);\n stroke: var(--bendpoint-stroke-color);\n stroke-opacity: 1;\n}\n\n.djs-bendpoint.floating .djs-hit {\n pointer-events: none;\n}\n\n.djs-segment-dragger .djs-hit,\n.djs-bendpoint .djs-hit {\n fill: none;\n pointer-events: all;\n}\n\n.djs-segment-dragger.horizontal .djs-hit {\n cursor: ns-resize;\n}\n\n.djs-segment-dragger.vertical .djs-hit {\n cursor: ew-resize;\n}\n\n.djs-segment-dragger.djs-dragging .djs-hit {\n pointer-events: none;\n}\n\n.djs-updating,\n.djs-updating > * {\n pointer-events: none !important;\n}\n\n.djs-updating .djs-context-pad,\n.djs-updating .djs-outline,\n.djs-updating .djs-bendpoint,\n.connect-ok .djs-bendpoint,\n.connect-not-ok .djs-bendpoint,\n.drop-ok .djs-bendpoint,\n.drop-not-ok .djs-bendpoint {\n display: none !important;\n}\n\n.djs-segment-dragger.djs-dragging,\n.djs-bendpoint.djs-dragging {\n display: block;\n opacity: 1.0;\n}\n\n\n/**\n * tooltips\n */\n.djs-tooltip-error {\n width: 160px;\n padding: 6px;\n\n background: var(--tooltip-error-background-color);\n border: solid 1px var(--tooltip-error-border-color);\n border-radius: 2px;\n color: var(--tooltip-error-color);\n font-size: 12px;\n line-height: 16px;\n\n opacity: 0.75;\n}\n\n.djs-tooltip-error:hover {\n opacity: 1;\n}\n\n\n/**\n * search pad\n */\n.djs-search-container {\n position: absolute;\n top: 20px;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n\n width: 25%;\n min-width: 300px;\n max-width: 400px;\n z-index: 10;\n\n font-size: 1.05em;\n opacity: 0.9;\n background: var(--search-container-background-color);\n border: solid 1px var(--search-container-border-color);\n border-radius: 2px;\n box-shadow: 0 0 0 2px var(--search-container-box-shadow-color), 0 0 0 1px var(--search-container-box-shadow-inset-color) inset;\n}\n\n.djs-search-container:not(.open) {\n display: none;\n}\n\n.djs-search-input input {\n font-size: 1.05em;\n width: 100%;\n padding: 6px 10px;\n border: 1px solid var(--search-input-border-color);\n box-sizing: border-box;\n}\n\n.djs-search-input input:focus {\n outline: none;\n border-color: var(--search-input-border-color);\n}\n\n.djs-search-results {\n position: relative;\n overflow-y: auto;\n max-height: 200px;\n}\n\n.djs-search-results:hover {\n cursor: pointer;\n}\n\n.djs-search-result {\n width: 100%;\n padding: 6px 10px;\n background: white;\n border-bottom: solid 1px var(--search-result-border-color);\n border-radius: 1px;\n}\n\n.djs-search-highlight {\n color: var(--search-result-highlight-color);\n}\n\n.djs-search-result-primary {\n margin: 0 0 10px;\n}\n\n.djs-search-result-secondary {\n font-family: monospace;\n margin: 0;\n}\n\n.djs-search-result:hover {\n background: var(--search-result-selected-color);\n}\n\n.djs-search-result-selected {\n background: var(--search-result-selected-color);\n}\n\n.djs-search-result-selected:hover {\n background: var(--search-result-selected-color);\n}\n\n.djs-search-overlay {\n background: var(--search-result-selected-color);\n}\n\n/**\n * hidden styles\n */\n.djs-element-hidden,\n.djs-element-hidden .djs-hit,\n.djs-element-hidden .djs-outline,\n.djs-label-hidden .djs-label {\n display: none !important;\n}\n","@font-face {\n font-family: 'bpmn';\n src: url('../font/bpmn.eot?26374340');\n src: url('../font/bpmn.eot?26374340#iefix') format('embedded-opentype'),\n url('../font/bpmn.woff2?26374340') format('woff2'),\n url('../font/bpmn.woff?26374340') format('woff'),\n url('../font/bpmn.ttf?26374340') format('truetype'),\n url('../font/bpmn.svg?26374340#bpmn') format('svg');\n font-weight: normal;\n font-style: normal;\n}\n/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */\n/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */\n/*\n@media screen and (-webkit-min-device-pixel-ratio:0) {\n @font-face {\n font-family: 'bpmn';\n src: url('../font/bpmn.svg?26374340#bpmn') format('svg');\n }\n}\n*/\n\n [class^=\"bpmn-icon-\"]:before, [class*=\" bpmn-icon-\"]:before {\n font-family: \"bpmn\";\n font-style: normal;\n font-weight: normal;\n speak: never;\n\n display: inline-block;\n text-decoration: inherit;\n width: 1em;\n /* margin-right: .2em; */\n text-align: center;\n /* opacity: .8; */\n\n /* For safety - reset parent styles, that can break glyph codes*/\n font-variant: normal;\n text-transform: none;\n\n /* fix buttons height, for twitter bootstrap */\n line-height: 1em;\n\n /* Animation center compensation - margins should be symmetric */\n /* remove if not needed */\n /* margin-left: .2em; */\n\n /* you can be more comfortable with increased icons size */\n /* font-size: 120%; */\n\n /* Font smoothing. That was taken from TWBS */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n /* Uncomment for 3D effect */\n /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */\n}\n\n.bpmn-icon-screw-wrench:before { content: '\\e800'; } /* '' */\n.bpmn-icon-trash:before { content: '\\e801'; } /* '' */\n.bpmn-icon-conditional-flow:before { content: '\\e802'; } /* '' */\n.bpmn-icon-default-flow:before { content: '\\e803'; } /* '' */\n.bpmn-icon-gateway-parallel:before { content: '\\e804'; } /* '' */\n.bpmn-icon-intermediate-event-catch-cancel:before { content: '\\e805'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-message:before { content: '\\e806'; } /* '' */\n.bpmn-icon-start-event-compensation:before { content: '\\e807'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-parallel-multiple:before { content: '\\e808'; } /* '' */\n.bpmn-icon-loop-marker:before { content: '\\e809'; } /* '' */\n.bpmn-icon-parallel-mi-marker:before { content: '\\e80a'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-signal:before { content: '\\e80b'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before { content: '\\e80c'; } /* '' */\n.bpmn-icon-intermediate-event-catch-parallel-multiple:before { content: '\\e80d'; } /* '' */\n.bpmn-icon-intermediate-event-catch-compensation:before { content: '\\e80e'; } /* '' */\n.bpmn-icon-gateway-xor:before { content: '\\e80f'; } /* '' */\n.bpmn-icon-connection:before { content: '\\e810'; } /* '' */\n.bpmn-icon-end-event-cancel:before { content: '\\e811'; } /* '' */\n.bpmn-icon-intermediate-event-catch-condition:before { content: '\\e812'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before { content: '\\e813'; } /* '' */\n.bpmn-icon-start-event-condition:before { content: '\\e814'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-timer:before { content: '\\e815'; } /* '' */\n.bpmn-icon-sequential-mi-marker:before { content: '\\e816'; } /* '' */\n.bpmn-icon-user-task:before { content: '\\e817'; } /* '' */\n.bpmn-icon-business-rule:before { content: '\\e818'; } /* '' */\n.bpmn-icon-sub-process-marker:before { content: '\\e819'; } /* '' */\n.bpmn-icon-start-event-parallel-multiple:before { content: '\\e81a'; } /* '' */\n.bpmn-icon-start-event-error:before { content: '\\e81b'; } /* '' */\n.bpmn-icon-intermediate-event-catch-signal:before { content: '\\e81c'; } /* '' */\n.bpmn-icon-intermediate-event-catch-error:before { content: '\\e81d'; } /* '' */\n.bpmn-icon-end-event-compensation:before { content: '\\e81e'; } /* '' */\n.bpmn-icon-subprocess-collapsed:before { content: '\\e81f'; } /* '' */\n.bpmn-icon-subprocess-expanded:before { content: '\\e820'; } /* '' */\n.bpmn-icon-task:before { content: '\\e821'; } /* '' */\n.bpmn-icon-end-event-error:before { content: '\\e822'; } /* '' */\n.bpmn-icon-intermediate-event-catch-escalation:before { content: '\\e823'; } /* '' */\n.bpmn-icon-intermediate-event-catch-timer:before { content: '\\e824'; } /* '' */\n.bpmn-icon-start-event-escalation:before { content: '\\e825'; } /* '' */\n.bpmn-icon-start-event-signal:before { content: '\\e826'; } /* '' */\n.bpmn-icon-business-rule-task:before { content: '\\e827'; } /* '' */\n.bpmn-icon-manual:before { content: '\\e828'; } /* '' */\n.bpmn-icon-receive:before { content: '\\e829'; } /* '' */\n.bpmn-icon-call-activity:before { content: '\\e82a'; } /* '' */\n.bpmn-icon-start-event-timer:before { content: '\\e82b'; } /* '' */\n.bpmn-icon-start-event-message:before { content: '\\e82c'; } /* '' */\n.bpmn-icon-intermediate-event-none:before { content: '\\e82d'; } /* '' */\n.bpmn-icon-intermediate-event-catch-link:before { content: '\\e82e'; } /* '' */\n.bpmn-icon-end-event-escalation:before { content: '\\e82f'; } /* '' */\n.bpmn-icon-text-annotation:before { content: '\\e830'; } /* '' */\n.bpmn-icon-bpmn-io:before { content: '\\e831'; } /* '' */\n.bpmn-icon-gateway-complex:before { content: '\\e832'; } /* '' */\n.bpmn-icon-gateway-eventbased:before { content: '\\e833'; } /* '' */\n.bpmn-icon-gateway-none:before { content: '\\e834'; } /* '' */\n.bpmn-icon-gateway-or:before { content: '\\e835'; } /* '' */\n.bpmn-icon-end-event-terminate:before { content: '\\e836'; } /* '' */\n.bpmn-icon-end-event-signal:before { content: '\\e837'; } /* '' */\n.bpmn-icon-end-event-none:before { content: '\\e838'; } /* '' */\n.bpmn-icon-end-event-multiple:before { content: '\\e839'; } /* '' */\n.bpmn-icon-end-event-message:before { content: '\\e83a'; } /* '' */\n.bpmn-icon-end-event-link:before { content: '\\e83b'; } /* '' */\n.bpmn-icon-intermediate-event-catch-message:before { content: '\\e83c'; } /* '' */\n.bpmn-icon-intermediate-event-throw-compensation:before { content: '\\e83d'; } /* '' */\n.bpmn-icon-start-event-multiple:before { content: '\\e83e'; } /* '' */\n.bpmn-icon-script:before { content: '\\e83f'; } /* '' */\n.bpmn-icon-manual-task:before { content: '\\e840'; } /* '' */\n.bpmn-icon-send:before { content: '\\e841'; } /* '' */\n.bpmn-icon-service:before { content: '\\e842'; } /* '' */\n.bpmn-icon-receive-task:before { content: '\\e843'; } /* '' */\n.bpmn-icon-user:before { content: '\\e844'; } /* '' */\n.bpmn-icon-start-event-none:before { content: '\\e845'; } /* '' */\n.bpmn-icon-intermediate-event-throw-escalation:before { content: '\\e846'; } /* '' */\n.bpmn-icon-intermediate-event-catch-multiple:before { content: '\\e847'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before { content: '\\e848'; } /* '' */\n.bpmn-icon-intermediate-event-throw-link:before { content: '\\e849'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-condition:before { content: '\\e84a'; } /* '' */\n.bpmn-icon-data-object:before { content: '\\e84b'; } /* '' */\n.bpmn-icon-script-task:before { content: '\\e84c'; } /* '' */\n.bpmn-icon-send-task:before { content: '\\e84d'; } /* '' */\n.bpmn-icon-data-store:before { content: '\\e84e'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-escalation:before { content: '\\e84f'; } /* '' */\n.bpmn-icon-intermediate-event-throw-message:before { content: '\\e850'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before { content: '\\e851'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before { content: '\\e852'; } /* '' */\n.bpmn-icon-intermediate-event-throw-multiple:before { content: '\\e853'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-message:before { content: '\\e854'; } /* '' */\n.bpmn-icon-ad-hoc-marker:before { content: '\\e855'; } /* '' */\n.bpmn-icon-service-task:before { content: '\\e856'; } /* '' */\n.bpmn-icon-task-none:before { content: '\\e857'; } /* '' */\n.bpmn-icon-compensation-marker:before { content: '\\e858'; } /* '' */\n.bpmn-icon-start-event-non-interrupting-multiple:before { content: '\\e859'; } /* '' */\n.bpmn-icon-intermediate-event-throw-signal:before { content: '\\e85a'; } /* '' */\n.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before { content: '\\e85b'; } /* '' */\n.bpmn-icon-participant:before { content: '\\e85c'; } /* '' */\n.bpmn-icon-event-subprocess-expanded:before { content: '\\e85d'; } /* '' */\n.bpmn-icon-lane-insert-below:before { content: '\\e85e'; } /* '' */\n.bpmn-icon-space-tool:before { content: '\\e85f'; } /* '' */\n.bpmn-icon-connection-multi:before { content: '\\e860'; } /* '' */\n.bpmn-icon-lane:before { content: '\\e861'; } /* '' */\n.bpmn-icon-lasso-tool:before { content: '\\e862'; } /* '' */\n.bpmn-icon-lane-insert-above:before { content: '\\e863'; } /* '' */\n.bpmn-icon-lane-divide-three:before { content: '\\e864'; } /* '' */\n.bpmn-icon-lane-divide-two:before { content: '\\e865'; } /* '' */\n.bpmn-icon-data-input:before { content: '\\e866'; } /* '' */\n.bpmn-icon-data-output:before { content: '\\e867'; } /* '' */\n.bpmn-icon-hand-tool:before { content: '\\e868'; } /* '' */\n.bpmn-icon-group:before { content: '\\e869'; } /* '' */\n.bpmn-icon-transaction:before { content: '\\e8c4'; } /* '' */","@font-face {\n font-family: \"Material Icons\";\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(\"./material-icons.woff2\") format(\"woff2\"), url(\"./material-icons.woff\") format(\"woff\");\n}\n.material-icons {\n font-family: \"Material Icons\";\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-feature-settings: \"liga\";\n}\n\n@font-face {\n font-family: \"Material Icons Outlined\";\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(\"./material-icons-outlined.woff2\") format(\"woff2\"), url(\"./material-icons-outlined.woff\") format(\"woff\");\n}\n.material-icons-outlined {\n font-family: \"Material Icons Outlined\";\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-feature-settings: \"liga\";\n}\n\n@font-face {\n font-family: \"Material Icons Round\";\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(\"./material-icons-round.woff2\") format(\"woff2\"), url(\"./material-icons-round.woff\") format(\"woff\");\n}\n.material-icons-round {\n font-family: \"Material Icons Round\";\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-feature-settings: \"liga\";\n}\n\n@font-face {\n font-family: \"Material Icons Sharp\";\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(\"./material-icons-sharp.woff2\") format(\"woff2\"), url(\"./material-icons-sharp.woff\") format(\"woff\");\n}\n.material-icons-sharp {\n font-family: \"Material Icons Sharp\";\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-feature-settings: \"liga\";\n}\n\n@font-face {\n font-family: \"Material Icons Two Tone\";\n font-style: normal;\n font-weight: 400;\n font-display: block;\n src: url(\"./material-icons-two-tone.woff2\") format(\"woff2\"), url(\"./material-icons-two-tone.woff\") format(\"woff\");\n}\n.material-icons-two-tone {\n font-family: \"Material Icons Two Tone\";\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-feature-settings: \"liga\";\n}\n","@use 'sass:color';\n@use 'sass:list';\n@use 'sass:map';\n@use 'sass:meta';\n\n/// Include content under the current selector (&) or the document root if there is no current\n/// selector.\n/// @param {String} $root [html] The default root selector to use when there is no current selector.\n/// @output The given content under the current selector, or root selector if there is no current\n/// selector.\n/// @content Content to output under the current selector, or root selector if there is no current\n/// selector.\n@mixin current-selector-or-root($root: html) {\n @if & {\n @content;\n }\n @else {\n #{$root} {\n @content;\n }\n }\n}\n\n/// A version of the standard `map.merge` function that takes a variable number of arguments.\n/// Each argument is merged into the final result from left to right.\n/// @param {List} $maps The maps to combine with map.merge\n/// @return {Map} The combined result of successively calling map.merge with each parameter.\n@function merge-all($maps...) {\n $result: ();\n @each $map in $maps {\n $result: map.merge($result, $map);\n }\n @return $result;\n}\n\n/// A version of the standard `map.deep-merge` function that takes a variable number of arguments.\n/// Each argument is deep-merged into the final result from left to right.\n/// @param {List} $maps The maps to combine with map.deep-merge\n/// @return {Map} The combined result of successively calling map.deep-merge with each parameter.\n@function deep-merge-all($maps...) {\n $result: ();\n @each $map in $maps {\n $result: map.deep-merge($result, $map);\n }\n @return $result;\n}\n\n/// Coerces the given value to a list, by converting any non-list value into a single-item list.\n/// This should be used when dealing with user-passed lists of args to avoid confusing errors,\n/// since Sass treats `($x)` as equivalent to `$x`.\n/// @param {Any} $value The value to coerce to a list.\n/// @return {List} The original $value if it was a list, otherwise a single-item list containing\n/// $value.\n@function coerce-to-list($value) {\n @return if(meta.type-of($value) != 'list', ($value,), $value);\n}\n\n/// A version of the Sass `color.change` function that is safe ot use with CSS variables.\n@function safe-color-change($color, $args...) {\n $args: meta.keywords($args);\n @return if(meta.type-of($color) == 'color', color.change($color, $args...), $color);\n}\n\n/// Gets the given arguments as a map of keywords and validates that only supported arguments were\n/// passed.\n/// @param {ArgList} $args The arguments to convert to a keywords map.\n/// @param {List} $supported-args The supported argument names.\n/// @return {Map} The $args as a map of argument name to argument value.\n@function validate-keyword-args($args, $supported-args) {\n @if list.length($args) > 0 {\n @error #{'Expected keyword args, but got positional args: '}#{$args};\n }\n $kwargs: meta.keywords($args);\n @each $arg, $v in $kwargs {\n @if list.index($supported-args, $arg) == null {\n @error #{'Unsupported argument '}#{$arg}#{'. Valid arguments are: '}#{$supported-args};\n }\n }\n @return $kwargs;\n}\n","//\n// Copyright 2020 Google Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\n@use 'sass:list';\n@use 'sass:map';\n@use 'sass:meta';\n@use './gss';\n\n/// When true, add an additional property/value declaration before declarations\n/// that use advanced features such as custom properties or CSS functions. This\n/// adds fallback support for older browsers such as IE11 that do not support\n/// these features at the cost of additional CSS. Set this variable to false to\n/// disable generating fallback declarations.\n$enable-fallback-declarations: true !default;\n\n/// Writes a CSS property/value declaration. This mixin is used throughout the\n/// theme package for consistency for dynamically setting CSS property values.\n///\n/// This mixin may optionally take a fallback value. For advanced features such\n/// as custom properties or CSS functions like min and max, a fallback value is\n/// recommended to support older browsers.\n///\n/// @param {String} $property - The CSS property of the declaration.\n/// @param {*} $value - The value of the CSS declaration. The value should be\n/// resolved by other theme functions first (i.e. custom property Maps and\n/// Material theme keys are not supported in this mixin). If the value is\n/// null, no declarations will be emitted.\n/// @param {*} $fallback - An optional fallback value for older browsers. If\n/// provided, a second property/value declaration will be added before the\n/// main property/value declaration.\n/// @param {Map} $gss - An optional Map of GSS annotations to add.\n/// @param {Bool} $important - If true, add `!important` to the declaration.\n@mixin declaration(\n $property,\n $value,\n $fallback-value: null,\n $gss: (),\n $important: false\n) {\n // Normally setting a null value to a property will not emit CSS, so mixins\n // wouldn't need to check this. However, Sass will throw an error if the\n // interpolated property is a custom property.\n @if $value != null {\n $important-rule: if($important, ' !important', '');\n\n @if $fallback-value and $enable-fallback-declarations {\n @include gss.annotate($gss);\n #{$property}: #{$fallback-value} #{$important-rule};\n\n // Add @alternate to annotations.\n $gss: map.merge(\n $gss,\n (\n alternate: true,\n )\n );\n }\n\n @include gss.annotate($gss);\n #{$property}: #{$value}#{$important-rule};\n }\n}\n\n/// Unpacks shorthand values for CSS properties (i.e. lists of 1-3 values).\n/// If a list of 4 values is given, it is returned as-is.\n///\n/// Examples:\n///\n/// unpack-value(4px) => 4px 4px 4px 4px\n/// unpack-value(4px 2px) => 4px 2px 4px 2px\n/// unpack-value(4px 2px 2px) => 4px 2px 2px 2px\n/// unpack-value(4px 2px 0 2px) => 4px 2px 0 2px\n///\n/// @param {Number | Map | List} $value - List of 1 to 4 value numbers.\n/// @return {List} a List of 4 value numbers.\n@function unpack-value($value) {\n @if meta.type-of($value) == 'map' or list.length($value) == 1 {\n @return $value $value $value $value;\n } @else if list.length($value) == 4 {\n @return $value;\n } @else if list.length($value) == 3 {\n @return list.nth($value, 1) list.nth($value, 2) list.nth($value, 3)\n list.nth($value, 2);\n } @else if list.length($value) == 2 {\n @return list.nth($value, 1) list.nth($value, 2) list.nth($value, 1)\n list.nth($value, 2);\n }\n\n @error \"Invalid CSS property value: '#{$value}' is more than 4 values\";\n}\n","// Custom Theming for Angular Material\n// For more information: https://material.angular.io/guide/theming\n@use \"@angular/material\" as mat;\n@import \"@angular/material\";\n@import \"material-icons/iconfont/material-icons.css\";\n// Plus imports for other components in your app.\n// Include the common styles for Angular Material. We include this here so that you only\n// have to load a single css file for Angular Material in your app.\n// Be sure that you only ever include this mixin once!\n@include mat.all-component-typographies();\n@include mat.core();\n\n// Define the palettes for your theme using the Material Design palettes available in palette.scss\n// (imported above). For each palette, you can optionally specify a default, lighter, and darker\n// hue. Available color palettes: https://material.io/design/color/\n$egon-primary: mat.define-palette(mat.$cyan-palette);\n$egon-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);\n\n// The warn palette is optional (defaults to red).\n$egon-warn: mat.define-palette(mat.$red-palette);\n\n// Create the theme object. A theme consists of configurations for individual\n// theming systems such as \"color\" or \"typography\".\n$egon-theme: mat.define-light-theme(\n (\n color: (\n primary: $egon-primary,\n accent: $egon-accent,\n warn: $egon-warn,\n ),\n )\n);\n\n// Include theme styles for core and each component used in your app.\n// Alternatively, you can import and @include the theme mixins for each component\n// that you are using.\n@include mat.all-component-themes($egon-theme);\n\n/* FONTS */\n\n@font-face {\n font-family: Roboto;\n font-style: normal;\n font-weight: 700;\n src: local(\"Roboto-Regular\"), url(\"~src/assets/font/Roboto-Regular.woff\");\n}\n\n/* You can add global styles to this file, and also import other style files */\n\nhtml,\nbody {\n height: 100%;\n}\n\nbody {\n margin: 0;\n font-family: Roboto, \"Helvetica Neue\", Arial, sans-serif;\n}\n\n.smallScrollbar {\n /* Works on Firefox */\n scrollbar-width: thin;\n\n /* Works on Chrome, Edge, and Safari */\n *::-webkit-scrollbar {\n width: 12px;\n }\n}\n\n.headline {\n font-size: 17pt;\n height: 40px;\n cursor: pointer;\n}\n\n.headerButton {\n background-color: transparent;\n border: none;\n}\n\n.spacer {\n flex: 1 1 auto;\n}\n\n.mr-1 {\n margin-right: 8px !important;\n}\n\n.mr-10 {\n margin-right: 10px !important;\n}\n\n.materialIconButton {\n font-size: 24px !important;\n padding-left: 5px;\n padding-right: 5px;\n margin-top: 9px;\n}\n\n.toolbar {\n height: 65px;\n}\n\napp-root {\n display: block;\n height: 100%;\n}\n\na {\n color: map-get($egon-accent, 900);\n}\n\n/* Material Design */\n\nmat-dialog-actions.mdc-dialog__actions {\n padding: 0 24px 20px 24px;\n justify-content: end;\n}\n\n/* Snackbar */\n\n.mat-mdc-snack-bar-container {\n &.snackbar_success {\n --mdc-snackbar-container-color: darkgreen;\n --mat-mdc-snack-bar-button-color: #fff;\n --mdc-snackbar-supporting-text-color: #fff;\n }\n &.snackbar_warning {\n --mdc-snackbar-container-color: darkorange;\n --mat-mdc-snack-bar-button-color: black;\n --mdc-snackbar-supporting-text-color: #fff;\n }\n &.snackbar_error {\n --mdc-snackbar-container-color: #d04437;\n --mat-mdc-snack-bar-button-color: #fff;\n --mdc-snackbar-supporting-text-color: #fff;\n }\n &.snackbar_info {\n --mdc-snackbar-container-color: #42aebb;\n --mat-mdc-snack-bar-button-color: black;\n --mdc-snackbar-supporting-text-color: #fff;\n }\n}\n\n/* BPMN elements */\n\n.djs-overlay-context-pad {\n width: 120px;\n height: 238px;\n overflow-y: auto;\n}\n\n.djs-context-pad.open {\n border: solid 1px #80808054;\n}\n\n.djs-context-pad.open > .group {\n border: solid 1px #80808054;\n padding: 1px;\n background-color: white;\n}\n\n/**\n * from bpmn.io\n */\n\n/**\n * palette\n */\n\n.djs-palette {\n position: absolute;\n left: 20px;\n top: 20px;\n\n box-sizing: border-box;\n width: 32px;\n}\n\n.djs-palette .separator {\n margin: 0 2px;\n padding-top: 0;\n\n border: none;\n border-bottom: solid 1px #ddd;\n\n clear: both;\n}\n\n.djs-palette .entry:before {\n vertical-align: middle;\n}\n\n.djs-palette .djs-palette-toggle {\n cursor: pointer;\n}\n\n.djs-palette .entry,\n.djs-palette .djs-palette-toggle {\n color: #333;\n font-size: 26px;\n\n text-align: center;\n}\n\n.djs-palette .entry {\n float: left;\n}\n\n.djs-palette .entry img {\n max-width: 100%;\n}\n\n.djs-palette .djs-palette-entries:after {\n content: \"\";\n display: table;\n clear: both;\n}\n\n.djs-palette .djs-palette-toggle:hover {\n background: #666;\n}\n\n.djs-palette .entry:hover {\n fill: #42aebb;\n}\n\n.djs-palette .highlighted-entry {\n color: #42aebb !important;\n}\n\n.djs-palette .entry,\n.djs-palette .djs-palette-toggle {\n width: 30px;\n height: 30px;\n line-height: 30px;\n cursor: default;\n}\n\n/**\n * Palette open / two-column layout is controlled via\n * classes on the palette. Events to hook into palette\n * changed life-cycle are available in addition.\n */\n.djs-palette.two-column.open {\n width: 64px;\n}\n\n.djs-palette:not(.open) .djs-palette-entries {\n display: none;\n}\n\n.djs-palette:not(.open) {\n overflow: hidden;\n}\n\n.djs-palette.open .djs-palette-toggle {\n display: none;\n}\n\n/**\n * outline styles\n */\n\n.djs-outline {\n fill: none;\n visibility: hidden;\n}\n\n.djs-element.hover .djs-outline,\n.djs-element.selected .djs-outline {\n visibility: visible;\n shape-rendering: crispEdges;\n stroke-dasharray: 3, 3;\n}\n\n.djs-element.selected .djs-outline {\n stroke: #8888ff;\n stroke-width: 1px;\n}\n\n.djs-element.hover .djs-outline {\n stroke: #42aebb;\n}\n\n.djs-element.attach-ok .djs-visual > :nth-child(1) {\n stroke: #42aebb !important;\n}\n\n/**\n* Selection box style\n*\n*/\n.djs-lasso-overlay {\n stroke: #42aebb;\n}\n\n/**\n * Resize styles\n */\n.djs-resize-overlay {\n stroke: #42aebb;\n}\n\n/**\n * drag styles\n */\n.djs-dragger .djs-visual circle,\n.djs-dragger .djs-visual path,\n.djs-dragger .djs-visual polygon,\n.djs-dragger .djs-visual polyline,\n.djs-dragger .djs-visual rect,\n.djs-dragger .djs-visual text {\n fill: none !important;\n stroke: #42aebb !important;\n}\n\n/**\n * snapping\n */\n.djs-snap-line {\n stroke: #42aebb;\n stroke: rgba(255, 195, 66, 0.5);\n}\n\n.djs-palette .entry:hover {\n color: #42aebb;\n}\n\n.djs-palette .highlighted-entry {\n color: #42aebb !important;\n}\n\n.djs-context-pad .entry:hover {\n background: #42aebb;\n}\n\n.djs-popup .djs-popup-header .entry.active {\n color: #42aebb;\n border: solid 1px #42aebb;\n background-color: #f6f6f6;\n}\n\n.djs-popup-body .entry {\n width: auto !important;\n}\n\n.djs-segment-dragger:hover .djs-visual,\n.djs-segment-dragger.djs-dragging .djs-visual,\n.djs-bendpoint:hover .djs-visual,\n.djs-bendpoint.floating .djs-visual {\n fill: #42aebb;\n stroke-opacity: 0.5;\n stroke: black;\n}\n\n.djs-segment-dragger.djs-dragging .djs-visual,\n.djs-bendpoint.djs-dragging .djs-visual {\n fill: #42aebb;\n}\n\n.djs-tooltip-error > * {\n color: #42aebb;\n border-left: solid 5px #42aebb;\n}\n\n.djs-search-input input:focus {\n outline: none;\n border-color: #52b415;\n}\n\n.djs-search-result:hover {\n background: #fdffd6;\n}\n\n.djs-search-result-selected {\n background: #42aebb;\n}\n\n.djs-search-result-selected:hover {\n background: #42aebb;\n}\n\n.djs-search-overlay {\n background: #42aebb;\n}\n\n.autocomplete-items {\n border: 1px solid #a9a9a9;\n background-color: #f0f0f0;\n}\n\n.autocomplete-active {\n background-color: DodgerBlue !important;\n color: #ffffff;\n}\n","@use 'sass:list';\n@use 'sass:map';\n@use 'sass:string';\n@use 'typography-utils';\n@use '../theming/inspection';\n@use './versioning';\n\n// Definition and versioning functions live in their own files to avoid circular dependencies, but\n// we re-export them here so that historical imports from this file continue to work without needing\n// to be updated.\n@forward './definition';\n@forward './versioning';\n\n@mixin typography-hierarchy($theme, $selector: '.mat-typography', $back-compat: false) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _m3-typography-hierarchy($theme, $selector, $back-compat);\n }\n @else {\n @include _m2-typography-hierarchy($theme, $selector);\n }\n}\n\n@function _get-selector($selectors, $prefix) {\n $result: ();\n @each $selector in $selectors {\n // Don't add \"naked\" tag selectors, and don't nest prefix selector.\n @if string.index($selector, '.') == 1 {\n $result: list.append($result, $selector, $separator: comma);\n }\n // Don't nest the prefix selector in itself.\n @if $selector != $prefix {\n $result: list.append($result, '#{$prefix} #{$selector}', $separator: comma);\n }\n }\n @return $result;\n}\n\n@mixin _m3-typography-level($theme, $selector-prefix, $level, $selectors, $margin: null) {\n #{_get-selector($selectors, $selector-prefix)} {\n // TODO(mmalerba): When we expose system tokens as CSS vars, we should change this to emit token\n // slots.\n font: inspection.get-theme-typography($theme, $level, font);\n letter-spacing: inspection.get-theme-typography($theme, $level, letter-spacing);\n @if $margin != null {\n margin: 0 0 $margin;\n }\n }\n}\n\n@mixin _m3-typography-hierarchy($theme, $selector-prefix, $add-m2-selectors) {\n $levels: (\n display-large: (\n selectors: ('.mat-display-large', 'h1'),\n m2-selectors: ('.mat-h1', '.mat-headline-1'),\n margin: 0.5em\n ),\n display-medium: (\n selectors: ('.mat-display-medium', 'h2'),\n m2-selectors: ('.mat-h2', '.mat-headline-2'),\n margin: 0.5em\n ),\n display-small: (\n selectors: ('.mat-display-small', 'h3'),\n m2-selectors: ('.mat-h3', '.mat-headline-3'),\n margin: 0.5em\n ),\n headline-large: (\n selectors: ('.mat-headline-large', 'h4'),\n m2-selectors: ('.mat-h4', '.mat-headline-4'),\n margin: 0.5em\n ),\n headline-medium: (\n selectors: ('.mat-headline-medium', 'h5'),\n m2-selectors: ('.mat-h5', '.mat-headline-5'),\n margin: 0.5em\n ),\n headline-small: (\n selectors: ('.mat-headline-small', 'h6'),\n m2-selectors: ('.mat-h6', '.mat-headline-6'),\n margin: 0.5em\n ),\n title-large: (\n selectors: ('.mat-title-large'),\n m2-selectors: ('.mat-subtitle-1'),\n ),\n title-medium: (\n selectors: ('.mat-title-medium'),\n m2-selectors: ('.mat-subtitle-2'),\n ),\n title-small: (\n selectors: ('.mat-title-small')\n ),\n body-large: (\n selectors: ('.mat-body-large', $selector-prefix),\n m2-selectors: ('.mat-body', '.mat-body-strong', '.mat-body-2'),\n ),\n body-medium: (\n selectors: ('.mat-body-medium')\n ),\n body-small: (\n selectors: ('.mat-body-small')\n ),\n label-large: (\n selectors: ('.mat-label-large')\n ),\n label-medium: (\n selectors: ('.mat-label-medium')\n ),\n label-small: (\n selectors: ('.mat-label-small'),\n m2-selectors: ('.mat-small', '.mat-caption')\n ),\n );\n\n @each $level, $options in $levels {\n @if $add-m2-selectors {\n $options: map.set($options, selectors,\n list.join(map.get($options, selectors), map.get($options, m2-selectors) or ()));\n }\n $options: map.remove($options, m2-selectors);\n\n // Apply styles for the level.\n @include _m3-typography-level($theme, $selector-prefix, $level, $options...);\n\n // Also style

inside body-large.\n @if $level == body-large {\n #{_get-selector(map.get($options, selectors), $selector-prefix)} {\n p {\n margin: 0 0 0.75em;\n }\n }\n }\n }\n}\n\n/// Emits baseline typographic styles based on a given config.\n/// @param {Map} $config-or-theme A typography config for an entire theme.\n/// @param {String} $selector Ancestor selector under which native elements, such as h1, will\n/// be styled.\n@mixin _m2-typography-hierarchy($theme, $selector) {\n // Note that it seems redundant to prefix the class rules with the `$selector`, however it's\n // necessary if we want to allow people to overwrite the tag selectors. This is due to\n // selectors like `#{$selector} h1` being more specific than ones like `.mat-title`.\n .mat-h1,\n .mat-headline-5,\n #{$selector} .mat-h1,\n #{$selector} .mat-headline-5,\n #{$selector} h1 {\n font: inspection.get-theme-typography($theme, headline-5, font);\n letter-spacing: inspection.get-theme-typography($theme, headline-5, letter-spacing);\n margin: 0 0 16px;\n }\n\n .mat-h2,\n .mat-headline-6,\n #{$selector} .mat-h2,\n #{$selector} .mat-headline-6,\n #{$selector} h2 {\n font: inspection.get-theme-typography($theme, headline-6, font);\n letter-spacing: inspection.get-theme-typography($theme, headline-6, letter-spacing);\n margin: 0 0 16px;\n }\n\n .mat-h3,\n .mat-subtitle-1,\n #{$selector} .mat-h3,\n #{$selector} .mat-subtitle-1,\n #{$selector} h3 {\n font: inspection.get-theme-typography($theme, subtitle-1, font);\n letter-spacing: inspection.get-theme-typography($theme, subtitle-1, letter-spacing);\n margin: 0 0 16px;\n }\n\n .mat-h4,\n .mat-body-1,\n #{$selector} .mat-h4,\n #{$selector} .mat-body-1,\n #{$selector} h4 {\n font: inspection.get-theme-typography($theme, body-1, font);\n letter-spacing: inspection.get-theme-typography($theme, body-1, letter-spacing);\n margin: 0 0 16px;\n }\n\n // Note: the spec doesn't have anything that would correspond to h5 and h6, but we add these for\n // consistency. The font sizes come from the Chrome user agent styles which have h5 at 0.83em\n // and h6 at 0.67em.\n .mat-h5,\n #{$selector} .mat-h5,\n #{$selector} h5 {\n @include typography-utils.font-shorthand(\n // calc is used here to support css variables\n calc(#{inspection.get-theme-typography($theme, body-2, font-size)} * 0.83),\n inspection.get-theme-typography($theme, body-2, font-weight),\n inspection.get-theme-typography($theme, body-2, line-height),\n inspection.get-theme-typography($theme, body-2, font-family)\n );\n\n margin: 0 0 12px;\n }\n\n .mat-h6,\n #{$selector} .mat-h6,\n #{$selector} h6 {\n @include typography-utils.font-shorthand(\n // calc is used here to support css variables\n calc(#{inspection.get-theme-typography($theme, body-2, font-size)} * 0.67),\n inspection.get-theme-typography($theme, body-2, font-weight),\n inspection.get-theme-typography($theme, body-2, line-height),\n inspection.get-theme-typography($theme, body-2, font-family)\n );\n\n margin: 0 0 12px;\n }\n\n .mat-body-strong,\n .mat-subtitle-2,\n #{$selector} .mat-body-strong,\n #{$selector} .mat-subtitle-2 {\n font: inspection.get-theme-typography($theme, subtitle-2, font);\n letter-spacing: inspection.get-theme-typography($theme, subtitle-2, letter-spacing);\n }\n\n .mat-body,\n .mat-body-2,\n #{$selector} .mat-body,\n #{$selector} .mat-body-2,\n #{$selector} {\n font: inspection.get-theme-typography($theme, body-2, font);\n letter-spacing: inspection.get-theme-typography($theme, body-2, letter-spacing);\n\n p {\n margin: 0 0 12px;\n }\n }\n\n .mat-small,\n .mat-caption,\n #{$selector} .mat-small,\n #{$selector} .mat-caption {\n font: inspection.get-theme-typography($theme, caption, font);\n letter-spacing: inspection.get-theme-typography($theme, caption, letter-spacing);\n }\n\n .mat-headline-1,\n #{$selector} .mat-headline-1 {\n font: inspection.get-theme-typography($theme, headline-1, font);\n letter-spacing: inspection.get-theme-typography($theme, headline-1, letter-spacing);\n margin: 0 0 56px;\n }\n\n .mat-headline-2,\n #{$selector} .mat-headline-2 {\n font: inspection.get-theme-typography($theme, headline-2, font);\n letter-spacing: inspection.get-theme-typography($theme, headline-2, letter-spacing);\n margin: 0 0 64px;\n }\n\n .mat-headline-3,\n #{$selector} .mat-headline-3 {\n font: inspection.get-theme-typography($theme, headline-3, font);\n letter-spacing: inspection.get-theme-typography($theme, headline-3, letter-spacing);\n margin: 0 0 64px;\n }\n\n .mat-headline-4,\n #{$selector} .mat-headline-4 {\n font: inspection.get-theme-typography($theme, headline-4, font);\n letter-spacing: inspection.get-theme-typography($theme, headline-4, letter-spacing);\n margin: 0 0 64px;\n }\n}\n","@use 'sass:list';\n@use 'sass:math';\n@use './property-getters';\n\n// Property getters live in their own file to avoid circular dependencies, but we re-export them\n// here so that historical imports from this file continue to work without needing to be updated.\n@forward './property-getters';\n\n/// Outputs the shorthand `font` CSS property, based on a set of typography values. Falls back to\n/// the individual properties if a value that isn't allowed in the shorthand is passed in.\n/// @param {String} $font-size The font-size value.\n/// @param {String | Number} $font-weight The font-weight value.\n/// @param {String | Number} $line-height The line-height value.\n/// @param {String} $font-family The font-family value.\n/// @returns {String} The `font` shorthand value combining the given parts.\n@mixin font-shorthand($font-size, $font-weight, $line-height, $font-family) {\n // If any of the values are set to `inherit`, we can't use the shorthand\n // so we fall back to passing in the individual properties.\n @if ($font-size == inherit or\n $font-weight == inherit or\n $line-height == inherit or\n $font-family == inherit or\n $font-size == null or\n $font-weight == null or\n $line-height == null or\n $font-family == null) {\n\n font-size: $font-size;\n font-weight: $font-weight;\n line-height: $line-height;\n font-family: $font-family;\n }\n @else {\n // Otherwise use the shorthand `font`, because it's the least amount of bytes.\n font: $font-weight list.slash($font-size, $line-height) $font-family;\n }\n}\n\n/// Emits CSS styles for the given typography level.\n/// @param {Map} $config A typography config.\n/// @param {Map} $level A typography level.\n@mixin typography-level($config, $level) {\n // we deliberately do not use the font shorthand here because it overrides\n // certain font properties that can't be configured in the current typography\n // config, e.g. the font-variant-caps or font-feature-settings property\n font-size: property-getters.font-size($config, $level);\n font-weight: property-getters.font-weight($config, $level);\n line-height: property-getters.line-height($config, $level);\n font-family: property-getters.font-family($config, $level);\n letter-spacing: property-getters.letter-spacing($config, $level);\n}\n\n/// Coerce a value to `em` if it is a unitless number, otherwise returns\n/// the value provided.\n@function private-coerce-unitless-to-em($value) {\n @return if(math.is-unitless($value), 1em * $value, $value);\n}\n","@use 'sass:color';\n@use '@material/chips/chip-theme' as mdc-chip-theme;\n@use '../core/tokens/m2/mdc/chip' as tokens-mdc-chip;\n@use '../core/tokens/m2/mat/chip' as tokens-mat-chip;\n@use '../core/tokens/token-utils';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/typography/typography';\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-chips.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n .mat-mdc-standard-chip {\n @include mdc-chip-theme.theme(tokens-mdc-chip.get-unthemable-tokens());\n @include token-utils.create-token-values(\n tokens-mat-chip.$prefix, tokens-mat-chip.get-unthemable-tokens());\n }\n }\n}\n\n/// Outputs color theme styles for the mat-chips.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the selected chip: primary, secondary, tertiary,\n/// or error (If not specified, default secondary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n .mat-mdc-standard-chip {\n $default-color-tokens: tokens-mdc-chip.get-color-tokens($theme);\n @include mdc-chip-theme.theme($default-color-tokens);\n @include token-utils.create-token-values(\n tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme));\n\n &.mat-mdc-chip-selected,\n &.mat-mdc-chip-highlighted {\n &.mat-primary {\n $primary-color-tokens: tokens-mdc-chip.get-color-tokens($theme, primary);\n @include mdc-chip-theme.theme($primary-color-tokens);\n @include token-utils.create-token-values(\n tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, primary));\n }\n\n &.mat-accent {\n $accent-color-tokens: tokens-mdc-chip.get-color-tokens($theme, accent);\n @include mdc-chip-theme.theme($accent-color-tokens);\n @include token-utils.create-token-values(\n tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, accent));\n }\n\n &.mat-warn {\n $warn-color-tokens: tokens-mdc-chip.get-color-tokens($theme, warn);\n @include mdc-chip-theme.theme($warn-color-tokens);\n @include token-utils.create-token-values(\n tokens-mat-chip.$prefix, tokens-mat-chip.get-color-tokens($theme, warn));\n }\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-chips.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n $typography-tokens: tokens-mdc-chip.get-typography-tokens($theme);\n\n .mat-mdc-standard-chip {\n @include mdc-chip-theme.theme($typography-tokens);\n @include token-utils.create-token-values(\n tokens-mat-chip.$prefix, tokens-mat-chip.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs density theme styles for the mat-chips.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n $density-tokens: tokens-mdc-chip.get-density-tokens($theme);\n\n .mat-mdc-chip.mat-mdc-standard-chip {\n @include mdc-chip-theme.theme($density-tokens);\n @include token-utils.create-token-values(\n tokens-mat-chip.$prefix, tokens-mat-chip.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-chips.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the selected chip: primary, secondary, tertiary,\n/// or error (If not specified, default secondary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-chips') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mdc-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-chip.$prefix, $options...);\n $mat-chip-tokens: token-utils.get-tokens-for($tokens, tokens-mat-chip.$prefix, $options...);\n @include mdc-chip-theme.theme($mdc-chip-tokens);\n @include token-utils.create-token-values(tokens-mat-chip.$prefix, $mat-chip-tokens);\n}\n","@use '@material/switch/switch-theme' as mdc-switch-theme;\n@use '@material/form-field/form-field-theme' as mdc-form-field-theme;\n@use '../core/style/sass-utils';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/tokens/token-utils';\n@use '../core/typography/typography';\n@use '../core/tokens/m2/mdc/form-field' as tokens-mdc-form-field;\n@use '../core/tokens/m2/mat/switch' as tokens-mat-switch;\n@use '../core/tokens/m2/mdc/switch' as tokens-mdc-switch;\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-slide-toggle.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n $mat-tokens: tokens-mat-switch.get-unthemable-tokens();\n $mdc-tokens: tokens-mdc-switch.get-unthemable-tokens();\n @include mdc-switch-theme.theme($mdc-tokens);\n @include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-tokens);\n }\n }\n}\n\n/// Outputs color theme styles for the mat-slide-toggle.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the slide-toggle: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n $is-dark: inspection.get-theme-type($theme) == dark;\n $mat-tokens: tokens-mat-switch.get-color-tokens($theme);\n $mdc-tokens: tokens-mdc-switch.get-color-tokens($theme);\n\n // Add values for MDC slide toggles tokens\n @include sass-utils.current-selector-or-root() {\n @include mdc-switch-theme.theme($mdc-tokens);\n @include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-tokens);\n\n // TODO(wagnermaciel): Use our token system to define this css variable.\n --mdc-switch-disabled-label-text-color: #{inspection.get-theme-color(\n $theme,\n foreground,\n disabled-text\n )};\n\n .mat-mdc-slide-toggle {\n @include mdc-form-field-theme.theme(tokens-mdc-form-field.get-color-tokens($theme));\n\n // Change the color palette related tokens to accent or warn if applicable\n &.mat-accent {\n @include mdc-switch-theme.theme(\n tokens-mdc-switch.private-get-color-palette-color-tokens($theme, accent));\n }\n\n &.mat-warn {\n @include mdc-switch-theme.theme(\n tokens-mdc-switch.private-get-color-palette-color-tokens($theme, warn));\n }\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-slide-toggle.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n $mat-tokens: tokens-mat-switch.get-typography-tokens($theme);\n $mdc-tokens: tokens-mdc-switch.get-typography-tokens($theme);\n\n // Add values for MDC slide toggle tokens\n @include sass-utils.current-selector-or-root() {\n @include mdc-switch-theme.theme($mdc-tokens);\n @include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-tokens);\n\n .mat-mdc-slide-toggle {\n @include mdc-form-field-theme.theme(tokens-mdc-form-field.get-typography-tokens($theme));\n }\n }\n }\n}\n\n/// Outputs density theme styles for the mat-slide-toggle.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n $mat-tokens: tokens-mat-switch.get-density-tokens($theme);\n $mdc-tokens: tokens-mdc-switch.get-density-tokens($theme);\n @include mdc-switch-theme.theme(tokens-mdc-switch.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-icon.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the slide-toggle: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-slide-toggle') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n // Don't pass $options here, since the mdc-form-field doesn't support color options,\n // only the mdc-switch does.\n $mdc-form-field-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-form-field.$prefix);\n $mat-switch-tokens: token-utils.get-tokens-for($tokens, tokens-mat-switch.$prefix);\n $mdc-switch-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-switch.$prefix, $options...);\n\n @include mdc-form-field-theme.theme($mdc-form-field-tokens);\n @include mdc-switch-theme.theme($mdc-switch-tokens);\n @include token-utils.create-token-values(tokens-mat-switch.$prefix, $mat-switch-tokens);\n}\n","@use '@material/radio/radio-theme' as mdc-radio-theme;\n@use '@material/form-field/form-field-theme' as mdc-form-field-theme;\n@use '../core/style/sass-utils';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/tokens/token-utils';\n@use '../core/typography/typography';\n@use '../core/tokens/m2/mdc/form-field' as tokens-mdc-form-field;\n@use '../core/tokens/m2/mdc/radio' as tokens-mdc-radio;\n@use '../core/tokens/m2/mat/radio' as tokens-mat-radio;\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-radio.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-radio-theme.theme(tokens-mdc-radio.get-unthemable-tokens());\n @include token-utils.create-token-values(\n tokens-mat-radio.$prefix, tokens-mat-radio.get-unthemable-tokens());\n }\n }\n}\n\n/// Outputs color theme styles for the mat-radio.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the radio button: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n .mat-mdc-radio-button {\n @include mdc-form-field-theme.theme(tokens-mdc-form-field.get-color-tokens($theme));\n\n &.mat-primary {\n @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, primary));\n @include token-utils.create-token-values(tokens-mat-radio.$prefix,\n tokens-mat-radio.get-color-tokens($theme, primary));\n }\n\n &.mat-accent {\n @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-radio.$prefix,\n tokens-mat-radio.get-color-tokens($theme));\n }\n\n &.mat-warn {\n @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, warn));\n @include token-utils.create-token-values(tokens-mat-radio.$prefix,\n tokens-mat-radio.get-color-tokens($theme, warn));\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-radio.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-radio-theme.theme(tokens-mdc-radio.get-typography-tokens($theme));\n @include token-utils.create-token-values(\n tokens-mat-radio.$prefix, tokens-mat-radio.get-typography-tokens($theme));\n }\n\n .mat-mdc-radio-button {\n @include mdc-form-field-theme.theme(tokens-mdc-form-field.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-radio.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n $density-scale: inspection.get-theme-density($theme);\n\n @include sass-utils.current-selector-or-root() {\n @include mdc-radio-theme.theme(tokens-mdc-radio.get-density-tokens($theme));\n @include token-utils.create-token-values(\n tokens-mat-radio.$prefix, tokens-mat-radio.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-radio.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the radio button: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-radio') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mdc-radio-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-radio.$prefix, $options...);\n $mat-radio-tokens: token-utils.get-tokens-for($tokens, tokens-mat-radio.$prefix, $options...);\n // Don't pass $options here, since the mdc-form-field doesn't support color options,\n // only the mdc-radio and mat-radio do.\n $mdc-form-field-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-form-field.$prefix);\n @include mdc-radio-theme.theme($mdc-radio-tokens);\n @include mdc-form-field-theme.theme($mdc-form-field-tokens);\n @include token-utils.create-token-values(tokens-mat-radio.$prefix, $mat-radio-tokens);\n}\n","@use 'sass:map';\n@use '@material/list/evolution-mixins';\n@use '@material/checkbox/checkbox-theme' as mdc-checkbox-theme;\n@use '@material/radio/radio-theme' as mdc-radio-theme;\n@use '@material/list/list-theme' as mdc-list-theme;\n\n@use '../core/style/sass-utils';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/tokens/m2/mat/list' as tokens-mat-list;\n@use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox;\n@use '../core/tokens/m2/mdc/radio' as tokens-mdc-radio;\n@use '../core/tokens/m2/mdc/list' as tokens-mdc-list;\n@use '../core/tokens/token-utils';\n@use '../core/typography/typography';\n\n@mixin base($theme) {\n // Add default values for tokens not related to color, typography, or density.\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-list-theme.theme(tokens-mdc-list.get-unthemable-tokens());\n @include token-utils.create-token-values(\n tokens-mat-list.$prefix, tokens-mat-list.get-unthemable-tokens());\n }\n }\n}\n\n@mixin color($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));\n }\n @else {\n $mdc-list-color-tokens: tokens-mdc-list.get-color-tokens($theme);\n\n // Add values for MDC list tokens.\n @include sass-utils.current-selector-or-root() {\n @include mdc-list-theme.theme($mdc-list-color-tokens);\n @include token-utils.create-token-values(\n tokens-mat-list.$prefix, tokens-mat-list.get-color-tokens($theme));\n }\n\n .mdc-list-item__start,\n .mdc-list-item__end {\n @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, primary));\n }\n\n .mat-accent {\n .mdc-list-item__start,\n .mdc-list-item__end {\n @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, accent));\n }\n }\n\n .mat-warn {\n .mdc-list-item__start,\n .mdc-list-item__end {\n @include mdc-radio-theme.theme(tokens-mdc-radio.get-color-tokens($theme, warn));\n }\n }\n\n .mat-mdc-list-option {\n @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, primary));\n }\n .mat-mdc-list-option.mat-accent {\n @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, accent));\n }\n .mat-mdc-list-option.mat-warn {\n @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, warn));\n }\n\n // There is no token for activated color on nav list.\n // TODO(mmalerba): Add a token to MDC or make a custom one.\n .mat-mdc-list-base.mat-mdc-list-base {\n @include evolution-mixins.list-selected-ink-color(\n inspection.get-theme-color($theme, primary));\n }\n\n // TODO(mmalerba): Leaking styles from the old MDC list mixins used in other components can\n // cause opacity issues, so we need this override for now. We can remove it when all\n // Angular Material components stop using the old MDC mixins.\n .mat-mdc-list-base .mdc-list-item--disabled {\n .mdc-list-item__start,\n .mdc-list-item__content,\n .mdc-list-item__end {\n opacity: 1;\n }\n }\n }\n}\n\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n $density-scale: inspection.get-theme-density($theme);\n $mdc-list-density-tokens: tokens-mdc-list.get-density-tokens($theme);\n\n // Add values for MDC list tokens.\n @include sass-utils.current-selector-or-root() {\n @include mdc-list-theme.theme($mdc-list-density-tokens);\n @include token-utils.create-token-values(\n tokens-mat-list.$prefix, tokens-mat-list.get-density-tokens($theme));\n }\n\n .mdc-list-item__start,\n .mdc-list-item__end {\n @include mdc-radio-theme.theme(tokens-mdc-radio.get-density-tokens($theme));\n }\n\n // TODO(mmalerba): This is added to maintain the same style MDC used prior to the token-based\n // API, to avoid screenshot diffs. We should remove it in favor of following MDC's current\n // style, or add custom tokens for it.\n .mat-mdc-list-item {\n &.mdc-list-item--with-leading-avatar,\n &.mdc-list-item--with-leading-checkbox,\n &.mdc-list-item--with-leading-icon {\n &.mdc-list-item--with-one-line {\n height: map.get((\n 0: 56px,\n -1: 52px,\n -2: 48px,\n -3: 44px,\n -4: 40px,\n -5: 40px,\n ), $density-scale);\n }\n\n &.mdc-list-item--with-two-lines {\n height: map.get((\n 0: 72px,\n -1: 68px,\n -2: 64px,\n -3: 60px,\n -4: 56px,\n -5: 56px,\n ), $density-scale);\n }\n }\n }\n }\n}\n\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n $mdc-list-typography-tokens: tokens-mdc-list.get-typography-tokens($theme);\n\n // Add values for MDC list tokens.\n @include sass-utils.current-selector-or-root() {\n @include mdc-list-theme.theme($mdc-list-typography-tokens);\n @include token-utils.create-token-values(\n tokens-mat-list.$prefix, tokens-mat-list.get-typography-tokens($theme));\n }\n\n // MDC does not have tokens for the subheader.\n // TODO(mmalerba): Discuss with MDC about adding them, or create custom tokens.\n .mdc-list-group__subheader {\n font: inspection.get-theme-typography($theme, subtitle-1, font);\n letter-spacing: inspection.get-theme-typography($theme, subtitle-1, letter-spacing);\n }\n }\n}\n\n@mixin theme($theme) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-list') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme));\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n @include mdc-list-theme.theme(token-utils.get-tokens-for($tokens, tokens-mdc-list.$prefix));\n\n $mat-list-tokens: token-utils.get-tokens-for($tokens, tokens-mat-list.$prefix);\n @include token-utils.create-token-values(tokens-mat-list.$prefix, $mat-list-tokens);\n}\n","@use '@material/tab-indicator/tab-indicator-theme' as mdc-tab-indicator-theme;\n@use '@material/tab/tab-theme' as mdc-tab-theme;\n@use '../core/style/sass-utils';\n@use '../core/tokens/m2/mdc/tab' as tokens-mdc-tab;\n@use '../core/tokens/m2/mdc/tab-indicator' as tokens-mdc-tab-indicator;\n@use '../core/tokens/m2/mat/tab-header' as tokens-mat-tab-header;\n@use '../core/tokens/m2/mat/tab-header-with-background' as tokens-mat-tab-header-with-background;\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/typography/typography';\n@use '../core/tokens/token-utils';\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-tab.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-tab-indicator-theme.theme(tokens-mdc-tab-indicator.get-unthemable-tokens());\n @include mdc-tab-theme.secondary-navigation-tab-theme(tokens-mdc-tab.get-unthemable-tokens());\n @include token-utils.create-token-values(\n tokens-mat-tab-header.$prefix, tokens-mat-tab-header.get-unthemable-tokens());\n @include token-utils.create-token-values(\n tokens-mat-tab-header-with-background.$prefix,\n tokens-mat-tab-header-with-background.get-unthemable-tokens()\n );\n }\n }\n}\n\n/// Outputs color theme styles for the mat-tab.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the tab indicator: primary, secondary,\n/// tertiary, or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n .mat-mdc-tab-group, .mat-mdc-tab-nav-bar {\n @include _palette-styles($theme, primary);\n\n &.mat-accent {\n @include _palette-styles($theme, accent);\n }\n\n &.mat-warn {\n @include _palette-styles($theme, warn);\n }\n\n &.mat-background-primary {\n @include _background-styles($theme, primary);\n }\n\n &.mat-background-accent {\n @include _background-styles($theme, accent);\n }\n\n &.mat-background-warn {\n @include _background-styles($theme, warn);\n }\n }\n }\n}\n\n@mixin _background-styles($theme, $palette-name) {\n @include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,\n tokens-mat-tab-header-with-background.get-color-tokens($theme, $palette-name));\n}\n\n@mixin _palette-styles($theme, $palette-name) {\n @include mdc-tab-theme.secondary-navigation-tab-theme(\n tokens-mdc-tab.get-color-tokens($theme, $palette-name));\n @include mdc-tab-indicator-theme.theme(\n tokens-mdc-tab-indicator.get-color-tokens($theme, $palette-name));\n @include token-utils.create-token-values(tokens-mat-tab-header.$prefix,\n tokens-mat-tab-header.get-color-tokens($theme, $palette-name));\n}\n\n/// Outputs typography theme styles for the mat-tab.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n .mat-mdc-tab-header {\n @include mdc-tab-theme.secondary-navigation-tab-theme(\n tokens-mdc-tab.get-typography-tokens($theme));\n @include mdc-tab-indicator-theme.theme(\n tokens-mdc-tab-indicator.get-typography-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-tab-header.$prefix,\n tokens-mat-tab-header.get-typography-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,\n tokens-mat-tab-header-with-background.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs density theme styles for the mat-tab.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n .mat-mdc-tab-header {\n @include mdc-tab-theme.secondary-navigation-tab-theme(\n tokens-mdc-tab.get-density-tokens($theme));\n @include mdc-tab-indicator-theme.theme(\n tokens-mdc-tab-indicator.get-density-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-tab-header.$prefix,\n tokens-mat-tab-header.get-density-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,\n tokens-mat-tab-header-with-background.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-tab.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the tab indicator: primary, secondary,\n/// tertiary, or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-tabs') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mdc-tab-indicator-tokens: token-utils.get-tokens-for(\n $tokens, tokens-mdc-tab-indicator.$prefix, $options...);\n $mat-tab-header-tokens: token-utils.get-tokens-for(\n $tokens, tokens-mat-tab-header.$prefix, $options...);\n // Don't pass $options here, because the mdc-tab doesn't have color variants,\n // only the mdc-tab-indicator and mat-tab-header do.\n $mdc-tab-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-tab.$prefix);\n @include mdc-tab-theme.secondary-navigation-tab-theme($mdc-tab-tokens);\n @include mdc-tab-indicator-theme.theme($mdc-tab-indicator-tokens);\n @include token-utils.create-token-values(tokens-mat-tab-header.$prefix, $mat-tab-header-tokens);\n}\n","@use '@material/checkbox/checkbox-theme' as mdc-checkbox-theme;\n@use '@material/form-field/form-field-theme' as mdc-form-field-theme;\n@use '../core/style/sass-utils';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/tokens/token-utils';\n@use '../core/typography/typography';\n@use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox;\n@use '../core/tokens/m2/mdc/form-field' as tokens-mdc-form-field;\n@use '../core/tokens/m2/mat/checkbox' as tokens-mat-checkbox;\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-checkbox.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-unthemable-tokens());\n @include token-utils.create-token-values(\n tokens-mat-checkbox.$prefix, tokens-mat-checkbox.get-unthemable-tokens());\n }\n }\n}\n\n/// Outputs color theme styles for the mat-checkbox.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the checkbox: primary, secondary, tertiary, or\n/// error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme));\n @include token-utils.create-token-values(\n tokens-mat-checkbox.$prefix, tokens-mat-checkbox.get-color-tokens($theme));\n }\n\n .mat-mdc-checkbox {\n @include mdc-form-field-theme.theme(tokens-mdc-form-field.get-color-tokens($theme));\n\n &.mat-primary {\n @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, primary));\n }\n\n &.mat-warn {\n @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, warn));\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-checkbox.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-typography-tokens($theme));\n @include token-utils.create-token-values(\n tokens-mat-checkbox.$prefix, tokens-mat-checkbox.get-typography-tokens($theme));\n }\n\n .mat-mdc-checkbox {\n @include mdc-form-field-theme.theme(tokens-mdc-form-field.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs density theme styles for the mat-checkbox.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n $density-scale: inspection.get-theme-density($theme);\n\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-density-tokens($theme));\n @include token-utils.create-token-values(\n tokens-mat-checkbox.$prefix, tokens-mat-checkbox.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-checkbox.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the checkbox: primary, secondary, tertiary, or\n/// error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-checkbox') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mdc-checkbox-tokens: token-utils.get-tokens-for(\n $tokens, tokens-mdc-checkbox.$prefix, $options...);\n // Don't pass $options here, since the mdc-form-field doesn't support color options,\n // only the mdc-checkbox does.\n $mdc-form-field-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-form-field.$prefix);\n $mat-checkbox-tokens: token-utils.get-tokens-for($tokens, tokens-mat-checkbox.$prefix);\n @include mdc-checkbox-theme.theme($mdc-checkbox-tokens);\n @include mdc-form-field-theme.theme($mdc-form-field-tokens);\n @include token-utils.create-token-values(tokens-mat-checkbox.$prefix, $mat-checkbox-tokens);\n}\n","@use '@angular/cdk';\n@use '../tokens/m2/mat/ripple' as tokens-mat-ripple;\n@use '../tokens/token-utils';\n\n@mixin ripple() {\n // The host element of an mat-ripple directive should always have a position of \"absolute\" or\n // \"relative\" so that the ripples inside are correctly positioned relatively to the container.\n .mat-ripple {\n overflow: hidden;\n\n // By default, every ripple container should have position: relative in favor of creating an\n // easy API for developers using the MatRipple directive.\n position: relative;\n\n // Promote containers that have ripples to a new layer. We want to target `:not(:empty)`,\n // because we don't want all ripple containers to have their own layer since they're used in a\n // lot of places and the layer is only relevant while animating. Note that ideally we'd use\n // the `contain` property here (see #13175), because `:empty` can be broken by having extra\n // text inside the element, but it isn't very well supported yet.\n &:not(:empty) {\n transform: translateZ(0);\n }\n }\n\n .mat-ripple.mat-ripple-unbounded {\n overflow: visible;\n }\n\n .mat-ripple-element {\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n\n transition: opacity, transform 0ms cubic-bezier(0, 0, 0.2, 1);\n\n // We use a 3d transform here in order to avoid an issue in Safari where\n // the ripples aren't clipped when inside the shadow DOM (see #24028).\n transform: scale3d(0, 0, 0);\n\n @include token-utils.use-tokens(\n tokens-mat-ripple.$prefix, tokens-mat-ripple.get-token-slots()) {\n // We have to emit a fallback value here, because some internal builds depend on it.\n background-color: var(#{token-utils.get-token-variable(color)}, rgba(#000, 0.1));\n }\n\n // In high contrast mode the ripple is opaque, causing it to obstruct the content.\n @include cdk.high-contrast(active, off) {\n display: none;\n }\n }\n}\n","/// Emits a CSS class, `.cdk-visually-hidden`. This class can be applied to an element\n/// to make that element visually hidden while remaining available to assistive technology.\n@mixin a11y-visually-hidden() {\n .cdk-visually-hidden {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n\n // This works around a Chrome bug that can cause the tab to crash when large amounts of\n // non-English text get wrapped: https://bugs.chromium.org/p/chromium/issues/detail?id=1201444\n white-space: nowrap;\n\n // Avoid browsers rendering the focus ring in some cases.\n outline: 0;\n\n // Avoid some cases where the browser will still render the native controls (see #9049).\n -webkit-appearance: none;\n -moz-appearance: none;\n\n // We need at least one of top/bottom/left/right in order to prevent cases where the\n // absolute-positioned element is pushed down and can affect scrolling (see #24597).\n // `left` was chosen here, because it's the least likely to break overrides where the\n // element might have been positioned (e.g. `mat-checkbox`).\n left: 0;\n\n [dir='rtl'] & {\n left: auto;\n right: 0;\n }\n }\n}\n\n/// @deprecated Use `a11y-visually-hidden`.\n@mixin a11y() {\n @include a11y-visually-hidden;\n}\n\n/// Emits the mixin's content nested under `$selector-context` if `$selector-context`\n/// is non-empty.\n/// @param {String} selector-context The selector under which to nest the mixin's content.\n@mixin _optionally-nest-content($selector-context) {\n @if ($selector-context == '') {\n @content;\n }\n @else {\n #{$selector-context} {\n @content;\n }\n }\n}\n\n/// Applies styles for users in high contrast mode. Note that this only applies\n/// to Microsoft browsers. Chrome can be included by checking for the `html[hc]`\n/// attribute, however Chrome handles high contrast differently.\n///\n/// @param {String} target Type of high contrast setting to target. Defaults to `active`, can be\n/// `white-on-black` or `black-on-white`.\n/// @param {String} encapsulation Whether to emit styles for view encapsulation. Values are:\n/// * `on` - works for `Emulated`, `Native`, and `ShadowDom`\n/// * `off` - works for `None`\n/// * `any` - works for all encapsulation modes by emitting the CSS twice (default).\n@mixin high-contrast($target: active, $encapsulation: 'any') {\n @if ($target != 'active' and $target != 'black-on-white' and $target != 'white-on-black') {\n @error 'Unknown cdk-high-contrast value \"#{$target}\" provided. ' +\n 'Allowed values are \"active\", \"black-on-white\", and \"white-on-black\"';\n }\n\n @if ($encapsulation != 'on' and $encapsulation != 'off' and $encapsulation != 'any') {\n @error 'Unknown cdk-high-contrast encapsulation \"#{$encapsulation}\" provided. ' +\n 'Allowed values are \"on\", \"off\", and \"any\"';\n }\n\n // If the selector context has multiple parts, such as `.section, .region`, just doing\n // `.cdk-high-contrast-xxx #{&}` will only apply the parent selector to the first part of the\n // context. We address this by nesting the selector context under .cdk-high-contrast.\n @at-root {\n $selector-context: #{&};\n\n @if ($encapsulation != 'on') {\n // Note that if this selector is updated, the same change has to be made inside\n // `_overlay.scss` which can't depend on this mixin due to some infrastructure limitations.\n .cdk-high-contrast-#{$target} {\n @include _optionally-nest-content($selector-context) {\n @content;\n }\n }\n }\n\n @if ($encapsulation != 'off') {\n .cdk-high-contrast-#{$target} :host {\n @include _optionally-nest-content($selector-context) {\n @content;\n }\n }\n }\n }\n}\n","// We want overlays to always appear over user content, so set a baseline\n// very high z-index for the overlay container, which is where we create the new\n// stacking context for all overlays.\n$overlay-container-z-index: 1000 !default;\n$overlay-z-index: 1000 !default;\n$overlay-backdrop-z-index: 1000 !default;\n\n// Background color for all of the backdrops\n$overlay-backdrop-color: rgba(0, 0, 0, 0.32) !default;\n\n// Default backdrop animation is based on the Material Design swift-ease-out.\n$backdrop-animation-duration: 400ms !default;\n$backdrop-animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1) !default;\n\n/// Emits structural styles required for cdk/overlay to function.\n@mixin overlay() {\n .cdk-overlay-container, .cdk-global-overlay-wrapper {\n // Disable events from being captured on the overlay container.\n pointer-events: none;\n\n // The container should be the size of the viewport.\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n }\n\n // The overlay-container is an invisible element which contains all individual overlays.\n .cdk-overlay-container {\n position: fixed;\n z-index: $overlay-container-z-index;\n\n &:empty {\n // Hide the element when it doesn't have any child nodes. This doesn't\n // include overlays that have been detached, rather than disposed.\n display: none;\n }\n }\n\n // We use an extra wrapper element in order to use make the overlay itself a flex item.\n // This makes centering the overlay easy without running into the subpixel rendering\n // problems tied to using `transform` and without interfering with the other position\n // strategies.\n .cdk-global-overlay-wrapper {\n display: flex;\n position: absolute;\n z-index: $overlay-z-index;\n }\n\n // A single overlay pane.\n .cdk-overlay-pane {\n // Note: it's important for this one to start off `absolute`,\n // in order for us to be able to measure it correctly.\n position: absolute;\n pointer-events: auto;\n box-sizing: border-box;\n z-index: $overlay-z-index;\n\n // For connected-position overlays, we set `display: flex` in\n // order to force `max-width` and `max-height` to take effect.\n display: flex;\n max-width: 100%;\n max-height: 100%;\n }\n\n .cdk-overlay-backdrop {\n // TODO(jelbourn): reuse sidenav fullscreen mixin.\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n\n z-index: $overlay-backdrop-z-index;\n pointer-events: auto;\n -webkit-tap-highlight-color: transparent;\n transition: opacity $backdrop-animation-duration $backdrop-animation-timing-function;\n opacity: 0;\n\n &.cdk-overlay-backdrop-showing {\n opacity: 1;\n\n // Note that we can't import and use the `high-contrast` mixin from `_a11y.scss`, because\n // this file will be copied to the top-level `cdk` package when putting together the files\n // for npm. Any relative import paths we use here will become invalid once the file is copied.\n .cdk-high-contrast-active & {\n // In high contrast mode the rgba background will become solid\n // so we need to fall back to making it opaque using `opacity`.\n opacity: 0.6;\n }\n }\n }\n\n .cdk-overlay-dark-backdrop {\n background: $overlay-backdrop-color;\n }\n\n .cdk-overlay-transparent-backdrop {\n // Define a transition on the visibility so that the `transitionend` event can fire immediately.\n transition: visibility 1ms linear, opacity 1ms linear;\n visibility: hidden;\n opacity: 1;\n\n // Note: as of Firefox 57, having the backdrop be `background: none` will prevent it from\n // capturing the user's mouse scroll events. Since we also can't use something like\n // `rgba(0, 0, 0, 0)`, we work around the inconsistency by not setting the background at\n // all and using `opacity` to make the element transparent.\n &.cdk-overlay-backdrop-showing {\n opacity: 0;\n visibility: visible;\n }\n }\n\n .cdk-overlay-backdrop-noop-animation {\n transition: none;\n }\n\n // Overlay parent element used with the connected position strategy. Used to constrain the\n // overlay element's size to fit within the viewport.\n .cdk-overlay-connected-position-bounding-box {\n position: absolute;\n z-index: $overlay-z-index;\n\n // We use `display: flex` on this element exclusively for centering connected overlays.\n // When *not* centering, a top/left/bottom/right will be set which overrides the normal\n // flex layout.\n display: flex;\n\n // We use the `column` direction here to avoid some flexbox issues in Edge\n // when using the \"grow after open\" options.\n flex-direction: column;\n\n // Add some dimensions so the element has an `innerText` which some people depend on in tests.\n min-width: 1px;\n min-height: 1px;\n }\n\n // Used when disabling global scrolling.\n .cdk-global-scrollblock {\n position: fixed;\n\n // Necessary for the content not to lose its width. Note that we're using 100%, instead of\n // 100vw, because 100vw includes the width plus the scrollbar, whereas 100% is the width\n // that the element had before we made it `fixed`.\n width: 100%;\n\n // Note: this will always add a scrollbar to whatever element it is on, which can\n // potentially result in double scrollbars. It shouldn't be an issue, because we won't\n // block scrolling on a page that doesn't have a scrollbar in the first place.\n overflow-y: scroll;\n }\n}\n","// Structural styles for the autosize text fields.\n@mixin text-field-autosize() {\n // Remove the resize handle on autosizing textareas, because whatever height\n // the user resized to will be overwritten once they start typing again.\n textarea.cdk-textarea-autosize {\n resize: none;\n }\n\n // This class is temporarily applied to the textarea when it is being measured. It is immediately\n // removed when measuring is complete. We use `!important` rules here to make sure user-specified\n // rules do not interfere with the measurement.\n textarea.cdk-textarea-autosize-measuring {\n @include _autosize-measuring-base;\n height: auto !important;\n overflow: hidden !important;\n }\n\n // Similar to the `cdk-textarea-autosize-measuring` class, but only applied on Firefox. We need\n // to use this class, because Firefox has a bug where changing the `overflow` breaks the user's\n // ability to undo/redo what they were typing (see #16629). This class is only scoped to Firefox,\n // because the measurements there don't seem to be affected by the `height: 0`, whereas on other\n // browsers they are, e.g. Chrome detects longer text and IE does't resize back to normal.\n // Identical issue report: https://bugzilla.mozilla.org/show_bug.cgi?id=448784\n textarea.cdk-textarea-autosize-measuring-firefox {\n @include _autosize-measuring-base;\n height: 0 !important;\n }\n}\n\n// Core styles that enable monitoring autofill state of text fields.\n@mixin text-field-autofill() {\n // Keyframes that apply no styles, but allow us to monitor when an text field becomes autofilled\n // by watching for the animation events that are fired when they start. Note: the /*!*/ comment is\n // needed to prevent LibSass from stripping the keyframes out.\n // Based on: https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n @keyframes cdk-text-field-autofill-start {/*!*/}\n @keyframes cdk-text-field-autofill-end {/*!*/}\n\n .cdk-text-field-autofill-monitored:-webkit-autofill {\n // Since Chrome 80 we need a 1ms delay, or the animationstart event won't fire.\n animation: cdk-text-field-autofill-start 0s 1ms;\n }\n\n .cdk-text-field-autofill-monitored:not(:-webkit-autofill) {\n // Since Chrome 80 we need a 1ms delay, or the animationstart event won't fire.\n animation: cdk-text-field-autofill-end 0s 1ms;\n }\n}\n\n@mixin _autosize-measuring-base {\n // Having 2px top and bottom padding seems to fix a bug where Chrome gets an incorrect\n // measurement. We just have to account for it later and subtract it off the final result.\n padding: 2px 0 !important;\n box-sizing: content-box !important;\n}\n\n// Used to generate UIDs for keyframes used to change the text field autofill styles.\n$autofill-color-frame-count: 0;\n\n// Mixin used to apply custom background and foreground colors to an autofilled text field.\n// Based on: https://stackoverflow.com/questions/2781549/\n// removing-input-background-colour-for-chrome-autocomplete#answer-37432260\n@mixin text-field-autofill-color($background, $foreground:'') {\n @keyframes cdk-text-field-autofill-color-#{$autofill-color-frame-count} {\n to {\n background: $background;\n @if $foreground != '' { color: $foreground; }\n }\n }\n\n &:-webkit-autofill {\n animation: cdk-text-field-autofill-color-#{$autofill-color-frame-count} both;\n }\n\n &.cdk-text-field-autofill-monitored:-webkit-autofill {\n // Since Chrome 80 we need a 1ms delay for cdk-text-field-autofill-start, or the animationstart\n // event won't fire.\n animation: cdk-text-field-autofill-start 0s 1ms,\n cdk-text-field-autofill-color-#{$autofill-color-frame-count} both;\n }\n\n $autofill-color-frame-count: $autofill-color-frame-count + 1 !global;\n}\n\n// @deprecated Use `autosize` and `autofill` instead.\n@mixin text-field {\n @include text-field-autosize();\n @include text-field-autofill();\n}\n","@use 'sass:map';\n@use 'sass:meta';\n@use '@angular/cdk';\n@use '../style/layout-common';\n@use '../theming/theming';\n@use '../theming/inspection';\n\n// Private sass variables that will be used as reference throughout component stylesheets.\n$default-border-width: 3px;\n$default-border-style: solid;\n$default-border-color: transparent;\n$default-border-radius: 4px;\n\n// Mixin that renders the focus indicator structural styles.\n@mixin structural-styling($prefix) {\n .#{$prefix}-focus-indicator {\n position: relative;\n\n &::before {\n @include layout-common.fill();\n box-sizing: border-box;\n pointer-events: none;\n display: var(--#{$prefix}-focus-indicator-display, none); // Hide the indicator by default.\n border: var(\n --#{$prefix}-focus-indicator-border-width,\n #{$default-border-width}\n )\n var(\n --#{$prefix}-focus-indicator-border-style,\n #{$default-border-style}\n )\n var(\n --#{$prefix}-focus-indicator-border-color,\n #{$default-border-color}\n );\n border-radius: var(\n --#{$prefix}-focus-indicator-border-radius,\n #{$default-border-radius}\n );\n }\n\n // By default, render the focus indicator when the focus indicator host element takes focus.\n // Defining a pseudo element's content will cause it to render.\n &:focus::before {\n content: '';\n }\n }\n\n // Enable the indicator in high contrast mode.\n @include cdk.high-contrast(active, off) {\n @include customize-focus-indicators((display: block), $prefix);\n }\n}\n\n// Generates CSS variable declarations from a map.\n@mixin _output-variables($map) {\n @each $key, $value in $map {\n @if ($value) {\n --#{$key}: #{$value};\n }\n }\n}\n\n// Mixin that dedups CSS variables for the strong-focus-indicators mixin.\n@mixin customize-focus-indicators($config, $prefix) {\n $border-style: map.get($config, border-style);\n $border-width: map.get($config, border-width);\n $border-radius: map.get($config, border-radius);\n $border-color: map.get($config, border-color);\n $display: map.get($config, display);\n $map: (\n '#{$prefix}-focus-indicator-border-style': $border-style,\n '#{$prefix}-focus-indicator-border-width': $border-width,\n '#{$prefix}-focus-indicator-border-radius': $border-radius,\n '#{$prefix}-focus-indicator-border-color': $border-color,\n '#{$prefix}-focus-indicator-display': $display,\n );\n\n @if (&) {\n @include _output-variables($map);\n }\n @else {\n // We use `html` here instead of `:root`, because the\n // latter causes some issues with internal tooling.\n html {\n @include _output-variables($map);\n }\n }\n}\n\n@mixin strong-focus-indicators($config: ()) {\n // Default focus indicator config.\n $default-config: (\n border-color: black,\n display: block,\n );\n\n // Merge default config with user config.\n $config: map.merge($default-config, $config);\n\n @include customize-focus-indicators($config, 'mat');\n}\n\n@mixin mdc-strong-focus-indicators($config: ()) {\n // Default focus indicator config.\n $default-config: (\n border-color: black,\n display: block,\n );\n\n // Merge default config with user config.\n $config: map.merge($default-config, $config);\n\n @include customize-focus-indicators($config, 'mat-mdc');\n}\n\n@mixin strong-focus-indicators-color($theme-or-color) {\n @if meta.type-of($theme-or-color) == 'color' {\n @include customize-focus-indicators((\n border-color: $theme-or-color\n ), 'mat');\n }\n @else {\n $border-color: inspection.get-theme-color($theme-or-color, primary);\n @include customize-focus-indicators((\n border-color: $border-color\n ), 'mat');\n }\n}\n\n@mixin strong-focus-indicators-theme($theme-or-color) {\n @if meta.type-of($theme-or-color) == 'color' {\n @include customize-focus-indicators((\n border-color: $theme-or-color\n ), 'mat');\n }\n @else {\n @include theming.private-check-duplicate-theme-styles($theme-or-color, 'mat-focus-indicators') {\n @if inspection.theme-has($theme-or-color, color) {\n @include strong-focus-indicators-color($theme-or-color);\n }\n }\n }\n}\n\n@mixin mdc-strong-focus-indicators-color($theme-or-color) {\n @if meta.type-of($theme-or-color) == 'color' {\n @include customize-focus-indicators((\n border-color: $theme-or-color\n ), 'mat-mdc');\n }\n @else {\n $border-color: inspection.get-theme-color($theme-or-color, primary);\n @include customize-focus-indicators((\n border-color: $border-color\n ), 'mat-mdc');\n }\n}\n\n@mixin mdc-strong-focus-indicators-theme($theme-or-color) {\n @if meta.type-of($theme-or-color) == 'color' {\n @include customize-focus-indicators((\n border-color: $theme-or-color\n ), 'mat-mdc');\n }\n @else {\n @include theming.private-check-duplicate-theme-styles(\n $theme-or-color, 'mat-mdc-focus-indicators') {\n @if inspection.theme-has($theme-or-color, color) {\n @include mdc-strong-focus-indicators-color($theme-or-color);\n }\n }\n }\n}\n","// This mixin ensures an element spans to fill the nearest ancestor with defined positioning.\n@mixin fill {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n position: absolute;\n}\n","@use '@angular/cdk';\n@use './tokens/m2/mat/app' as tokens-mat-app;\n@use './tokens/token-utils';\n@use './ripple/ripple';\n@use './focus-indicators/private';\n@use './mdc-helpers/mdc-helpers';\n\n// Mixin that renders all of the core styles that are not theme-dependent.\n@mixin core() {\n @include ripple.ripple();\n @include cdk.a11y-visually-hidden();\n @include cdk.overlay();\n @include cdk.text-field-autosize();\n @include cdk.text-field-autofill();\n @include private.structural-styling('mat');\n @include private.structural-styling('mat-mdc');\n\n // Wrapper element that provides the theme background when the\n // user's content isn't inside of a `mat-sidenav-container`.\n @at-root {\n .mat-app-background {\n @include mdc-helpers.disable-mdc-fallback-declarations {\n @include token-utils.use-tokens(tokens-mat-app.$prefix, tokens-mat-app.get-token-slots()) {\n // Note: we need to emit fallback values here to avoid errors in internal builds.\n @include token-utils.create-token-slot(background-color, background-color, transparent);\n @include token-utils.create-token-slot(color, text-color, inherit);\n }\n }\n }\n }\n}\n","@use '../tokens/m2/mat/option' as tokens-mat-option;\n@use '../tokens/token-utils';\n@use '../style/sass-utils';\n@use '../theming/theming';\n@use '../theming/inspection';\n@use '../theming/validation';\n@use '../typography/typography';\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-option.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {}\n}\n\n/// Outputs color theme styles for the mat-option.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the selected option: primary, secondary,\n/// tertiary, or error (If not specified, default secondary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-option.$prefix,\n tokens-mat-option.get-color-tokens($theme));\n }\n\n .mat-accent {\n @include token-utils.create-token-values(tokens-mat-option.$prefix,\n tokens-mat-option.get-color-tokens($theme, accent));\n }\n\n .mat-warn {\n @include token-utils.create-token-values(tokens-mat-option.$prefix,\n tokens-mat-option.get-color-tokens($theme, warn));\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-option.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-option.$prefix,\n tokens-mat-option.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs density theme styles for the mat-option.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {}\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-option.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the selected option: primary, secondary,\n/// tertiary, or error (If not specified, default secondary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-option') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);\n @include token-utils.create-token-values(tokens-mat-option.$prefix, $mat-option-tokens);\n}\n","@use '../../theming/theming';\n@use '../../theming/inspection';\n@use '../../theming/validation';\n@use '../../style/sass-utils';\n@use '../../tokens/token-utils';\n@use '../../tokens/m2/mat/full-pseudo-checkbox' as tokens-mat-full-pseudo-checkbox;\n@use '../../tokens/m2/mat/minimal-pseudo-checkbox' as tokens-mat-minimal-pseudo-checkbox;\n\n@mixin _palette-styles($theme, $palette-name) {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-full-pseudo-checkbox.$prefix,\n tokens-mat-full-pseudo-checkbox.get-color-tokens($theme, $palette-name));\n @include token-utils.create-token-values(tokens-mat-minimal-pseudo-checkbox.$prefix,\n tokens-mat-minimal-pseudo-checkbox.get-color-tokens($theme, $palette-name));\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mat-full-pseudo-checkbox-tokens:\n token-utils.get-tokens-for($tokens, tokens-mat-full-pseudo-checkbox.$prefix, $options...);\n $mat-minimal-pseudo-checkbox-tokens:\n token-utils.get-tokens-for($tokens, tokens-mat-minimal-pseudo-checkbox.$prefix, $options...);\n @include token-utils.create-token-values(\n tokens-mat-full-pseudo-checkbox.$prefix, $mat-full-pseudo-checkbox-tokens);\n @include token-utils.create-token-values(\n tokens-mat-minimal-pseudo-checkbox.$prefix, $mat-minimal-pseudo-checkbox-tokens);\n}\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-pseudo-checkbox.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {}\n\n/// Outputs color theme styles for the mat-pseudo-checkbox.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the pseudo-checkbox: primary, secondary,\n/// tertiary, or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n .mat-primary {\n @include _palette-styles($theme, primary);\n }\n\n // Default to the accent color. Note that the pseudo checkboxes are meant to inherit the\n // theme from their parent, rather than implementing their own theming, which is why we\n // don't attach to the `mat-*` classes. Also note that this needs to be below `.mat-primary`\n // in order to allow for the color to be overwritten if the checkbox is inside a parent that\n // has `mat-accent` and is placed inside another parent that has `mat-primary`.\n @include _palette-styles($theme, accent);\n .mat-accent {\n @include _palette-styles($theme, accent);\n }\n\n .mat-warn {\n @include _palette-styles($theme, warn);\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-pseudo-checkbox.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n}\n\n/// Outputs density theme styles for the mat-pseudo-checkbox.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-pseudo-checkbox.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the pseudo-checkbox: primary, secondary,\n/// tertiary, or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-pseudo-checkbox') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n","@use './theming/theming';\n@use './theming/inspection';\n@use './theming/validation';\n@use './style/private';\n@use './ripple/ripple-theme';\n@use './option/option-theme';\n@use './option/optgroup-theme';\n@use './selection/pseudo-checkbox/pseudo-checkbox-theme';\n@use './style/elevation';\n@use './style/sass-utils';\n@use './typography/typography';\n@use './tokens/token-utils';\n@use './tokens/m2/mat/app' as tokens-mat-app;\n@use './tokens/m2/mat/ripple' as tokens-mat-ripple;\n@use './tokens/m2/mat/option' as tokens-mat-option;\n@use './tokens/m2/mat/full-pseudo-checkbox' as tokens-mat-full-pseudo-checkbox;\n@use './tokens/m2/mat/minimal-pseudo-checkbox' as tokens-mat-minimal-pseudo-checkbox;\n\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include ripple-theme.base($theme);\n @include option-theme.base($theme);\n @include optgroup-theme.base($theme);\n @include pseudo-checkbox-theme.base($theme);\n }\n}\n\n@mixin color($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));\n }\n @else {\n @include ripple-theme.color($theme);\n @include option-theme.color($theme);\n @include optgroup-theme.color($theme);\n @include pseudo-checkbox-theme.color($theme);\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-app.$prefix,\n tokens-mat-app.get-color-tokens($theme));\n }\n\n // Provides external CSS classes for each elevation value. Each CSS class is formatted as\n // `mat-elevation-z$zValue` where `$zValue` corresponds to the z-space to which the element is\n // elevated.\n @for $zValue from 0 through 24 {\n $selector: elevation.$prefix + $zValue;\n // We need the `mat-mdc-elevation-specific`, because some MDC mixins\n // come with elevation baked in and we don't have a way of removing it.\n .#{$selector}, .mat-mdc-elevation-specific.#{$selector} {\n @include private.private-theme-elevation($zValue, $theme);\n }\n }\n }\n\n // TODO(crisbeto): move this into the base.\n // Marker that is used to determine whether the user has added a theme to their page.\n @at-root {\n .mat-theme-loaded-marker {\n display: none;\n }\n }\n}\n\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include option-theme.typography($theme);\n @include optgroup-theme.typography($theme);\n @include pseudo-checkbox-theme.typography($theme);\n @include ripple-theme.typography($theme);\n }\n}\n\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n @include option-theme.density($theme);\n @include optgroup-theme.density($theme);\n @include pseudo-checkbox-theme.density($theme);\n @include ripple-theme.density($theme);\n }\n}\n\n// Mixin that renders all of the core styles that depend on the theme.\n@mixin theme($theme, $options...) {\n // Wrap the sub-theme includes in the duplicate theme styles mixin. This ensures that\n // there won't be multiple warnings. e.g. if `mat-core-theme` reports a warning, then\n // the imported themes (such as `mat-ripple-theme`) should not report again.\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-core') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mat-app-tokens: token-utils.get-tokens-for($tokens, tokens-mat-app.$prefix, $options...);\n $mat-ripple-tokens: token-utils.get-tokens-for($tokens, tokens-mat-ripple.$prefix, $options...);\n $mat-option-tokens: token-utils.get-tokens-for($tokens, tokens-mat-option.$prefix, $options...);\n $mat-full-pseudo-checkbox-tokens: token-utils.get-tokens-for($tokens,\n tokens-mat-full-pseudo-checkbox.$prefix, $options...);\n $mat-minimal-pseudo-checkbox-tokens: token-utils.get-tokens-for($tokens,\n tokens-mat-minimal-pseudo-checkbox.$prefix, $options...);\n\n @include token-utils.create-token-values(tokens-mat-app.$prefix, $mat-app-tokens);\n @include token-utils.create-token-values(tokens-mat-ripple.$prefix, $mat-ripple-tokens);\n @include token-utils.create-token-values(tokens-mat-option.$prefix, $mat-option-tokens);\n @include token-utils.create-token-values(tokens-mat-full-pseudo-checkbox.$prefix,\n $mat-full-pseudo-checkbox-tokens);\n @include token-utils.create-token-values(tokens-mat-minimal-pseudo-checkbox.$prefix,\n $mat-minimal-pseudo-checkbox-tokens);\n}\n","@use '../core/style/sass-utils';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/tokens/token-utils';\n@use '../core/tokens/m2/mdc/linear-progress' as tokens-mdc-linear-progress;\n@use '@material/linear-progress/linear-progress-theme' as mdc-linear-progress-theme;\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-progress-bar.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n // Add default values for tokens not related to color, typography, or density.\n @include sass-utils.current-selector-or-root() {\n @include mdc-linear-progress-theme.theme(tokens-mdc-linear-progress.get-unthemable-tokens());\n }\n }\n}\n\n@mixin _palette-styles($theme, $palette-name) {\n @include mdc-linear-progress-theme.theme(\n tokens-mdc-linear-progress.get-color-tokens($theme, $palette-name));\n}\n\n/// Outputs color theme styles for the mat-progress-bar.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the progress bar: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n .mat-mdc-progress-bar {\n @include _palette-styles($theme, primary);\n\n &.mat-accent {\n @include _palette-styles($theme, accent);\n }\n\n &.mat-warn {\n @include _palette-styles($theme, warn);\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-progress-bar.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {}\n\n\n/// Outputs density theme styles for the mat-progress-bar.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-progress-bar.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the progress bar: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-progress-bar') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mdc-linear-progress-tokens:\n token-utils.get-tokens-for($tokens, tokens-mdc-linear-progress.$prefix, $options...);\n @include mdc-linear-progress-theme.theme($mdc-linear-progress-tokens);\n}\n","@use '@material/textfield/filled-text-field-theme' as mdc-filled-text-field-theme;\n@use '@material/textfield/outlined-text-field-theme' as mdc-outlined-text-field-theme;\n@use '../core/tokens/m2/mdc/filled-text-field' as tokens-mdc-filled-text-field;\n@use '../core/tokens/m2/mdc/outlined-text-field' as tokens-mdc-outlined-text-field;\n@use '../core/tokens/m2/mat/form-field' as tokens-mat-form-field;\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/typography/typography';\n@use '../core/style/sass-utils';\n@use '../core/tokens/token-utils';\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-form-field.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(\n tokens-mdc-filled-text-field.$prefix,\n tokens-mdc-filled-text-field.get-unthemable-tokens());\n @include token-utils.create-token-values(\n tokens-mdc-outlined-text-field.$prefix,\n tokens-mdc-outlined-text-field.get-unthemable-tokens());\n @include token-utils.create-token-values(\n tokens-mat-form-field.$prefix,\n tokens-mat-form-field.get-unthemable-tokens());\n }\n }\n}\n\n/// Outputs color theme styles for the mat-form-field.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the form field: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-filled-text-field-theme.theme(\n tokens-mdc-filled-text-field.get-color-tokens($theme));\n @include mdc-outlined-text-field-theme.theme(\n tokens-mdc-outlined-text-field.get-color-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-form-field.$prefix,\n tokens-mat-form-field.get-color-tokens($theme));\n }\n\n .mat-mdc-form-field.mat-accent {\n @include mdc-filled-text-field-theme.theme(\n tokens-mdc-filled-text-field.private-get-color-palette-color-tokens($theme, accent));\n @include mdc-outlined-text-field-theme.theme(\n tokens-mdc-outlined-text-field.private-get-color-palette-color-tokens($theme, accent));\n @include token-utils.create-token-values(tokens-mat-form-field.$prefix,\n tokens-mat-form-field.private-get-color-palette-color-tokens($theme, accent));\n }\n\n .mat-mdc-form-field.mat-warn {\n @include mdc-filled-text-field-theme.theme(\n tokens-mdc-filled-text-field.private-get-color-palette-color-tokens($theme, warn));\n @include mdc-outlined-text-field-theme.theme(\n tokens-mdc-outlined-text-field.private-get-color-palette-color-tokens($theme, warn));\n @include token-utils.create-token-values(tokens-mat-form-field.$prefix,\n tokens-mat-form-field.private-get-color-palette-color-tokens($theme, warn));\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-form-field.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-filled-text-field-theme.theme(\n tokens-mdc-filled-text-field.get-typography-tokens($theme));\n @include mdc-outlined-text-field-theme.theme(\n tokens-mdc-outlined-text-field.get-typography-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-form-field.$prefix,\n tokens-mat-form-field.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs density theme styles for the mat-form-field.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-form-field.$prefix,\n tokens-mat-form-field.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-form-field.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the form field: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-form-field') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mdc-filled-text-field-tokens:\n token-utils.get-tokens-for($tokens, tokens-mdc-filled-text-field.$prefix, $options...);\n $mdc-outlined-text-field-tokens:\n token-utils.get-tokens-for($tokens, tokens-mdc-outlined-text-field.$prefix, $options...);\n $mat-form-field-tokens:\n token-utils.get-tokens-for($tokens, tokens-mat-form-field.$prefix, $options...);\n @include mdc-filled-text-field-theme.theme($mdc-filled-text-field-tokens);\n @include mdc-outlined-text-field-theme.theme($mdc-outlined-text-field-tokens);\n @include token-utils.create-token-values(tokens-mat-form-field.$prefix, $mat-form-field-tokens);\n}\n","@use '../core/tokens/m2/mat/select' as tokens-mat-select;\n@use '../core/tokens/token-utils';\n@use '../core/style/sass-utils';\n\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/typography/typography';\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-select.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n $mat-tokens: tokens-mat-select.get-unthemable-tokens();\n @include token-utils.create-token-values(tokens-mat-select.$prefix, $mat-tokens);\n }\n }\n}\n\n/// Outputs color theme styles for the mat-select.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the select arrow: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-select.$prefix,\n tokens-mat-select.get-color-tokens($theme));\n\n .mat-mdc-form-field.mat-accent {\n @include token-utils.create-token-values(tokens-mat-select.$prefix,\n tokens-mat-select.get-color-tokens($theme, accent));\n }\n\n .mat-mdc-form-field.mat-warn {\n @include token-utils.create-token-values(tokens-mat-select.$prefix,\n tokens-mat-select.get-color-tokens($theme, warn));\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-select.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-select.$prefix,\n tokens-mat-select.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-select.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-select.$prefix,\n tokens-mat-select.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-icon.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the select arrow: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-select') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mat-select-tokens: token-utils.get-tokens-for($tokens, tokens-mat-select.$prefix, $options...);\n @include token-utils.create-token-values(tokens-mat-select.$prefix, $mat-select-tokens);\n}\n","@use '@material/slider/slider-theme' as mdc-slider-theme;\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/typography/typography';\n@use '../core/style/sass-utils';\n@use '../core/tokens/token-utils';\n@use '../core/tokens/m2/mat/slider' as tokens-mat-slider;\n@use '../core/tokens/m2/mdc/slider' as tokens-mdc-slider;\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-slider.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n // Add default values for tokens not related to color, typography, or density.\n @include sass-utils.current-selector-or-root() {\n $mat-tokens: tokens-mat-slider.get-unthemable-tokens();\n @include token-utils.create-token-values(tokens-mat-slider.$prefix, $mat-tokens);\n @include mdc-slider-theme.theme(tokens-mdc-slider.get-unthemable-tokens());\n }\n }\n}\n\n/// Outputs color theme styles for the mat-slider.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the slider: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n $is-dark: inspection.get-theme-type($theme) == dark;\n\n $mdc-color-tokens: token-utils.resolve-elevation(\n tokens-mdc-slider.get-color-tokens($theme),\n handle-elevation,\n handle-shadow-color\n );\n\n $mat-slider-color-tokens: tokens-mat-slider.get-color-tokens($theme);\n\n // Add values for MDC slider tokens.\n @include sass-utils.current-selector-or-root() {\n @include mdc-slider-theme.theme($mdc-color-tokens);\n @include token-utils.create-token-values(\n tokens-mat-slider.$prefix,\n $mat-slider-color-tokens\n );\n\n .mat-accent {\n @include token-utils.create-token-values(\n tokens-mat-slider.$prefix,\n tokens-mat-slider.private-get-color-palette-color-tokens($theme, accent),\n );\n @include mdc-slider-theme.theme(\n tokens-mdc-slider.private-get-color-palette-color-tokens($theme, accent));\n }\n\n .mat-warn {\n @include token-utils.create-token-values(\n tokens-mat-slider.$prefix,\n tokens-mat-slider.private-get-color-palette-color-tokens($theme, warn),\n );\n @include mdc-slider-theme.theme(\n tokens-mdc-slider.private-get-color-palette-color-tokens($theme, warn));\n }\n }\n }\n}\n\n\n/// Outputs typography theme styles for the mat-slider.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n // Add values for MDC slider tokens.\n @include sass-utils.current-selector-or-root() {\n @include mdc-slider-theme.theme(tokens-mdc-slider.get-typography-tokens($theme));\n }\n }\n}\n\n\n/// Outputs density theme styles for the mat-slider.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n // Add values for MDC slider tokens.\n @include sass-utils.current-selector-or-root() {\n @include mdc-slider-theme.theme(tokens-mdc-slider.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-option.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the slider: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-slider') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mdc-slider-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-slider.$prefix, $options...);\n $mat-slider-tokens: token-utils.get-tokens-for($tokens, tokens-mat-slider.$prefix, $options...);\n @include mdc-slider-theme.theme($mdc-slider-tokens);\n @include token-utils.create-token-values(tokens-mat-slider.$prefix, $mat-slider-tokens);\n}\n","//\n// Copyright 2022 Google Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n//\n\n// stylelint-disable selector-class-pattern --\n// Internal stylesheet for material list component. Selector '.mdc-*' should\n// only be used in this project.\n\n@use '@material/density/functions' as density-functions;\n@use '@material/dom/mixins' as dom-mixins;\n@use '@material/feature-targeting/feature-targeting';\n@use '@material/ripple/ripple-theme';\n@use '@material/ripple/ripple';\n@use '@material/rtl/rtl';\n@use '@material/shape/mixins' as shape-mixins;\n@use '@material/theme/theme-color';\n@use '@material/theme/theme';\n@use '@material/typography/typography';\n@use './evolution-variables' as variables;\n@use 'sass:list';\n@use 'sass:map';\n@use 'sass:math';\n\n$ripple-target: variables.$ripple-target;\n\n@mixin static-styles($query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n\n @include _high-contrast-mode($query: $query);\n .mdc-list {\n @include _static-list-base($query: $query);\n }\n\n .mdc-list-item__wrapper {\n @include feature-targeting.targets($feat-structure) {\n display: block;\n }\n }\n\n .mdc-list-item {\n @include item-base($query: $query);\n @include _list-item-baseline-height($query: $query);\n @include one-line-item-start-alignment(center, $query: $query);\n @include two-line-item-start-alignment(\n $alignment: flex-start,\n $offset: 16px,\n $query: $query\n );\n @include three-line-item-start-alignment(\n $alignment: flex-start,\n $offset: 16px,\n $query: $query\n );\n\n @include one-line-item-end-alignment(center, $query: $query);\n @include two-line-item-end-alignment(center, $query: $query);\n @include three-line-item-end-alignment(\n $alignment: flex-start,\n $offset: 16px,\n $query: $query\n );\n\n @include feature-targeting.targets($feat-structure) {\n align-items: stretch;\n cursor: pointer;\n }\n\n // Reset mouse cursor for disabled and non-interactive items.\n &.mdc-list-item--disabled,\n &.mdc-list-item--non-interactive {\n @include feature-targeting.targets($feat-structure) {\n cursor: auto;\n }\n }\n\n // TODO(b/254711887): Likely need to update this to adhere to a HCM focus\n // ring spec.\n // For components using aria-activedescendant, the focus pseudoclass is\n // never applied and use `.mdc-ripple-upgraded--background-focused` instead.\n &:not(.mdc-list-item--selected):focus::before,\n &.mdc-ripple-upgraded--background-focused::before {\n @include dom-mixins.transparent-border($query: $query);\n }\n\n &.mdc-list-item--selected::before {\n @include dom-mixins.transparent-border(\n $border-width: 3px,\n $border-style: double,\n $query: $query\n );\n }\n\n &.mdc-list-item--selected:focus::before {\n @include dom-mixins.transparent-border(\n $border-width: 3px,\n $query: $query\n );\n }\n }\n\n // stylelint-disable selector-max-type --\n // Override anchor tag styles for the use-case of a list being used for navigation\n a.mdc-list-item {\n @include feature-targeting.targets($feat-structure) {\n color: inherit;\n text-decoration: none;\n }\n }\n // stylelint-enable selector-max-type\n\n .mdc-list-item__start {\n @include feature-targeting.targets($feat-structure) {\n fill: currentColor;\n flex-shrink: 0;\n pointer-events: none;\n }\n }\n\n .mdc-list-item__end {\n @include feature-targeting.targets($feat-structure) {\n flex-shrink: 0;\n pointer-events: none;\n }\n }\n\n .mdc-list-item__content {\n @include typography.overflow-ellipsis($query);\n @include feature-targeting.targets($feat-structure) {\n align-self: center;\n flex: 1;\n pointer-events: none;\n }\n\n .mdc-list-item--with-two-lines &,\n .mdc-list-item--with-three-lines & {\n @include feature-targeting.targets($feat-structure) {\n align-self: stretch;\n }\n }\n\n // Disable interaction on label elements that may automatically\n // toggle corresponding checkbox / radio input.\n &[for] {\n @include feature-targeting.targets($feat-structure) {\n pointer-events: none;\n }\n }\n }\n\n .mdc-list-item__primary-text {\n @include typography.overflow-ellipsis($query);\n\n .mdc-list-item--with-two-lines &,\n .mdc-list-item--with-three-lines & {\n @include typography.text-baseline(\n $top: 28px,\n $bottom: 20px,\n $query: $query\n );\n }\n }\n\n .mdc-list-item__secondary-text {\n @include typography.overflow-ellipsis($query);\n @include typography.text-baseline(\n $top: 20px,\n $display: block,\n $query: $query\n );\n\n .mdc-list-item--with-three-lines & {\n @include feature-targeting.targets($feat-structure) {\n white-space: normal;\n line-height: 20px;\n }\n }\n\n .mdc-list-item--with-overline & {\n @include feature-targeting.targets($feat-structure) {\n white-space: nowrap;\n line-height: auto;\n }\n }\n }\n\n .mdc-list-item__overline-text {\n @include typography.overflow-ellipsis($query);\n\n .mdc-list-item--with-two-lines & {\n @include typography.text-baseline(\n $top: 24px,\n $bottom: 20px,\n $query: $query\n );\n }\n\n .mdc-list-item--with-three-lines & {\n @include typography.text-baseline(\n $top: 28px,\n $bottom: 20px,\n $query: $query\n );\n }\n }\n\n .mdc-list-item--with-leading-avatar {\n @include item-start-spacing(16px, $query: $query);\n @include _two-line-item-text-baseline($query: $query);\n @include _tall-list-item-baseline-height($query: $query);\n\n .mdc-list-item__start {\n @include feature-targeting.targets($feat-structure) {\n border-radius: 50%;\n }\n }\n }\n\n .mdc-list-item--with-leading-icon {\n @include item-start-spacing(\n $leading: 16px,\n $trailing: 32px,\n $query: $query\n );\n @include _two-line-item-text-baseline($query: $query);\n @include _tall-list-item-baseline-height($query: $query);\n }\n\n .mdc-list-item--with-leading-thumbnail {\n @include item-start-spacing(16px, $query: $query);\n @include _two-line-item-text-baseline($query: $query);\n @include _tall-list-item-baseline-height($query: $query);\n }\n\n .mdc-list-item--with-leading-image {\n @include item-start-spacing(16px, $query: $query);\n @include _two-line-item-text-baseline($query: $query);\n @include _one-line-item-taller-density(\n variables.$one-line-item-density-scale,\n $query: $query\n );\n @include _two-line-item-tall-density(\n variables.$two-line-item-density-scale,\n $query: $query\n );\n }\n\n .mdc-list-item--with-leading-video {\n @include two-line-item-start-alignment(\n $alignment: flex-start,\n $offset: 8px,\n $query: $query\n );\n @include item-start-spacing($leading: 0, $trailing: 16px, $query: $query);\n @include _two-line-item-text-baseline($query: $query);\n @include _one-line-item-taller-density(\n variables.$one-line-item-density-scale,\n $query: $query\n );\n @include _two-line-item-tall-density(\n variables.$two-line-item-density-scale,\n $query: $query\n );\n }\n\n .mdc-list-item--with-leading-checkbox {\n $leading: absorb-overflow(16px, $actual: 40px, $available: 24px);\n $trailing: absorb-overflow(32px, $actual: 40px, $available: 24px);\n $top: absorb-overflow(16px, $actual: 40px, $available: 24px);\n\n @include item-start-spacing($leading, $trailing, $query: $query);\n @include two-line-item-start-alignment(\n $alignment: flex-start,\n $offset: $top,\n $query: $query\n );\n @include _two-line-item-text-baseline($query: $query);\n @include _tall-list-item-baseline-height($query: $query);\n }\n\n .mdc-list-item--with-leading-radio {\n $leading: absorb-overflow(16px, $actual: 40px, $available: 24px);\n $trailing: absorb-overflow(32px, $actual: 40px, $available: 24px);\n $top: absorb-overflow(16px, $actual: 40px, $available: 24px);\n\n @include item-start-spacing($leading, $trailing, $query: $query);\n @include two-line-item-start-alignment(\n $alignment: flex-start,\n $offset: $top,\n $query: $query\n );\n @include _two-line-item-text-baseline($query: $query);\n @include _tall-list-item-baseline-height($query: $query);\n }\n\n .mdc-list-item--with-leading-switch {\n @include item-start-spacing(16px, $query: $query);\n @include two-line-item-start-alignment(\n $alignment: flex-start,\n $offset: 16px,\n $query: $query\n );\n @include _two-line-item-text-baseline($query: $query);\n @include _tall-list-item-baseline-height($query: $query);\n }\n\n .mdc-list-item--with-trailing-icon {\n @include item-end-spacing(16px, $query: $query);\n }\n\n .mdc-list-item--with-trailing-meta {\n @include two-line-item-end-alignment(flex-start, $query: $query);\n @include three-line-item-end-alignment(flex-start, $query: $query);\n @include item-end-spacing($leading: 28px, $trailing: 16px, $query: $query);\n @include _multi-line-item-end-text-baseline($query: $query);\n\n .mdc-list-item__end {\n @include typography.typography(caption, $query);\n }\n }\n\n .mdc-list-item--with-trailing-checkbox {\n $leading: absorb-overflow(32px, $actual: 40px, $available: 24px);\n $trailing: absorb-overflow(16px, $actual: 40px, $available: 24px);\n $top: absorb-overflow(16px, $actual: 40px, $available: 24px);\n\n @include item-end-spacing($leading, $trailing, $query: $query);\n @include three-line-item-end-alignment(\n $alignment: flex-start,\n $offset: $top,\n $query: $query\n );\n }\n\n .mdc-list-item--with-trailing-radio {\n $leading: absorb-overflow(32px, $actual: 40px, $available: 24px);\n $trailing: absorb-overflow(16px, $actual: 40px, $available: 24px);\n $top: absorb-overflow(16px, $actual: 40px, $available: 24px);\n\n @include item-end-spacing($leading, $trailing, $query: $query);\n @include three-line-item-end-alignment(\n $alignment: flex-start,\n $offset: $top,\n $query: $query\n );\n }\n\n .mdc-list-item--with-trailing-switch {\n @include item-end-spacing(16px, $query: $query);\n @include three-line-item-end-alignment(\n $alignment: flex-start,\n $offset: 16px,\n $query: $query\n );\n }\n\n .mdc-list-item--with-overline {\n @include _two-line-item-primary-text-baseline(20px, 0px, $query: $query);\n @include _three-line-item-primary-baseline(20px, 0px, $query: $query);\n }\n\n // This must be specified last to ensure that RTL padding takes priority over\n // LTR padding in the cascade.\n .mdc-list-item {\n @include item-spacing(16px, $query: $query);\n }\n\n //\n // Grouping\n //\n .mdc-list-group {\n @include feature-targeting.targets($feat-structure) {\n // Cancel top/bottom padding on individual lists within group\n .mdc-deprecated-list {\n padding: 0;\n }\n }\n }\n .mdc-list-group__subheader {\n @include _list-group-subheader-margin($query: $query);\n }\n\n //\n // Dividers\n //\n\n .mdc-list-divider {\n @include feature-targeting.targets($feat-structure) {\n padding: 0;\n\n // Allows the use of padding to specify leading and trailing insets\n // independently.\n background-clip: content-box;\n }\n }\n\n // The base inset variant corresponds to the item's padding.\n .mdc-list-divider,\n .mdc-list-divider--with-leading-text,\n .mdc-list-divider--with-leading-icon,\n .mdc-list-divider--with-leading-image,\n .mdc-list-divider--with-leading-thumbnail,\n .mdc-list-divider--with-leading-avatar,\n .mdc-list-divider--with-leading-checkbox,\n .mdc-list-divider--with-leading-switch,\n .mdc-list-divider--with-leading-radio {\n @include divider-leading-inset(16px, $query: $query);\n @include divider-trailing-inset(16px, $query: $query);\n }\n\n .mdc-list-divider--with-leading-video {\n @include divider-leading-inset(0px, $query: $query);\n }\n\n // This is needed to ensure that default padding isn't applied in RTL locales.\n .mdc-list-divider {\n @include feature-targeting.targets($feat-structure) {\n @include rtl.rtl {\n padding: 0;\n }\n }\n }\n}\n\n@mixin core-styles($query: feature-targeting.all()) {\n @include without-ripple($query);\n @include with-ripple($query);\n}\n\n@mixin without-ripple($query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n $feat-structure: feature-targeting.create-target($query, structure);\n $feat-typography: feature-targeting.create-target($query, typography);\n\n //\n // Items\n //\n\n @include list-primary-text-ink-color(text-primary-on-background, $query);\n @include list-secondary-text-ink-color(text-secondary-on-background, $query);\n @include list-overline-text-ink-color(text-hint-on-background, $query);\n @include list-icon-fill-color(transparent, $query);\n @include list-icon-ink-color(text-icon-on-background, $query);\n @include list-meta-text-ink-color(text-hint-on-background, $query);\n @include list-disabled-opacity(variables.$content-disabled-opacity, $query);\n @include list-disabled-ink-color(variables.$content-disabled-color, $query);\n @include list-selected-ink-color(variables.$content-selected-color, $query);\n\n @include group-subheader-ink-color(text-primary-on-background, $query);\n\n @include _high-contrast-mode-border-color($query);\n\n .mdc-list {\n @include _typography-list-base($query: $query);\n }\n\n .mdc-list-item__primary-text {\n @include typography.typography(subtitle1, $query);\n }\n\n .mdc-list-item__secondary-text {\n @include typography.typography(body2, $query);\n }\n\n .mdc-list-item__overline-text {\n @include typography.typography(overline, $query);\n }\n\n .mdc-list-item--with-leading-avatar {\n @include item-start-size(40px, $query: $query);\n }\n\n .mdc-list-item--with-leading-icon {\n @include item-start-size(24px, $query: $query);\n }\n\n .mdc-list-item--with-leading-thumbnail {\n @include item-start-size(40px, $query: $query);\n }\n\n .mdc-list-item--with-leading-image {\n @include item-start-size(56px, $query: $query);\n }\n\n .mdc-list-item--with-leading-video {\n @include item-start-size($width: 100px, $height: 56px, $query: $query);\n }\n\n .mdc-list-item--with-leading-checkbox {\n @include item-start-size(40px, $query: $query);\n }\n\n .mdc-list-item--with-leading-radio {\n @include item-start-size(40px, $query: $query);\n }\n\n .mdc-list-item--with-leading-switch {\n @include item-start-size($width: 36px, $height: 20px, $query: $query);\n }\n\n .mdc-list-item--with-trailing-icon {\n @include item-end-size(24px, $query: $query);\n }\n\n .mdc-list-item--with-trailing-meta {\n .mdc-list-item__end {\n @include typography.typography(caption, $query);\n }\n }\n\n .mdc-list-item--with-trailing-checkbox {\n @include item-end-size(40px, $query: $query);\n }\n\n .mdc-list-item--with-trailing-radio {\n @include item-end-size(40px, $query: $query);\n }\n\n .mdc-list-item--with-trailing-switch {\n @include item-end-size($width: 36px, $height: 20px, $query: $query);\n }\n\n .mdc-list-group__subheader {\n @include typography.typography(subtitle1, $query);\n }\n\n //\n // Dividers\n //\n\n $divider-color: if(\n theme-color.tone(theme-color.$background) == 'dark',\n variables.$divider-color-on-dark-bg,\n variables.$divider-color-on-light-bg\n );\n\n @include divider-color($divider-color, $query: $query);\n @include divider-height(1px, $query: $query);\n @include static-styles($query: $query);\n} // end of without-ripple\n\n@mixin with-ripple($query: feature-targeting.all()) {\n @include ripple.common($query); // COPYBARA_COMMENT_THIS_LINE\n\n :not(.mdc-list-item--disabled).mdc-list-item {\n @include _item-interactive-ripple($query);\n }\n}\n\n///\n/// Adjusts an offset (i.e., margin) to accomodate contents that are larger than\n/// the space allocated by the specification.\n///\n/// For instance, the specification provides 24x24dp for a checkbox with a 16dp\n/// margin. However, checkboxes are actually 40x40dp. To ensure that the\n/// checkbox is positioned correctly, the margin is reduced by 8dp to reflect\n/// that the margin is already \"baked into\" the checkbox.\n///\n/// Concretely, 40dp - 24dp = 16dp. Assuming that the control is symmetrical,\n/// half of the overflow (8dp) is on the leading side and half on the trailing\n/// side. Therefore, the leading and trailing margins are reduced by 8dp.\n///\n/// Note: this might be more useful if it's added into the leading/trailing\n/// margin mixins as a parameter.\n///\n@function absorb-overflow($offset, $actual, $available, $symmetric: true) {\n @if $actual <= $available {\n @return $offset;\n }\n $overflow: $actual - $available;\n @return $offset - math.div($overflow, if($symmetric, 2, 1));\n}\n\n@mixin one-line-item-height($height, $query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-item--with-one-line {\n @include feature-targeting.targets($feat-structure) {\n height: $height;\n }\n }\n}\n\n@mixin two-line-item-height($height, $query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-item--with-two-lines {\n @include feature-targeting.targets($feat-structure) {\n height: $height;\n }\n }\n}\n@mixin three-line-item-height($height, $query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-item--with-three-lines {\n @include feature-targeting.targets($feat-structure) {\n height: $height;\n }\n }\n}\n\n@mixin list-item-height($height) {\n &.mdc-list-item--with-one-line,\n &.mdc-list-item--with-two-lines,\n &.mdc-list-item--with-three-lines {\n @include theme.property(height, $height);\n }\n}\n\n@mixin item-spacing(\n $leading,\n $trailing: $leading,\n $query: feature-targeting.all()\n) {\n $feat-structure: feature-targeting.create-target($query, structure);\n @include feature-targeting.targets($feat-structure) {\n @include rtl.reflexive-property(padding, $leading, $trailing);\n }\n}\n\n@mixin one-line-item-start-alignment(\n $alignment,\n $offset: 0,\n $query: feature-targeting.all()\n) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-item--with-one-line {\n .mdc-list-item__start {\n @include feature-targeting.targets($feat-structure) {\n align-self: $alignment;\n margin-top: $offset;\n }\n }\n }\n}\n\n@mixin two-line-item-start-alignment(\n $alignment,\n $offset: 0,\n $query: feature-targeting.all()\n) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-item--with-two-lines {\n .mdc-list-item__start {\n @include feature-targeting.targets($feat-structure) {\n align-self: $alignment;\n margin-top: $offset;\n }\n }\n }\n}\n\n@mixin three-line-item-start-alignment(\n $alignment,\n $offset: 0,\n $query: feature-targeting.all()\n) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-item--with-three-lines {\n .mdc-list-item__start {\n @include feature-targeting.targets($feat-structure) {\n align-self: $alignment;\n margin-top: $offset;\n }\n }\n }\n}\n\n@mixin one-line-item-end-alignment(\n $alignment,\n $offset: 0,\n $query: feature-targeting.all()\n) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-item--with-one-line {\n .mdc-list-item__end {\n @include feature-targeting.targets($feat-structure) {\n align-self: $alignment;\n margin-top: $offset;\n }\n }\n }\n}\n\n@mixin two-line-item-end-alignment(\n $alignment,\n $offset: 0,\n $query: feature-targeting.all()\n) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-item--with-two-lines {\n .mdc-list-item__end {\n @include feature-targeting.targets($feat-structure) {\n align-self: $alignment;\n margin-top: $offset;\n }\n }\n }\n}\n\n@mixin three-line-item-end-alignment(\n $alignment,\n $offset: 0,\n $query: feature-targeting.all()\n) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-item--with-three-lines {\n .mdc-list-item__end {\n @include feature-targeting.targets($feat-structure) {\n align-self: $alignment;\n margin-top: $offset;\n }\n }\n }\n}\n\n@mixin item-start-spacing(\n $leading,\n $trailing: $leading,\n $query: feature-targeting.all()\n) {\n $feat-structure: feature-targeting.create-target($query, structure);\n @include feature-targeting.targets($feat-structure) {\n // Extra specificity needed to override default customizations.\n &.mdc-list-item {\n // We rely on auto to avoid clobbering the opposite padding.\n @include rtl.reflexive-property(padding, 0, auto);\n }\n\n .mdc-list-item__start {\n @include rtl.reflexive-property(margin, $leading, $trailing);\n }\n }\n}\n\n@mixin item-end-spacing(\n $leading,\n $trailing: $leading,\n $query: feature-targeting.all()\n) {\n $feat-structure: feature-targeting.create-target($query, structure);\n @include feature-targeting.targets($feat-structure) {\n // Extra specificity needed to override default customizations.\n &.mdc-list-item {\n // We rely on auto to avoid clobbering the opposite padding.\n @include rtl.reflexive-property(padding, auto, 0);\n }\n\n .mdc-list-item__end {\n @include rtl.reflexive-property(margin, $leading, $trailing);\n }\n }\n}\n\n@mixin item-start-size(\n $width,\n $height: $width,\n $query: feature-targeting.all()\n) {\n $feat-structure: feature-targeting.create-target($query, structure);\n @include feature-targeting.targets($feat-structure) {\n .mdc-list-item__start {\n @include theme.property(width, $width);\n @include theme.property(height, $height);\n }\n }\n}\n\n@mixin item-end-size($width, $height: $width, $query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n @include feature-targeting.targets($feat-structure) {\n .mdc-list-item__end {\n @include theme.property(width, $width);\n @include theme.property(height, $height);\n }\n }\n}\n\n@mixin list-item-selected-container-color($color) {\n &.mdc-list-item.mdc-list-item--selected {\n @include theme.property(background-color, $color);\n }\n}\n\n@mixin list-primary-text-typography($typography-theme) {\n .mdc-list-item__primary-text {\n @include typography.theme-styles($typography-theme);\n }\n}\n\n@mixin list-primary-text-ink-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-item__primary-text {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(color, $color);\n }\n }\n}\n\n@mixin list-secondary-text-ink-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-item__secondary-text {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(color, $color);\n }\n }\n}\n\n@mixin list-secondary-text-typography($typography-theme) {\n .mdc-list-item__secondary-text {\n @include typography.theme-styles($typography-theme);\n }\n}\n\n@mixin list-overline-text-ink-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-item__overline-text {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(color, $color);\n }\n }\n}\n\n@mixin list-meta-text-ink-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-item__end {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(color, $color);\n }\n }\n}\n\n@mixin list-icon-ink-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-item--with-leading-icon .mdc-list-item__start,\n .mdc-list-item--with-trailing-icon .mdc-list-item__end {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(color, $color);\n }\n }\n}\n\n@mixin list-icon-fill-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-item--with-leading-icon .mdc-list-item__start,\n .mdc-list-item--with-trailing-icon .mdc-list-item__end {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(background-color, $color);\n }\n }\n}\n\n@mixin list-selected-ink-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-item--selected,\n .mdc-list-item--activated {\n @include list-primary-text-ink-color($color, $query);\n @include _item-icon-ink-color($color, $leading-only: true, $query: $query);\n }\n}\n\n@mixin list-selected-meta-text-ink-color(\n $color,\n $query: feature-targeting.all()\n) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-item--selected,\n .mdc-list-item--activated {\n @include list-meta-text-ink-color($color, $query);\n }\n}\n\n@mixin list-disabled-ink-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-item--disabled {\n @include list-primary-text-ink-color($color, $query);\n @include list-secondary-text-ink-color($color, $query);\n @include list-overline-text-ink-color($color, $query);\n @include _item-icon-ink-color($color, $query: $query);\n @include item-meta-text-ink-color($color, $query);\n }\n}\n\n@mixin list-disabled-opacity($opacity, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-item--disabled {\n .mdc-list-item__start,\n .mdc-list-item__content,\n .mdc-list-item__end {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(opacity, $opacity);\n }\n }\n }\n}\n\n@mixin group-subheader-ink-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-deprecated-list-group__subheader {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(color, $color);\n }\n }\n}\n\n///\n/// Sets shape radius (rounded) to single line list variant.\n///\n/// @param {Number | List} $radius Radius size in `px` or percentage. It can be 4 value corner or single radius.\n/// Set to `50%` for rounded shape.\n/// @param {Boolean} $rtl-reflexive Set to true to flip border radius in RTL context. Defaults to `false`.\n/// @param {Number} $density-scale Density scale of single line list. Set this only when custom density is applied.\n/// Defaults to `$mdc-deprecated-list-single-line-density-scale`.\n///\n/// @access public\n///\n@mixin one-line-list-radius(\n $radius,\n $rtl-reflexive: false,\n $density-scale: variables.$one-line-item-density-scale,\n $query: feature-targeting.all()\n) {\n .mdc-list-item--with-one-line {\n @include shape-mixins.radius(\n $radius,\n $rtl-reflexive,\n $component-height:\n density-functions.prop-value(\n $density-config: variables.$one-line-item-density-config,\n $density-scale: $density-scale,\n $property-name: height\n ),\n $query: $query\n );\n\n &.mdc-list-item--with-leading-avatar,\n &.mdc-list-item--with-leading-icon,\n &.mdc-list-item--with-leading-thumbnail,\n &.mdc-list-item--with-leading-checkbox,\n &.mdc-list-item--with-leading-radio,\n &.mdc-list-item--with-leading-switch {\n @include shape-mixins.radius(\n $radius,\n $rtl-reflexive,\n $component-height:\n density-functions.prop-value(\n $density-config: variables.$one-line-item-tall-density-config,\n $density-scale: $density-scale,\n $property-name: height\n ),\n $query: $query\n );\n }\n\n &.mdc-list-item--with-leading-image,\n &.mdc-list-item--with-leading-video {\n @include shape-mixins.radius(\n $radius,\n $rtl-reflexive,\n $component-height:\n density-functions.prop-value(\n $density-config: variables.$one-line-item-taller-density-config,\n $density-scale: $density-scale,\n $property-name: height\n ),\n $query: $query\n );\n }\n }\n}\n\n@mixin two-line-list-radius(\n $radius,\n $rtl-reflexive: false,\n $density-scale: variables.$two-line-item-density-scale,\n $query: feature-targeting.all()\n) {\n .mdc-list-item--with-two-lines {\n @include shape-mixins.radius(\n $radius,\n $rtl-reflexive,\n $component-height:\n density-functions.prop-value(\n $density-config: variables.$two-line-item-density-config,\n $density-scale: $density-scale,\n $property-name: height\n ),\n $query: $query\n );\n\n &.mdc-list-item--with-leading-avatar,\n &.mdc-list-item--with-leading-icon,\n &.mdc-list-item--with-leading-thumbnail,\n &.mdc-list-item--with-leading-checkbox,\n &.mdc-list-item--with-leading-radio,\n &.mdc-list-item--with-leading-switch,\n &.mdc-list-item--with-leading-image,\n &.mdc-list-item--with-leading-video {\n @include shape-mixins.radius(\n $radius,\n $rtl-reflexive,\n $component-height:\n density-functions.prop-value(\n $density-config: variables.$two-line-item-tall-density-config,\n $density-scale: $density-scale,\n $property-name: height\n ),\n $query: $query\n );\n }\n }\n}\n\n@mixin three-line-list-radius(\n $radius,\n $rtl-reflexive: false,\n $density-scale: variables.$three-line-item-density-scale,\n $query: feature-targeting.all()\n) {\n .mdc-list-item--with-three-lines {\n @include shape-mixins.radius(\n $radius,\n $rtl-reflexive,\n $component-height:\n density-functions.prop-value(\n $density-config: variables.$three-line-item-density-config,\n $density-scale: $density-scale,\n $property-name: height\n ),\n $query: $query\n );\n }\n}\n\n@mixin divider-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n .mdc-list-divider {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(background-color, $color);\n }\n }\n}\n\n@mixin divider-height($height, $query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n\n .mdc-list-divider {\n @include feature-targeting.targets($feat-structure) {\n @include theme.property(height, $height);\n }\n }\n}\n\n@mixin divider-leading-inset($inset, $query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-divider--with-leading-inset {\n @include feature-targeting.targets($feat-structure) {\n // We rely on auto to avoid clobbering the opposite padding.\n @include rtl.reflexive-property(padding, $inset, auto);\n }\n }\n}\n\n@mixin divider-trailing-inset($inset, $query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n &.mdc-list-divider--with-trailing-inset {\n @include feature-targeting.targets($feat-structure) {\n // We rely on auto to avoid clobbering the opposite padding.\n @include rtl.reflexive-property(padding, auto, $inset);\n }\n }\n}\n\n// The public density mixins apply the appropriate density styles regardless of\n// the item's start contents.\n@mixin one-line-item-density(\n $density-scale,\n $exclude-variants: false,\n $query: feature-targeting.all()\n) {\n @include _one-line-item-density($density-scale, $query: $query);\n\n @if not $exclude-variants {\n &.mdc-list-item--with-leading-avatar,\n &.mdc-list-item--with-leading-icon,\n &.mdc-list-item--with-leading-thumbnail,\n &.mdc-list-item--with-leading-checkbox,\n &.mdc-list-item--with-leading-radio,\n &.mdc-list-item--with-leading-switch {\n @include _one-line-item-tall-density($density-scale, $query: $query);\n }\n\n &.mdc-list-item--with-leading-image,\n &.mdc-list-item--with-leading-video {\n @include _one-line-item-taller-density($density-scale, $query: $query);\n }\n }\n}\n\n@mixin two-line-item-density($density-scale, $query: feature-targeting.all()) {\n @include _two-line-item-density($density-scale, $query: $query);\n\n &.mdc-list-item--with-leading-avatar,\n &.mdc-list-item--with-leading-icon,\n &.mdc-list-item--with-leading-thumbnail,\n &.mdc-list-item--with-leading-checkbox,\n &.mdc-list-item--with-leading-radio,\n &.mdc-list-item--with-leading-switch,\n &.mdc-list-item--with-leading-image,\n &.mdc-list-item--with-leading-video {\n @include _two-line-item-tall-density($density-scale, $query: $query);\n }\n}\n\n@mixin three-line-item-density(\n $density-scale,\n $query: feature-targeting.all()\n) {\n @include _three-line-item-density($density-scale, $query: $query);\n}\n\n//\n// Private\n//\n\n// Mixins that apply baseline height for one-, two-, and three- line item\n// container heights. This mixin calls the density mixins so that the styles\n// can be overwritten by future density mixin calls.\n@mixin _list-item-baseline-height($query: feature-targeting.all()) {\n @include _one-line-item-density(\n variables.$one-line-item-density-scale,\n $query: $query\n );\n\n @include _two-line-item-density(\n variables.$two-line-item-density-scale,\n $query: $query\n );\n\n @include _three-line-item-density(\n variables.$three-line-item-density-scale,\n $query: $query\n );\n}\n\n@mixin _tall-list-item-baseline-height($query: feature-targeting.all()) {\n @include _one-line-item-tall-density(\n variables.$one-line-item-density-scale,\n $query: $query\n );\n @include _two-line-item-tall-density(\n variables.$two-line-item-density-scale,\n $query: $query\n );\n}\n\n// The private density mixins allow density properties to be overridden\n// individually to avoid increasing specificity.\n\n@mixin _one-line-item-density($density-scale, $query: feature-targeting.all()) {\n $height: density-functions.prop-value(\n $density-config: variables.$one-line-item-density-config,\n $density-scale: $density-scale,\n $property-name: height,\n );\n\n @include one-line-item-height($height, $query: $query);\n}\n\n@mixin _one-line-item-tall-density(\n $density-scale,\n $query: feature-targeting.all()\n) {\n $height: density-functions.prop-value(\n $density-config: variables.$one-line-item-tall-density-config,\n $density-scale: $density-scale,\n $property-name: height,\n );\n\n @include one-line-item-height($height, $query: $query);\n}\n\n@mixin _one-line-item-taller-density(\n $density-scale,\n $query: feature-targeting.all()\n) {\n $height: density-functions.prop-value(\n $density-config: variables.$one-line-item-taller-density-config,\n $density-scale: $density-scale,\n $property-name: height,\n );\n\n @include one-line-item-height($height, $query: $query);\n}\n\n@mixin _two-line-item-density($density-scale, $query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n $height: density-functions.prop-value(\n $density-config: variables.$two-line-item-density-config,\n $density-scale: $density-scale,\n $property-name: height,\n );\n\n @include two-line-item-height($height, $query: $query);\n\n @if ($density-scale and $density-scale != 0) {\n &.mdc-list-item--with-two-lines {\n .mdc-list-item__content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n .mdc-list-item__primary-text,\n .mdc-list-item__secondary-text {\n margin-top: 0px;\n margin-bottom: 0px;\n line-height: 1.4;\n &::before,\n &::after {\n display: none;\n }\n }\n }\n }\n}\n\n@mixin _two-line-item-tall-density(\n $density-scale,\n $query: feature-targeting.all()\n) {\n $height: density-functions.prop-value(\n $density-config: variables.$two-line-item-tall-density-config,\n $density-scale: $density-scale,\n $property-name: height,\n );\n\n @include two-line-item-height($height, $query: $query);\n}\n\n@mixin _three-line-item-density(\n $density-scale,\n $query: feature-targeting.all()\n) {\n $height: density-functions.prop-value(\n $density-config: variables.$three-line-item-density-config,\n $density-scale: $density-scale,\n $property-name: height,\n );\n\n @include three-line-item-height($height, $query: $query);\n}\n\n// Split the list-base mixin into two sub-mixins, one holding the\n// structural/static styles (static-list-base) and the other holding styles\n// that are themable (typography-list-base). However, the existing list-base\n// mixin need to be preserved as Angular calls this mixin for autocomplete\n// base styling.\n@mixin _typography-list-base($query: feature-targeting.all()) {\n $feat-typography: feature-targeting.create-target($query, typography);\n @include typography.typography(subtitle1, $query);\n @include feature-targeting.targets($feat-typography) {\n // According to the mocks and stickersheet, the line-height is\n // adjusted to 24px for text content, same as for body1.\n /* @alternate */\n line-height: map.get(map.get(typography.$styles, body1), line-height);\n }\n}\n\n@mixin _static-list-base($query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n\n @include feature-targeting.targets($feat-structure) {\n margin: 0;\n padding: 8px 0;\n list-style-type: none;\n\n &:focus // lint-disable-focus-psuedo-selector\n {\n outline: none;\n }\n }\n}\n\n@mixin list-base($query: feature-targeting.all()) {\n @include _typography-list-base($query: $query);\n @include _static-list-base($query: $query);\n}\n\n@mixin item-base($query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n @include feature-targeting.targets($feat-structure) {\n display: flex;\n position: relative;\n align-items: center;\n justify-content: flex-start;\n overflow: hidden;\n padding: 0;\n\n &:focus // lint-disable-focus-psuedo-selector\n {\n outline: none;\n }\n }\n}\n\n@mixin _item-interactive-ripple($query: feature-targeting.all()) {\n @include ripple.surface(\n $ripple-target: variables.$ripple-target,\n $query: $query\n );\n @include ripple.radius-bounded(\n $ripple-target: variables.$ripple-target,\n $query: $query\n );\n @include ripple-theme.states(\n theme-color.prop-value(on-surface),\n false,\n $ripple-target: variables.$ripple-target,\n $query: $query\n );\n @include ripple-theme.states-activated(\n primary,\n false,\n $ripple-target: variables.$ripple-target,\n $query: $query\n );\n @include ripple-theme.states-selected(\n primary,\n false,\n $ripple-target: variables.$ripple-target,\n $query: $query\n );\n\n #{variables.$ripple-target} {\n @include ripple.surface-styles($query: $query);\n @include ripple.target-common($query: $query);\n }\n}\n\n@mixin _two-line-item-text-baseline($query: feature-targeting.all()) {\n @include _two-line-item-primary-text-baseline(32px, 20px, $query: $query);\n @include _two-line-item-overline-text-baseline(28px, 20px, $query: $query);\n @include _two-line-item-meta-text-baseline($top: 32px, $query: $query);\n}\n\n@mixin _two-line-item-primary-text-baseline(\n $top,\n $bottom,\n $query: feature-targeting.all()\n) {\n &.mdc-list-item--with-two-lines {\n .mdc-list-item__primary-text {\n @include typography.text-baseline(\n $top: $top,\n $bottom: $bottom,\n $query: $query\n );\n }\n }\n}\n\n@mixin _three-line-item-primary-baseline(\n $top,\n $bottom,\n $query: feature-targeting.all()\n) {\n &.mdc-list-item--with-three-lines {\n .mdc-list-item__primary-text {\n @include typography.text-baseline(\n $top: $top,\n $bottom: $bottom,\n $query: $query\n );\n }\n }\n}\n\n@mixin _two-line-item-overline-text-baseline(\n $top,\n $bottom,\n $query: feature-targeting.all()\n) {\n &.mdc-list-item--with-two-lines {\n .mdc-list-item__overline-text {\n @include typography.text-baseline(\n $top: $top,\n $bottom: $bottom,\n $query: $query\n );\n }\n }\n}\n\n@mixin _three-line-item-overline-baseline(\n $top,\n $bottom,\n $query: feature-targeting.all()\n) {\n &.mdc-list-item--with-three-lines {\n .mdc-list-item__overline-text {\n @include typography.text-baseline(\n $top: $top,\n $bottom: $bottom,\n $query: $query\n );\n }\n }\n}\n\n@mixin _multi-line-item-end-text-baseline($query: feature-targeting.all()) {\n &.mdc-list-item--with-two-lines {\n .mdc-list-item__end {\n @include typography.text-baseline(\n $display: block,\n $top: 28px,\n $query: $query\n );\n }\n }\n\n &.mdc-list-item--with-three-lines {\n .mdc-list-item__end {\n @include typography.text-baseline(\n $display: block,\n $top: 28px,\n $query: $query\n );\n }\n }\n}\n\n@mixin _two-line-item-meta-text-baseline(\n $top,\n $query: feature-targeting.all()\n) {\n &.mdc-list-item--with-two-lines {\n &.mdc-list-item--with-trailing-meta {\n .mdc-list-item__end {\n @include typography.text-baseline(\n $display: block,\n $top: $top,\n $query: $query\n );\n }\n }\n }\n}\n\n@mixin item-meta-text-ink-color($color, $query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n\n &.mdc-list-item--with-trailing-meta {\n .mdc-list-item__end {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(color, $color);\n }\n }\n }\n}\n\n@mixin _item-icon-ink-color(\n $color,\n $leading-only: false,\n $query: feature-targeting.all()\n) {\n $feat-color: feature-targeting.create-target($query, color);\n\n &.mdc-list-item--with-leading-icon {\n .mdc-list-item__start {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(color, $color);\n }\n }\n }\n\n @if (not $leading-only) {\n &.mdc-list-item--with-trailing-icon {\n .mdc-list-item__end {\n @include feature-targeting.targets($feat-color) {\n @include theme.property(color, $color);\n }\n }\n }\n }\n}\n\n@mixin _high-contrast-mode-border-color($query: feature-targeting.all()) {\n $feat-color: feature-targeting.create-target($query, color);\n .mdc-list-divider::after {\n @include feature-targeting.targets($feat-color) {\n // Color ensures border is shown, but will be overridden by the browser.\n @include theme.property(border-bottom-color, white);\n }\n }\n}\n\n@mixin _high-contrast-mode($query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n\n @include dom-mixins.forced-colors-mode {\n .mdc-list-divider::after {\n @include feature-targeting.targets($feat-structure) {\n content: '';\n display: block;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n }\n }\n }\n}\n\n@mixin _list-group-subheader-margin($query: feature-targeting.all()) {\n $feat-structure: feature-targeting.create-target($query, structure);\n\n $mdc-list-subheader-virtual-height: 3rem;\n $mdc-list-subheader-leading: map.get(\n map.get(typography.$styles, body1),\n line-height\n );\n $mdc-list-subheader-margin: calc(\n (#{$mdc-list-subheader-virtual-height} - #{$mdc-list-subheader-leading}) / 2\n );\n\n @include feature-targeting.targets($feat-structure) {\n margin: $mdc-list-subheader-margin variables.$side-padding;\n }\n}\n","@use '@material/button/button-text-theme' as mdc-button-text-theme;\n@use '@material/button/button-filled-theme' as mdc-button-filled-theme;\n@use '@material/button/button-protected-theme' as mdc-button-protected-theme;\n@use '@material/button/button-outlined-theme' as mdc-button-outlined-theme;\n\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/tokens/token-utils';\n@use '../core/typography/typography';\n@use '../core/tokens/m2/mdc/filled-button' as tokens-mdc-filled-button;\n@use '../core/tokens/m2/mat/filled-button' as tokens-mat-filled-button;\n@use '../core/tokens/m2/mdc/outlined-button' as tokens-mdc-outlined-button;\n@use '../core/tokens/m2/mat/outlined-button' as tokens-mat-outlined-button;\n@use '../core/tokens/m2/mdc/protected-button' as tokens-mdc-protected-button;\n@use '../core/tokens/m2/mat/protected-button' as tokens-mat-protected-button;\n@use '../core/tokens/m2/mdc/text-button' as tokens-mdc-text-button;\n@use '../core/tokens/m2/mat/text-button' as tokens-mat-text-button;\n@use '../core/style/sass-utils';\n\n@mixin _text-button-variant($theme, $palette) {\n $mdc-tokens: if($palette,\n tokens-mdc-text-button.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mdc-text-button.get-color-tokens($theme)\n );\n\n $mat-tokens: if($palette,\n tokens-mat-text-button.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mat-text-button.get-color-tokens($theme)\n );\n\n @include mdc-button-text-theme.theme($mdc-tokens);\n @include token-utils.create-token-values(tokens-mat-text-button.$prefix, $mat-tokens);\n}\n\n@mixin _filled-button-variant($theme, $palette) {\n $mdc-tokens: if($palette,\n tokens-mdc-filled-button.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mdc-filled-button.get-color-tokens($theme)\n );\n\n $mat-tokens: if($palette,\n tokens-mat-filled-button.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mat-filled-button.get-color-tokens($theme)\n );\n\n @include mdc-button-filled-theme.theme($mdc-tokens);\n @include token-utils.create-token-values(tokens-mat-filled-button.$prefix, $mat-tokens);\n}\n\n@mixin _protected-button-variant($theme, $palette) {\n $mdc-tokens: if($palette,\n tokens-mdc-protected-button.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mdc-protected-button.get-color-tokens($theme)\n );\n\n $mat-tokens: if($palette,\n tokens-mat-protected-button.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mat-protected-button.get-color-tokens($theme)\n );\n\n @include mdc-button-protected-theme.theme($mdc-tokens);\n @include token-utils.create-token-values(tokens-mat-protected-button.$prefix, $mat-tokens);\n}\n\n@mixin _outlined-button-variant($theme, $palette) {\n $mdc-tokens: if($palette,\n tokens-mdc-outlined-button.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mdc-outlined-button.get-color-tokens($theme)\n );\n\n $mat-tokens: if($palette,\n tokens-mat-outlined-button.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mat-outlined-button.get-color-tokens($theme)\n );\n\n @include mdc-button-outlined-theme.theme($mdc-tokens);\n @include token-utils.create-token-values(tokens-mat-outlined-button.$prefix, $mat-tokens);\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mdc-text-button-tokens:\n token-utils.get-tokens-for($tokens, tokens-mdc-text-button.$prefix, $options...);\n $mdc-protected-button-tokens:\n token-utils.get-tokens-for($tokens, tokens-mdc-protected-button.$prefix, $options...);\n $mdc-filled-button-tokens:\n token-utils.get-tokens-for($tokens, tokens-mdc-filled-button.$prefix, $options...);\n $mdc-outlined-button-tokens:\n token-utils.get-tokens-for($tokens, tokens-mdc-outlined-button.$prefix, $options...);\n $mat-text-button-tokens:\n token-utils.get-tokens-for($tokens, tokens-mat-text-button.$prefix, $options...);\n $mat-protected-button-tokens:\n token-utils.get-tokens-for($tokens, tokens-mat-protected-button.$prefix, $options...);\n $mat-filled-button-tokens:\n token-utils.get-tokens-for($tokens, tokens-mat-filled-button.$prefix, $options...);\n $mat-outlined-button-tokens:\n token-utils.get-tokens-for($tokens, tokens-mat-outlined-button.$prefix, $options...);\n @include mdc-button-text-theme.theme($mdc-text-button-tokens);\n @include mdc-button-protected-theme.theme($mdc-protected-button-tokens);\n @include mdc-button-filled-theme.theme($mdc-filled-button-tokens);\n @include mdc-button-outlined-theme.theme($mdc-outlined-button-tokens);\n @include token-utils.create-token-values(tokens-mat-text-button.$prefix, $mat-text-button-tokens);\n @include token-utils.create-token-values(\n tokens-mat-protected-button.$prefix, $mat-protected-button-tokens);\n @include token-utils.create-token-values(\n tokens-mat-filled-button.$prefix, $mat-filled-button-tokens);\n @include token-utils.create-token-values(\n tokens-mat-outlined-button.$prefix, $mat-outlined-button-tokens);\n}\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-button.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-button-text-theme.theme(\n tokens-mdc-text-button.get-unthemable-tokens());\n @include mdc-button-filled-theme.theme(\n tokens-mdc-filled-button.get-unthemable-tokens());\n @include mdc-button-protected-theme.theme(\n tokens-mdc-protected-button.get-unthemable-tokens());\n @include mdc-button-outlined-theme.theme(\n tokens-mdc-outlined-button.get-unthemable-tokens());\n\n @include token-utils.create-token-values(tokens-mat-text-button.$prefix,\n tokens-mat-text-button.get-unthemable-tokens());\n @include token-utils.create-token-values(tokens-mat-filled-button.$prefix,\n tokens-mat-filled-button.get-unthemable-tokens());\n @include token-utils.create-token-values(tokens-mat-protected-button.$prefix,\n tokens-mat-protected-button.get-unthemable-tokens());\n @include token-utils.create-token-values(tokens-mat-outlined-button.$prefix,\n tokens-mat-outlined-button.get-unthemable-tokens());\n }\n }\n}\n\n/// Outputs color theme styles for the mat-button.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the button: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include _text-button-variant($theme, null);\n @include _filled-button-variant($theme, null);\n @include _protected-button-variant($theme, null);\n @include _outlined-button-variant($theme, null);\n }\n\n .mat-mdc-button {\n &.mat-primary {\n @include _text-button-variant($theme, primary);\n }\n\n &.mat-accent {\n @include _text-button-variant($theme, accent);\n }\n\n &.mat-warn {\n @include _text-button-variant($theme, warn);\n }\n }\n\n .mat-mdc-unelevated-button {\n &.mat-primary {\n @include _filled-button-variant($theme, primary);\n }\n\n &.mat-accent {\n @include _filled-button-variant($theme, accent);\n }\n\n &.mat-warn {\n @include _filled-button-variant($theme, warn);\n }\n }\n\n .mat-mdc-raised-button {\n &.mat-primary {\n @include _protected-button-variant($theme, primary);\n }\n\n &.mat-accent {\n @include _protected-button-variant($theme, accent);\n }\n\n &.mat-warn {\n @include _protected-button-variant($theme, warn);\n }\n }\n\n .mat-mdc-outlined-button {\n &.mat-primary {\n @include _outlined-button-variant($theme, primary);\n }\n\n &.mat-accent {\n @include _outlined-button-variant($theme, accent);\n }\n\n &.mat-warn {\n @include _outlined-button-variant($theme, warn);\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-button.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-button-text-theme.theme(\n tokens-mdc-text-button.get-typography-tokens($theme));\n @include mdc-button-filled-theme.theme(\n tokens-mdc-filled-button.get-typography-tokens($theme));\n @include mdc-button-outlined-theme.theme(\n tokens-mdc-outlined-button.get-typography-tokens($theme));\n @include mdc-button-protected-theme.theme(\n tokens-mdc-protected-button.get-typography-tokens($theme));\n\n @include token-utils.create-token-values(tokens-mat-text-button.$prefix,\n tokens-mat-text-button.get-typography-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-filled-button.$prefix,\n tokens-mat-filled-button.get-typography-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-protected-button.$prefix,\n tokens-mat-protected-button.get-typography-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-outlined-button.$prefix,\n tokens-mat-outlined-button.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs density theme styles for the mat-button.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-button-text-theme.theme(\n tokens-mdc-text-button.get-density-tokens($theme));\n @include mdc-button-filled-theme.theme(\n tokens-mdc-filled-button.get-density-tokens($theme));\n @include mdc-button-outlined-theme.theme(\n tokens-mdc-outlined-button.get-density-tokens($theme));\n @include mdc-button-protected-theme.theme(\n tokens-mdc-protected-button.get-density-tokens($theme));\n\n @include token-utils.create-token-values(tokens-mat-text-button.$prefix,\n tokens-mat-text-button.get-density-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-filled-button.$prefix,\n tokens-mat-filled-button.get-density-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-protected-button.$prefix,\n tokens-mat-protected-button.get-density-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-outlined-button.$prefix,\n tokens-mat-outlined-button.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-button.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the button: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-button') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n","@use 'sass:map';\n@use 'sass:math';\n@use '@material/density/functions' as mdc-density-functions;\n@use '@material/icon-button/icon-button-theme' as mdc-icon-button-theme;\n@use '../core/tokens/m2/mdc/icon-button' as tokens-mdc-icon-button;\n@use '../core/tokens/m2/mat/icon-button' as tokens-mat-icon-button;\n@use '../core/style/sass-utils';\n@use '../core/tokens/token-utils';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n\n\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n // Add default values for tokens not related to color, typography, or density.\n @include sass-utils.current-selector-or-root() {\n @include mdc-icon-button-theme.theme(tokens-mdc-icon-button.get-unthemable-tokens());\n }\n }\n}\n\n@mixin _icon-button-variant($theme, $palette) {\n $mdc-tokens: if($palette,\n tokens-mdc-icon-button.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mdc-icon-button.get-color-tokens($theme)\n );\n\n $mat-tokens: if($palette,\n tokens-mat-icon-button.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mat-icon-button.get-color-tokens($theme)\n );\n\n @include mdc-icon-button-theme.theme($mdc-tokens);\n @include token-utils.create-token-values(tokens-mat-icon-button.$prefix, $mat-tokens);\n}\n\n@mixin color($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include _icon-button-variant($theme, null);\n\n .mat-mdc-icon-button {\n &.mat-primary {\n @include _icon-button-variant($theme, primary);\n }\n\n &.mat-accent {\n @include _icon-button-variant($theme, accent);\n }\n\n &.mat-warn {\n @include _icon-button-variant($theme, warn);\n }\n }\n }\n }\n}\n\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-icon-button.$prefix,\n tokens-mat-icon-button.get-typography-tokens($theme));\n }\n }\n}\n\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n $icon-size: 24px;\n $density-scale: inspection.get-theme-density($theme);\n // Manually apply the expected density theming, and include the padding\n // as it was applied before\n $calculated-size: mdc-density-functions.prop-value(\n $density-config: (\n size: (\n default: 48px,\n maximum: 48px,\n minimum: 28px,\n ),\n ),\n $density-scale: $density-scale,\n $property-name: size,\n );\n\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-icon-button.$prefix,\n tokens-mat-icon-button.get-density-tokens($theme));\n }\n\n // Use `mat-mdc-button-base` to increase the specificity over the button's structural styles.\n .mat-mdc-icon-button.mat-mdc-button-base {\n // Match the styles that used to be present. This is necessary for backwards\n // compat to match the previous implementations selector count (two classes).\n @include mdc-icon-button-theme.theme((\n state-layer-size: $calculated-size,\n ));\n\n // TODO: Switch calculated-size to \"var(--mdc-icon-button-state-layer-size)\"\n // Currently fails validation because the variable is \"undefined\"\n // in the sass stack.\n // TODO: Switch icon-size to \"var(--mdc-icon-button-icon-size)\". Currently\n // fails validation because the variable is \"undefined\" in the sass stack.\n width: var(--mdc-icon-button-state-layer-size);\n height: var(--mdc-icon-button-state-layer-size);\n padding: math.div($calculated-size - $icon-size, 2);\n }\n }\n}\n\n@mixin theme($theme) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-icon-button') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme));\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n @if ($tokens != ()) {\n @include mdc-icon-button-theme.theme(map.get($tokens, tokens-mdc-icon-button.$prefix));\n @include token-utils.create-token-values(\n tokens-mat-icon-button.$prefix, map.get($tokens, tokens-mat-icon-button.$prefix));\n }\n}\n","@use '@material/fab/fab-theme' as mdc-fab-theme;\n@use '@material/fab/fab-small-theme' as mdc-fab-small-theme;\n@use '@material/fab/extended-fab-theme' as mdc-extended-fab-theme;\n@use '../core/style/sass-utils';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/tokens/m2/mdc/fab' as tokens-mdc-fab;\n@use '../core/tokens/m2/mdc/fab-small' as tokens-mdc-fab-small;\n@use '../core/tokens/m2/mdc/extended-fab' as tokens-mdc-extended-fab;\n@use '../core/tokens/m2/mat/fab' as tokens-mat-fab;\n@use '../core/tokens/m2/mat/fab-small' as tokens-mat-fab-small;\n@use '../core/tokens/token-utils';\n@use '../core/typography/typography';\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-fab.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n // Add default values for tokens not related to color, typography, or density.\n @include sass-utils.current-selector-or-root() {\n @include mdc-fab-theme.theme(tokens-mdc-fab.get-unthemable-tokens());\n @include mdc-fab-small-theme.theme(tokens-mdc-fab-small.get-unthemable-tokens());\n @include mdc-extended-fab-theme.theme(\n tokens-mdc-extended-fab.get-unthemable-tokens()\n );\n }\n }\n}\n\n@mixin _fab-variant($theme, $palette) {\n $mdc-tokens: if($palette,\n tokens-mdc-fab.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mdc-fab.get-color-tokens($theme)\n );\n\n $mat-tokens: if($palette,\n tokens-mat-fab.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mat-fab.get-color-tokens($theme)\n );\n\n @include mdc-fab-theme.theme($mdc-tokens);\n @include token-utils.create-token-values(tokens-mat-fab.$prefix, $mat-tokens);\n}\n\n@mixin _fab-small-variant($theme, $palette) {\n $mdc-tokens: if($palette,\n tokens-mdc-fab-small.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mdc-fab-small.get-color-tokens($theme)\n );\n\n $mat-tokens: if($palette,\n tokens-mat-fab-small.private-get-color-palette-color-tokens($theme, $palette),\n tokens-mat-fab-small.get-color-tokens($theme)\n );\n\n @include mdc-fab-small-theme.theme($mdc-tokens);\n @include token-utils.create-token-values(tokens-mat-fab-small.$prefix, $mat-tokens);\n}\n\n/// Outputs color theme styles for the mat-fab.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the fab: primary, secondary, or tertiary\n/// (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include _fab-variant($theme, null);\n @include _fab-small-variant($theme, null);\n @include mdc-extended-fab-theme.theme(tokens-mdc-extended-fab.get-color-tokens($theme));\n\n .mat-mdc-fab {\n &.mat-primary {\n @include _fab-variant($theme, primary);\n }\n\n &.mat-accent {\n @include _fab-variant($theme, accent);\n }\n\n &.mat-warn {\n @include _fab-variant($theme, warn);\n }\n }\n\n .mat-mdc-mini-fab {\n &.mat-primary {\n @include _fab-small-variant($theme, primary);\n }\n\n &.mat-accent {\n @include _fab-small-variant($theme, accent);\n }\n\n &.mat-warn {\n @include _fab-small-variant($theme, warn);\n }\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-fab.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include mdc-extended-fab-theme.theme(tokens-mdc-extended-fab.get-typography-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-fab.$prefix,\n tokens-mat-fab.get-typography-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-fab-small.$prefix,\n tokens-mat-fab-small.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs density theme styles for the mat-fab.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-fab.$prefix,\n tokens-mat-fab.get-density-tokens($theme));\n @include token-utils.create-token-values(tokens-mat-fab-small.$prefix,\n tokens-mat-fab-small.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-checkbox.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the fab: primary, secondary, or tertiary\n/// (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-fab') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mdc-extended-fab-tokens: token-utils.get-tokens-for(\n $tokens, tokens-mdc-extended-fab.$prefix, $options...);\n $mdc-fab-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-fab.$prefix, $options...);\n $mdc-fab-small-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-fab-small.$prefix,\n $options...);\n $mat-fab-tokens: token-utils.get-tokens-for($tokens, tokens-mat-fab.$prefix, $options...);\n $mat-fab-small-tokens: token-utils.get-tokens-for($tokens, tokens-mat-fab-small.$prefix,\n $options...);\n @include mdc-extended-fab-theme.theme($mdc-extended-fab-tokens);\n @include mdc-fab-theme.theme($mdc-fab-tokens);\n @include mdc-fab-small-theme.theme($mdc-fab-small-tokens);\n @include token-utils.create-token-values(tokens-mat-fab.$prefix, $mat-fab-tokens);\n @include token-utils.create-token-values(tokens-mat-fab-small.$prefix, $mat-fab-small-tokens);\n}\n","@use '../core/style/sass-utils';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/tokens/token-utils';\n@use '../core/tokens/m2/mdc/circular-progress' as tokens-mdc-circular-progress;\n@use '@material/circular-progress/circular-progress-theme' as mdc-circular-progress-theme;\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-progress-spinner.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n // Add default values for tokens not related to color, typography, or density.\n @include sass-utils.current-selector-or-root() {\n @include mdc-circular-progress-theme.theme(\n tokens-mdc-circular-progress.get-unthemable-tokens()\n );\n }\n }\n}\n\n/// Outputs color theme styles for the mat-progress-spinner.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the spinner: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n $mdc-circular-progress-color-tokens: tokens-mdc-circular-progress.get-color-tokens($theme);\n\n @include sass-utils.current-selector-or-root() {\n @include mdc-circular-progress-theme.theme($mdc-circular-progress-color-tokens);\n\n .mat-accent {\n $color: inspection.get-theme-color($theme, accent);\n @include mdc-circular-progress-theme.theme((active-indicator-color: $color));\n }\n\n .mat-warn {\n $color: inspection.get-theme-color($theme, warn);\n @include mdc-circular-progress-theme.theme((active-indicator-color: $color));\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-progress-spinner.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n}\n\n/// Outputs density theme styles for the mat-progress-spinner.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-progress-spinner.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the spinner: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-progress-spinner') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mdc-circular-progress-tokens:\n token-utils.get-tokens-for($tokens, tokens-mdc-circular-progress.$prefix, $options...);\n @include mdc-circular-progress-theme.theme($mdc-circular-progress-tokens);\n}\n","@use 'sass:color';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/typography/typography';\n@use '../core/tokens/m2/mat/badge' as tokens-mat-badge;\n@use '../core/tokens/token-utils';\n@use '../core/style/sass-utils';\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-badge.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-badge.$prefix,\n tokens-mat-badge.get-unthemable-tokens());\n }\n }\n}\n\n/// Outputs color theme styles for the mat-badge.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the badge: primary, secondary, tertiary,\n/// or error (If not specified, default error color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-badge.$prefix,\n tokens-mat-badge.get-color-tokens($theme));\n }\n\n .mat-badge-accent {\n @include token-utils.create-token-values(tokens-mat-badge.$prefix,\n tokens-mat-badge.private-get-color-palette-color-tokens($theme, accent));\n }\n\n .mat-badge-warn {\n @include token-utils.create-token-values(tokens-mat-badge.$prefix,\n tokens-mat-badge.private-get-color-palette-color-tokens($theme, warn));\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-badge.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-badge.$prefix,\n tokens-mat-badge.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs density theme styles for the mat-badge.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {}\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-badge.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the badge: primary, secondary, tertiary,\n/// or error (If not specified, default error color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-badge') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mat-badge-tokens: token-utils.get-tokens-for($tokens, tokens-mat-badge.$prefix, $options...);\n @include token-utils.create-token-values(tokens-mat-badge.$prefix, $mat-badge-tokens);\n}\n","@use 'sass:color';\n@use 'sass:map';\n@use '../core/tokens/m2/mat/datepicker' as tokens-mat-datepicker;\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/tokens/token-utils';\n@use '../core/style/sass-utils';\n@use '../core/typography/typography';\n@use '../button/icon-button-theme';\n\n// TODO(crisbeto): these variables aren't used anymore and should be removed.\n$selected-today-box-shadow-width: 1px;\n$selected-fade-amount: 0.6;\n$range-fade-amount: 0.2;\n$today-fade-amount: 0.2;\n$calendar-body-font-size: 13px !default;\n$calendar-weekday-table-font-size: 11px !default;\n\n@mixin _calendar-color($theme, $palette-name) {\n $palette-color: inspection.get-theme-color($theme, $palette-name);\n $range-color: tokens-mat-datepicker.private-get-range-background-color($palette-color);\n $range-tokens: tokens-mat-datepicker.get-range-color-tokens($range-color);\n $calendar-tokens:\n tokens-mat-datepicker.private-get-calendar-color-palette-color-tokens($theme, $palette-name);\n\n @include token-utils.create-token-values(tokens-mat-datepicker.$prefix,\n map.merge($calendar-tokens, $range-tokens));\n}\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-datepicker.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-datepicker.$prefix,\n tokens-mat-datepicker.get-unthemable-tokens());\n }\n }\n}\n\n/// Outputs color theme styles for the mat-datepicker.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the main selection: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-datepicker.$prefix,\n tokens-mat-datepicker.get-color-tokens($theme));\n }\n\n .mat-datepicker-content {\n &.mat-accent {\n @include _calendar-color($theme, accent);\n }\n\n &.mat-warn {\n @include _calendar-color($theme, warn);\n }\n }\n\n .mat-datepicker-toggle-active {\n &.mat-accent {\n $accent-tokens:\n tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens($theme, accent);\n @include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $accent-tokens);\n }\n\n &.mat-warn {\n $warn-tokens:\n tokens-mat-datepicker.private-get-toggle-color-palette-color-tokens($theme, warn);\n @include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $warn-tokens);\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-datepicker.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-datepicker.$prefix,\n tokens-mat-datepicker.get-typography-tokens($theme));\n }\n }\n}\n\n@mixin date-range-colors(\n $range-color,\n $comparison-color: tokens-mat-datepicker.$private-default-comparison-color,\n $overlap-color: tokens-mat-datepicker.$private-default-overlap-color,\n $overlap-selected-color:\n tokens-mat-datepicker.private-get-default-overlap-selected-color($overlap-color)) {\n $tokens: tokens-mat-datepicker.get-range-color-tokens(\n $range-color: $range-color,\n $comparison-color: $comparison-color,\n $overlap-color: $overlap-color,\n $overlap-selected-color: $overlap-selected-color,\n );\n\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $tokens);\n }\n}\n\n/// Outputs density theme styles for the mat-datepicker.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n // TODO(crisbeto): move this into the structural styles\n // once the icon button density is switched to tokens.\n\n // Regardless of the user-passed density, we want the calendar\n // previous/next buttons to remain at density -2\n .mat-calendar-controls {\n @include icon-button-theme.density(-2);\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-datepicker.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the main selection: primary, secondary, tertiary,\n/// or error (If not specified, default primary color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-datepicker') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mat-datepicker-tokens:\n token-utils.get-tokens-for($tokens, tokens-mat-datepicker.$prefix, $options...);\n @include token-utils.create-token-values(tokens-mat-datepicker.$prefix, $mat-datepicker-tokens);\n}\n","@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/tokens/m2/mat/icon' as tokens-mat-icon;\n@use '../core/tokens/token-utils';\n@use '../core/style/sass-utils';\n\n@mixin _palette-colors($theme, $palette-name) {\n $color: inspection.get-theme-color($theme, $palette-name, text);\n $tokens: tokens-mat-icon.private-get-icon-color-tokens($color);\n @include token-utils.create-token-values(tokens-mat-icon.$prefix, $tokens);\n}\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for the mat-icon.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {}\n}\n\n/// Outputs color theme styles for the mat-icon.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the icon: primary, secondary, tertiary, or error\n/// (If not specified, default neutral color will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-icon.$prefix,\n tokens-mat-icon.get-color-tokens($theme));\n }\n\n .mat-icon {\n &.mat-primary {\n @include _palette-colors($theme, primary);\n }\n\n &.mat-accent {\n @include _palette-colors($theme, accent);\n }\n\n &.mat-warn {\n @include _palette-colors($theme, warn);\n }\n }\n }\n}\n\n/// Outputs typography theme styles for the mat-icon.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {}\n}\n\n/// Outputs density theme styles for the mat-icon.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {}\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for the mat-icon.\n/// @param {Map} $theme The theme to generate styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the icon: surface, primary, secondary, tertiary,\n/// or error (If not specified, default surface color will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-icon') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n $mat-icon-tokens: token-utils.get-tokens-for($tokens, tokens-mat-icon.$prefix, $options...);\n @include token-utils.create-token-values(tokens-mat-icon.$prefix, $mat-icon-tokens);\n}\n","@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/typography/typography';\n@use '../core/style/sass-utils';\n@use '../core/tokens/token-utils';\n@use '../core/tokens/m2/mat/stepper' as tokens-mat-stepper;\n\n/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)\n/// for mat-stepper.\n/// @param {Map} $theme The theme to generate base styles for.\n@mixin base($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));\n }\n @else {}\n}\n\n/// Outputs color theme styles for mat-stepper.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the stepper: primary, secondary,\n/// tertiary, or error (If not specified, primary color values will be used).\n@mixin color($theme, $options...) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color), $options...);\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-stepper.$prefix,\n tokens-mat-stepper.get-color-tokens($theme));\n\n .mat-step-header.mat-accent {\n @include token-utils.create-token-values(tokens-mat-stepper.$prefix,\n tokens-mat-stepper.private-get-color-palette-color-tokens($theme, accent));\n }\n\n .mat-step-header.mat-warn {\n @include token-utils.create-token-values(tokens-mat-stepper.$prefix,\n tokens-mat-stepper.private-get-color-palette-color-tokens($theme, warn));\n }\n }\n }\n}\n\n/// Outputs typography theme styles for mat-stepper.\n/// @param {Map} $theme The theme to generate typography styles for.\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-stepper.$prefix,\n tokens-mat-stepper.get-typography-tokens($theme));\n }\n }\n}\n\n/// Outputs density theme styles for mat-stepper.\n/// @param {Map} $theme The theme to generate density styles for.\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-stepper.$prefix,\n tokens-mat-stepper.get-density-tokens($theme));\n }\n }\n}\n\n/// Outputs all (base, color, typography, and density) theme styles for mat-stepper.\n/// @param {Map} $theme The theme to generate color styles for.\n/// @param {ArgList} Additional optional arguments (only supported for M3 themes):\n/// $color-variant: The color variant to use for the stepper: primary, secondary,\n/// tertiary, or error (If not specified, primary color values will be used).\n@mixin theme($theme, $options...) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-stepper') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme), $options...);\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens, $options...) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n @if ($tokens != ()) {\n $mat-stepper-tokens: token-utils.get-tokens-for(\n $tokens,\n tokens-mat-stepper.$prefix,\n $options...\n );\n @include token-utils.create-token-values(\n tokens-mat-stepper.$prefix, $mat-stepper-tokens);\n }\n}\n","@use 'sass:map';\n@use '../core/theming/theming';\n@use '../core/theming/inspection';\n@use '../core/theming/validation';\n@use '../core/typography/typography';\n@use '../core/tokens/m2/mat/toolbar' as tokens-mat-toolbar;\n@use '../core/tokens/token-utils';\n@use '../core/style/sass-utils';\n\n@mixin _palette-styles($theme, $palette-name) {\n @include token-utils.create-token-values(\n tokens-mat-toolbar.$prefix,\n tokens-mat-toolbar.private-get-color-palette-color-tokens(\n $background-color: inspection.get-theme-color($theme, $palette-name),\n $text-color: inspection.get-theme-color($theme, $palette-name, default-contrast)\n )\n );\n}\n\n@mixin base($theme) {}\n\n@mixin color($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,\n tokens-mat-toolbar.get-color-tokens($theme));\n }\n\n .mat-toolbar {\n &.mat-primary {\n @include _palette-styles($theme, primary);\n }\n\n &.mat-accent {\n @include _palette-styles($theme, accent);\n }\n\n &.mat-warn {\n @include _palette-styles($theme, warn);\n }\n }\n }\n}\n\n@mixin typography($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));\n }\n @else {\n // TODO(mmalerba): Stop calling this and resolve resulting screen diffs.\n $theme: inspection.private-get-typography-back-compat-theme($theme);\n\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,\n tokens-mat-toolbar.get-typography-tokens($theme));\n }\n }\n}\n\n@mixin density($theme) {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));\n }\n @else {\n @include sass-utils.current-selector-or-root() {\n @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,\n tokens-mat-toolbar.get-density-tokens($theme));\n }\n }\n}\n\n@mixin theme($theme) {\n @include theming.private-check-duplicate-theme-styles($theme, 'mat-toolbar') {\n @if inspection.get-theme-version($theme) == 1 {\n @include _theme-from-tokens(inspection.get-theme-tokens($theme));\n }\n @else {\n @include base($theme);\n @if inspection.theme-has($theme, color) {\n @include color($theme);\n }\n @if inspection.theme-has($theme, density) {\n @include density($theme);\n }\n @if inspection.theme-has($theme, typography) {\n @include typography($theme);\n }\n }\n }\n}\n\n@mixin _theme-from-tokens($tokens) {\n @include validation.selector-defined(\n 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');\n @if ($tokens != ()) {\n @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,\n map.get($tokens, tokens-mat-toolbar.$prefix));\n }\n}\n"],"names":[],"sourceRoot":"webpack:///","x_google_ignoreList":[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]} \ No newline at end of file diff --git a/app-v2/vendor.js b/app-v2/vendor.js new file mode 100644 index 0000000..b21c927 --- /dev/null +++ b/app-v2/vendor.js @@ -0,0 +1,155448 @@ +(self["webpackChunkegon"] = self["webpackChunkegon"] || []).push([["vendor"],{ + +/***/ 67534: +/*!*************************************************!*\ + !*** ./node_modules/bpmn-js/lib/BaseModeler.js ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BaseModeler) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var ids__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ids */ 70678); +/* harmony import */ var _BaseViewer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BaseViewer */ 8772); + + + + +/** + * A base modeler for BPMN 2.0 diagrams. + * + * Have a look at {@link Modeler} for a bundle that includes actual features. + * + * @param {Object} [options] configuration options to pass to the viewer + * @param {DOMElement} [options.container] the container to render the viewer in, defaults to body. + * @param {string|number} [options.width] the width of the viewer + * @param {string|number} [options.height] the height of the viewer + * @param {Object} [options.moddleExtensions] extension packages to provide + * @param {Array} [options.modules] a list of modules to override the default modules + * @param {Array} [options.additionalModules] a list of modules to use with the default modules + */ +function BaseModeler(options) { + _BaseViewer__WEBPACK_IMPORTED_MODULE_2__["default"].call(this, options); + + // hook ID collection into the modeler + this.on('import.parse.complete', function (event) { + if (!event.error) { + this._collectIds(event.definitions, event.elementsById); + } + }, this); + this.on('diagram.destroy', function () { + this.get('moddle').ids.clear(); + }, this); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BaseModeler, _BaseViewer__WEBPACK_IMPORTED_MODULE_2__["default"]); + +/** + * Create a moddle instance, attaching ids to it. + * + * @param {Object} options + */ +BaseModeler.prototype._createModdle = function (options) { + var moddle = _BaseViewer__WEBPACK_IMPORTED_MODULE_2__["default"].prototype._createModdle.call(this, options); + + // attach ids to moddle to be able to track + // and validated ids in the BPMN 2.0 XML document + // tree + moddle.ids = new ids__WEBPACK_IMPORTED_MODULE_1__["default"]([32, 36, 1]); + return moddle; +}; + +/** + * Collect ids processed during parsing of the + * definitions object. + * + * @param {ModdleElement} definitions + * @param {Context} context + */ +BaseModeler.prototype._collectIds = function (definitions, elementsById) { + var moddle = definitions.$model, + ids = moddle.ids, + id; + + // remove references from previous import + ids.clear(); + for (id in elementsById) { + ids.claim(id, elementsById[id]); + } +}; + +/***/ }), + +/***/ 8772: +/*!************************************************!*\ + !*** ./node_modules/bpmn-js/lib/BaseViewer.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BaseViewer) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var diagram_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js */ 93274); +/* harmony import */ var bpmn_moddle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! bpmn-moddle */ 18357); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _import_Importer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./import/Importer */ 90415); +/* harmony import */ var _util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/CompatibilityUtil */ 84720); +/* harmony import */ var _util_PoweredByUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./util/PoweredByUtil */ 49397); +/** + * The code in the area + * must not be changed. + * + * @see http://bpmn.io/license for more information. + */ + + + + + + + + + +/** + * A base viewer for BPMN 2.0 diagrams. + * + * Have a look at {@link Viewer}, {@link NavigatedViewer} or {@link Modeler} for + * bundles that include actual features. + * + * @param {Object} [options] configuration options to pass to the viewer + * @param {DOMElement} [options.container] the container to render the viewer in, defaults to body. + * @param {string|number} [options.width] the width of the viewer + * @param {string|number} [options.height] the height of the viewer + * @param {Object} [options.moddleExtensions] extension packages to provide + * @param {Array} [options.modules] a list of modules to override the default modules + * @param {Array} [options.additionalModules] a list of modules to use with the default modules + */ +function BaseViewer(options) { + options = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({}, DEFAULT_OPTIONS, options); + this._moddle = this._createModdle(options); + this._container = this._createContainer(options); + + /* */ + + addProjectLogo(this._container); + + /* */ + + this._init(this._container, this._moddle, options); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BaseViewer, diagram_js__WEBPACK_IMPORTED_MODULE_2__["default"]); + +/** +* The importXML result. +* +* @typedef {Object} ImportXMLResult +* +* @property {Array} warnings +*/ + +/** +* The importXML error. +* +* @typedef {Error} ImportXMLError +* +* @property {Array} warnings +*/ + +/** + * Parse and render a BPMN 2.0 diagram. + * + * Once finished the viewer reports back the result to the + * provided callback function with (err, warnings). + * + * ## Life-Cycle Events + * + * During import the viewer will fire life-cycle events: + * + * * import.parse.start (about to read model from xml) + * * import.parse.complete (model read; may have worked or not) + * * import.render.start (graphical import start) + * * import.render.complete (graphical import finished) + * * import.done (everything done) + * + * You can use these events to hook into the life-cycle. + * + * @param {string} xml the BPMN 2.0 xml + * @param {ModdleElement|string} [bpmnDiagram] BPMN diagram or id of diagram to render (if not provided, the first one will be rendered) + * + * Returns {Promise} + */ +BaseViewer.prototype.importXML = (0,_util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_3__.wrapForCompatibility)(function importXML(xml, bpmnDiagram) { + var self = this; + function ParseCompleteEvent(data) { + var event = self.get('eventBus').createEvent(data); + + // TODO(nikku): remove with future bpmn-js version + Object.defineProperty(event, 'context', { + enumerable: true, + get: function () { + console.warn(new Error('import.parse.complete is deprecated ' + 'and will be removed in future library versions')); + return { + warnings: data.warnings, + references: data.references, + elementsById: data.elementsById + }; + } + }); + return event; + } + return new Promise(function (resolve, reject) { + // hook in pre-parse listeners + + // allow xml manipulation + xml = self._emit('import.parse.start', { + xml: xml + }) || xml; + self._moddle.fromXML(xml, 'bpmn:Definitions').then(function (result) { + var definitions = result.rootElement; + var references = result.references; + var parseWarnings = result.warnings; + var elementsById = result.elementsById; + + // hook in post parse listeners + + // allow definitions manipulation + definitions = self._emit('import.parse.complete', ParseCompleteEvent({ + error: null, + definitions: definitions, + elementsById: elementsById, + references: references, + warnings: parseWarnings + })) || definitions; + self.importDefinitions(definitions, bpmnDiagram).then(function (result) { + var allWarnings = [].concat(parseWarnings, result.warnings || []); + self._emit('import.done', { + error: null, + warnings: allWarnings + }); + return resolve({ + warnings: allWarnings + }); + }).catch(function (err) { + var allWarnings = [].concat(parseWarnings, err.warnings || []); + self._emit('import.done', { + error: err, + warnings: allWarnings + }); + return reject(addWarningsToError(err, allWarnings)); + }); + }).catch(function (err) { + self._emit('import.parse.complete', { + error: err + }); + err = checkValidationError(err); + self._emit('import.done', { + error: err, + warnings: err.warnings + }); + return reject(err); + }); + }); +}); + +/** +* The importDefinitions result. +* +* @typedef {Object} ImportDefinitionsResult +* +* @property {Array} warnings +*/ + +/** +* The importDefinitions error. +* +* @typedef {Error} ImportDefinitionsError +* +* @property {Array} warnings +*/ + +/** + * Import parsed definitions and render a BPMN 2.0 diagram. + * + * Once finished the viewer reports back the result to the + * provided callback function with (err, warnings). + * + * ## Life-Cycle Events + * + * During import the viewer will fire life-cycle events: + * + * * import.render.start (graphical import start) + * * import.render.complete (graphical import finished) + * + * You can use these events to hook into the life-cycle. + * + * @param {ModdleElement} definitions parsed BPMN 2.0 definitions + * @param {ModdleElement|string} [bpmnDiagram] BPMN diagram or id of diagram to render (if not provided, the first one will be rendered) + * + * Returns {Promise} + */ +BaseViewer.prototype.importDefinitions = (0,_util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_3__.wrapForCompatibility)(function importDefinitions(definitions, bpmnDiagram) { + var self = this; + return new Promise(function (resolve, reject) { + self._setDefinitions(definitions); + self.open(bpmnDiagram).then(function (result) { + var warnings = result.warnings; + return resolve({ + warnings: warnings + }); + }).catch(function (err) { + return reject(err); + }); + }); +}); + +/** + * The open result. + * + * @typedef {Object} OpenResult + * + * @property {Array} warnings + */ + +/** +* The open error. +* +* @typedef {Error} OpenError +* +* @property {Array} warnings +*/ + +/** + * Open diagram of previously imported XML. + * + * Once finished the viewer reports back the result to the + * provided callback function with (err, warnings). + * + * ## Life-Cycle Events + * + * During switch the viewer will fire life-cycle events: + * + * * import.render.start (graphical import start) + * * import.render.complete (graphical import finished) + * + * You can use these events to hook into the life-cycle. + * + * @param {string|ModdleElement} [bpmnDiagramOrId] id or the diagram to open + * + * Returns {Promise} + */ +BaseViewer.prototype.open = (0,_util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_3__.wrapForCompatibility)(function open(bpmnDiagramOrId) { + var definitions = this._definitions; + var bpmnDiagram = bpmnDiagramOrId; + var self = this; + return new Promise(function (resolve, reject) { + if (!definitions) { + var err1 = new Error('no XML imported'); + return reject(addWarningsToError(err1, [])); + } + if (typeof bpmnDiagramOrId === 'string') { + bpmnDiagram = findBPMNDiagram(definitions, bpmnDiagramOrId); + if (!bpmnDiagram) { + var err2 = new Error('BPMNDiagram <' + bpmnDiagramOrId + '> not found'); + return reject(addWarningsToError(err2, [])); + } + } + + // clear existing rendered diagram + // catch synchronous exceptions during #clear() + try { + self.clear(); + } catch (error) { + return reject(addWarningsToError(error, [])); + } + + // perform graphical import + (0,_import_Importer__WEBPACK_IMPORTED_MODULE_4__.importBpmnDiagram)(self, definitions, bpmnDiagram).then(function (result) { + var warnings = result.warnings; + return resolve({ + warnings: warnings + }); + }).catch(function (err) { + return reject(err); + }); + }); +}); + +/** + * The saveXML result. + * + * @typedef {Object} SaveXMLResult + * + * @property {string} xml + */ + +/** + * Export the currently displayed BPMN 2.0 diagram as + * a BPMN 2.0 XML document. + * + * ## Life-Cycle Events + * + * During XML saving the viewer will fire life-cycle events: + * + * * saveXML.start (before serialization) + * * saveXML.serialized (after xml generation) + * * saveXML.done (everything done) + * + * You can use these events to hook into the life-cycle. + * + * @param {Object} [options] export options + * @param {boolean} [options.format=false] output formatted XML + * @param {boolean} [options.preamble=true] output preamble + * + * Returns {Promise} + */ +BaseViewer.prototype.saveXML = (0,_util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_3__.wrapForCompatibility)(function saveXML(options) { + options = options || {}; + var self = this; + var definitions = this._definitions; + return new Promise(function (resolve) { + if (!definitions) { + return resolve({ + error: new Error('no definitions loaded') + }); + } + + // allow to fiddle around with definitions + definitions = self._emit('saveXML.start', { + definitions: definitions + }) || definitions; + self._moddle.toXML(definitions, options).then(function (result) { + var xml = result.xml; + xml = self._emit('saveXML.serialized', { + xml: xml + }) || xml; + return resolve({ + xml: xml + }); + }); + }).catch(function (error) { + return { + error: error + }; + }).then(function (result) { + self._emit('saveXML.done', result); + var error = result.error; + if (error) { + return Promise.reject(error); + } + return result; + }); +}); + +/** + * The saveSVG result. + * + * @typedef {Object} SaveSVGResult + * + * @property {string} svg + */ + +/** + * Export the currently displayed BPMN 2.0 diagram as + * an SVG image. + * + * ## Life-Cycle Events + * + * During SVG saving the viewer will fire life-cycle events: + * + * * saveSVG.start (before serialization) + * * saveSVG.done (everything done) + * + * You can use these events to hook into the life-cycle. + * + * @param {Object} [options] + * + * Returns {Promise} + */ +BaseViewer.prototype.saveSVG = (0,_util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_3__.wrapForCompatibility)(function saveSVG(options) { + options = options || {}; + var self = this; + return new Promise(function (resolve, reject) { + self._emit('saveSVG.start'); + var svg, err; + try { + var canvas = self.get('canvas'); + var contentNode = canvas.getDefaultLayer(), + defsNode = (0,min_dom__WEBPACK_IMPORTED_MODULE_5__.query)('defs', canvas._svg); + var contents = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_6__.innerSVG)(contentNode), + defs = defsNode ? '' + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_6__.innerSVG)(defsNode) + '' : ''; + var bbox = contentNode.getBBox(); + svg = '\n' + '\n' + '\n' + '' + defs + contents + ''; + } catch (e) { + err = e; + } + self._emit('saveSVG.done', { + error: err, + svg: svg + }); + if (!err) { + return resolve({ + svg: svg + }); + } + return reject(err); + }); +}); + +/** + * Get a named diagram service. + * + * @example + * + * var elementRegistry = viewer.get('elementRegistry'); + * var startEventShape = elementRegistry.get('StartEvent_1'); + * + * @param {string} name + * + * @return {Object} diagram service instance + * + * @method BaseViewer#get + */ + +/** + * Invoke a function in the context of this viewer. + * + * @example + * + * viewer.invoke(function(elementRegistry) { + * var startEventShape = elementRegistry.get('StartEvent_1'); + * }); + * + * @param {Function} fn to be invoked + * + * @return {Object} the functions return value + * + * @method BaseViewer#invoke + */ + +BaseViewer.prototype._setDefinitions = function (definitions) { + this._definitions = definitions; +}; +BaseViewer.prototype.getModules = function () { + return this._modules; +}; + +/** + * Remove all drawn elements from the viewer. + * + * After calling this method the viewer can still + * be reused for opening another diagram. + * + * @method BaseViewer#clear + */ +BaseViewer.prototype.clear = function () { + if (!this.getDefinitions()) { + // no diagram to clear + return; + } + + // remove businessObject#di binding + // + // this is necessary, as we establish the bindings + // in the BpmnTreeWalker (and assume none are given + // on reimport) + this.get('elementRegistry').forEach(function (element) { + var bo = element.businessObject; + if (bo && bo.di) { + delete bo.di; + } + }); + + // remove drawn elements + diagram_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype.clear.call(this); +}; + +/** + * Destroy the viewer instance and remove all its + * remainders from the document tree. + */ +BaseViewer.prototype.destroy = function () { + // diagram destroy + diagram_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype.destroy.call(this); + + // dom detach + (0,min_dom__WEBPACK_IMPORTED_MODULE_5__.remove)(this._container); +}; + +/** + * Register an event listener + * + * Remove a previously added listener via {@link #off(event, callback)}. + * + * @param {string} event + * @param {number} [priority] + * @param {Function} callback + * @param {Object} [that] + */ +BaseViewer.prototype.on = function (event, priority, callback, target) { + return this.get('eventBus').on(event, priority, callback, target); +}; + +/** + * De-register an event listener + * + * @param {string} event + * @param {Function} callback + */ +BaseViewer.prototype.off = function (event, callback) { + this.get('eventBus').off(event, callback); +}; +BaseViewer.prototype.attachTo = function (parentNode) { + if (!parentNode) { + throw new Error('parentNode required'); + } + + // ensure we detach from the + // previous, old parent + this.detach(); + + // unwrap jQuery if provided + if (parentNode.get && parentNode.constructor.prototype.jquery) { + parentNode = parentNode.get(0); + } + if (typeof parentNode === 'string') { + parentNode = (0,min_dom__WEBPACK_IMPORTED_MODULE_5__.query)(parentNode); + } + parentNode.appendChild(this._container); + this._emit('attach', {}); + this.get('canvas').resized(); +}; +BaseViewer.prototype.getDefinitions = function () { + return this._definitions; +}; +BaseViewer.prototype.detach = function () { + var container = this._container, + parentNode = container.parentNode; + if (!parentNode) { + return; + } + this._emit('detach', {}); + parentNode.removeChild(container); +}; +BaseViewer.prototype._init = function (container, moddle, options) { + var baseModules = options.modules || this.getModules(), + additionalModules = options.additionalModules || [], + staticModules = [{ + bpmnjs: ['value', this], + moddle: ['value', moddle] + }]; + var diagramModules = [].concat(staticModules, baseModules, additionalModules); + var diagramOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.omit)(options, ['additionalModules']), { + canvas: (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({}, options.canvas, { + container: container + }), + modules: diagramModules + }); + + // invoke diagram constructor + diagram_js__WEBPACK_IMPORTED_MODULE_2__["default"].call(this, diagramOptions); + if (options && options.container) { + this.attachTo(options.container); + } +}; + +/** + * Emit an event on the underlying {@link EventBus} + * + * @param {string} type + * @param {Object} event + * + * @return {Object} event processing result (if any) + */ +BaseViewer.prototype._emit = function (type, event) { + return this.get('eventBus').fire(type, event); +}; +BaseViewer.prototype._createContainer = function (options) { + var container = (0,min_dom__WEBPACK_IMPORTED_MODULE_5__.domify)('

'); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(container.style, { + width: ensureUnit(options.width), + height: ensureUnit(options.height), + position: options.position + }); + return container; +}; +BaseViewer.prototype._createModdle = function (options) { + var moddleOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({}, this._moddleExtensions, options.moddleExtensions); + return new bpmn_moddle__WEBPACK_IMPORTED_MODULE_7__["default"](moddleOptions); +}; +BaseViewer.prototype._modules = []; + +// helpers /////////////// + +function addWarningsToError(err, warningsAry) { + err.warnings = warningsAry; + return err; +} +function checkValidationError(err) { + // check if we can help the user by indicating wrong BPMN 2.0 xml + // (in case he or the exporting tool did not get that right) + + var pattern = /unparsable content <([^>]+)> detected([\s\S]*)$/; + var match = pattern.exec(err.message); + if (match) { + err.message = 'unparsable content <' + match[1] + '> detected; ' + 'this may indicate an invalid BPMN 2.0 diagram file' + match[2]; + } + return err; +} +var DEFAULT_OPTIONS = { + width: '100%', + height: '100%', + position: 'relative' +}; + +/** + * Ensure the passed argument is a proper unit (defaulting to px) + */ +function ensureUnit(val) { + return val + ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isNumber)(val) ? 'px' : ''); +} + +/** + * Find BPMNDiagram in definitions by ID + * + * @param {ModdleElement} definitions + * @param {string} diagramId + * + * @return {ModdleElement|null} + */ +function findBPMNDiagram(definitions, diagramId) { + if (!diagramId) { + return null; + } + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(definitions.diagrams, function (element) { + return element.id === diagramId; + }) || null; +} + +/* */ + + + + +/** + * Adds the project logo to the diagram container as + * required by the bpmn.io license. + * + * @see http://bpmn.io/license + * + * @param {Element} container + */ +function addProjectLogo(container) { + var img = _util_PoweredByUtil__WEBPACK_IMPORTED_MODULE_8__.BPMNIO_IMG; + var linkMarkup = '' + img + ''; + var linkElement = (0,min_dom__WEBPACK_IMPORTED_MODULE_5__.domify)(linkMarkup); + container.appendChild(linkElement); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(linkElement, 'click', function (event) { + (0,_util_PoweredByUtil__WEBPACK_IMPORTED_MODULE_8__.open)(); + event.preventDefault(); + }); +} + +/* */ + +/***/ }), + +/***/ 47377: +/*!*********************************************!*\ + !*** ./node_modules/bpmn-js/lib/Modeler.js ***! + \*********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Modeler) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _BaseModeler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BaseModeler */ 67534); +/* harmony import */ var _Viewer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Viewer */ 32589); +/* harmony import */ var _NavigatedViewer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NavigatedViewer */ 8948); +/* harmony import */ var diagram_js_lib_navigation_keyboard_move__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/navigation/keyboard-move */ 9612); +/* harmony import */ var diagram_js_lib_navigation_movecanvas__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/navigation/movecanvas */ 26962); +/* harmony import */ var diagram_js_lib_navigation_touch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! diagram-js/lib/navigation/touch */ 16342); +/* harmony import */ var diagram_js_lib_navigation_zoomscroll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! diagram-js/lib/navigation/zoomscroll */ 8901); +/* harmony import */ var diagram_js_lib_features_align_elements__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! diagram-js/lib/features/align-elements */ 81765); +/* harmony import */ var _features_auto_place__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./features/auto-place */ 36873); +/* harmony import */ var _features_auto_resize__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./features/auto-resize */ 65110); +/* harmony import */ var diagram_js_lib_features_auto_scroll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! diagram-js/lib/features/auto-scroll */ 69231); +/* harmony import */ var diagram_js_lib_features_bendpoints__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! diagram-js/lib/features/bendpoints */ 31068); +/* harmony import */ var diagram_js_lib_features_connect__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! diagram-js/lib/features/connect */ 60262); +/* harmony import */ var diagram_js_lib_features_connection_preview__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! diagram-js/lib/features/connection-preview */ 54205); +/* harmony import */ var _features_context_pad__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./features/context-pad */ 41687); +/* harmony import */ var _features_copy_paste__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./features/copy-paste */ 82375); +/* harmony import */ var diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! diagram-js/lib/features/create */ 48256); +/* harmony import */ var _features_distribute_elements__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./features/distribute-elements */ 86815); +/* harmony import */ var _features_editor_actions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./features/editor-actions */ 9323); +/* harmony import */ var _features_grid_snapping__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./features/grid-snapping */ 22791); +/* harmony import */ var _features_interaction_events__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./features/interaction-events */ 69382); +/* harmony import */ var _features_keyboard__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./features/keyboard */ 6581); +/* harmony import */ var diagram_js_lib_features_keyboard_move_selection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! diagram-js/lib/features/keyboard-move-selection */ 22030); +/* harmony import */ var _features_label_editing__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./features/label-editing */ 62511); +/* harmony import */ var _features_modeling__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./features/modeling */ 35959); +/* harmony import */ var diagram_js_lib_features_move__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! diagram-js/lib/features/move */ 74569); +/* harmony import */ var _features_palette__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./features/palette */ 57763); +/* harmony import */ var _features_replace_preview__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./features/replace-preview */ 47353); +/* harmony import */ var diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! diagram-js/lib/features/resize */ 40844); +/* harmony import */ var _features_snapping__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./features/snapping */ 49652); +/* harmony import */ var _features_search__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./features/search */ 51652); +/* harmony import */ var _util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/CompatibilityUtil */ 84720); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +var initialDiagram = '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + ''; + +/** + * A modeler for BPMN 2.0 diagrams. + * + * + * ## Extending the Modeler + * + * In order to extend the viewer pass extension modules to bootstrap via the + * `additionalModules` option. An extension module is an object that exposes + * named services. + * + * The following example depicts the integration of a simple + * logging component that integrates with interaction events: + * + * + * ```javascript + * + * // logging component + * function InteractionLogger(eventBus) { + * eventBus.on('element.hover', function(event) { + * console.log() + * }) + * } + * + * InteractionLogger.$inject = [ 'eventBus' ]; // minification save + * + * // extension module + * var extensionModule = { + * __init__: [ 'interactionLogger' ], + * interactionLogger: [ 'type', InteractionLogger ] + * }; + * + * // extend the viewer + * var bpmnModeler = new Modeler({ additionalModules: [ extensionModule ] }); + * bpmnModeler.importXML(...); + * ``` + * + * + * ## Customizing / Replacing Components + * + * You can replace individual diagram components by redefining them in override modules. + * This works for all components, including those defined in the core. + * + * Pass in override modules via the `options.additionalModules` flag like this: + * + * ```javascript + * function CustomContextPadProvider(contextPad) { + * + * contextPad.registerProvider(this); + * + * this.getContextPadEntries = function(element) { + * // no entries, effectively disable the context pad + * return {}; + * }; + * } + * + * CustomContextPadProvider.$inject = [ 'contextPad' ]; + * + * var overrideModule = { + * contextPadProvider: [ 'type', CustomContextPadProvider ] + * }; + * + * var bpmnModeler = new Modeler({ additionalModules: [ overrideModule ]}); + * ``` + * + * @param {Object} [options] configuration options to pass to the viewer + * @param {DOMElement} [options.container] the container to render the viewer in, defaults to body. + * @param {string|number} [options.width] the width of the viewer + * @param {string|number} [options.height] the height of the viewer + * @param {Object} [options.moddleExtensions] extension packages to provide + * @param {Array} [options.modules] a list of modules to override the default modules + * @param {Array} [options.additionalModules] a list of modules to use with the default modules + */ +function Modeler(options) { + _BaseModeler__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, options); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(Modeler, _BaseModeler__WEBPACK_IMPORTED_MODULE_1__["default"]); +Modeler.Viewer = _Viewer__WEBPACK_IMPORTED_MODULE_2__["default"]; +Modeler.NavigatedViewer = _NavigatedViewer__WEBPACK_IMPORTED_MODULE_3__["default"]; + +/** +* The createDiagram result. +* +* @typedef {Object} CreateDiagramResult +* +* @property {Array} warnings +*/ + +/** +* The createDiagram error. +* +* @typedef {Error} CreateDiagramError +* +* @property {Array} warnings +*/ + +/** + * Create a new diagram to start modeling. + * + * Returns {Promise} + */ +Modeler.prototype.createDiagram = (0,_util_CompatibilityUtil__WEBPACK_IMPORTED_MODULE_4__.wrapForCompatibility)(function createDiagram() { + return this.importXML(initialDiagram); +}); +Modeler.prototype._interactionModules = [ +// non-modeling components +diagram_js_lib_navigation_keyboard_move__WEBPACK_IMPORTED_MODULE_5__["default"], diagram_js_lib_navigation_movecanvas__WEBPACK_IMPORTED_MODULE_6__["default"], diagram_js_lib_navigation_touch__WEBPACK_IMPORTED_MODULE_7__["default"], diagram_js_lib_navigation_zoomscroll__WEBPACK_IMPORTED_MODULE_8__["default"]]; +Modeler.prototype._modelingModules = [ +// modeling components +diagram_js_lib_features_align_elements__WEBPACK_IMPORTED_MODULE_9__["default"], _features_auto_place__WEBPACK_IMPORTED_MODULE_10__["default"], diagram_js_lib_features_auto_scroll__WEBPACK_IMPORTED_MODULE_11__["default"], _features_auto_resize__WEBPACK_IMPORTED_MODULE_12__["default"], diagram_js_lib_features_bendpoints__WEBPACK_IMPORTED_MODULE_13__["default"], diagram_js_lib_features_connect__WEBPACK_IMPORTED_MODULE_14__["default"], diagram_js_lib_features_connection_preview__WEBPACK_IMPORTED_MODULE_15__["default"], _features_context_pad__WEBPACK_IMPORTED_MODULE_16__["default"], _features_copy_paste__WEBPACK_IMPORTED_MODULE_17__["default"], diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_18__["default"], _features_distribute_elements__WEBPACK_IMPORTED_MODULE_19__["default"], _features_editor_actions__WEBPACK_IMPORTED_MODULE_20__["default"], _features_grid_snapping__WEBPACK_IMPORTED_MODULE_21__["default"], _features_interaction_events__WEBPACK_IMPORTED_MODULE_22__["default"], _features_keyboard__WEBPACK_IMPORTED_MODULE_23__["default"], diagram_js_lib_features_keyboard_move_selection__WEBPACK_IMPORTED_MODULE_24__["default"], _features_label_editing__WEBPACK_IMPORTED_MODULE_25__["default"], _features_modeling__WEBPACK_IMPORTED_MODULE_26__["default"], diagram_js_lib_features_move__WEBPACK_IMPORTED_MODULE_27__["default"], _features_palette__WEBPACK_IMPORTED_MODULE_28__["default"], _features_replace_preview__WEBPACK_IMPORTED_MODULE_29__["default"], diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_30__["default"], _features_snapping__WEBPACK_IMPORTED_MODULE_31__["default"], _features_search__WEBPACK_IMPORTED_MODULE_32__["default"]]; + +// modules the modeler is composed of +// +// - viewer modules +// - interaction modules +// - modeling modules + +Modeler.prototype._modules = [].concat(_Viewer__WEBPACK_IMPORTED_MODULE_2__["default"].prototype._modules, Modeler.prototype._interactionModules, Modeler.prototype._modelingModules); + +/***/ }), + +/***/ 8948: +/*!*****************************************************!*\ + !*** ./node_modules/bpmn-js/lib/NavigatedViewer.js ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ NavigatedViewer) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Viewer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Viewer */ 32589); +/* harmony import */ var diagram_js_lib_navigation_keyboard_move__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/navigation/keyboard-move */ 9612); +/* harmony import */ var diagram_js_lib_navigation_movecanvas__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/navigation/movecanvas */ 26962); +/* harmony import */ var diagram_js_lib_navigation_zoomscroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/navigation/zoomscroll */ 8901); + + + + + + +/** + * A viewer that includes mouse navigation facilities + * + * @param {Object} options + */ +function NavigatedViewer(options) { + _Viewer__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, options); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(NavigatedViewer, _Viewer__WEBPACK_IMPORTED_MODULE_1__["default"]); +NavigatedViewer.prototype._navigationModules = [diagram_js_lib_navigation_keyboard_move__WEBPACK_IMPORTED_MODULE_2__["default"], diagram_js_lib_navigation_movecanvas__WEBPACK_IMPORTED_MODULE_3__["default"], diagram_js_lib_navigation_zoomscroll__WEBPACK_IMPORTED_MODULE_4__["default"]]; +NavigatedViewer.prototype._modules = [].concat(_Viewer__WEBPACK_IMPORTED_MODULE_1__["default"].prototype._modules, NavigatedViewer.prototype._navigationModules); + +/***/ }), + +/***/ 32589: +/*!********************************************!*\ + !*** ./node_modules/bpmn-js/lib/Viewer.js ***! + \********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Viewer) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./core */ 85971); +/* harmony import */ var diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/i18n/translate */ 3933); +/* harmony import */ var diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/features/selection */ 26334); +/* harmony import */ var diagram_js_lib_features_overlays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/features/overlays */ 4541); +/* harmony import */ var _BaseViewer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BaseViewer */ 8772); + + + + + + + +/** + * A viewer for BPMN 2.0 diagrams. + * + * Have a look at {@link NavigatedViewer} or {@link Modeler} for bundles that include + * additional features. + * + * + * ## Extending the Viewer + * + * In order to extend the viewer pass extension modules to bootstrap via the + * `additionalModules` option. An extension module is an object that exposes + * named services. + * + * The following example depicts the integration of a simple + * logging component that integrates with interaction events: + * + * + * ```javascript + * + * // logging component + * function InteractionLogger(eventBus) { + * eventBus.on('element.hover', function(event) { + * console.log() + * }) + * } + * + * InteractionLogger.$inject = [ 'eventBus' ]; // minification save + * + * // extension module + * var extensionModule = { + * __init__: [ 'interactionLogger' ], + * interactionLogger: [ 'type', InteractionLogger ] + * }; + * + * // extend the viewer + * var bpmnViewer = new Viewer({ additionalModules: [ extensionModule ] }); + * bpmnViewer.importXML(...); + * ``` + * + * @param {Object} [options] configuration options to pass to the viewer + * @param {DOMElement} [options.container] the container to render the viewer in, defaults to body. + * @param {string|number} [options.width] the width of the viewer + * @param {string|number} [options.height] the height of the viewer + * @param {Object} [options.moddleExtensions] extension packages to provide + * @param {Array} [options.modules] a list of modules to override the default modules + * @param {Array} [options.additionalModules] a list of modules to use with the default modules + */ +function Viewer(options) { + _BaseViewer__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, options); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(Viewer, _BaseViewer__WEBPACK_IMPORTED_MODULE_1__["default"]); + +// modules the viewer is composed of +Viewer.prototype._modules = [_core__WEBPACK_IMPORTED_MODULE_2__["default"], diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_3__["default"], diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_4__["default"], diagram_js_lib_features_overlays__WEBPACK_IMPORTED_MODULE_5__["default"]]; + +// default moddle extensions the viewer is composed of +Viewer.prototype._moddleExtensions = {}; + +/***/ }), + +/***/ 85971: +/*!************************************************!*\ + !*** ./node_modules/bpmn-js/lib/core/index.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../draw */ 14334); +/* harmony import */ var _import__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../import */ 57733); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_draw__WEBPACK_IMPORTED_MODULE_0__["default"], _import__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 31637: +/*!*********************************************************!*\ + !*** ./node_modules/bpmn-js/lib/draw/BpmnRenderUtil.js ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getCirclePath: () => (/* binding */ getCirclePath), +/* harmony export */ getDi: () => (/* binding */ getDi), +/* harmony export */ getDiamondPath: () => (/* binding */ getDiamondPath), +/* harmony export */ getFillColor: () => (/* binding */ getFillColor), +/* harmony export */ getLabelColor: () => (/* binding */ getLabelColor), +/* harmony export */ getRectPath: () => (/* binding */ getRectPath), +/* harmony export */ getRoundRectPath: () => (/* binding */ getRoundRectPath), +/* harmony export */ getSemantic: () => (/* binding */ getSemantic), +/* harmony export */ getStrokeColor: () => (/* binding */ getStrokeColor), +/* harmony export */ isCollection: () => (/* binding */ isCollection), +/* harmony export */ isThrowEvent: () => (/* binding */ isThrowEvent), +/* harmony export */ isTypedEvent: () => (/* binding */ isTypedEvent) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/util/RenderUtil */ 96546); + + + +// element utils ////////////////////// + +/** + * Checks if eventDefinition of the given element matches with semantic type. + * + * @return {boolean} true if element is of the given semantic type + */ +function isTypedEvent(event, eventDefinitionType, filter) { + function matches(definition, filter) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.every)(filter, function (val, key) { + // we want a == conversion here, to be able to catch + // undefined == false and friends + /* jshint -W116 */ + return definition[key] == val; + }); + } + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.some)(event.eventDefinitions, function (definition) { + return definition.$type === eventDefinitionType && matches(event, filter); + }); +} +function isThrowEvent(event) { + return event.$type === 'bpmn:IntermediateThrowEvent' || event.$type === 'bpmn:EndEvent'; +} +function isCollection(element) { + var dataObject = element.dataObjectRef; + return element.isCollection || dataObject && dataObject.isCollection; +} +function getDi(element) { + return element.businessObject.di; +} +function getSemantic(element) { + return element.businessObject; +} + +// color access ////////////////////// + +function getFillColor(element, defaultColor) { + var di = getDi(element); + return di.get('color:background-color') || di.get('bioc:fill') || defaultColor || 'white'; +} +function getStrokeColor(element, defaultColor) { + var di = getDi(element); + return di.get('color:border-color') || di.get('bioc:stroke') || defaultColor || 'black'; +} +function getLabelColor(element, defaultColor, defaultStrokeColor) { + var di = getDi(element), + label = di.get('label'); + return label && label.get('color:color') || defaultColor || getStrokeColor(element, defaultStrokeColor); +} + +// cropping path customizations ////////////////////// + +function getCirclePath(shape) { + var cx = shape.x + shape.width / 2, + cy = shape.y + shape.height / 2, + radius = shape.width / 2; + var circlePath = [['M', cx, cy], ['m', 0, -radius], ['a', radius, radius, 0, 1, 1, 0, 2 * radius], ['a', radius, radius, 0, 1, 1, 0, -2 * radius], ['z']]; + return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_1__.componentsToPath)(circlePath); +} +function getRoundRectPath(shape, borderRadius) { + var x = shape.x, + y = shape.y, + width = shape.width, + height = shape.height; + var roundRectPath = [['M', x + borderRadius, y], ['l', width - borderRadius * 2, 0], ['a', borderRadius, borderRadius, 0, 0, 1, borderRadius, borderRadius], ['l', 0, height - borderRadius * 2], ['a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, borderRadius], ['l', borderRadius * 2 - width, 0], ['a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, -borderRadius], ['l', 0, borderRadius * 2 - height], ['a', borderRadius, borderRadius, 0, 0, 1, borderRadius, -borderRadius], ['z']]; + return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_1__.componentsToPath)(roundRectPath); +} +function getDiamondPath(shape) { + var width = shape.width, + height = shape.height, + x = shape.x, + y = shape.y, + halfWidth = width / 2, + halfHeight = height / 2; + var diamondPath = [['M', x + halfWidth, y], ['l', halfWidth, halfHeight], ['l', -halfWidth, halfHeight], ['l', -halfWidth, -halfHeight], ['z']]; + return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_1__.componentsToPath)(diamondPath); +} +function getRectPath(shape) { + var x = shape.x, + y = shape.y, + width = shape.width, + height = shape.height; + var rectPath = [['M', x, y], ['l', width, 0], ['l', 0, height], ['l', -width, 0], ['z']]; + return (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_1__.componentsToPath)(rectPath); +} + +/***/ }), + +/***/ 44250: +/*!*******************************************************!*\ + !*** ./node_modules/bpmn-js/lib/draw/BpmnRenderer.js ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnRenderer) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_draw_BaseRenderer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/draw/BaseRenderer */ 14694); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../util/DiUtil */ 55441); +/* harmony import */ var _features_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../features/label-editing/LabelUtil */ 89497); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/util/RenderUtil */ 96546); +/* harmony import */ var _BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BpmnRenderUtil */ 31637); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! diagram-js/lib/util/SvgTransformUtil */ 81384); +/* harmony import */ var ids__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ids */ 70678); + + + + + + + + + + + + +var RENDERER_IDS = new ids__WEBPACK_IMPORTED_MODULE_1__["default"](); +var TASK_BORDER_RADIUS = 10; +var INNER_OUTER_DIST = 3; +var DEFAULT_FILL_OPACITY = .95, + HIGH_FILL_OPACITY = .35; +var ELEMENT_LABEL_DISTANCE = 10; +function BpmnRenderer(config, eventBus, styles, pathMap, canvas, textRenderer, priority) { + diagram_js_lib_draw_BaseRenderer__WEBPACK_IMPORTED_MODULE_2__["default"].call(this, eventBus, priority); + var defaultFillColor = config && config.defaultFillColor, + defaultStrokeColor = config && config.defaultStrokeColor, + defaultLabelColor = config && config.defaultLabelColor; + var rendererId = RENDERER_IDS.next(); + var markers = {}; + var computeStyle = styles.computeStyle; + function addMarker(id, options) { + var attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({ + fill: 'black', + strokeWidth: 1, + strokeLinecap: 'round', + strokeDasharray: 'none' + }, options.attrs); + var ref = options.ref || { + x: 0, + y: 0 + }; + var scale = options.scale || 1; + + // fix for safari / chrome / firefox bug not correctly + // resetting stroke dash array + if (attrs.strokeDasharray === 'none') { + attrs.strokeDasharray = [10000, 1]; + } + var marker = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('marker'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(options.element, attrs); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(marker, options.element); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(marker, { + id: id, + viewBox: '0 0 20 20', + refX: ref.x, + refY: ref.y, + markerWidth: 20 * scale, + markerHeight: 20 * scale, + orient: 'auto' + }); + var defs = (0,min_dom__WEBPACK_IMPORTED_MODULE_5__.query)('defs', canvas._svg); + if (!defs) { + defs = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('defs'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(canvas._svg, defs); + } + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(defs, marker); + markers[id] = marker; + } + function colorEscape(str) { + // only allow characters and numbers + return str.replace(/[^0-9a-zA-z]+/g, '_'); + } + function marker(type, fill, stroke) { + var id = type + '-' + colorEscape(fill) + '-' + colorEscape(stroke) + '-' + rendererId; + if (!markers[id]) { + createMarker(id, type, fill, stroke); + } + return 'url(#' + id + ')'; + } + function createMarker(id, type, fill, stroke) { + if (type === 'sequenceflow-end') { + var sequenceflowEnd = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(sequenceflowEnd, { + d: 'M 1 5 L 11 10 L 1 15 Z' + }); + addMarker(id, { + element: sequenceflowEnd, + ref: { + x: 11, + y: 10 + }, + scale: 0.5, + attrs: { + fill: stroke, + stroke: stroke + } + }); + } + if (type === 'messageflow-start') { + var messageflowStart = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('circle'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(messageflowStart, { + cx: 6, + cy: 6, + r: 3.5 + }); + addMarker(id, { + element: messageflowStart, + attrs: { + fill: fill, + stroke: stroke + }, + ref: { + x: 6, + y: 6 + } + }); + } + if (type === 'messageflow-end') { + var messageflowEnd = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(messageflowEnd, { + d: 'm 1 5 l 0 -3 l 7 3 l -7 3 z' + }); + addMarker(id, { + element: messageflowEnd, + attrs: { + fill: fill, + stroke: stroke, + strokeLinecap: 'butt' + }, + ref: { + x: 8.5, + y: 5 + } + }); + } + if (type === 'association-start') { + var associationStart = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(associationStart, { + d: 'M 11 5 L 1 10 L 11 15' + }); + addMarker(id, { + element: associationStart, + attrs: { + fill: 'none', + stroke: stroke, + strokeWidth: 1.5 + }, + ref: { + x: 1, + y: 10 + }, + scale: 0.5 + }); + } + if (type === 'association-end') { + var associationEnd = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(associationEnd, { + d: 'M 1 5 L 11 10 L 1 15' + }); + addMarker(id, { + element: associationEnd, + attrs: { + fill: 'none', + stroke: stroke, + strokeWidth: 1.5 + }, + ref: { + x: 12, + y: 10 + }, + scale: 0.5 + }); + } + if (type === 'conditional-flow-marker') { + var conditionalflowMarker = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(conditionalflowMarker, { + d: 'M 0 10 L 8 6 L 16 10 L 8 14 Z' + }); + addMarker(id, { + element: conditionalflowMarker, + attrs: { + fill: fill, + stroke: stroke + }, + ref: { + x: -1, + y: 10 + }, + scale: 0.5 + }); + } + if (type === 'conditional-default-flow-marker') { + var conditionaldefaultflowMarker = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(conditionaldefaultflowMarker, { + d: 'M 6 4 L 10 16' + }); + addMarker(id, { + element: conditionaldefaultflowMarker, + attrs: { + stroke: stroke + }, + ref: { + x: 0, + y: 10 + }, + scale: 0.5 + }); + } + } + function drawCircle(parentGfx, width, height, offset, attrs) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isObject)(offset)) { + attrs = offset; + offset = 0; + } + offset = offset || 0; + attrs = computeStyle(attrs, { + stroke: 'black', + strokeWidth: 2, + fill: 'white' + }); + if (attrs.fill === 'none') { + delete attrs.fillOpacity; + } + var cx = width / 2, + cy = height / 2; + var circle = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('circle'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(circle, { + cx: cx, + cy: cy, + r: Math.round((width + height) / 4 - offset) + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(circle, attrs); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(parentGfx, circle); + return circle; + } + function drawRect(parentGfx, width, height, r, offset, attrs) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isObject)(offset)) { + attrs = offset; + offset = 0; + } + offset = offset || 0; + attrs = computeStyle(attrs, { + stroke: 'black', + strokeWidth: 2, + fill: 'white' + }); + var rect = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('rect'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(rect, { + x: offset, + y: offset, + width: width - offset * 2, + height: height - offset * 2, + rx: r, + ry: r + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(rect, attrs); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(parentGfx, rect); + return rect; + } + function drawDiamond(parentGfx, width, height, attrs) { + var x_2 = width / 2; + var y_2 = height / 2; + var points = [{ + x: x_2, + y: 0 + }, { + x: width, + y: y_2 + }, { + x: x_2, + y: height + }, { + x: 0, + y: y_2 + }]; + var pointsString = points.map(function (point) { + return point.x + ',' + point.y; + }).join(' '); + attrs = computeStyle(attrs, { + stroke: 'black', + strokeWidth: 2, + fill: 'white' + }); + var polygon = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('polygon'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(polygon, { + points: pointsString + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(polygon, attrs); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(parentGfx, polygon); + return polygon; + } + function drawLine(parentGfx, waypoints, attrs) { + attrs = computeStyle(attrs, ['no-fill'], { + stroke: 'black', + strokeWidth: 2, + fill: 'none' + }); + var line = (0,diagram_js_lib_util_RenderUtil__WEBPACK_IMPORTED_MODULE_6__.createLine)(waypoints, attrs); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(parentGfx, line); + return line; + } + function drawPath(parentGfx, d, attrs) { + attrs = computeStyle(attrs, ['no-fill'], { + strokeWidth: 2, + stroke: 'black' + }); + var path = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(path, { + d: d + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(path, attrs); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(parentGfx, path); + return path; + } + function drawMarker(type, parentGfx, path, attrs) { + return drawPath(parentGfx, path, (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({ + 'data-marker': type + }, attrs)); + } + function as(type) { + return function (parentGfx, element) { + return handlers[type](parentGfx, element); + }; + } + function renderer(type) { + return handlers[type]; + } + function renderEventContent(element, parentGfx) { + var event = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element); + var isThrowing = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isThrowEvent)(event); + if (event.eventDefinitions && event.eventDefinitions.length > 1) { + if (event.parallelMultiple) { + return renderer('bpmn:ParallelMultipleEventDefinition')(parentGfx, element, isThrowing); + } else { + return renderer('bpmn:MultipleEventDefinition')(parentGfx, element, isThrowing); + } + } + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isTypedEvent)(event, 'bpmn:MessageEventDefinition')) { + return renderer('bpmn:MessageEventDefinition')(parentGfx, element, isThrowing); + } + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isTypedEvent)(event, 'bpmn:TimerEventDefinition')) { + return renderer('bpmn:TimerEventDefinition')(parentGfx, element, isThrowing); + } + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isTypedEvent)(event, 'bpmn:ConditionalEventDefinition')) { + return renderer('bpmn:ConditionalEventDefinition')(parentGfx, element); + } + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isTypedEvent)(event, 'bpmn:SignalEventDefinition')) { + return renderer('bpmn:SignalEventDefinition')(parentGfx, element, isThrowing); + } + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isTypedEvent)(event, 'bpmn:EscalationEventDefinition')) { + return renderer('bpmn:EscalationEventDefinition')(parentGfx, element, isThrowing); + } + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isTypedEvent)(event, 'bpmn:LinkEventDefinition')) { + return renderer('bpmn:LinkEventDefinition')(parentGfx, element, isThrowing); + } + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isTypedEvent)(event, 'bpmn:ErrorEventDefinition')) { + return renderer('bpmn:ErrorEventDefinition')(parentGfx, element, isThrowing); + } + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isTypedEvent)(event, 'bpmn:CancelEventDefinition')) { + return renderer('bpmn:CancelEventDefinition')(parentGfx, element, isThrowing); + } + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isTypedEvent)(event, 'bpmn:CompensateEventDefinition')) { + return renderer('bpmn:CompensateEventDefinition')(parentGfx, element, isThrowing); + } + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isTypedEvent)(event, 'bpmn:TerminateEventDefinition')) { + return renderer('bpmn:TerminateEventDefinition')(parentGfx, element, isThrowing); + } + return null; + } + function renderLabel(parentGfx, label, options) { + options = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({ + size: { + width: 100 + } + }, options); + var text = textRenderer.createText(label || '', options); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.classes)(text).add('djs-label'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(parentGfx, text); + return text; + } + function renderEmbeddedLabel(parentGfx, element, align) { + var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element); + return renderLabel(parentGfx, semantic.name, { + box: element, + align: align, + padding: 5, + style: { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getLabelColor)(element, defaultLabelColor, defaultStrokeColor) + } + }); + } + function renderExternalLabel(parentGfx, element) { + var box = { + width: 90, + height: 30, + x: element.width / 2 + element.x, + y: element.height / 2 + element.y + }; + return renderLabel(parentGfx, (0,_features_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_8__.getLabel)(element), { + box: box, + fitBox: true, + style: (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({}, textRenderer.getExternalStyle(), { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getLabelColor)(element, defaultLabelColor, defaultStrokeColor) + }) + }); + } + function renderLaneLabel(parentGfx, text, element) { + var textBox = renderLabel(parentGfx, text, { + box: { + height: 30, + width: element.height + }, + align: 'center-middle', + style: { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getLabelColor)(element, defaultLabelColor, defaultStrokeColor) + } + }); + var top = -1 * element.height; + (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_9__.transform)(textBox, 0, -top, 270); + } + function createPathFromConnection(connection) { + var waypoints = connection.waypoints; + var pathData = 'm ' + waypoints[0].x + ',' + waypoints[0].y; + for (var i = 1; i < waypoints.length; i++) { + pathData += 'L' + waypoints[i].x + ',' + waypoints[i].y + ' '; + } + return pathData; + } + var handlers = this.handlers = { + 'bpmn:Event': function (parentGfx, element, attrs) { + if (!('fillOpacity' in attrs)) { + attrs.fillOpacity = DEFAULT_FILL_OPACITY; + } + return drawCircle(parentGfx, element.width, element.height, attrs); + }, + 'bpmn:StartEvent': function (parentGfx, element) { + var attrs = { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }; + var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element); + if (!semantic.isInterrupting) { + attrs = { + strokeDasharray: '6', + strokeLinecap: 'round', + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }; + } + var circle = renderer('bpmn:Event')(parentGfx, element, attrs); + renderEventContent(element, parentGfx); + return circle; + }, + 'bpmn:MessageEventDefinition': function (parentGfx, element, isThrowing) { + var pathData = pathMap.getScaledPath('EVENT_MESSAGE', { + xScaleFactor: 0.9, + yScaleFactor: 0.9, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.235, + my: 0.315 + } + }); + var fill = isThrowing ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor); + var stroke = isThrowing ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor) : (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor); + var messagePath = drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: fill, + stroke: stroke + }); + return messagePath; + }, + 'bpmn:TimerEventDefinition': function (parentGfx, element) { + var circle = drawCircle(parentGfx, element.width, element.height, 0.2 * element.height, { + strokeWidth: 2, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + var pathData = pathMap.getScaledPath('EVENT_TIMER_WH', { + xScaleFactor: 0.75, + yScaleFactor: 0.75, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.5, + my: 0.5 + } + }); + drawPath(parentGfx, pathData, { + strokeWidth: 2, + strokeLinecap: 'square', + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + for (var i = 0; i < 12; i++) { + var linePathData = pathMap.getScaledPath('EVENT_TIMER_LINE', { + xScaleFactor: 0.75, + yScaleFactor: 0.75, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.5, + my: 0.5 + } + }); + var width = element.width / 2; + var height = element.height / 2; + drawPath(parentGfx, linePathData, { + strokeWidth: 1, + strokeLinecap: 'square', + transform: 'rotate(' + i * 30 + ',' + height + ',' + width + ')', + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + } + return circle; + }, + 'bpmn:EscalationEventDefinition': function (parentGfx, event, isThrowing) { + var pathData = pathMap.getScaledPath('EVENT_ESCALATION', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: event.width, + containerHeight: event.height, + position: { + mx: 0.5, + my: 0.2 + } + }); + var fill = isThrowing ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) : 'none'; + return drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: fill, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) + }); + }, + 'bpmn:ConditionalEventDefinition': function (parentGfx, event) { + var pathData = pathMap.getScaledPath('EVENT_CONDITIONAL', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: event.width, + containerHeight: event.height, + position: { + mx: 0.5, + my: 0.222 + } + }); + return drawPath(parentGfx, pathData, { + strokeWidth: 1, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) + }); + }, + 'bpmn:LinkEventDefinition': function (parentGfx, event, isThrowing) { + var pathData = pathMap.getScaledPath('EVENT_LINK', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: event.width, + containerHeight: event.height, + position: { + mx: 0.57, + my: 0.263 + } + }); + var fill = isThrowing ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) : 'none'; + return drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: fill, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) + }); + }, + 'bpmn:ErrorEventDefinition': function (parentGfx, event, isThrowing) { + var pathData = pathMap.getScaledPath('EVENT_ERROR', { + xScaleFactor: 1.1, + yScaleFactor: 1.1, + containerWidth: event.width, + containerHeight: event.height, + position: { + mx: 0.2, + my: 0.722 + } + }); + var fill = isThrowing ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) : 'none'; + return drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: fill, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) + }); + }, + 'bpmn:CancelEventDefinition': function (parentGfx, event, isThrowing) { + var pathData = pathMap.getScaledPath('EVENT_CANCEL_45', { + xScaleFactor: 1.0, + yScaleFactor: 1.0, + containerWidth: event.width, + containerHeight: event.height, + position: { + mx: 0.638, + my: -0.055 + } + }); + var fill = isThrowing ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) : 'none'; + var path = drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: fill, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) + }); + (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_9__.rotate)(path, 45); + return path; + }, + 'bpmn:CompensateEventDefinition': function (parentGfx, event, isThrowing) { + var pathData = pathMap.getScaledPath('EVENT_COMPENSATION', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: event.width, + containerHeight: event.height, + position: { + mx: 0.22, + my: 0.5 + } + }); + var fill = isThrowing ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) : 'none'; + return drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: fill, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) + }); + }, + 'bpmn:SignalEventDefinition': function (parentGfx, event, isThrowing) { + var pathData = pathMap.getScaledPath('EVENT_SIGNAL', { + xScaleFactor: 0.9, + yScaleFactor: 0.9, + containerWidth: event.width, + containerHeight: event.height, + position: { + mx: 0.5, + my: 0.2 + } + }); + var fill = isThrowing ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) : 'none'; + return drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: fill, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) + }); + }, + 'bpmn:MultipleEventDefinition': function (parentGfx, event, isThrowing) { + var pathData = pathMap.getScaledPath('EVENT_MULTIPLE', { + xScaleFactor: 1.1, + yScaleFactor: 1.1, + containerWidth: event.width, + containerHeight: event.height, + position: { + mx: 0.222, + my: 0.36 + } + }); + var fill = isThrowing ? (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) : 'none'; + return drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: fill + }); + }, + 'bpmn:ParallelMultipleEventDefinition': function (parentGfx, event) { + var pathData = pathMap.getScaledPath('EVENT_PARALLEL_MULTIPLE', { + xScaleFactor: 1.2, + yScaleFactor: 1.2, + containerWidth: event.width, + containerHeight: event.height, + position: { + mx: 0.458, + my: 0.194 + } + }); + return drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(event, defaultStrokeColor) + }); + }, + 'bpmn:EndEvent': function (parentGfx, element) { + var circle = renderer('bpmn:Event')(parentGfx, element, { + strokeWidth: 4, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + renderEventContent(element, parentGfx, true); + return circle; + }, + 'bpmn:TerminateEventDefinition': function (parentGfx, element) { + var circle = drawCircle(parentGfx, element.width, element.height, 8, { + strokeWidth: 4, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return circle; + }, + 'bpmn:IntermediateEvent': function (parentGfx, element) { + var outer = renderer('bpmn:Event')(parentGfx, element, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + + /* inner */ + drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, 'none'), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + renderEventContent(element, parentGfx); + return outer; + }, + 'bpmn:IntermediateCatchEvent': as('bpmn:IntermediateEvent'), + 'bpmn:IntermediateThrowEvent': as('bpmn:IntermediateEvent'), + 'bpmn:Activity': function (parentGfx, element, attrs) { + attrs = attrs || {}; + if (!('fillOpacity' in attrs)) { + attrs.fillOpacity = DEFAULT_FILL_OPACITY; + } + return drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, attrs); + }, + 'bpmn:Task': function (parentGfx, element) { + var attrs = { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }; + var rect = renderer('bpmn:Activity')(parentGfx, element, attrs); + renderEmbeddedLabel(parentGfx, element, 'center-middle'); + attachTaskMarkers(parentGfx, element); + return rect; + }, + 'bpmn:ServiceTask': function (parentGfx, element) { + var task = renderer('bpmn:Task')(parentGfx, element); + var pathDataBG = pathMap.getScaledPath('TASK_TYPE_SERVICE', { + abspos: { + x: 12, + y: 18 + } + }); + + /* service bg */ + drawPath(parentGfx, pathDataBG, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + var fillPathData = pathMap.getScaledPath('TASK_TYPE_SERVICE_FILL', { + abspos: { + x: 17.2, + y: 18 + } + }); + + /* service fill */ + drawPath(parentGfx, fillPathData, { + strokeWidth: 0, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor) + }); + var pathData = pathMap.getScaledPath('TASK_TYPE_SERVICE', { + abspos: { + x: 17, + y: 22 + } + }); + + /* service */ + drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return task; + }, + 'bpmn:UserTask': function (parentGfx, element) { + var task = renderer('bpmn:Task')(parentGfx, element); + var x = 15; + var y = 12; + var pathData = pathMap.getScaledPath('TASK_TYPE_USER_1', { + abspos: { + x: x, + y: y + } + }); + + /* user path */ + drawPath(parentGfx, pathData, { + strokeWidth: 0.5, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + var pathData2 = pathMap.getScaledPath('TASK_TYPE_USER_2', { + abspos: { + x: x, + y: y + } + }); + + /* user2 path */ + drawPath(parentGfx, pathData2, { + strokeWidth: 0.5, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + var pathData3 = pathMap.getScaledPath('TASK_TYPE_USER_3', { + abspos: { + x: x, + y: y + } + }); + + /* user3 path */ + drawPath(parentGfx, pathData3, { + strokeWidth: 0.5, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return task; + }, + 'bpmn:ManualTask': function (parentGfx, element) { + var task = renderer('bpmn:Task')(parentGfx, element); + var pathData = pathMap.getScaledPath('TASK_TYPE_MANUAL', { + abspos: { + x: 17, + y: 15 + } + }); + + /* manual path */ + drawPath(parentGfx, pathData, { + strokeWidth: 0.5, + // 0.25, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return task; + }, + 'bpmn:SendTask': function (parentGfx, element) { + var task = renderer('bpmn:Task')(parentGfx, element); + var pathData = pathMap.getScaledPath('TASK_TYPE_SEND', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: 21, + containerHeight: 14, + position: { + mx: 0.285, + my: 0.357 + } + }); + + /* send path */ + drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor) + }); + return task; + }, + 'bpmn:ReceiveTask': function (parentGfx, element) { + var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element); + var task = renderer('bpmn:Task')(parentGfx, element); + var pathData; + if (semantic.instantiate) { + drawCircle(parentGfx, 28, 28, 20 * 0.22, { + strokeWidth: 1 + }); + pathData = pathMap.getScaledPath('TASK_TYPE_INSTANTIATING_SEND', { + abspos: { + x: 7.77, + y: 9.52 + } + }); + } else { + pathData = pathMap.getScaledPath('TASK_TYPE_SEND', { + xScaleFactor: 0.9, + yScaleFactor: 0.9, + containerWidth: 21, + containerHeight: 14, + position: { + mx: 0.3, + my: 0.4 + } + }); + } + + /* receive path */ + drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return task; + }, + 'bpmn:ScriptTask': function (parentGfx, element) { + var task = renderer('bpmn:Task')(parentGfx, element); + var pathData = pathMap.getScaledPath('TASK_TYPE_SCRIPT', { + abspos: { + x: 15, + y: 20 + } + }); + + /* script path */ + drawPath(parentGfx, pathData, { + strokeWidth: 1, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return task; + }, + 'bpmn:BusinessRuleTask': function (parentGfx, element) { + var task = renderer('bpmn:Task')(parentGfx, element); + var headerPathData = pathMap.getScaledPath('TASK_TYPE_BUSINESS_RULE_HEADER', { + abspos: { + x: 8, + y: 8 + } + }); + var businessHeaderPath = drawPath(parentGfx, headerPathData); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(businessHeaderPath, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, '#aaaaaa'), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + var headerData = pathMap.getScaledPath('TASK_TYPE_BUSINESS_RULE_MAIN', { + abspos: { + x: 8, + y: 8 + } + }); + var businessPath = drawPath(parentGfx, headerData); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(businessPath, { + strokeWidth: 1, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return task; + }, + 'bpmn:SubProcess': function (parentGfx, element, attrs) { + attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({ + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }, attrs); + var rect = renderer('bpmn:Activity')(parentGfx, element, attrs); + var expanded = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isExpanded)(element); + if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isEventSubProcess)(element)) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(rect, { + strokeDasharray: '1,2' + }); + } + renderEmbeddedLabel(parentGfx, element, expanded ? 'center-top' : 'center-middle'); + if (expanded) { + attachTaskMarkers(parentGfx, element); + } else { + attachTaskMarkers(parentGfx, element, ['SubProcessMarker']); + } + return rect; + }, + 'bpmn:AdHocSubProcess': function (parentGfx, element) { + return renderer('bpmn:SubProcess')(parentGfx, element); + }, + 'bpmn:Transaction': function (parentGfx, element) { + var outer = renderer('bpmn:SubProcess')(parentGfx, element); + var innerAttrs = styles.style(['no-fill', 'no-events'], { + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + + /* inner path */ + drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS - 2, INNER_OUTER_DIST, innerAttrs); + return outer; + }, + 'bpmn:CallActivity': function (parentGfx, element) { + return renderer('bpmn:SubProcess')(parentGfx, element, { + strokeWidth: 5 + }); + }, + 'bpmn:Participant': function (parentGfx, element) { + var attrs = { + fillOpacity: DEFAULT_FILL_OPACITY, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }; + var lane = renderer('bpmn:Lane')(parentGfx, element, attrs); + var expandedPool = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_10__.isExpanded)(element); + if (expandedPool) { + drawLine(parentGfx, [{ + x: 30, + y: 0 + }, { + x: 30, + y: element.height + }], { + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + var text = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element).name; + renderLaneLabel(parentGfx, text, element); + } else { + // Collapsed pool draw text inline + var text2 = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element).name; + renderLabel(parentGfx, text2, { + box: element, + align: 'center-middle', + style: { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getLabelColor)(element, defaultLabelColor, defaultStrokeColor) + } + }); + } + var participantMultiplicity = !!(0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element).participantMultiplicity; + if (participantMultiplicity) { + renderer('ParticipantMultiplicityMarker')(parentGfx, element); + } + return lane; + }, + 'bpmn:Lane': function (parentGfx, element, attrs) { + var rect = drawRect(parentGfx, element.width, element.height, 0, (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({ + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + fillOpacity: HIGH_FILL_OPACITY, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }, attrs)); + var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element); + if (semantic.$type === 'bpmn:Lane') { + var text = semantic.name; + renderLaneLabel(parentGfx, text, element); + } + return rect; + }, + 'bpmn:InclusiveGateway': function (parentGfx, element) { + var diamond = renderer('bpmn:Gateway')(parentGfx, element); + + /* circle path */ + drawCircle(parentGfx, element.width, element.height, element.height * 0.24, { + strokeWidth: 2.5, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return diamond; + }, + 'bpmn:ExclusiveGateway': function (parentGfx, element) { + var diamond = renderer('bpmn:Gateway')(parentGfx, element); + var pathData = pathMap.getScaledPath('GATEWAY_EXCLUSIVE', { + xScaleFactor: 0.4, + yScaleFactor: 0.4, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.32, + my: 0.3 + } + }); + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getDi)(element).isMarkerVisible) { + drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + } + return diamond; + }, + 'bpmn:ComplexGateway': function (parentGfx, element) { + var diamond = renderer('bpmn:Gateway')(parentGfx, element); + var pathData = pathMap.getScaledPath('GATEWAY_COMPLEX', { + xScaleFactor: 0.5, + yScaleFactor: 0.5, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.46, + my: 0.26 + } + }); + + /* complex path */ + drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return diamond; + }, + 'bpmn:ParallelGateway': function (parentGfx, element) { + var diamond = renderer('bpmn:Gateway')(parentGfx, element); + var pathData = pathMap.getScaledPath('GATEWAY_PARALLEL', { + xScaleFactor: 0.6, + yScaleFactor: 0.6, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.46, + my: 0.2 + } + }); + + /* parallel path */ + drawPath(parentGfx, pathData, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return diamond; + }, + 'bpmn:EventBasedGateway': function (parentGfx, element) { + var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element); + var diamond = renderer('bpmn:Gateway')(parentGfx, element); + + /* outer circle path */ + drawCircle(parentGfx, element.width, element.height, element.height * 0.20, { + strokeWidth: 1, + fill: 'none', + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + var type = semantic.eventGatewayType; + var instantiate = !!semantic.instantiate; + function drawEvent() { + var pathData = pathMap.getScaledPath('GATEWAY_EVENT_BASED', { + xScaleFactor: 0.18, + yScaleFactor: 0.18, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.36, + my: 0.44 + } + }); + var attrs = { + strokeWidth: 2, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, 'none'), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }; + + /* event path */ + drawPath(parentGfx, pathData, attrs); + } + if (type === 'Parallel') { + var pathData = pathMap.getScaledPath('GATEWAY_PARALLEL', { + xScaleFactor: 0.4, + yScaleFactor: 0.4, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.474, + my: 0.296 + } + }); + var parallelPath = drawPath(parentGfx, pathData); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(parallelPath, { + strokeWidth: 1, + fill: 'none' + }); + } else if (type === 'Exclusive') { + if (!instantiate) { + var innerCircle = drawCircle(parentGfx, element.width, element.height, element.height * 0.26); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(innerCircle, { + strokeWidth: 1, + fill: 'none', + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + } + drawEvent(); + } + return diamond; + }, + 'bpmn:Gateway': function (parentGfx, element) { + var attrs = { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + fillOpacity: DEFAULT_FILL_OPACITY, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }; + return drawDiamond(parentGfx, element.width, element.height, attrs); + }, + 'bpmn:SequenceFlow': function (parentGfx, element) { + var pathData = createPathFromConnection(element); + var fill = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor); + var attrs = { + strokeLinejoin: 'round', + markerEnd: marker('sequenceflow-end', fill, stroke), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }; + var path = drawPath(parentGfx, pathData, attrs); + var sequenceFlow = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element); + var source; + if (element.source) { + source = element.source.businessObject; + + // conditional flow marker + if (sequenceFlow.conditionExpression && source.$instanceOf('bpmn:Activity')) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(path, { + markerStart: marker('conditional-flow-marker', fill, stroke) + }); + } + + // default marker + if (source.default && (source.$instanceOf('bpmn:Gateway') || source.$instanceOf('bpmn:Activity')) && source.default === sequenceFlow) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(path, { + markerStart: marker('conditional-default-flow-marker', fill, stroke) + }); + } + } + return path; + }, + 'bpmn:Association': function (parentGfx, element, attrs) { + var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element); + var fill = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor); + attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({ + strokeDasharray: '0.5, 5', + strokeLinecap: 'round', + strokeLinejoin: 'round', + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }, attrs || {}); + if (semantic.associationDirection === 'One' || semantic.associationDirection === 'Both') { + attrs.markerEnd = marker('association-end', fill, stroke); + } + if (semantic.associationDirection === 'Both') { + attrs.markerStart = marker('association-start', fill, stroke); + } + return drawLine(parentGfx, element.waypoints, attrs); + }, + 'bpmn:DataInputAssociation': function (parentGfx, element) { + var fill = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor); + return renderer('bpmn:Association')(parentGfx, element, { + markerEnd: marker('association-end', fill, stroke) + }); + }, + 'bpmn:DataOutputAssociation': function (parentGfx, element) { + var fill = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor); + return renderer('bpmn:Association')(parentGfx, element, { + markerEnd: marker('association-end', fill, stroke) + }); + }, + 'bpmn:MessageFlow': function (parentGfx, element) { + var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element), + di = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getDi)(element); + var fill = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor); + var pathData = createPathFromConnection(element); + var attrs = { + markerEnd: marker('messageflow-end', fill, stroke), + markerStart: marker('messageflow-start', fill, stroke), + strokeDasharray: '10, 12', + strokeLinecap: 'round', + strokeLinejoin: 'round', + strokeWidth: '1.5px', + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }; + var path = drawPath(parentGfx, pathData, attrs); + if (semantic.messageRef) { + var midPoint = path.getPointAtLength(path.getTotalLength() / 2); + var markerPathData = pathMap.getScaledPath('MESSAGE_FLOW_MARKER', { + abspos: { + x: midPoint.x, + y: midPoint.y + } + }); + var messageAttrs = { + strokeWidth: 1 + }; + if (di.messageVisibleKind === 'initiating') { + messageAttrs.fill = 'white'; + messageAttrs.stroke = 'black'; + } else { + messageAttrs.fill = '#888'; + messageAttrs.stroke = 'white'; + } + var message = drawPath(parentGfx, markerPathData, messageAttrs); + var labelText = semantic.messageRef.name; + var label = renderLabel(parentGfx, labelText, { + align: 'center-top', + fitBox: true, + style: { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultLabelColor, defaultStrokeColor) + } + }); + var messageBounds = message.getBBox(), + labelBounds = label.getBBox(); + var translateX = midPoint.x - labelBounds.width / 2, + translateY = midPoint.y + messageBounds.height / 2 + ELEMENT_LABEL_DISTANCE; + (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_9__.transform)(label, translateX, translateY, 0); + } + return path; + }, + 'bpmn:DataObject': function (parentGfx, element) { + var pathData = pathMap.getScaledPath('DATA_OBJECT_PATH', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.474, + my: 0.296 + } + }); + var elementObject = drawPath(parentGfx, pathData, { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + fillOpacity: DEFAULT_FILL_OPACITY, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element); + if ((0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.isCollection)(semantic)) { + renderDataItemCollection(parentGfx, element); + } + return elementObject; + }, + 'bpmn:DataObjectReference': as('bpmn:DataObject'), + 'bpmn:DataInput': function (parentGfx, element) { + var arrowPathData = pathMap.getRawPath('DATA_ARROW'); + + // page + var elementObject = renderer('bpmn:DataObject')(parentGfx, element); + + /* input arrow path */ + drawPath(parentGfx, arrowPathData, { + strokeWidth: 1 + }); + return elementObject; + }, + 'bpmn:DataOutput': function (parentGfx, element) { + var arrowPathData = pathMap.getRawPath('DATA_ARROW'); + + // page + var elementObject = renderer('bpmn:DataObject')(parentGfx, element); + + /* output arrow path */ + drawPath(parentGfx, arrowPathData, { + strokeWidth: 1, + fill: 'black' + }); + return elementObject; + }, + 'bpmn:DataStoreReference': function (parentGfx, element) { + var DATA_STORE_PATH = pathMap.getScaledPath('DATA_STORE', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0, + my: 0.133 + } + }); + var elementStore = drawPath(parentGfx, DATA_STORE_PATH, { + strokeWidth: 2, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + fillOpacity: DEFAULT_FILL_OPACITY, + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + return elementStore; + }, + 'bpmn:BoundaryEvent': function (parentGfx, element) { + var semantic = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element), + cancel = semantic.cancelActivity; + var attrs = { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }; + if (!cancel) { + attrs.strokeDasharray = '6'; + attrs.strokeLinecap = 'round'; + } + + // apply fillOpacity + var outerAttrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({}, attrs, { + fillOpacity: 1 + }); + + // apply no-fill + var innerAttrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({}, attrs, { + fill: 'none' + }); + var outer = renderer('bpmn:Event')(parentGfx, element, outerAttrs); + + /* inner path */ + drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, innerAttrs); + renderEventContent(element, parentGfx); + return outer; + }, + 'bpmn:Group': function (parentGfx, element) { + var group = drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, { + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor), + strokeWidth: 1, + strokeDasharray: '8,3,1,3', + fill: 'none', + pointerEvents: 'none' + }); + return group; + }, + 'label': function (parentGfx, element) { + return renderExternalLabel(parentGfx, element); + }, + 'bpmn:TextAnnotation': function (parentGfx, element) { + var style = { + 'fill': 'none', + 'stroke': 'none' + }; + var textElement = drawRect(parentGfx, element.width, element.height, 0, 0, style); + var textPathData = pathMap.getScaledPath('TEXT_ANNOTATION', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.0, + my: 0.0 + } + }); + drawPath(parentGfx, textPathData, { + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + var text = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element).text || ''; + renderLabel(parentGfx, text, { + box: element, + align: 'left-top', + padding: 5, + style: { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getLabelColor)(element, defaultLabelColor, defaultStrokeColor) + } + }); + return textElement; + }, + 'ParticipantMultiplicityMarker': function (parentGfx, element) { + var markerPath = pathMap.getScaledPath('MARKER_PARALLEL', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: element.width / 2 / element.width, + my: (element.height - 15) / element.height + } + }); + drawMarker('participant-multiplicity', parentGfx, markerPath, { + strokeWidth: 2, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + }, + 'SubProcessMarker': function (parentGfx, element) { + var markerRect = drawRect(parentGfx, 14, 14, 0, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + + // Process marker is placed in the middle of the box + // therefore fixed values can be used here + (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_9__.translate)(markerRect, element.width / 2 - 7.5, element.height - 20); + var markerPath = pathMap.getScaledPath('MARKER_SUB_PROCESS', { + xScaleFactor: 1.5, + yScaleFactor: 1.5, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: (element.width / 2 - 7.5) / element.width, + my: (element.height - 20) / element.height + } + }); + drawMarker('sub-process', parentGfx, markerPath, { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + }, + 'ParallelMarker': function (parentGfx, element, position) { + var markerPath = pathMap.getScaledPath('MARKER_PARALLEL', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: (element.width / 2 + position.parallel) / element.width, + my: (element.height - 20) / element.height + } + }); + drawMarker('parallel', parentGfx, markerPath, { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + }, + 'SequentialMarker': function (parentGfx, element, position) { + var markerPath = pathMap.getScaledPath('MARKER_SEQUENTIAL', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: (element.width / 2 + position.seq) / element.width, + my: (element.height - 19) / element.height + } + }); + drawMarker('sequential', parentGfx, markerPath, { + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + }, + 'CompensationMarker': function (parentGfx, element, position) { + var markerMath = pathMap.getScaledPath('MARKER_COMPENSATION', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: (element.width / 2 + position.compensation) / element.width, + my: (element.height - 13) / element.height + } + }); + drawMarker('compensation', parentGfx, markerMath, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + }, + 'LoopMarker': function (parentGfx, element, position) { + var markerPath = pathMap.getScaledPath('MARKER_LOOP', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: (element.width / 2 + position.loop) / element.width, + my: (element.height - 7) / element.height + } + }); + drawMarker('loop', parentGfx, markerPath, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getFillColor)(element, defaultFillColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor), + strokeLinecap: 'round', + strokeMiterlimit: 0.5 + }); + }, + 'AdhocMarker': function (parentGfx, element, position) { + var markerPath = pathMap.getScaledPath('MARKER_ADHOC', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: (element.width / 2 + position.adhoc) / element.width, + my: (element.height - 15) / element.height + } + }); + drawMarker('adhoc', parentGfx, markerPath, { + strokeWidth: 1, + fill: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor), + stroke: (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getStrokeColor)(element, defaultStrokeColor) + }); + } + }; + function attachTaskMarkers(parentGfx, element, taskMarkers) { + var obj = (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getSemantic)(element); + var subprocess = taskMarkers && taskMarkers.indexOf('SubProcessMarker') !== -1; + var position; + if (subprocess) { + position = { + seq: -21, + parallel: -22, + compensation: -42, + loop: -18, + adhoc: 10 + }; + } else { + position = { + seq: -3, + parallel: -6, + compensation: -27, + loop: 0, + adhoc: 10 + }; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(taskMarkers, function (marker) { + renderer(marker)(parentGfx, element, position); + }); + if (obj.isForCompensation) { + renderer('CompensationMarker')(parentGfx, element, position); + } + if (obj.$type === 'bpmn:AdHocSubProcess') { + renderer('AdhocMarker')(parentGfx, element, position); + } + var loopCharacteristics = obj.loopCharacteristics, + isSequential = loopCharacteristics && loopCharacteristics.isSequential; + if (loopCharacteristics) { + if (isSequential === undefined) { + renderer('LoopMarker')(parentGfx, element, position); + } + if (isSequential === false) { + renderer('ParallelMarker')(parentGfx, element, position); + } + if (isSequential === true) { + renderer('SequentialMarker')(parentGfx, element, position); + } + } + } + function renderDataItemCollection(parentGfx, element) { + var yPosition = (element.height - 18) / element.height; + var pathData = pathMap.getScaledPath('DATA_OBJECT_COLLECTION_PATH', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.33, + my: yPosition + } + }); + + /* collection path */ + drawPath(parentGfx, pathData, { + strokeWidth: 2 + }); + } + + // extension API, use at your own risk + this._drawPath = drawPath; +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnRenderer, diagram_js_lib_draw_BaseRenderer__WEBPACK_IMPORTED_MODULE_2__["default"]); +BpmnRenderer.$inject = ['config.bpmnRenderer', 'eventBus', 'styles', 'pathMap', 'canvas', 'textRenderer']; +BpmnRenderer.prototype.canRender = function (element) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_11__.is)(element, 'bpmn:BaseElement'); +}; +BpmnRenderer.prototype.drawShape = function (parentGfx, element) { + var type = element.type; + var h = this.handlers[type]; + + /* jshint -W040 */ + return h(parentGfx, element); +}; +BpmnRenderer.prototype.drawConnection = function (parentGfx, element) { + var type = element.type; + var h = this.handlers[type]; + + /* jshint -W040 */ + return h(parentGfx, element); +}; +BpmnRenderer.prototype.getShapePath = function (element) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_11__.is)(element, 'bpmn:Event')) { + return (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getCirclePath)(element); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_11__.is)(element, 'bpmn:Activity')) { + return (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getRoundRectPath)(element, TASK_BORDER_RADIUS); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_11__.is)(element, 'bpmn:Gateway')) { + return (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getDiamondPath)(element); + } + return (0,_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_7__.getRectPath)(element); +}; + +/***/ }), + +/***/ 56089: +/*!**************************************************!*\ + !*** ./node_modules/bpmn-js/lib/draw/PathMap.js ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ PathMap) +/* harmony export */ }); +/** + * Map containing SVG paths needed by BpmnRenderer. + */ + +function PathMap() { + /** + * Contains a map of path elements + * + *

Path definition

+ * A parameterized path is defined like this: + *
+   * 'GATEWAY_PARALLEL': {
+   *   d: 'm {mx},{my} {e.x0},0 0,{e.x1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +
+          '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',
+   *   height: 17.5,
+   *   width:  17.5,
+   *   heightElements: [2.5, 7.5],
+   *   widthElements: [2.5, 7.5]
+   * }
+   * 
+ *

It's important to specify a correct height and width for the path as the scaling + * is based on the ratio between the specified height and width in this object and the + * height and width that is set as scale target (Note x,y coordinates will be scaled with + * individual ratios).

+ *

The 'heightElements' and 'widthElements' array must contain the values that will be scaled. + * The scaling is based on the computed ratios. + * Coordinates on the y axis should be in the heightElement's array, they will be scaled using + * the computed ratio coefficient. + * In the parameterized path the scaled values can be accessed through the 'e' object in {} brackets. + *

    + *
  • The values for the y axis can be accessed in the path string using {e.y0}, {e.y1}, ....
  • + *
  • The values for the x axis can be accessed in the path string using {e.x0}, {e.x1}, ....
  • + *
+ * The numbers x0, x1 respectively y0, y1, ... map to the corresponding array index. + *

+ */ + this.pathMap = { + 'EVENT_MESSAGE': { + d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}', + height: 36, + width: 36, + heightElements: [6, 14], + widthElements: [10.5, 21] + }, + 'EVENT_SIGNAL': { + d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z', + height: 36, + width: 36, + heightElements: [18], + widthElements: [10, 20] + }, + 'EVENT_ESCALATION': { + d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z', + height: 36, + width: 36, + heightElements: [20, 7], + widthElements: [8] + }, + 'EVENT_CONDITIONAL': { + d: 'M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z ' + 'M {e.x2},{e.y3} l {e.x0},0 ' + 'M {e.x2},{e.y4} l {e.x0},0 ' + 'M {e.x2},{e.y5} l {e.x0},0 ' + 'M {e.x2},{e.y6} l {e.x0},0 ' + 'M {e.x2},{e.y7} l {e.x0},0 ' + 'M {e.x2},{e.y8} l {e.x0},0 ', + height: 36, + width: 36, + heightElements: [8.5, 14.5, 18, 11.5, 14.5, 17.5, 20.5, 23.5, 26.5], + widthElements: [10.5, 14.5, 12.5] + }, + 'EVENT_LINK': { + d: 'm {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z', + height: 36, + width: 36, + heightElements: [4.4375, 6.75, 7.8125], + widthElements: [9.84375, 13.5] + }, + 'EVENT_ERROR': { + d: 'm {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z', + height: 36, + width: 36, + heightElements: [0.023, 8.737, 8.151, 16.564, 10.591, 8.714], + widthElements: [0.085, 6.672, 6.97, 4.273, 5.337, 6.636] + }, + 'EVENT_CANCEL_45': { + d: 'm {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 ' + '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z', + height: 36, + width: 36, + heightElements: [4.75, 8.5], + widthElements: [4.75, 8.5] + }, + 'EVENT_COMPENSATION': { + d: 'm {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z', + height: 36, + width: 36, + heightElements: [6.5, 13, 0.4, 6.1], + widthElements: [9, 9.3, 8.7] + }, + 'EVENT_TIMER_WH': { + d: 'M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ', + height: 36, + width: 36, + heightElements: [10, 2], + widthElements: [3, 7] + }, + 'EVENT_TIMER_LINE': { + d: 'M {mx},{my} ' + 'm {e.x0},{e.y0} l -{e.x1},{e.y1} ', + height: 36, + width: 36, + heightElements: [10, 3], + widthElements: [0, 0] + }, + 'EVENT_MULTIPLE': { + d: 'm {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z', + height: 36, + width: 36, + heightElements: [6.28099, 12.56199], + widthElements: [3.1405, 9.42149, 12.56198] + }, + 'EVENT_PARALLEL_MULTIPLE': { + d: 'm {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' + '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z', + height: 36, + width: 36, + heightElements: [2.56228, 7.68683], + widthElements: [2.56228, 7.68683] + }, + 'GATEWAY_EXCLUSIVE': { + d: 'm {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} ' + '{e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} ' + '{e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z', + height: 17.5, + width: 17.5, + heightElements: [8.5, 6.5312, -6.5312, -8.5], + widthElements: [6.5, -6.5, 3, -3, 5, -5] + }, + 'GATEWAY_PARALLEL': { + d: 'm {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 ' + '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z', + height: 30, + width: 30, + heightElements: [5, 12.5], + widthElements: [5, 12.5] + }, + 'GATEWAY_EVENT_BASED': { + d: 'm {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z', + height: 11, + width: 11, + heightElements: [-6, 6, 12, -12], + widthElements: [9, -3, -12] + }, + 'GATEWAY_COMPLEX': { + d: 'm {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} ' + '{e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} ' + '{e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} ' + '-{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z', + height: 17.125, + width: 17.125, + heightElements: [4.875, 3.4375, 2.125, 3], + widthElements: [3.4375, 2.125, 4.875, 3] + }, + 'DATA_OBJECT_PATH': { + d: 'm 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0', + height: 61, + width: 51, + heightElements: [10, 50, 60], + widthElements: [10, 40, 50, 60] + }, + 'DATA_OBJECT_COLLECTION_PATH': { + d: 'm{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10', + height: 10, + width: 10, + heightElements: [], + widthElements: [] + }, + 'DATA_ARROW': { + d: 'm 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z', + height: 61, + width: 51, + heightElements: [], + widthElements: [] + }, + 'DATA_STORE': { + d: 'm {mx},{my} ' + 'l 0,{e.y2} ' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 ' + 'l 0,-{e.y2} ' + 'c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 ' + 'm -{e.x2},{e.y0}' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0' + 'm -{e.x2},{e.y0}' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0', + height: 61, + width: 61, + heightElements: [7, 10, 45], + widthElements: [2, 58, 60] + }, + 'TEXT_ANNOTATION': { + d: 'm {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0', + height: 30, + width: 10, + heightElements: [30], + widthElements: [10] + }, + 'MARKER_SUB_PROCESS': { + d: 'm{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0', + height: 10, + width: 10, + heightElements: [], + widthElements: [] + }, + 'MARKER_PARALLEL': { + d: 'm{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10', + height: 10, + width: 10, + heightElements: [], + widthElements: [] + }, + 'MARKER_SEQUENTIAL': { + d: 'm{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0', + height: 10, + width: 10, + heightElements: [], + widthElements: [] + }, + 'MARKER_COMPENSATION': { + d: 'm {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z', + height: 10, + width: 21, + heightElements: [], + widthElements: [] + }, + 'MARKER_LOOP': { + d: 'm {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 ' + '-6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 ' + '0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 ' + 'l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902', + height: 13.9, + width: 13.7, + heightElements: [], + widthElements: [] + }, + 'MARKER_ADHOC': { + d: 'm {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 ' + '3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 ' + '1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 ' + '-3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 ' + '-2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z', + height: 4, + width: 15, + heightElements: [], + widthElements: [] + }, + 'TASK_TYPE_SEND': { + d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}', + height: 14, + width: 21, + heightElements: [6, 14], + widthElements: [10.5, 21] + }, + 'TASK_TYPE_SCRIPT': { + d: 'm {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 ' + 'c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z ' + 'm -7,-12 l 5,0 ' + 'm -4.5,3 l 4.5,0 ' + 'm -3,3 l 5,0' + 'm -4,3 l 5,0', + height: 15, + width: 12.6, + heightElements: [6, 14], + widthElements: [10.5, 21] + }, + 'TASK_TYPE_USER_1': { + d: 'm {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 ' + '-4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 ' + '0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 ' + 'h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 z' + 'm -8,6 l 0,5.5 m 11,0 l 0,-5' + }, + 'TASK_TYPE_USER_2': { + d: 'm {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 ' + '-2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 ' + }, + 'TASK_TYPE_USER_3': { + d: 'm {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 ' + '4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 ' + '-4.20799998,3.36699999 -4.20699998,4.34799999 z' + }, + 'TASK_TYPE_MANUAL': { + d: 'm {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 ' + '-0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 ' + '0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 ' + '-1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 ' + '0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 ' + '-10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 ' + '2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 ' + '-0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 ' + '-1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 ' + '-0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 ' + '0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 ' + '-5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z' + }, + 'TASK_TYPE_INSTANTIATING_SEND': { + d: 'm {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6' + }, + 'TASK_TYPE_SERVICE': { + d: 'm {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 ' + '0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 ' + '-1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 ' + 'v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 ' + '-0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 ' + '-1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 ' + 'h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 ' + '-0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 ' + 'c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 ' + 'l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 ' + '0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 ' + 'c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z ' + 'm 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' + '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' + '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z' + }, + 'TASK_TYPE_SERVICE_FILL': { + d: 'm {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' + '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' + '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z' + }, + 'TASK_TYPE_BUSINESS_RULE_HEADER': { + d: 'm {mx},{my} 0,4 20,0 0,-4 z' + }, + 'TASK_TYPE_BUSINESS_RULE_MAIN': { + d: 'm {mx},{my} 0,12 20,0 0,-12 z' + 'm 0,8 l 20,0 ' + 'm -13,-4 l 0,8' + }, + 'MESSAGE_FLOW_MARKER': { + d: 'm {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6' + } + }; + this.getRawPath = function getRawPath(pathId) { + return this.pathMap[pathId].d; + }; + + /** + * Scales the path to the given height and width. + *

Use case

+ *

Use case is to scale the content of elements (event, gateways) based + * on the element bounding box's size. + *

+ *

Why not transform

+ *

Scaling a path with transform() will also scale the stroke and IE does not support + * the option 'non-scaling-stroke' to prevent this. + * Also there are use cases where only some parts of a path should be + * scaled.

+ * + * @param {string} pathId The ID of the path. + * @param {Object} param

+ * Example param object scales the path to 60% size of the container (data.width, data.height). + *

+   *   {
+   *     xScaleFactor: 0.6,
+   *     yScaleFactor:0.6,
+   *     containerWidth: data.width,
+   *     containerHeight: data.height,
+   *     position: {
+   *       mx: 0.46,
+   *       my: 0.2,
+   *     }
+   *   }
+   *   
+ *
    + *
  • targetpathwidth = xScaleFactor * containerWidth
  • + *
  • targetpathheight = yScaleFactor * containerHeight
  • + *
  • Position is used to set the starting coordinate of the path. M is computed: + *
      + *
    • position.x * containerWidth
    • + *
    • position.y * containerHeight
    • + *
    + * Center of the container
     position: {
    +   *       mx: 0.5,
    +   *       my: 0.5,
    +   *     }
    + * Upper left corner of the container + *
     position: {
    +   *       mx: 0.0,
    +   *       my: 0.0,
    +   *     }
    + *
  • + *
+ *

+ * + */ + this.getScaledPath = function getScaledPath(pathId, param) { + var rawPath = this.pathMap[pathId]; + + // positioning + // compute the start point of the path + var mx, my; + if (param.abspos) { + mx = param.abspos.x; + my = param.abspos.y; + } else { + mx = param.containerWidth * param.position.mx; + my = param.containerHeight * param.position.my; + } + var coordinates = {}; // map for the scaled coordinates + if (param.position) { + // path + var heightRatio = param.containerHeight / rawPath.height * param.yScaleFactor; + var widthRatio = param.containerWidth / rawPath.width * param.xScaleFactor; + + // Apply height ratio + for (var heightIndex = 0; heightIndex < rawPath.heightElements.length; heightIndex++) { + coordinates['y' + heightIndex] = rawPath.heightElements[heightIndex] * heightRatio; + } + + // Apply width ratio + for (var widthIndex = 0; widthIndex < rawPath.widthElements.length; widthIndex++) { + coordinates['x' + widthIndex] = rawPath.widthElements[widthIndex] * widthRatio; + } + } + + // Apply value to raw path + var path = format(rawPath.d, { + mx: mx, + my: my, + e: coordinates + }); + return path; + }; +} + +// helpers ////////////////////// + +// copied and adjusted from https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js +var tokenRegex = /\{([^{}]+)\}/g, + objNotationRegex = /(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g; // matches .xxxxx or ["xxxxx"] to run over object properties + +function replacer(all, key, obj) { + var res = obj; + key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) { + name = name || quotedName; + if (res) { + if (name in res) { + res = res[name]; + } + typeof res == 'function' && isFunc && (res = res()); + } + }); + res = (res == null || res == obj ? all : res) + ''; + return res; +} +function format(str, obj) { + return String(str).replace(tokenRegex, function (all, key) { + return replacer(all, key, obj); + }); +} + +/***/ }), + +/***/ 69524: +/*!*******************************************************!*\ + !*** ./node_modules/bpmn-js/lib/draw/TextRenderer.js ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ TextRenderer) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_util_Text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/util/Text */ 46209); + + +var DEFAULT_FONT_SIZE = 12; +var LINE_HEIGHT_RATIO = 1.2; +var MIN_TEXT_ANNOTATION_HEIGHT = 30; +function TextRenderer(config) { + var defaultStyle = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ + fontFamily: 'Arial, sans-serif', + fontSize: DEFAULT_FONT_SIZE, + fontWeight: 'normal', + lineHeight: LINE_HEIGHT_RATIO + }, config && config.defaultStyle || {}); + var fontSize = parseInt(defaultStyle.fontSize, 10) - 1; + var externalStyle = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, defaultStyle, { + fontSize: fontSize + }, config && config.externalStyle || {}); + var textUtil = new diagram_js_lib_util_Text__WEBPACK_IMPORTED_MODULE_1__["default"]({ + style: defaultStyle + }); + + /** + * Get the new bounds of an externally rendered, + * layouted label. + * + * @param {Bounds} bounds + * @param {string} text + * + * @return {Bounds} + */ + this.getExternalLabelBounds = function (bounds, text) { + var layoutedDimensions = textUtil.getDimensions(text, { + box: { + width: 90, + height: 30, + x: bounds.width / 2 + bounds.x, + y: bounds.height / 2 + bounds.y + }, + style: externalStyle + }); + + // resize label shape to fit label text + return { + x: Math.round(bounds.x + bounds.width / 2 - layoutedDimensions.width / 2), + y: Math.round(bounds.y), + width: Math.ceil(layoutedDimensions.width), + height: Math.ceil(layoutedDimensions.height) + }; + }; + + /** + * Get the new bounds of text annotation. + * + * @param {Bounds} bounds + * @param {string} text + * + * @return {Bounds} + */ + this.getTextAnnotationBounds = function (bounds, text) { + var layoutedDimensions = textUtil.getDimensions(text, { + box: bounds, + style: defaultStyle, + align: 'left-top', + padding: 5 + }); + return { + x: bounds.x, + y: bounds.y, + width: bounds.width, + height: Math.max(MIN_TEXT_ANNOTATION_HEIGHT, Math.round(layoutedDimensions.height)) + }; + }; + + /** + * Create a layouted text element. + * + * @param {string} text + * @param {Object} [options] + * + * @return {SVGElement} rendered text + */ + this.createText = function (text, options) { + return textUtil.createText(text, options || {}); + }; + + /** + * Get default text style. + */ + this.getDefaultStyle = function () { + return defaultStyle; + }; + + /** + * Get the external text style. + */ + this.getExternalStyle = function () { + return externalStyle; + }; +} +TextRenderer.$inject = ['config.textRenderer']; + +/***/ }), + +/***/ 14334: +/*!************************************************!*\ + !*** ./node_modules/bpmn-js/lib/draw/index.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _BpmnRenderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BpmnRenderer */ 44250); +/* harmony import */ var _TextRenderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TextRenderer */ 69524); +/* harmony import */ var _PathMap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PathMap */ 56089); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['bpmnRenderer'], + bpmnRenderer: ['type', _BpmnRenderer__WEBPACK_IMPORTED_MODULE_0__["default"]], + textRenderer: ['type', _TextRenderer__WEBPACK_IMPORTED_MODULE_1__["default"]], + pathMap: ['type', _PathMap__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 74832: +/*!***********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/auto-place/BpmnAutoPlace.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AutoPlace) +/* harmony export */ }); +/* harmony import */ var _BpmnAutoPlaceUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BpmnAutoPlaceUtil */ 74340); + + +/** + * BPMN auto-place behavior. + * + * @param {EventBus} eventBus + */ +function AutoPlace(eventBus) { + eventBus.on('autoPlace', function (context) { + var shape = context.shape, + source = context.source; + return (0,_BpmnAutoPlaceUtil__WEBPACK_IMPORTED_MODULE_0__.getNewShapePosition)(source, shape); + }); +} +AutoPlace.$inject = ['eventBus']; + +/***/ }), + +/***/ 74340: +/*!***************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/auto-place/BpmnAutoPlaceUtil.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getDataElementPosition: () => (/* binding */ getDataElementPosition), +/* harmony export */ getFlowNodePosition: () => (/* binding */ getFlowNodePosition), +/* harmony export */ getNewShapePosition: () => (/* binding */ getNewShapePosition), +/* harmony export */ getTextAnnotationPosition: () => (/* binding */ getTextAnnotationPosition) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ 4525); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/auto-place/AutoPlaceUtil */ 7851); + + + + + +/** + * Find the new position for the target element to + * connect to source. + * + * @param {djs.model.Shape} source + * @param {djs.model.Shape} element + * + * @return {Point} + */ +function getNewShapePosition(source, element) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) { + return getTextAnnotationPosition(source, element); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference'])) { + return getDataElementPosition(source, element); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:FlowNode')) { + return getFlowNodePosition(source, element); + } +} + +/** + * Always try to place element right of source; + * compute actual distance from previous nodes in flow. + */ +function getFlowNodePosition(source, element) { + var sourceTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(source); + var sourceMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source); + var horizontalDistance = (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.getConnectedDistance)(source, { + filter: function (connection) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(connection, 'bpmn:SequenceFlow'); + } + }); + var margin = 30, + minDistance = 80, + orientation = 'left'; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(source, 'bpmn:BoundaryEvent')) { + orientation = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getOrientation)(source, source.host, -25); + if (orientation.indexOf('top') !== -1) { + margin *= -1; + } + } + var position = { + x: sourceTrbl.right + horizontalDistance + element.width / 2, + y: sourceMid.y + getVerticalDistance(orientation, minDistance) + }; + var nextPositionDirection = { + y: { + margin: margin, + minDistance: minDistance + } + }; + return (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.findFreePosition)(source, element, position, (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.generateGetNextPosition)(nextPositionDirection)); +} +function getVerticalDistance(orientation, minDistance) { + if (orientation.indexOf('top') != -1) { + return -1 * minDistance; + } else if (orientation.indexOf('bottom') != -1) { + return minDistance; + } else { + return 0; + } +} + +/** + * Always try to place text annotations top right of source. + */ +function getTextAnnotationPosition(source, element) { + var sourceTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(source); + var position = { + x: sourceTrbl.right + element.width / 2, + y: sourceTrbl.top - 50 - element.height / 2 + }; + var nextPositionDirection = { + y: { + margin: -30, + minDistance: 20 + } + }; + return (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.findFreePosition)(source, element, position, (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.generateGetNextPosition)(nextPositionDirection)); +} + +/** + * Always put element bottom right of source. + */ +function getDataElementPosition(source, element) { + var sourceTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(source); + var position = { + x: sourceTrbl.right - 10 + element.width / 2, + y: sourceTrbl.bottom + 40 + element.width / 2 + }; + var nextPositionDirection = { + x: { + margin: 30, + minDistance: 30 + } + }; + return (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.findFreePosition)(source, element, position, (0,diagram_js_lib_features_auto_place_AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_2__.generateGetNextPosition)(nextPositionDirection)); +} + +/***/ }), + +/***/ 36873: +/*!***************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/auto-place/index.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_auto_place__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/auto-place */ 28261); +/* harmony import */ var _BpmnAutoPlace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnAutoPlace */ 74832); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_auto_place__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['bpmnAutoPlace'], + bpmnAutoPlace: ['type', _BpmnAutoPlace__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 14810: +/*!*************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/auto-resize/BpmnAutoResize.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnAutoResize) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_auto_resize_AutoResize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/auto-resize/AutoResize */ 70111); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); + + + + +/** + * Sub class of the AutoResize module which implements a BPMN + * specific resize function. + */ +function BpmnAutoResize(injector) { + injector.invoke(diagram_js_lib_features_auto_resize_AutoResize__WEBPACK_IMPORTED_MODULE_1__["default"], this); +} +BpmnAutoResize.$inject = ['injector']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnAutoResize, diagram_js_lib_features_auto_resize_AutoResize__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/** + * Resize shapes and lanes. + * + * @param {djs.model.Shape} target + * @param {Bounds} newBounds + * @param {Object} hints + */ +BpmnAutoResize.prototype.resize = function (target, newBounds, hints) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Participant')) { + this._modeling.resizeLane(target, newBounds, null, hints); + } else { + this._modeling.resizeShape(target, newBounds, null, hints); + } +}; + +/***/ }), + +/***/ 37751: +/*!*********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/auto-resize/BpmnAutoResizeProvider.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnAutoResizeProvider) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_features_auto_resize_AutoResizeProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/auto-resize/AutoResizeProvider */ 862); + + + + + +/** + * This module is a provider for automatically resizing parent BPMN elements + */ +function BpmnAutoResizeProvider(eventBus, modeling) { + diagram_js_lib_features_auto_resize_AutoResizeProvider__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this._modeling = modeling; +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnAutoResizeProvider, diagram_js_lib_features_auto_resize_AutoResizeProvider__WEBPACK_IMPORTED_MODULE_1__["default"]); +BpmnAutoResizeProvider.$inject = ['eventBus', 'modeling']; + +/** + * Check if the given target can be expanded + * + * @param {djs.model.Shape} target + * + * @return {boolean} + */ +BpmnAutoResizeProvider.prototype.canResize = function (elements, target) { + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Participant') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Lane') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:SubProcess')) { + return false; + } + var canResize = true; + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(elements, function (element) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:Lane') || element.labelTarget) { + canResize = false; + return; + } + }); + return canResize; +}; + +/***/ }), + +/***/ 65110: +/*!****************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/auto-resize/index.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _BpmnAutoResize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BpmnAutoResize */ 14810); +/* harmony import */ var _BpmnAutoResizeProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnAutoResizeProvider */ 37751); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['bpmnAutoResize', 'bpmnAutoResizeProvider'], + bpmnAutoResize: ['type', _BpmnAutoResize__WEBPACK_IMPORTED_MODULE_0__["default"]], + bpmnAutoResizeProvider: ['type', _BpmnAutoResizeProvider__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 30862: +/*!*****************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/context-pad/ContextPadProvider.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ContextPadProvider) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/DiUtil */ 55441); +/* harmony import */ var _modeling_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modeling/util/LaneUtil */ 23568); +/* harmony import */ var diagram_js_lib_util_Mouse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/util/Mouse */ 53171); + + + + + + + +/** + * A provider for BPMN 2.0 elements context pad + */ +function ContextPadProvider(config, injector, eventBus, contextPad, modeling, elementFactory, connect, create, popupMenu, canvas, rules, translate) { + config = config || {}; + contextPad.registerProvider(this); + this._contextPad = contextPad; + this._modeling = modeling; + this._elementFactory = elementFactory; + this._connect = connect; + this._create = create; + this._popupMenu = popupMenu; + this._canvas = canvas; + this._rules = rules; + this._translate = translate; + if (config.autoPlace !== false) { + this._autoPlace = injector.get('autoPlace', false); + } + eventBus.on('create.end', 250, function (event) { + var context = event.context, + shape = context.shape; + if (!(0,diagram_js_lib_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.hasPrimaryModifier)(event) || !contextPad.isOpen(shape)) { + return; + } + var entries = contextPad.getEntries(shape); + if (entries.replace) { + entries.replace.action.click(event, shape); + } + }); +} +ContextPadProvider.$inject = ['config.contextPad', 'injector', 'eventBus', 'contextPad', 'modeling', 'elementFactory', 'connect', 'create', 'popupMenu', 'canvas', 'rules', 'translate']; +ContextPadProvider.prototype.getContextPadEntries = function (element) { + var contextPad = this._contextPad, + modeling = this._modeling, + elementFactory = this._elementFactory, + connect = this._connect, + create = this._create, + popupMenu = this._popupMenu, + canvas = this._canvas, + rules = this._rules, + autoPlace = this._autoPlace, + translate = this._translate; + var actions = {}; + if (element.type === 'label') { + return actions; + } + var businessObject = element.businessObject; + function startConnect(event, element) { + connect.start(event, element); + } + function removeElement(e) { + modeling.removeElements([element]); + } + function getReplaceMenuPosition(element) { + var Y_OFFSET = 5; + var diagramContainer = canvas.getContainer(), + pad = contextPad.getPad(element).html; + var diagramRect = diagramContainer.getBoundingClientRect(), + padRect = pad.getBoundingClientRect(); + var top = padRect.top - diagramRect.top; + var left = padRect.left - diagramRect.left; + var pos = { + x: left, + y: top + padRect.height + Y_OFFSET + }; + return pos; + } + + /** + * Create an append action + * + * @param {string} type + * @param {string} className + * @param {string} [title] + * @param {Object} [options] + * + * @return {Object} descriptor + */ + function appendAction(type, className, title, options) { + if (typeof title !== 'string') { + options = title; + title = translate('Append {type}', { + type: type.replace(/^bpmn:/, '') + }); + } + function appendStart(event, element) { + var shape = elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ + type: type + }, options)); + create.start(event, shape, { + source: element + }); + } + var append = autoPlace ? function (event, element) { + var shape = elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ + type: type + }, options)); + autoPlace.append(element, shape); + } : appendStart; + return { + group: 'model', + className: className, + title: title, + action: { + dragstart: appendStart, + click: append + } + }; + } + function splitLaneHandler(count) { + return function (event, element) { + // actual split + modeling.splitLane(element, count); + + // refresh context pad after split to + // get rid of split icons + contextPad.open(element, true); + }; + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(businessObject, ['bpmn:Lane', 'bpmn:Participant']) && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isExpanded)(businessObject)) { + var childLanes = (0,_modeling_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__.getChildLanes)(element); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'lane-insert-above': { + group: 'lane-insert-above', + className: 'bpmn-icon-lane-insert-above', + title: translate('Add Lane above'), + action: { + click: function (event, element) { + modeling.addLane(element, 'top'); + } + } + } + }); + if (childLanes.length < 2) { + if (element.height >= 120) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'lane-divide-two': { + group: 'lane-divide', + className: 'bpmn-icon-lane-divide-two', + title: translate('Divide into two Lanes'), + action: { + click: splitLaneHandler(2) + } + } + }); + } + if (element.height >= 180) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'lane-divide-three': { + group: 'lane-divide', + className: 'bpmn-icon-lane-divide-three', + title: translate('Divide into three Lanes'), + action: { + click: splitLaneHandler(3) + } + } + }); + } + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'lane-insert-below': { + group: 'lane-insert-below', + className: 'bpmn-icon-lane-insert-below', + title: translate('Add Lane below'), + action: { + click: function (event, element) { + modeling.addLane(element, 'bottom'); + } + } + } + }); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:FlowNode')) { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:EventBasedGateway')) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'append.receive-task': appendAction('bpmn:ReceiveTask', 'bpmn-icon-receive-task', translate('Append ReceiveTask')), + 'append.message-intermediate-event': appendAction('bpmn:IntermediateCatchEvent', 'bpmn-icon-intermediate-event-catch-message', translate('Append MessageIntermediateCatchEvent'), { + eventDefinitionType: 'bpmn:MessageEventDefinition' + }), + 'append.timer-intermediate-event': appendAction('bpmn:IntermediateCatchEvent', 'bpmn-icon-intermediate-event-catch-timer', translate('Append TimerIntermediateCatchEvent'), { + eventDefinitionType: 'bpmn:TimerEventDefinition' + }), + 'append.condition-intermediate-event': appendAction('bpmn:IntermediateCatchEvent', 'bpmn-icon-intermediate-event-catch-condition', translate('Append ConditionIntermediateCatchEvent'), { + eventDefinitionType: 'bpmn:ConditionalEventDefinition' + }), + 'append.signal-intermediate-event': appendAction('bpmn:IntermediateCatchEvent', 'bpmn-icon-intermediate-event-catch-signal', translate('Append SignalIntermediateCatchEvent'), { + eventDefinitionType: 'bpmn:SignalEventDefinition' + }) + }); + } else if (isEventType(businessObject, 'bpmn:BoundaryEvent', 'bpmn:CompensateEventDefinition')) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'append.compensation-activity': appendAction('bpmn:Task', 'bpmn-icon-task', translate('Append compensation activity'), { + isForCompensation: true + }) + }); + } else if (!(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:EndEvent') && !businessObject.isForCompensation && !isEventType(businessObject, 'bpmn:IntermediateThrowEvent', 'bpmn:LinkEventDefinition') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isEventSubProcess)(businessObject)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'append.end-event': appendAction('bpmn:EndEvent', 'bpmn-icon-end-event-none', translate('Append EndEvent')), + 'append.gateway': appendAction('bpmn:ExclusiveGateway', 'bpmn-icon-gateway-none', translate('Append Gateway')), + 'append.append-task': appendAction('bpmn:Task', 'bpmn-icon-task', translate('Append Task')), + 'append.intermediate-event': appendAction('bpmn:IntermediateThrowEvent', 'bpmn-icon-intermediate-event-none', translate('Append Intermediate/Boundary Event')) + }); + } + } + if (!popupMenu.isEmpty(element, 'bpmn-replace')) { + // Replace menu entry + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'replace': { + group: 'edit', + className: 'bpmn-icon-screw-wrench', + title: translate('Change type'), + action: { + click: function (event, element) { + var position = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(getReplaceMenuPosition(element), { + cursor: { + x: event.x, + y: event.y + } + }); + popupMenu.open(element, 'bpmn-replace', position); + } + } + } + }); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(businessObject, ['bpmn:FlowNode', 'bpmn:InteractionNode', 'bpmn:DataObjectReference', 'bpmn:DataStoreReference'])) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation'), + 'connect': { + group: 'connect', + className: 'bpmn-icon-connection-multi', + title: translate('Connect using ' + (businessObject.isForCompensation ? '' : 'Sequence/MessageFlow or ') + 'Association'), + action: { + click: startConnect, + dragstart: startConnect + } + } + }); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:TextAnnotation')) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'connect': { + group: 'connect', + className: 'bpmn-icon-connection-multi', + title: translate('Connect using Association'), + action: { + click: startConnect, + dragstart: startConnect + } + } + }); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(businessObject, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference'])) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'connect': { + group: 'connect', + className: 'bpmn-icon-connection-multi', + title: translate('Connect using DataInputAssociation'), + action: { + click: startConnect, + dragstart: startConnect + } + } + }); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:Group')) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation') + }); + } + + // delete element entry, only show if allowed by rules + var deleteAllowed = rules.allowed('elements.delete', { + elements: [element] + }); + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isArray)(deleteAllowed)) { + // was the element returned as a deletion candidate? + deleteAllowed = deleteAllowed[0] === element; + } + if (deleteAllowed) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(actions, { + 'delete': { + group: 'edit', + className: 'bpmn-icon-trash', + title: translate('Remove'), + action: { + click: removeElement + } + } + }); + } + return actions; +}; + +// helpers ///////// + +function isEventType(eventBo, type, definition) { + var isType = eventBo.$instanceOf(type); + var isDefinition = false; + var definitions = eventBo.eventDefinitions || []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(definitions, function (def) { + if (def.$type === definition) { + isDefinition = true; + } + }); + return isType && isDefinition; +} + +/***/ }), + +/***/ 41687: +/*!****************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/context-pad/index.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_direct_editing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js-direct-editing */ 32110); +/* harmony import */ var diagram_js_lib_features_context_pad__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/context-pad */ 93331); +/* harmony import */ var diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/selection */ 26334); +/* harmony import */ var diagram_js_lib_features_connect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/features/connect */ 60262); +/* harmony import */ var diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/features/create */ 48256); +/* harmony import */ var _popup_menu__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../popup-menu */ 30918); +/* harmony import */ var _ContextPadProvider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ContextPadProvider */ 30862); + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_direct_editing__WEBPACK_IMPORTED_MODULE_0__["default"], diagram_js_lib_features_context_pad__WEBPACK_IMPORTED_MODULE_1__["default"], diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_2__["default"], diagram_js_lib_features_connect__WEBPACK_IMPORTED_MODULE_3__["default"], diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_4__["default"], _popup_menu__WEBPACK_IMPORTED_MODULE_5__["default"]], + __init__: ['contextPadProvider'], + contextPadProvider: ['type', _ContextPadProvider__WEBPACK_IMPORTED_MODULE_6__["default"]] +}); + +/***/ }), + +/***/ 17380: +/*!***********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/copy-paste/BpmnCopyPaste.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnCopyPaste) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); + + +function copyProperties(source, target, properties) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(properties)) { + properties = [properties]; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(properties, function (property) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isUndefined)(source[property])) { + target[property] = source[property]; + } + }); +} +function removeProperties(element, properties) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(properties)) { + properties = [properties]; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(properties, function (property) { + if (element[property]) { + delete element[property]; + } + }); +} +var LOW_PRIORITY = 750; +function BpmnCopyPaste(bpmnFactory, eventBus, moddleCopy) { + eventBus.on('copyPaste.copyElement', LOW_PRIORITY, function (context) { + var descriptor = context.descriptor, + element = context.element; + var businessObject = descriptor.oldBusinessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element); + descriptor.type = element.type; + copyProperties(businessObject, descriptor, 'name'); + descriptor.di = {}; + + // colors will be set to DI + copyProperties(businessObject.di, descriptor.di, ['fill', 'stroke', 'background-color', 'border-color', 'color']); + copyProperties(businessObject.di, descriptor, 'isExpanded'); + if (isLabel(descriptor)) { + return descriptor; + } + + // default sequence flow + if (businessObject.default) { + descriptor.default = businessObject.default.id; + } + }); + eventBus.on('moddleCopy.canCopyProperty', function (context) { + var parent = context.parent, + property = context.property, + propertyName = context.propertyName, + bpmnProcess; + if (propertyName === 'processRef' && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(parent, 'bpmn:Participant') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(property, 'bpmn:Process')) { + bpmnProcess = bpmnFactory.create('bpmn:Process'); + + // return copy of process + return moddleCopy.copyElement(property, bpmnProcess); + } + }); + var references; + function resolveReferences(descriptor, cache) { + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(descriptor); + + // default sequence flows + if (descriptor.default) { + // relationship cannot be resolved immediately + references[descriptor.default] = { + element: businessObject, + property: 'default' + }; + } + + // boundary events + if (descriptor.host) { + // relationship can be resolved immediately + (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(descriptor).attachedToRef = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(cache[descriptor.host]); + } + references = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(references, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(references, function (array, reference, key) { + var element = reference.element, + property = reference.property; + if (key === descriptor.id) { + element[property] = businessObject; + array.push(descriptor.id); + } + return array; + }, [])); + } + eventBus.on('copyPaste.pasteElements', function () { + references = {}; + }); + eventBus.on('copyPaste.pasteElement', function (context) { + var cache = context.cache, + descriptor = context.descriptor, + oldBusinessObject = descriptor.oldBusinessObject, + newBusinessObject; + + // do NOT copy business object if external label + if (isLabel(descriptor)) { + descriptor.businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(cache[descriptor.labelTarget]); + return; + } + newBusinessObject = bpmnFactory.create(oldBusinessObject.$type); + descriptor.businessObject = moddleCopy.copyElement(oldBusinessObject, newBusinessObject); + + // resolve references e.g. default sequence flow + resolveReferences(descriptor, cache); + copyProperties(descriptor, newBusinessObject, ['isExpanded', 'name']); + removeProperties(descriptor, 'oldBusinessObject'); + }); +} +BpmnCopyPaste.$inject = ['bpmnFactory', 'eventBus', 'moddleCopy']; + +// helpers ////////// + +function isLabel(element) { + return !!element.labelTarget; +} + +/***/ }), + +/***/ 66545: +/*!********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/copy-paste/ModdleCopy.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ModdleCopy), +/* harmony export */ getPropertyNames: () => (/* binding */ getPropertyNames) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); + +var DISALLOWED_PROPERTIES = ['artifacts', 'dataInputAssociations', 'dataOutputAssociations', 'default', 'flowElements', 'lanes', 'incoming', 'outgoing']; + +/** + * @typedef {Function} listener + * + * @param {Object} context + * @param {Array} context.propertyNames + * @param {ModdleElement} context.sourceElement + * @param {ModdleElement} context.targetElement + * + * @returns {Array|boolean} - Return properties to be copied or false to disallow + * copying. + */ + +/** + * @typedef {Function} listener + * + * @param {Object} context + * @param {ModdleElement} context.parent + * @param {*} context.property + * @param {string} context.propertyName + * + * @returns {*|boolean} - Return copied property or false to disallow + * copying. + */ + +/** + * @typedef {Function} listener + * + * @param {Object} context + * @param {ModdleElement} context.parent + * @param {*} context.property + * @param {string} context.propertyName + * + * @returns {boolean} - Return false to disallow + * setting copied property. + */ + +/** + * Utility for copying model properties from source element to target element. + * + * @param {EventBus} eventBus + * @param {BpmnFactory} bpmnFactory + * @param {BpmnModdle} moddle + */ +function ModdleCopy(eventBus, bpmnFactory, moddle) { + this._bpmnFactory = bpmnFactory; + this._eventBus = eventBus; + this._moddle = moddle; + + // copy extension elements last + eventBus.on('moddleCopy.canCopyProperties', function (context) { + var propertyNames = context.propertyNames; + if (!propertyNames || !propertyNames.length) { + return; + } + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(propertyNames, function (propertyName) { + return propertyName === 'extensionElements'; + }); + }); + + // default check whether property can be copied + eventBus.on('moddleCopy.canCopyProperty', function (context) { + var parent = context.parent, + parentDescriptor = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(parent) && parent.$descriptor, + propertyName = context.propertyName; + if (propertyName && DISALLOWED_PROPERTIES.indexOf(propertyName) !== -1) { + // disallow copying property + return false; + } + if (propertyName && parentDescriptor && !(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(parentDescriptor.properties, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.matchPattern)({ + name: propertyName + }))) { + // disallow copying property + return false; + } + }); + + // do NOT allow to copy empty extension elements + eventBus.on('moddleCopy.canSetCopiedProperty', function (context) { + var property = context.property; + if (is(property, 'bpmn:ExtensionElements') && (!property.values || !property.values.length)) { + // disallow setting copied property + return false; + } + }); +} +ModdleCopy.$inject = ['eventBus', 'bpmnFactory', 'moddle']; + +/** + * Copy model properties of source element to target element. + * + * @param {ModdleElement} sourceElement + * @param {ModdleElement} targetElement + * @param {Array} [propertyNames] + * + * @param {ModdleElement} + */ +ModdleCopy.prototype.copyElement = function (sourceElement, targetElement, propertyNames) { + var self = this; + if (propertyNames && !(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(propertyNames)) { + propertyNames = [propertyNames]; + } + propertyNames = propertyNames || getPropertyNames(sourceElement.$descriptor); + var canCopyProperties = this._eventBus.fire('moddleCopy.canCopyProperties', { + propertyNames: propertyNames, + sourceElement: sourceElement, + targetElement: targetElement + }); + if (canCopyProperties === false) { + return targetElement; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(canCopyProperties)) { + propertyNames = canCopyProperties; + } + + // copy properties + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(propertyNames, function (propertyName) { + var sourceProperty; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(sourceElement, propertyName)) { + sourceProperty = sourceElement.get(propertyName); + } + var copiedProperty = self.copyProperty(sourceProperty, targetElement, propertyName); + var canSetProperty = self._eventBus.fire('moddleCopy.canSetCopiedProperty', { + parent: targetElement, + property: copiedProperty, + propertyName: propertyName + }); + if (canSetProperty === false) { + return; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isDefined)(copiedProperty)) { + targetElement.set(propertyName, copiedProperty); + } + }); + return targetElement; +}; + +/** + * Copy model property. + * + * @param {*} property + * @param {ModdleElement} parent + * @param {string} propertyName + * + * @returns {*} + */ +ModdleCopy.prototype.copyProperty = function (property, parent, propertyName) { + var self = this; + + // allow others to copy property + var copiedProperty = this._eventBus.fire('moddleCopy.canCopyProperty', { + parent: parent, + property: property, + propertyName: propertyName + }); + + // return if copying is NOT allowed + if (copiedProperty === false) { + return; + } + if (copiedProperty) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(copiedProperty) && copiedProperty.$type && !copiedProperty.$parent) { + copiedProperty.$parent = parent; + } + return copiedProperty; + } + var propertyDescriptor = this._moddle.getPropertyDescriptor(parent, propertyName); + + // do NOT copy references + if (propertyDescriptor.isReference) { + return; + } + + // copy id + if (propertyDescriptor.isId) { + return this._copyId(property, parent); + } + + // copy arrays + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(property)) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(property, function (childProperties, childProperty) { + // recursion + copiedProperty = self.copyProperty(childProperty, parent, propertyName); + + // copying might NOT be allowed + if (copiedProperty) { + copiedProperty.$parent = parent; + return childProperties.concat(copiedProperty); + } + return childProperties; + }, []); + } + + // copy model elements + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(property) && property.$type) { + if (this._moddle.getElementDescriptor(property).isGeneric) { + return; + } + copiedProperty = self._bpmnFactory.create(property.$type); + copiedProperty.$parent = parent; + + // recursion + copiedProperty = self.copyElement(property, copiedProperty); + return copiedProperty; + } + + // copy primitive properties + return property; +}; +ModdleCopy.prototype._copyId = function (id, element) { + // disallow if already taken + if (this._moddle.ids.assigned(id)) { + return; + } else { + this._moddle.ids.claim(id, element); + return id; + } +}; + +// helpers ////////// + +function getPropertyNames(descriptor, keepDefaultProperties) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(descriptor.properties, function (properties, property) { + if (keepDefaultProperties && property.default) { + return properties; + } + return properties.concat(property.name); + }, []); +} +function is(element, type) { + return element && typeof element.$instanceOf === 'function' && element.$instanceOf(type); +} + +/***/ }), + +/***/ 82375: +/*!***************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/copy-paste/index.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_copy_paste__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/copy-paste */ 54307); +/* harmony import */ var _BpmnCopyPaste__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnCopyPaste */ 17380); +/* harmony import */ var _ModdleCopy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ModdleCopy */ 66545); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_copy_paste__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['bpmnCopyPaste', 'moddleCopy'], + bpmnCopyPaste: ['type', _BpmnCopyPaste__WEBPACK_IMPORTED_MODULE_1__["default"]], + moddleCopy: ['type', _ModdleCopy__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 77134: +/*!*************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/di-ordering/BpmnDiOrdering.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnDiOrdering) +/* harmony export */ }); +/* harmony import */ var _draw_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../draw/BpmnRenderUtil */ 31637); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ 35723); + + + + +var HIGH_PRIORITY = 2000; +function BpmnDiOrdering(eventBus, canvas) { + eventBus.on('saveXML.start', HIGH_PRIORITY, orderDi); + function orderDi() { + var root = canvas.getRootElement(), + rootDi = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(root).di, + elements, + diElements; + elements = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_1__.selfAndAllChildren)([root], false); + + // only bpmndi:Shape and bpmndi:Edge can be direct children of bpmndi:Plane + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(elements, function (element) { + return element !== root && !element.labelTarget; + }); + diElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.map)(elements, _draw_BpmnRenderUtil__WEBPACK_IMPORTED_MODULE_3__.getDi); + rootDi.set('planeElement', diElements); + } +} +BpmnDiOrdering.$inject = ['eventBus', 'canvas']; + +/***/ }), + +/***/ 9454: +/*!****************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/di-ordering/index.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _di_ordering_BpmnDiOrdering__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../di-ordering/BpmnDiOrdering */ 77134); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['bpmnDiOrdering'], + bpmnDiOrdering: ['type', _di_ordering_BpmnDiOrdering__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 29924: +/*!*****************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/distribute-elements/BpmnDistributeElements.js ***! + \*****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnDistributeElements) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ 4525); + + + +/** + * Registers element exclude filters for elements that + * currently do not support distribution. + */ +function BpmnDistributeElements(distributeElements) { + distributeElements.registerFilter(function (elements) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function (element) { + var cannotDistribute = (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_1__.isAny)(element, ['bpmn:Association', 'bpmn:BoundaryEvent', 'bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation', 'bpmn:Lane', 'bpmn:MessageFlow', 'bpmn:Participant', 'bpmn:SequenceFlow', 'bpmn:TextAnnotation']); + return !(element.labelTarget || cannotDistribute); + }); + }); +} +BpmnDistributeElements.$inject = ['distributeElements']; + +/***/ }), + +/***/ 86815: +/*!************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/distribute-elements/index.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_distribute_elements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/distribute-elements */ 10635); +/* harmony import */ var _BpmnDistributeElements__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnDistributeElements */ 29924); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_distribute_elements__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['bpmnDistributeElements'], + bpmnDistributeElements: ['type', _BpmnDistributeElements__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 58364: +/*!*******************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/editor-actions/BpmnEditorActions.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnEditorActions) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_features_editor_actions_EditorActions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/editor-actions/EditorActions */ 56891); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ 35723); + + + + + + +/** + * Registers and executes BPMN specific editor actions. + * + * @param {Injector} injector + */ +function BpmnEditorActions(injector) { + injector.invoke(diagram_js_lib_features_editor_actions_EditorActions__WEBPACK_IMPORTED_MODULE_1__["default"], this); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnEditorActions, diagram_js_lib_features_editor_actions_EditorActions__WEBPACK_IMPORTED_MODULE_1__["default"]); +BpmnEditorActions.$inject = ['injector']; + +/** + * Register default actions. + * + * @param {Injector} injector + */ +BpmnEditorActions.prototype._registerDefaultActions = function (injector) { + // (0) invoke super method + + diagram_js_lib_features_editor_actions_EditorActions__WEBPACK_IMPORTED_MODULE_1__["default"].prototype._registerDefaultActions.call(this, injector); + + // (1) retrieve optional components to integrate with + + var canvas = injector.get('canvas', false); + var elementRegistry = injector.get('elementRegistry', false); + var selection = injector.get('selection', false); + var spaceTool = injector.get('spaceTool', false); + var lassoTool = injector.get('lassoTool', false); + var handTool = injector.get('handTool', false); + var globalConnect = injector.get('globalConnect', false); + var distributeElements = injector.get('distributeElements', false); + var alignElements = injector.get('alignElements', false); + var directEditing = injector.get('directEditing', false); + var searchPad = injector.get('searchPad', false); + var modeling = injector.get('modeling', false); + + // (2) check components and register actions + + if (canvas && elementRegistry && selection) { + this._registerAction('selectElements', function () { + // select all elements except for the invisible + // root element + var rootElement = canvas.getRootElement(); + var elements = elementRegistry.filter(function (element) { + return element !== rootElement; + }); + selection.select(elements); + return elements; + }); + } + if (spaceTool) { + this._registerAction('spaceTool', function () { + spaceTool.toggle(); + }); + } + if (lassoTool) { + this._registerAction('lassoTool', function () { + lassoTool.toggle(); + }); + } + if (handTool) { + this._registerAction('handTool', function () { + handTool.toggle(); + }); + } + if (globalConnect) { + this._registerAction('globalConnectTool', function () { + globalConnect.toggle(); + }); + } + if (selection && distributeElements) { + this._registerAction('distributeElements', function (opts) { + var currentSelection = selection.get(), + type = opts.type; + if (currentSelection.length) { + distributeElements.trigger(currentSelection, type); + } + }); + } + if (selection && alignElements) { + this._registerAction('alignElements', function (opts) { + var currentSelection = selection.get(), + aligneableElements = [], + type = opts.type; + if (currentSelection.length) { + aligneableElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(currentSelection, function (element) { + return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Lane'); + }); + alignElements.trigger(aligneableElements, type); + } + }); + } + if (selection && modeling) { + this._registerAction('setColor', function (opts) { + var currentSelection = selection.get(); + if (currentSelection.length) { + modeling.setColor(currentSelection, opts); + } + }); + } + if (selection && directEditing) { + this._registerAction('directEditing', function () { + var currentSelection = selection.get(); + if (currentSelection.length) { + directEditing.activate(currentSelection[0]); + } + }); + } + if (searchPad) { + this._registerAction('find', function () { + searchPad.toggle(); + }); + } + if (canvas && modeling) { + this._registerAction('moveToOrigin', function () { + var rootElement = canvas.getRootElement(), + boundingBox, + elements; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(rootElement, 'bpmn:Collaboration')) { + elements = elementRegistry.filter(function (element) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element.parent, 'bpmn:Collaboration'); + }); + } else { + elements = elementRegistry.filter(function (element) { + return element !== rootElement && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element.parent, 'bpmn:SubProcess'); + }); + } + boundingBox = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_4__.getBBox)(elements); + modeling.moveElements(elements, { + x: -boundingBox.x, + y: -boundingBox.y + }, rootElement); + }); + } +}; + +/***/ }), + +/***/ 9323: +/*!*******************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/editor-actions/index.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_editor_actions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/editor-actions */ 56919); +/* harmony import */ var _BpmnEditorActions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnEditorActions */ 58364); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_editor_actions__WEBPACK_IMPORTED_MODULE_0__["default"]], + editorActions: ['type', _BpmnEditorActions__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 84494: +/*!*****************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/grid-snapping/BpmnGridSnapping.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnGridSnapping) +/* harmony export */ }); +/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ 4525); + +function BpmnGridSnapping(eventBus) { + eventBus.on(['create.init', 'shape.move.init'], function (event) { + var context = event.context, + shape = event.shape; + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(shape, ['bpmn:Participant', 'bpmn:SubProcess', 'bpmn:TextAnnotation'])) { + if (!context.gridSnappingContext) { + context.gridSnappingContext = {}; + } + context.gridSnappingContext.snapLocation = 'top-left'; + } + }); +} +BpmnGridSnapping.$inject = ['eventBus']; + +/***/ }), + +/***/ 2942: +/*!***************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/grid-snapping/behavior/AutoPlaceBehavior.js ***! + \***************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AutoPlaceBehavior) +/* harmony export */ }); +/* harmony import */ var _auto_place_BpmnAutoPlaceUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../auto-place/BpmnAutoPlaceUtil */ 74340); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + + +var HIGH_PRIORITY = 2000; +function AutoPlaceBehavior(eventBus, gridSnapping) { + eventBus.on('autoPlace', HIGH_PRIORITY, function (context) { + var source = context.source, + sourceMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getMid)(source), + shape = context.shape; + var position = (0,_auto_place_BpmnAutoPlaceUtil__WEBPACK_IMPORTED_MODULE_1__.getNewShapePosition)(source, shape); + ['x', 'y'].forEach(function (axis) { + var options = {}; + + // do not snap if x/y equal + if (position[axis] === sourceMid[axis]) { + return; + } + if (position[axis] > sourceMid[axis]) { + options.min = position[axis]; + } else { + options.max = position[axis]; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:TextAnnotation')) { + if (isHorizontal(axis)) { + options.offset = -shape.width / 2; + } else { + options.offset = -shape.height / 2; + } + } + position[axis] = gridSnapping.snapValue(position[axis], options); + }); + + // must be returned to be considered by auto place + return position; + }); +} +AutoPlaceBehavior.$inject = ['eventBus', 'gridSnapping']; + +// helpers ////////// + +function isHorizontal(axis) { + return axis === 'x'; +} + +/***/ }), + +/***/ 74425: +/*!***********************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/grid-snapping/behavior/CreateParticipantBehavior.js ***! + \***********************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CreateParticipantBehavior) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + +var HIGHER_PRIORITY = 1750; +function CreateParticipantBehavior(canvas, eventBus, gridSnapping) { + eventBus.on(['create.start', 'shape.move.start'], HIGHER_PRIORITY, function (event) { + var context = event.context, + shape = context.shape, + rootElement = canvas.getRootElement(); + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Participant') || !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(rootElement, 'bpmn:Process') || !rootElement.children.length) { + return; + } + var createConstraints = context.createConstraints; + if (!createConstraints) { + return; + } + shape.width = gridSnapping.snapValue(shape.width, { + min: shape.width + }); + shape.height = gridSnapping.snapValue(shape.height, { + min: shape.height + }); + }); +} +CreateParticipantBehavior.$inject = ['canvas', 'eventBus', 'gridSnapping']; + +/***/ }), + +/***/ 58172: +/*!**********************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/grid-snapping/behavior/LayoutConnectionBehavior.js ***! + \**********************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ LayoutConnectionBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var diagram_js_lib_util_Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/Geometry */ 3242); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 54796); + + + + +var HIGH_PRIORITY = 3000; + +/** + * Snaps connections with Manhattan layout. + */ +function LayoutConnectionBehavior(eventBus, gridSnapping, modeling) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this._gridSnapping = gridSnapping; + var self = this; + this.postExecuted(['connection.create', 'connection.layout'], HIGH_PRIORITY, function (event) { + var context = event.context, + connection = context.connection, + hints = context.hints || {}, + waypoints = connection.waypoints; + if (hints.connectionStart || hints.connectionEnd || hints.createElementsBehavior === false) { + return; + } + if (!hasMiddleSegments(waypoints)) { + return; + } + modeling.updateWaypoints(connection, self.snapMiddleSegments(waypoints)); + }); +} +LayoutConnectionBehavior.$inject = ['eventBus', 'gridSnapping', 'modeling']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(LayoutConnectionBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/** + * Snap middle segments of a given connection. + * + * @param {Array} waypoints + * + * @returns {Array} + */ +LayoutConnectionBehavior.prototype.snapMiddleSegments = function (waypoints) { + var gridSnapping = this._gridSnapping, + snapped; + waypoints = waypoints.slice(); + for (var i = 1; i < waypoints.length - 2; i++) { + snapped = snapSegment(gridSnapping, waypoints[i], waypoints[i + 1]); + waypoints[i] = snapped[0]; + waypoints[i + 1] = snapped[1]; + } + return waypoints; +}; + +// helpers ////////// + +/** + * Check whether a connection has a middle segments. + * + * @param {Array} waypoints + * + * @returns {boolean} + */ +function hasMiddleSegments(waypoints) { + return waypoints.length > 3; +} + +/** + * Check whether an alignment is horizontal. + * + * @param {string} aligned + * + * @returns {boolean} + */ +function horizontallyAligned(aligned) { + return aligned === 'h'; +} + +/** + * Check whether an alignment is vertical. + * + * @param {string} aligned + * + * @returns {boolean} + */ +function verticallyAligned(aligned) { + return aligned === 'v'; +} + +/** + * Get middle segments from a given connection. + * + * @param {Array} waypoints + * + * @returns {Array} + */ +function snapSegment(gridSnapping, segmentStart, segmentEnd) { + var aligned = (0,diagram_js_lib_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointsAligned)(segmentStart, segmentEnd); + var snapped = {}; + if (horizontallyAligned(aligned)) { + // snap horizontally + snapped.y = gridSnapping.snapValue(segmentStart.y); + } + if (verticallyAligned(aligned)) { + // snap vertically + snapped.x = gridSnapping.snapValue(segmentStart.x); + } + if ('x' in snapped || 'y' in snapped) { + segmentStart = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({}, segmentStart, snapped); + segmentEnd = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)({}, segmentEnd, snapped); + } + return [segmentStart, segmentEnd]; +} + +/***/ }), + +/***/ 73965: +/*!***************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/grid-snapping/behavior/index.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _AutoPlaceBehavior__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AutoPlaceBehavior */ 2942); +/* harmony import */ var _CreateParticipantBehavior__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CreateParticipantBehavior */ 74425); +/* harmony import */ var _LayoutConnectionBehavior__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LayoutConnectionBehavior */ 58172); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['gridSnappingAutoPlaceBehavior', 'gridSnappingCreateParticipantBehavior', 'gridSnappingLayoutConnectionBehavior'], + gridSnappingAutoPlaceBehavior: ['type', _AutoPlaceBehavior__WEBPACK_IMPORTED_MODULE_0__["default"]], + gridSnappingCreateParticipantBehavior: ['type', _CreateParticipantBehavior__WEBPACK_IMPORTED_MODULE_1__["default"]], + gridSnappingLayoutConnectionBehavior: ['type', _LayoutConnectionBehavior__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 22791: +/*!******************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/grid-snapping/index.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _BpmnGridSnapping__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BpmnGridSnapping */ 84494); +/* harmony import */ var diagram_js_lib_features_grid_snapping__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/grid-snapping */ 82795); +/* harmony import */ var _behavior__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./behavior */ 73965); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_grid_snapping__WEBPACK_IMPORTED_MODULE_0__["default"], _behavior__WEBPACK_IMPORTED_MODULE_1__["default"]], + __init__: ['bpmnGridSnapping'], + bpmnGridSnapping: ['type', _BpmnGridSnapping__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 67892: +/*!***************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/interaction-events/BpmnInteractionEvents.js ***! + \***************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnInteractionEvents) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/DiUtil */ 55441); + + +var LABEL_WIDTH = 30, + LABEL_HEIGHT = 30; + +/** + * BPMN-specific hit zones and interaction fixes. + * + * @param {EventBus} eventBus + * @param {InteractionEvents} interactionEvents + */ +function BpmnInteractionEvents(eventBus, interactionEvents) { + this._interactionEvents = interactionEvents; + var self = this; + eventBus.on(['interactionEvents.createHit', 'interactionEvents.updateHit'], function (context) { + var element = context.element, + gfx = context.gfx; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Lane')) { + return self.createParticipantHit(element, gfx); + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant')) { + if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(element)) { + return self.createParticipantHit(element, gfx); + } else { + return self.createDefaultHit(element, gfx); + } + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess')) { + if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(element)) { + return self.createSubProcessHit(element, gfx); + } else { + return self.createDefaultHit(element, gfx); + } + } + }); +} +BpmnInteractionEvents.$inject = ['eventBus', 'interactionEvents']; +BpmnInteractionEvents.prototype.createDefaultHit = function (element, gfx) { + this._interactionEvents.removeHits(gfx); + this._interactionEvents.createDefaultHit(element, gfx); + + // indicate that we created a hit + return true; +}; +BpmnInteractionEvents.prototype.createParticipantHit = function (element, gfx) { + // remove existing hits + this._interactionEvents.removeHits(gfx); + + // add outline hit + this._interactionEvents.createBoxHit(gfx, 'click-stroke', { + width: element.width, + height: element.height + }); + + // add label hit + this._interactionEvents.createBoxHit(gfx, 'all', { + width: LABEL_WIDTH, + height: element.height + }); + + // indicate that we created a hit + return true; +}; +BpmnInteractionEvents.prototype.createSubProcessHit = function (element, gfx) { + // remove existing hits + this._interactionEvents.removeHits(gfx); + + // add outline hit + this._interactionEvents.createBoxHit(gfx, 'click-stroke', { + width: element.width, + height: element.height + }); + + // add label hit + this._interactionEvents.createBoxHit(gfx, 'all', { + width: element.width, + height: LABEL_HEIGHT + }); + + // indicate that we created a hit + return true; +}; + +/***/ }), + +/***/ 69382: +/*!***********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/interaction-events/index.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _BpmnInteractionEvents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BpmnInteractionEvents */ 67892); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['bpmnInteractionEvents'], + bpmnInteractionEvents: ['type', _BpmnInteractionEvents__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 67551: +/*!****************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/keyboard/BpmnKeyboardBindings.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnKeyboardBindings) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_features_keyboard_KeyboardBindings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/keyboard/KeyboardBindings */ 17946); + + + +/** + * BPMN 2.0 specific keyboard bindings. + * + * @param {Injector} injector + */ +function BpmnKeyboardBindings(injector) { + injector.invoke(diagram_js_lib_features_keyboard_KeyboardBindings__WEBPACK_IMPORTED_MODULE_1__["default"], this); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnKeyboardBindings, diagram_js_lib_features_keyboard_KeyboardBindings__WEBPACK_IMPORTED_MODULE_1__["default"]); +BpmnKeyboardBindings.$inject = ['injector']; + +/** + * Register available keyboard bindings. + * + * @param {Keyboard} keyboard + * @param {EditorActions} editorActions + */ +BpmnKeyboardBindings.prototype.registerBindings = function (keyboard, editorActions) { + // inherit default bindings + diagram_js_lib_features_keyboard_KeyboardBindings__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.registerBindings.call(this, keyboard, editorActions); + + /** + * Add keyboard binding if respective editor action + * is registered. + * + * @param {string} action name + * @param {Function} fn that implements the key binding + */ + function addListener(action, fn) { + if (editorActions.isRegistered(action)) { + keyboard.addListener(fn); + } + } + + // select all elements + // CTRL + A + addListener('selectElements', function (context) { + var event = context.keyEvent; + if (keyboard.isKey(['a', 'A'], event) && keyboard.isCmd(event)) { + editorActions.trigger('selectElements'); + return true; + } + }); + + // search labels + // CTRL + F + addListener('find', function (context) { + var event = context.keyEvent; + if (keyboard.isKey(['f', 'F'], event) && keyboard.isCmd(event)) { + editorActions.trigger('find'); + return true; + } + }); + + // activate space tool + // S + addListener('spaceTool', function (context) { + var event = context.keyEvent; + if (keyboard.hasModifier(event)) { + return; + } + if (keyboard.isKey(['s', 'S'], event)) { + editorActions.trigger('spaceTool'); + return true; + } + }); + + // activate lasso tool + // L + addListener('lassoTool', function (context) { + var event = context.keyEvent; + if (keyboard.hasModifier(event)) { + return; + } + if (keyboard.isKey(['l', 'L'], event)) { + editorActions.trigger('lassoTool'); + return true; + } + }); + + // activate hand tool + // H + addListener('handTool', function (context) { + var event = context.keyEvent; + if (keyboard.hasModifier(event)) { + return; + } + if (keyboard.isKey(['h', 'H'], event)) { + editorActions.trigger('handTool'); + return true; + } + }); + + // activate global connect tool + // C + addListener('globalConnectTool', function (context) { + var event = context.keyEvent; + if (keyboard.hasModifier(event)) { + return; + } + if (keyboard.isKey(['c', 'C'], event)) { + editorActions.trigger('globalConnectTool'); + return true; + } + }); + + // activate direct editing + // E + addListener('directEditing', function (context) { + var event = context.keyEvent; + if (keyboard.hasModifier(event)) { + return; + } + if (keyboard.isKey(['e', 'E'], event)) { + editorActions.trigger('directEditing'); + return true; + } + }); +}; + +/***/ }), + +/***/ 6581: +/*!*************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/keyboard/index.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_keyboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/keyboard */ 6329); +/* harmony import */ var _BpmnKeyboardBindings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnKeyboardBindings */ 67551); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_keyboard__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['keyboardBindings'], + keyboardBindings: ['type', _BpmnKeyboardBindings__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 24513: +/*!********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/label-editing/LabelEditingPreview.js ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ LabelEditingPreview) +/* harmony export */ }); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/util/SvgTransformUtil */ 81384); + + + +var MARKER_HIDDEN = 'djs-element-hidden', + MARKER_LABEL_HIDDEN = 'djs-label-hidden'; +function LabelEditingPreview(eventBus, canvas, elementRegistry, pathMap) { + var self = this; + var defaultLayer = canvas.getDefaultLayer(); + var element, absoluteElementBBox, gfx; + eventBus.on('directEditing.activate', function (context) { + var activeProvider = context.active; + element = activeProvider.element.label || activeProvider.element; + + // text annotation + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) { + absoluteElementBBox = canvas.getAbsoluteBBox(element); + gfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'); + var textPathData = pathMap.getScaledPath('TEXT_ANNOTATION', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: element.height, + position: { + mx: 0.0, + my: 0.0 + } + }); + var path = self.path = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(path, { + d: textPathData, + strokeWidth: 2, + stroke: getStrokeColor(element) + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(gfx, path); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(defaultLayer, gfx); + (0,diagram_js_lib_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__.translate)(gfx, element.x, element.y); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation') || element.labelTarget) { + canvas.addMarker(element, MARKER_HIDDEN); + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Task') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:CallActivity') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant')) { + canvas.addMarker(element, MARKER_LABEL_HIDDEN); + } + }); + eventBus.on('directEditing.resize', function (context) { + // text annotation + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) { + var height = context.height, + dy = context.dy; + var newElementHeight = Math.max(element.height / absoluteElementBBox.height * (height + dy), 0); + var textPathData = pathMap.getScaledPath('TEXT_ANNOTATION', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: element.width, + containerHeight: newElementHeight, + position: { + mx: 0.0, + my: 0.0 + } + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(self.path, { + d: textPathData + }); + } + }); + eventBus.on(['directEditing.complete', 'directEditing.cancel'], function (context) { + var activeProvider = context.active; + if (activeProvider) { + canvas.removeMarker(activeProvider.element.label || activeProvider.element, MARKER_HIDDEN); + canvas.removeMarker(element, MARKER_LABEL_HIDDEN); + } + element = undefined; + absoluteElementBBox = undefined; + if (gfx) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(gfx); + gfx = undefined; + } + }); +} +LabelEditingPreview.$inject = ['eventBus', 'canvas', 'elementRegistry', 'pathMap']; + +// helpers /////////////////// + +function getStrokeColor(element, defaultColor) { + var bo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element); + return bo.di.get('stroke') || defaultColor || 'black'; +} + +/***/ }), + +/***/ 27356: +/*!*********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/label-editing/LabelEditingProvider.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ LabelEditingProvider) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _LabelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LabelUtil */ 89497); +/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ 4525); +/* harmony import */ var _modeling_behavior_util_CategoryUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../modeling/behavior/util/CategoryUtil */ 14891); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/DiUtil */ 55441); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/LabelUtil */ 81454); + + + + + + + +function LabelEditingProvider(eventBus, bpmnFactory, canvas, directEditing, modeling, resizeHandles, textRenderer) { + this._bpmnFactory = bpmnFactory; + this._canvas = canvas; + this._modeling = modeling; + this._textRenderer = textRenderer; + directEditing.registerProvider(this); + + // listen to dblclick on non-root elements + eventBus.on('element.dblclick', function (event) { + activateDirectEdit(event.element, true); + }); + + // complete on followup canvas operation + eventBus.on(['autoPlace.start', 'canvas.viewbox.changing', 'drag.init', 'element.mousedown', 'popupMenu.open'], function (event) { + if (directEditing.isActive()) { + directEditing.complete(); + } + }); + + // cancel on command stack changes + eventBus.on(['commandStack.changed'], function (e) { + if (directEditing.isActive()) { + directEditing.cancel(); + } + }); + eventBus.on('directEditing.activate', function (event) { + resizeHandles.removeResizers(); + }); + eventBus.on('create.end', 500, function (event) { + var context = event.context, + element = context.shape, + canExecute = event.context.canExecute, + isTouch = event.isTouch; + + // TODO(nikku): we need to find a way to support the + // direct editing on mobile devices; right now this will + // break for desworkflowediting on mobile devices + // as it breaks the user interaction workflow + + // TODO(nre): we should temporarily focus the edited element + // here and release the focused viewport after the direct edit + // operation is finished + if (isTouch) { + return; + } + if (!canExecute) { + return; + } + if (context.hints && context.hints.createElementsBehavior === false) { + return; + } + activateDirectEdit(element); + }); + eventBus.on('autoPlace.end', 500, function (event) { + activateDirectEdit(event.shape); + }); + function activateDirectEdit(element, force) { + if (force || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, ['bpmn:Task', 'bpmn:TextAnnotation']) || isCollapsedSubProcess(element)) { + directEditing.activate(element); + } + } +} +LabelEditingProvider.$inject = ['eventBus', 'bpmnFactory', 'canvas', 'directEditing', 'modeling', 'resizeHandles', 'textRenderer']; + +/** + * Activate direct editing for activities and text annotations. + * + * @param {djs.model.Base} element + * + * @return {Object} an object with properties bounds (position and size), text and options + */ +LabelEditingProvider.prototype.activate = function (element) { + // text + var text = (0,_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.getLabel)(element); + if (text === undefined) { + return; + } + var context = { + text: text + }; + + // bounds + var bounds = this.getEditingBBox(element); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(context, bounds); + var options = {}; + + // tasks + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, ['bpmn:Task', 'bpmn:Participant', 'bpmn:Lane', 'bpmn:CallActivity']) || isCollapsedSubProcess(element)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(options, { + centerVertically: true + }); + } + + // external labels + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabelExternal)(element)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(options, { + autoResize: true + }); + } + + // text annotations + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(options, { + resizable: true, + autoResize: true + }); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(context, { + options: options + }); + return context; +}; + +/** + * Get the editing bounding box based on the element's size and position + * + * @param {djs.model.Base} element + * + * @return {Object} an object containing information about position + * and size (fixed or minimum and/or maximum) + */ +LabelEditingProvider.prototype.getEditingBBox = function (element) { + var canvas = this._canvas; + var target = element.label || element; + var bbox = canvas.getAbsoluteBBox(target); + var mid = { + x: bbox.x + bbox.width / 2, + y: bbox.y + bbox.height / 2 + }; + + // default position + var bounds = { + x: bbox.x, + y: bbox.y + }; + var zoom = canvas.zoom(); + var defaultStyle = this._textRenderer.getDefaultStyle(), + externalStyle = this._textRenderer.getExternalStyle(); + + // take zoom into account + var externalFontSize = externalStyle.fontSize * zoom, + externalLineHeight = externalStyle.lineHeight, + defaultFontSize = defaultStyle.fontSize * zoom, + defaultLineHeight = defaultStyle.lineHeight; + var style = { + fontFamily: this._textRenderer.getDefaultStyle().fontFamily, + fontWeight: this._textRenderer.getDefaultStyle().fontWeight + }; + + // adjust for expanded pools AND lanes + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Lane') || isExpandedPool(element)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, { + width: bbox.height, + height: 30 * zoom, + x: bbox.x - bbox.height / 2 + 15 * zoom, + y: mid.y - 30 * zoom / 2 + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, { + fontSize: defaultFontSize + 'px', + lineHeight: defaultLineHeight, + paddingTop: 7 * zoom + 'px', + paddingBottom: 7 * zoom + 'px', + paddingLeft: 5 * zoom + 'px', + paddingRight: 5 * zoom + 'px', + transform: 'rotate(-90deg)' + }); + } + + // internal labels for tasks and collapsed call activities, + // sub processes and participants + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, ['bpmn:Task', 'bpmn:CallActivity']) || isCollapsedPool(element) || isCollapsedSubProcess(element)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, { + width: bbox.width, + height: bbox.height + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, { + fontSize: defaultFontSize + 'px', + lineHeight: defaultLineHeight, + paddingTop: 7 * zoom + 'px', + paddingBottom: 7 * zoom + 'px', + paddingLeft: 5 * zoom + 'px', + paddingRight: 5 * zoom + 'px' + }); + } + + // internal labels for expanded sub processes + if (isExpandedSubProcess(element)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, { + width: bbox.width, + x: bbox.x + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, { + fontSize: defaultFontSize + 'px', + lineHeight: defaultLineHeight, + paddingTop: 7 * zoom + 'px', + paddingBottom: 7 * zoom + 'px', + paddingLeft: 5 * zoom + 'px', + paddingRight: 5 * zoom + 'px' + }); + } + var width = 90 * zoom, + paddingTop = 7 * zoom, + paddingBottom = 4 * zoom; + + // external labels for events, data elements, gateways, groups and connections + if (target.labelTarget) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, { + width: width, + height: bbox.height + paddingTop + paddingBottom, + x: mid.x - width / 2, + y: bbox.y - paddingTop + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, { + fontSize: externalFontSize + 'px', + lineHeight: externalLineHeight, + paddingTop: paddingTop + 'px', + paddingBottom: paddingBottom + 'px' + }); + } + + // external label not yet created + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabelExternal)(target) && !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.hasExternalLabel)(target) && !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabel)(target)) { + var externalLabelMid = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.getExternalLabelMid)(element); + var absoluteBBox = canvas.getAbsoluteBBox({ + x: externalLabelMid.x, + y: externalLabelMid.y, + width: 0, + height: 0 + }); + var height = externalFontSize + paddingTop + paddingBottom; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, { + width: width, + height: height, + x: absoluteBBox.x - width / 2, + y: absoluteBBox.y - height / 2 + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, { + fontSize: externalFontSize + 'px', + lineHeight: externalLineHeight, + paddingTop: paddingTop + 'px', + paddingBottom: paddingBottom + 'px' + }); + } + + // text annotations + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, { + width: bbox.width, + height: bbox.height, + minWidth: 30 * zoom, + minHeight: 10 * zoom + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(style, { + textAlign: 'left', + paddingTop: 5 * zoom + 'px', + paddingBottom: 7 * zoom + 'px', + paddingLeft: 7 * zoom + 'px', + paddingRight: 5 * zoom + 'px', + fontSize: defaultFontSize + 'px', + lineHeight: defaultLineHeight + }); + } + return { + bounds: bounds, + style: style + }; +}; +LabelEditingProvider.prototype.update = function (element, newLabel, activeContextText, bounds) { + var newBounds, bbox; + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:TextAnnotation')) { + bbox = this._canvas.getAbsoluteBBox(element); + newBounds = { + x: element.x, + y: element.y, + width: element.width / bbox.width * bounds.width, + height: element.height / bbox.height * bounds.height + }; + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Group')) { + var businessObject = (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element); + + // initialize categoryValue if not existing + if (!businessObject.categoryValueRef) { + var rootElement = this._canvas.getRootElement(), + definitions = (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(rootElement).$parent; + var categoryValue = (0,_modeling_behavior_util_CategoryUtil__WEBPACK_IMPORTED_MODULE_4__.createCategoryValue)(definitions, this._bpmnFactory); + (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element).categoryValueRef = categoryValue; + } + } + if (isEmptyText(newLabel)) { + newLabel = null; + } + this._modeling.updateLabel(element, newLabel, newBounds); +}; + +// helpers ////////////////////// + +function isCollapsedSubProcess(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(element); +} +function isExpandedSubProcess(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(element); +} +function isCollapsedPool(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(element); +} +function isExpandedPool(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(element); +} +function isEmptyText(label) { + return !label || !label.trim(); +} + +/***/ }), + +/***/ 89497: +/*!**********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/label-editing/LabelUtil.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getLabel: () => (/* binding */ getLabel), +/* harmony export */ setLabel: () => (/* binding */ setLabel) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); + +function getLabelAttr(semantic) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:FlowElement') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:Participant') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:Lane') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:SequenceFlow') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:MessageFlow') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:DataInput') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:DataOutput')) { + return 'name'; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:TextAnnotation')) { + return 'text'; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:Group')) { + return 'categoryValueRef'; + } +} +function getCategoryValue(semantic) { + var categoryValueRef = semantic['categoryValueRef']; + if (!categoryValueRef) { + return ''; + } + return categoryValueRef.value || ''; +} +function getLabel(element) { + var semantic = element.businessObject, + attr = getLabelAttr(semantic); + if (attr) { + if (attr === 'categoryValueRef') { + return getCategoryValue(semantic); + } + return semantic[attr] || ''; + } +} +function setLabel(element, text, isExternal) { + var semantic = element.businessObject, + attr = getLabelAttr(semantic); + if (attr) { + if (attr === 'categoryValueRef') { + semantic['categoryValueRef'].value = text; + } else { + semantic[attr] = text; + } + } + return element; +} + +/***/ }), + +/***/ 20649: +/*!***********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/label-editing/cmd/UpdateLabelHandler.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UpdateLabelHandler) +/* harmony export */ }); +/* harmony import */ var _LabelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../LabelUtil */ 89497); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/LabelUtil */ 81454); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + + +var NULL_DIMENSIONS = { + width: 0, + height: 0 +}; + +/** + * A handler that updates the text of a BPMN element. + */ +function UpdateLabelHandler(modeling, textRenderer) { + /** + * Set the label and return the changed elements. + * + * Element parameter can be label itself or connection (i.e. sequence flow). + * + * @param {djs.model.Base} element + * @param {string} text + */ + function setText(element, text) { + // external label if present + var label = element.label || element; + var labelTarget = element.labelTarget || element; + (0,_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.setLabel)(label, text, labelTarget !== label); + return [label, labelTarget]; + } + function preExecute(ctx) { + var element = ctx.element, + businessObject = element.businessObject, + newLabel = ctx.newLabel; + if (!(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(element) && (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabelExternal)(element) && !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.hasExternalLabel)(element) && !isEmptyText(newLabel)) { + // create label + var paddingTop = 7; + var labelCenter = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.getExternalLabelMid)(element); + labelCenter = { + x: labelCenter.x, + y: labelCenter.y + paddingTop + }; + modeling.createLabel(element, labelCenter, { + id: businessObject.id + '_label', + businessObject: businessObject + }); + } + } + function execute(ctx) { + ctx.oldLabel = (0,_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.getLabel)(ctx.element); + return setText(ctx.element, ctx.newLabel); + } + function revert(ctx) { + return setText(ctx.element, ctx.oldLabel); + } + function postExecute(ctx) { + var element = ctx.element, + label = element.label || element, + newLabel = ctx.newLabel, + newBounds = ctx.newBounds, + hints = ctx.hints || {}; + + // ignore internal labels for elements except text annotations + if (!(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(label) && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(label, 'bpmn:TextAnnotation')) { + return; + } + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.isLabel)(label) && isEmptyText(newLabel)) { + if (hints.removeShape !== false) { + modeling.removeShape(label, { + unsetLabel: false + }); + } + return; + } + var text = (0,_LabelUtil__WEBPACK_IMPORTED_MODULE_0__.getLabel)(label); + + // resize element based on label _or_ pre-defined bounds + if (typeof newBounds === 'undefined') { + newBounds = textRenderer.getExternalLabelBounds(label, text); + } + + // setting newBounds to false or _null_ will + // disable the postExecute resize operation + if (newBounds) { + modeling.resizeShape(label, newBounds, NULL_DIMENSIONS); + } + } + + // API + + this.preExecute = preExecute; + this.execute = execute; + this.revert = revert; + this.postExecute = postExecute; +} +UpdateLabelHandler.$inject = ['modeling', 'textRenderer']; + +// helpers /////////////////////// + +function isEmptyText(label) { + return !label || !label.trim(); +} + +/***/ }), + +/***/ 62511: +/*!******************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/label-editing/index.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/change-support */ 46242); +/* harmony import */ var diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/resize */ 40844); +/* harmony import */ var diagram_js_direct_editing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js-direct-editing */ 32110); +/* harmony import */ var _LabelEditingProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./LabelEditingProvider */ 27356); +/* harmony import */ var _LabelEditingPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./LabelEditingPreview */ 24513); + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_1__["default"], diagram_js_lib_features_resize__WEBPACK_IMPORTED_MODULE_2__["default"], diagram_js_direct_editing__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['labelEditingProvider', 'labelEditingPreview'], + labelEditingProvider: ['type', _LabelEditingProvider__WEBPACK_IMPORTED_MODULE_3__["default"]], + labelEditingPreview: ['type', _LabelEditingPreview__WEBPACK_IMPORTED_MODULE_4__["default"]] +}); + +/***/ }), + +/***/ 25198: +/*!*******************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/BpmnFactory.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnFactory) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); + + + +function BpmnFactory(moddle) { + this._model = moddle; +} +BpmnFactory.$inject = ['moddle']; +BpmnFactory.prototype._needsId = function (element) { + return (0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, ['bpmn:RootElement', 'bpmn:FlowElement', 'bpmn:MessageFlow', 'bpmn:DataAssociation', 'bpmn:Artifact', 'bpmn:Participant', 'bpmn:Lane', 'bpmn:LaneSet', 'bpmn:Process', 'bpmn:Collaboration', 'bpmndi:BPMNShape', 'bpmndi:BPMNEdge', 'bpmndi:BPMNDiagram', 'bpmndi:BPMNPlane', 'bpmn:Property', 'bpmn:CategoryValue']); +}; +BpmnFactory.prototype._ensureId = function (element) { + if (element.id) { + this._model.ids.claim(element.id, element); + return; + } + + // generate semantic ids for elements + // bpmn:SequenceFlow -> SequenceFlow_ID + var prefix; + if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Activity')) { + prefix = 'Activity'; + } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Event')) { + prefix = 'Event'; + } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Gateway')) { + prefix = 'Gateway'; + } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, ['bpmn:SequenceFlow', 'bpmn:MessageFlow'])) { + prefix = 'Flow'; + } else { + prefix = (element.$type || '').replace(/^[^:]*:/g, ''); + } + prefix += '_'; + if (!element.id && this._needsId(element)) { + element.id = this._model.ids.nextPrefixed(prefix, element); + } +}; +BpmnFactory.prototype.create = function (type, attrs) { + var element = this._model.create(type, attrs || {}); + this._ensureId(element); + return element; +}; +BpmnFactory.prototype.createDiLabel = function () { + return this.create('bpmndi:BPMNLabel', { + bounds: this.createDiBounds() + }); +}; +BpmnFactory.prototype.createDiShape = function (semantic, bounds, attrs) { + return this.create('bpmndi:BPMNShape', (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ + bpmnElement: semantic, + bounds: this.createDiBounds(bounds) + }, attrs)); +}; +BpmnFactory.prototype.createDiBounds = function (bounds) { + return this.create('dc:Bounds', bounds); +}; +BpmnFactory.prototype.createDiWaypoints = function (waypoints) { + var self = this; + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.map)(waypoints, function (pos) { + return self.createDiWaypoint(pos); + }); +}; +BpmnFactory.prototype.createDiWaypoint = function (point) { + return this.create('dc:Point', (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.pick)(point, ['x', 'y'])); +}; +BpmnFactory.prototype.createDiEdge = function (semantic, waypoints, attrs) { + return this.create('bpmndi:BPMNEdge', (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ + bpmnElement: semantic, + waypoint: this.createDiWaypoints(waypoints) + }, attrs)); +}; +BpmnFactory.prototype.createDiPlane = function (semantic) { + return this.create('bpmndi:BPMNPlane', { + bpmnElement: semantic + }); +}; + +/***/ }), + +/***/ 55395: +/*!********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/BpmnLayouter.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnLayouter) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_layout_BaseLayouter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/BaseLayouter */ 17640); +/* harmony import */ var diagram_js_lib_layout_ManhattanLayout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/layout/ManhattanLayout */ 98624); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../util/DiUtil */ 55441); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); + + + + + + + +var ATTACH_ORIENTATION_PADDING = -10, + BOUNDARY_TO_HOST_THRESHOLD = 40; +var oppositeOrientationMapping = { + 'top': 'bottom', + 'top-right': 'bottom-left', + 'top-left': 'bottom-right', + 'right': 'left', + 'bottom': 'top', + 'bottom-right': 'top-left', + 'bottom-left': 'top-right', + 'left': 'right' +}; +var orientationDirectionMapping = { + top: 't', + right: 'r', + bottom: 'b', + left: 'l' +}; +function BpmnLayouter() {} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnLayouter, diagram_js_lib_layout_BaseLayouter__WEBPACK_IMPORTED_MODULE_1__["default"]); +BpmnLayouter.prototype.layoutConnection = function (connection, hints) { + if (!hints) { + hints = {}; + } + var source = hints.source || connection.source, + target = hints.target || connection.target, + waypoints = hints.waypoints || connection.waypoints, + connectionStart = hints.connectionStart, + connectionEnd = hints.connectionEnd; + var manhattanOptions, updatedWaypoints; + if (!connectionStart) { + connectionStart = getConnectionDocking(waypoints && waypoints[0], source); + } + if (!connectionEnd) { + connectionEnd = getConnectionDocking(waypoints && waypoints[waypoints.length - 1], target); + } + + // TODO(nikku): support vertical modeling + // and invert preferredLayouts accordingly + + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:Association') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:DataAssociation')) { + if (waypoints && !isCompensationAssociation(source, target)) { + return [].concat([connectionStart], waypoints.slice(1, -1), [connectionEnd]); + } + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:MessageFlow')) { + manhattanOptions = getMessageFlowManhattanOptions(source, target); + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:SequenceFlow') || isCompensationAssociation(source, target)) { + // layout all connection between flow elements h:h, except for + // (1) outgoing of boundary events -> layout based on attach orientation and target orientation + // (2) incoming/outgoing of gateways -> v:h for outgoing, h:v for incoming + // (3) loops + if (source === target) { + manhattanOptions = { + preferredLayouts: getLoopPreferredLayout(source, connection) + }; + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:BoundaryEvent')) { + manhattanOptions = { + preferredLayouts: getBoundaryEventPreferredLayouts(source, target, connectionEnd) + }; + } else if (isExpandedSubProcess(source) || isExpandedSubProcess(target)) { + manhattanOptions = getSubProcessManhattanOptions(source); + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:Gateway')) { + manhattanOptions = { + preferredLayouts: ['v:h'] + }; + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Gateway')) { + manhattanOptions = { + preferredLayouts: ['h:v'] + }; + } else { + manhattanOptions = { + preferredLayouts: ['h:h'] + }; + } + } + if (manhattanOptions) { + manhattanOptions = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(manhattanOptions, hints); + updatedWaypoints = (0,diagram_js_lib_layout_ManhattanLayout__WEBPACK_IMPORTED_MODULE_4__.withoutRedundantPoints)((0,diagram_js_lib_layout_ManhattanLayout__WEBPACK_IMPORTED_MODULE_4__.repairConnection)(source, target, connectionStart, connectionEnd, waypoints, manhattanOptions)); + } + return updatedWaypoints || [connectionStart, connectionEnd]; +}; + +// helpers ////////// + +function getAttachOrientation(attachedElement) { + var hostElement = attachedElement.host; + return (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getOrientation)((0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(attachedElement), hostElement, ATTACH_ORIENTATION_PADDING); +} +function getMessageFlowManhattanOptions(source, target) { + return { + preferredLayouts: ['straight', 'v:v'], + preserveDocking: getMessageFlowPreserveDocking(source, target) + }; +} +function getMessageFlowPreserveDocking(source, target) { + // (1) docking element connected to participant has precedence + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Participant')) { + return 'source'; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:Participant')) { + return 'target'; + } + + // (2) docking element connected to expanded sub-process has precedence + if (isExpandedSubProcess(target)) { + return 'source'; + } + if (isExpandedSubProcess(source)) { + return 'target'; + } + + // (3) docking event has precedence + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Event')) { + return 'target'; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:Event')) { + return 'source'; + } + return null; +} +function getSubProcessManhattanOptions(source) { + return { + preferredLayouts: ['straight', 'h:h'], + preserveDocking: getSubProcessPreserveDocking(source) + }; +} +function getSubProcessPreserveDocking(source) { + return isExpandedSubProcess(source) ? 'target' : 'source'; +} +function getConnectionDocking(point, shape) { + return point ? point.original || point : (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(shape); +} +function isCompensationAssociation(source, target) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Activity') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:BoundaryEvent') && target.businessObject.isForCompensation; +} +function isExpandedSubProcess(element) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_6__.isExpanded)(element); +} +function isSame(a, b) { + return a === b; +} +function isAnyOrientation(orientation, orientations) { + return orientations.indexOf(orientation) !== -1; +} +function getHorizontalOrientation(orientation) { + var matches = /right|left/.exec(orientation); + return matches && matches[0]; +} +function getVerticalOrientation(orientation) { + var matches = /top|bottom/.exec(orientation); + return matches && matches[0]; +} +function isOppositeOrientation(a, b) { + return oppositeOrientationMapping[a] === b; +} +function isOppositeHorizontalOrientation(a, b) { + var horizontalOrientation = getHorizontalOrientation(a); + var oppositeHorizontalOrientation = oppositeOrientationMapping[horizontalOrientation]; + return b.indexOf(oppositeHorizontalOrientation) !== -1; +} +function isOppositeVerticalOrientation(a, b) { + var verticalOrientation = getVerticalOrientation(a); + var oppositeVerticalOrientation = oppositeOrientationMapping[verticalOrientation]; + return b.indexOf(oppositeVerticalOrientation) !== -1; +} +function isHorizontalOrientation(orientation) { + return orientation === 'right' || orientation === 'left'; +} +function getLoopPreferredLayout(source, connection) { + var waypoints = connection.waypoints; + var orientation = waypoints && waypoints.length && (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getOrientation)(waypoints[0], source); + if (orientation === 'top') { + return ['t:r']; + } else if (orientation === 'right') { + return ['r:b']; + } else if (orientation === 'left') { + return ['l:t']; + } + return ['b:l']; +} +function getBoundaryEventPreferredLayouts(source, target, end) { + var sourceMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(source), + targetMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(target), + attachOrientation = getAttachOrientation(source), + sourceLayout, + targetLayout; + var isLoop = isSame(source.host, target); + var attachedToSide = isAnyOrientation(attachOrientation, ['top', 'right', 'bottom', 'left']); + var targetOrientation = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getOrientation)(targetMid, sourceMid, { + x: source.width / 2 + target.width / 2, + y: source.height / 2 + target.height / 2 + }); + if (isLoop) { + return getBoundaryEventLoopLayout(attachOrientation, attachedToSide, source, target, end); + } + + // source layout + sourceLayout = getBoundaryEventSourceLayout(attachOrientation, targetOrientation, attachedToSide); + + // target layout + targetLayout = getBoundaryEventTargetLayout(attachOrientation, targetOrientation, attachedToSide); + return [sourceLayout + ':' + targetLayout]; +} +function getBoundaryEventLoopLayout(attachOrientation, attachedToSide, source, target, end) { + var orientation = attachedToSide ? attachOrientation : getVerticalOrientation(attachOrientation), + sourceLayout = orientationDirectionMapping[orientation], + targetLayout; + if (attachedToSide) { + if (isHorizontalOrientation(attachOrientation)) { + targetLayout = shouldConnectToSameSide('y', source, target, end) ? 'h' : 'b'; + } else { + targetLayout = shouldConnectToSameSide('x', source, target, end) ? 'v' : 'l'; + } + } else { + targetLayout = 'v'; + } + return [sourceLayout + ':' + targetLayout]; +} +function shouldConnectToSameSide(axis, source, target, end) { + var threshold = BOUNDARY_TO_HOST_THRESHOLD; + return !(areCloseOnAxis(axis, end, target, threshold) || areCloseOnAxis(axis, end, { + x: target.x + target.width, + y: target.y + target.height + }, threshold) || areCloseOnAxis(axis, end, (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(source), threshold)); +} +function areCloseOnAxis(axis, a, b, threshold) { + return Math.abs(a[axis] - b[axis]) < threshold; +} +function getBoundaryEventSourceLayout(attachOrientation, targetOrientation, attachedToSide) { + // attached to either top, right, bottom or left side + if (attachedToSide) { + return orientationDirectionMapping[attachOrientation]; + } + + // attached to either top-right, top-left, bottom-right or bottom-left corner + + // same vertical or opposite horizontal orientation + if (isSame(getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation)) || isOppositeOrientation(getHorizontalOrientation(attachOrientation), getHorizontalOrientation(targetOrientation))) { + return orientationDirectionMapping[getVerticalOrientation(attachOrientation)]; + } + + // fallback + return orientationDirectionMapping[getHorizontalOrientation(attachOrientation)]; +} +function getBoundaryEventTargetLayout(attachOrientation, targetOrientation, attachedToSide) { + // attached to either top, right, bottom or left side + if (attachedToSide) { + if (isHorizontalOrientation(attachOrientation)) { + // orientation is right or left + + // opposite horizontal orientation or same orientation + if (isOppositeHorizontalOrientation(attachOrientation, targetOrientation) || isSame(attachOrientation, targetOrientation)) { + return 'h'; + } + + // fallback + return 'v'; + } else { + // orientation is top or bottom + + // opposite vertical orientation or same orientation + if (isOppositeVerticalOrientation(attachOrientation, targetOrientation) || isSame(attachOrientation, targetOrientation)) { + return 'v'; + } + + // fallback + return 'h'; + } + } + + // attached to either top-right, top-left, bottom-right or bottom-left corner + + // orientation is right, left + // or same vertical orientation but also right or left + if (isHorizontalOrientation(targetOrientation) || isSame(getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation)) && getHorizontalOrientation(targetOrientation)) { + return 'h'; + } else { + return 'v'; + } +} + +/***/ }), + +/***/ 22301: +/*!*******************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnUpdater) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ 39233); +/* harmony import */ var diagram_js_lib_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/model */ 83377); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/ModelingUtil */ 4525); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); + + + + + + + + +/** + * A handler responsible for updating the underlying BPMN 2.0 XML + DI + * once changes on the diagram happen + */ +function BpmnUpdater(eventBus, bpmnFactory, connectionDocking, translate) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this._bpmnFactory = bpmnFactory; + this._translate = translate; + var self = this; + + // connection cropping ////////////////////// + + // crop connection ends during create/update + function cropConnection(e) { + var context = e.context, + hints = context.hints || {}, + connection; + if (!context.cropped && hints.createElementsBehavior !== false) { + connection = context.connection; + connection.waypoints = connectionDocking.getCroppedWaypoints(connection); + context.cropped = true; + } + } + this.executed(['connection.layout', 'connection.create'], cropConnection); + this.reverted(['connection.layout'], function (e) { + delete e.context.cropped; + }); + + // BPMN + DI update ////////////////////// + + // update parent + function updateParent(e) { + var context = e.context; + self.updateParent(context.shape || context.connection, context.oldParent); + } + function reverseUpdateParent(e) { + var context = e.context; + var element = context.shape || context.connection, + // oldParent is the (old) new parent, because we are undoing + oldParent = context.parent || context.newParent; + self.updateParent(element, oldParent); + } + this.executed(['shape.move', 'shape.create', 'shape.delete', 'connection.create', 'connection.move', 'connection.delete'], ifBpmn(updateParent)); + this.reverted(['shape.move', 'shape.create', 'shape.delete', 'connection.create', 'connection.move', 'connection.delete'], ifBpmn(reverseUpdateParent)); + + /* + * ## Updating Parent + * + * When morphing a Process into a Collaboration or vice-versa, + * make sure that both the *semantic* and *di* parent of each element + * is updated. + * + */ + function updateRoot(event) { + var context = event.context, + oldRoot = context.oldRoot, + children = oldRoot.children; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(children, function (child) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(child, 'bpmn:BaseElement')) { + self.updateParent(child); + } + }); + } + this.executed(['canvas.updateRoot'], updateRoot); + this.reverted(['canvas.updateRoot'], updateRoot); + + // update bounds + function updateBounds(e) { + var shape = e.context.shape; + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:BaseElement')) { + return; + } + self.updateBounds(shape); + } + this.executed(['shape.move', 'shape.create', 'shape.resize'], ifBpmn(function (event) { + // exclude labels because they're handled separately during shape.changed + if (event.context.shape.type === 'label') { + return; + } + updateBounds(event); + })); + this.reverted(['shape.move', 'shape.create', 'shape.resize'], ifBpmn(function (event) { + // exclude labels because they're handled separately during shape.changed + if (event.context.shape.type === 'label') { + return; + } + updateBounds(event); + })); + + // Handle labels separately. This is necessary, because the label bounds have to be updated + // every time its shape changes, not only on move, create and resize. + eventBus.on('shape.changed', function (event) { + if (event.element.type === 'label') { + updateBounds({ + context: { + shape: event.element + } + }); + } + }); + + // attach / detach connection + function updateConnection(e) { + self.updateConnection(e.context); + } + this.executed(['connection.create', 'connection.move', 'connection.delete', 'connection.reconnect'], ifBpmn(updateConnection)); + this.reverted(['connection.create', 'connection.move', 'connection.delete', 'connection.reconnect'], ifBpmn(updateConnection)); + + // update waypoints + function updateConnectionWaypoints(e) { + self.updateConnectionWaypoints(e.context.connection); + } + this.executed(['connection.layout', 'connection.move', 'connection.updateWaypoints'], ifBpmn(updateConnectionWaypoints)); + this.reverted(['connection.layout', 'connection.move', 'connection.updateWaypoints'], ifBpmn(updateConnectionWaypoints)); + + // update conditional/default flows + this.executed('connection.reconnect', ifBpmn(function (event) { + var context = event.context, + connection = context.connection, + oldSource = context.oldSource, + newSource = context.newSource, + connectionBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(connection), + oldSourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(oldSource), + newSourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(newSource); + + // remove condition from connection on reconnect to new source + // if new source can NOT have condional sequence flow + if (connectionBo.conditionExpression && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(newSourceBo, ['bpmn:Activity', 'bpmn:ExclusiveGateway', 'bpmn:InclusiveGateway'])) { + context.oldConditionExpression = connectionBo.conditionExpression; + delete connectionBo.conditionExpression; + } + + // remove default from old source flow on reconnect to new source + // if source changed + if (oldSource !== newSource && oldSourceBo.default === connectionBo) { + context.oldDefault = oldSourceBo.default; + delete oldSourceBo.default; + } + })); + this.reverted('connection.reconnect', ifBpmn(function (event) { + var context = event.context, + connection = context.connection, + oldSource = context.oldSource, + newSource = context.newSource, + connectionBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(connection), + oldSourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(oldSource), + newSourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(newSource); + + // add condition to connection on revert reconnect to new source + if (context.oldConditionExpression) { + connectionBo.conditionExpression = context.oldConditionExpression; + } + + // add default to old source on revert reconnect to new source + if (context.oldDefault) { + oldSourceBo.default = context.oldDefault; + delete newSourceBo.default; + } + })); + + // update attachments + function updateAttachment(e) { + self.updateAttachment(e.context); + } + this.executed(['element.updateAttachment'], ifBpmn(updateAttachment)); + this.reverted(['element.updateAttachment'], ifBpmn(updateAttachment)); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnUpdater, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +BpmnUpdater.$inject = ['eventBus', 'bpmnFactory', 'connectionDocking', 'translate']; + +// implementation ////////////////////// + +BpmnUpdater.prototype.updateAttachment = function (context) { + var shape = context.shape, + businessObject = shape.businessObject, + host = shape.host; + businessObject.attachedToRef = host && host.businessObject; +}; +BpmnUpdater.prototype.updateParent = function (element, oldParent) { + // do not update BPMN 2.0 label parent + if (element instanceof diagram_js_lib_model__WEBPACK_IMPORTED_MODULE_4__.Label) { + return; + } + + // data stores in collaborations are handled separately by DataStoreBehavior + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:DataStoreReference') && element.parent && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element.parent, 'bpmn:Collaboration')) { + return; + } + var parentShape = element.parent; + var businessObject = element.businessObject, + parentBusinessObject = parentShape && parentShape.businessObject, + parentDi = parentBusinessObject && parentBusinessObject.di; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:FlowNode')) { + this.updateFlowNodeRefs(businessObject, parentBusinessObject, oldParent && oldParent.businessObject); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:DataOutputAssociation')) { + if (element.source) { + parentBusinessObject = element.source.businessObject; + } else { + parentBusinessObject = null; + } + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:DataInputAssociation')) { + if (element.target) { + parentBusinessObject = element.target.businessObject; + } else { + parentBusinessObject = null; + } + } + this.updateSemanticParent(businessObject, parentBusinessObject); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:DataObjectReference') && businessObject.dataObjectRef) { + this.updateSemanticParent(businessObject.dataObjectRef, parentBusinessObject); + } + this.updateDiParent(businessObject.di, parentDi); +}; +BpmnUpdater.prototype.updateBounds = function (shape) { + var di = shape.businessObject.di; + var target = shape instanceof diagram_js_lib_model__WEBPACK_IMPORTED_MODULE_4__.Label ? this._getLabel(di) : di; + var bounds = target.bounds; + if (!bounds) { + bounds = this._bpmnFactory.createDiBounds(); + target.set('bounds', bounds); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(bounds, { + x: shape.x, + y: shape.y, + width: shape.width, + height: shape.height + }); +}; +BpmnUpdater.prototype.updateFlowNodeRefs = function (businessObject, newContainment, oldContainment) { + if (oldContainment === newContainment) { + return; + } + var oldRefs, newRefs; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldContainment, 'bpmn:Lane')) { + oldRefs = oldContainment.get('flowNodeRef'); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_5__.remove)(oldRefs, businessObject); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newContainment, 'bpmn:Lane')) { + newRefs = newContainment.get('flowNodeRef'); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_5__.add)(newRefs, businessObject); + } +}; + +// update existing sourceElement and targetElement di information +BpmnUpdater.prototype.updateDiConnection = function (di, newSource, newTarget) { + if (di.sourceElement && di.sourceElement.bpmnElement !== newSource) { + di.sourceElement = newSource && newSource.di; + } + if (di.targetElement && di.targetElement.bpmnElement !== newTarget) { + di.targetElement = newTarget && newTarget.di; + } +}; +BpmnUpdater.prototype.updateDiParent = function (di, parentDi) { + if (parentDi && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(parentDi, 'bpmndi:BPMNPlane')) { + parentDi = parentDi.$parent; + } + if (di.$parent === parentDi) { + return; + } + var planeElements = (parentDi || di.$parent).get('planeElement'); + if (parentDi) { + planeElements.push(di); + di.$parent = parentDi; + } else { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_5__.remove)(planeElements, di); + di.$parent = null; + } +}; +function getDefinitions(element) { + while (element && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Definitions')) { + element = element.$parent; + } + return element; +} +BpmnUpdater.prototype.getLaneSet = function (container) { + var laneSet, laneSets; + + // bpmn:Lane + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(container, 'bpmn:Lane')) { + laneSet = container.childLaneSet; + if (!laneSet) { + laneSet = this._bpmnFactory.create('bpmn:LaneSet'); + container.childLaneSet = laneSet; + laneSet.$parent = container; + } + return laneSet; + } + + // bpmn:Participant + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(container, 'bpmn:Participant')) { + container = container.processRef; + } + + // bpmn:FlowElementsContainer + laneSets = container.get('laneSets'); + laneSet = laneSets[0]; + if (!laneSet) { + laneSet = this._bpmnFactory.create('bpmn:LaneSet'); + laneSet.$parent = container; + laneSets.push(laneSet); + } + return laneSet; +}; +BpmnUpdater.prototype.updateSemanticParent = function (businessObject, newParent, visualParent) { + var containment, + translate = this._translate; + if (businessObject.$parent === newParent) { + return; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:DataInput') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:DataOutput')) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newParent, 'bpmn:Participant') && 'processRef' in newParent) { + newParent = newParent.processRef; + } + + // already in correct ioSpecification + if ('ioSpecification' in newParent && newParent.ioSpecification === businessObject.$parent) { + return; + } + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:Lane')) { + if (newParent) { + newParent = this.getLaneSet(newParent); + } + containment = 'lanes'; + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:FlowElement')) { + if (newParent) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newParent, 'bpmn:Participant')) { + newParent = newParent.processRef; + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newParent, 'bpmn:Lane')) { + do { + // unwrap Lane -> LaneSet -> (Lane | FlowElementsContainer) + newParent = newParent.$parent.$parent; + } while ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newParent, 'bpmn:Lane')); + } + } + containment = 'flowElements'; + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:Artifact')) { + while (newParent && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newParent, 'bpmn:Process') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newParent, 'bpmn:SubProcess') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newParent, 'bpmn:Collaboration')) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newParent, 'bpmn:Participant')) { + newParent = newParent.processRef; + break; + } else { + newParent = newParent.$parent; + } + } + containment = 'artifacts'; + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:MessageFlow')) { + containment = 'messageFlows'; + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:Participant')) { + containment = 'participants'; + + // make sure the participants process is properly attached / detached + // from the XML document + + var process = businessObject.processRef, + definitions; + if (process) { + definitions = getDefinitions(businessObject.$parent || newParent); + if (businessObject.$parent) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_5__.remove)(definitions.get('rootElements'), process); + process.$parent = null; + } + if (newParent) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_5__.add)(definitions.get('rootElements'), process); + process.$parent = definitions; + } + } + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:DataOutputAssociation')) { + containment = 'dataOutputAssociations'; + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:DataInputAssociation')) { + containment = 'dataInputAssociations'; + } + if (!containment) { + throw new Error(translate('no parent for {element} in {parent}', { + element: businessObject.id, + parent: newParent.id + })); + } + var children; + if (businessObject.$parent) { + // remove from old parent + children = businessObject.$parent.get(containment); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_5__.remove)(children, businessObject); + } + if (!newParent) { + businessObject.$parent = null; + } else { + // add to new parent + children = newParent.get(containment); + children.push(businessObject); + businessObject.$parent = newParent; + } + if (visualParent) { + var diChildren = visualParent.get(containment); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_5__.remove)(children, businessObject); + if (newParent) { + if (!diChildren) { + diChildren = []; + newParent.set(containment, diChildren); + } + diChildren.push(businessObject); + } + } +}; +BpmnUpdater.prototype.updateConnectionWaypoints = function (connection) { + connection.businessObject.di.set('waypoint', this._bpmnFactory.createDiWaypoints(connection.waypoints)); +}; +BpmnUpdater.prototype.updateConnection = function (context) { + var connection = context.connection, + businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(connection), + newSource = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(connection.source), + newTarget = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(connection.target), + visualParent; + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:DataAssociation')) { + var inverseSet = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:SequenceFlow'); + if (businessObject.sourceRef !== newSource) { + if (inverseSet) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_5__.remove)(businessObject.sourceRef && businessObject.sourceRef.get('outgoing'), businessObject); + if (newSource && newSource.get('outgoing')) { + newSource.get('outgoing').push(businessObject); + } + } + businessObject.sourceRef = newSource; + } + if (businessObject.targetRef !== newTarget) { + if (inverseSet) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_5__.remove)(businessObject.targetRef && businessObject.targetRef.get('incoming'), businessObject); + if (newTarget && newTarget.get('incoming')) { + newTarget.get('incoming').push(businessObject); + } + } + businessObject.targetRef = newTarget; + } + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:DataInputAssociation')) { + // handle obnoxious isMsome sourceRef + businessObject.get('sourceRef')[0] = newSource; + visualParent = context.parent || context.newParent || newTarget; + this.updateSemanticParent(businessObject, newTarget, visualParent); + } else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(businessObject, 'bpmn:DataOutputAssociation')) { + visualParent = context.parent || context.newParent || newSource; + this.updateSemanticParent(businessObject, newSource, visualParent); + + // targetRef = new target + businessObject.targetRef = newTarget; + } + this.updateConnectionWaypoints(connection); + this.updateDiConnection(businessObject.di, newSource, newTarget); +}; + +// helpers ////////////////////// + +BpmnUpdater.prototype._getLabel = function (di) { + if (!di.label) { + di.label = this._bpmnFactory.createDiLabel(); + } + return di.label; +}; + +/** + * Make sure the event listener is only called + * if the touched element is a BPMN element. + * + * @param {Function} fn + * @return {Function} guarded function + */ +function ifBpmn(fn) { + return function (event) { + var context = event.context, + element = context.shape || context.connection; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:BaseElement')) { + fn(event); + } + }; +} + +/***/ }), + +/***/ 5557: +/*!**********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/ElementFactory.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ElementFactory) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/DiUtil */ 55441); +/* harmony import */ var diagram_js_lib_core_ElementFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/core/ElementFactory */ 22037); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/LabelUtil */ 81454); + + + + + + + +/** + * A bpmn-aware factory for diagram-js shapes + */ +function ElementFactory(bpmnFactory, moddle, translate) { + diagram_js_lib_core_ElementFactory__WEBPACK_IMPORTED_MODULE_1__["default"].call(this); + this._bpmnFactory = bpmnFactory; + this._moddle = moddle; + this._translate = translate; +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(ElementFactory, diagram_js_lib_core_ElementFactory__WEBPACK_IMPORTED_MODULE_1__["default"]); +ElementFactory.$inject = ['bpmnFactory', 'moddle', 'translate']; +ElementFactory.prototype.baseCreate = diagram_js_lib_core_ElementFactory__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.create; +ElementFactory.prototype.create = function (elementType, attrs) { + // no special magic for labels, + // we assume their businessObjects have already been created + // and wired via attrs + if (elementType === 'label') { + return this.baseCreate(elementType, (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + type: 'label' + }, _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_LABEL_SIZE, attrs)); + } + return this.createBpmnElement(elementType, attrs); +}; +ElementFactory.prototype.createBpmnElement = function (elementType, attrs) { + var size, + translate = this._translate; + attrs = attrs || {}; + var businessObject = attrs.businessObject; + if (!businessObject) { + if (!attrs.type) { + throw new Error(translate('no shape type specified')); + } + businessObject = this._bpmnFactory.create(attrs.type); + } + if (!businessObject.di) { + if (elementType === 'root') { + businessObject.di = this._bpmnFactory.createDiPlane(businessObject, [], { + id: businessObject.id + '_di' + }); + } else if (elementType === 'connection') { + businessObject.di = this._bpmnFactory.createDiEdge(businessObject, [], { + id: businessObject.id + '_di' + }); + } else { + businessObject.di = this._bpmnFactory.createDiShape(businessObject, {}, { + id: businessObject.id + '_di' + }); + } + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(businessObject, 'bpmn:Group')) { + attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + isFrame: true + }, attrs); + } + if (attrs.di) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(businessObject.di, attrs.di); + delete attrs.di; + } + applyAttributes(businessObject, attrs, ['processRef', 'isInterrupting', 'associationDirection', 'isForCompensation']); + if (attrs.isExpanded) { + applyAttribute(businessObject.di, attrs, 'isExpanded'); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(businessObject, 'bpmn:ExclusiveGateway')) { + businessObject.di.isMarkerVisible = true; + } + var eventDefinitions, newEventDefinition; + if (attrs.eventDefinitionType) { + eventDefinitions = businessObject.get('eventDefinitions') || []; + newEventDefinition = this._bpmnFactory.create(attrs.eventDefinitionType, attrs.eventDefinitionAttrs); + if (attrs.eventDefinitionType === 'bpmn:ConditionalEventDefinition') { + newEventDefinition.condition = this._bpmnFactory.create('bpmn:FormalExpression'); + } + eventDefinitions.push(newEventDefinition); + newEventDefinition.$parent = businessObject; + businessObject.eventDefinitions = eventDefinitions; + delete attrs.eventDefinitionType; + } + size = this._getDefaultSize(businessObject); + attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + businessObject: businessObject, + id: businessObject.id + }, size, attrs); + return this.baseCreate(elementType, attrs); +}; +ElementFactory.prototype._getDefaultSize = function (semantic) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(semantic, 'bpmn:SubProcess')) { + if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(semantic)) { + return { + width: 350, + height: 200 + }; + } else { + return { + width: 100, + height: 80 + }; + } + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(semantic, 'bpmn:Task')) { + return { + width: 100, + height: 80 + }; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(semantic, 'bpmn:Gateway')) { + return { + width: 50, + height: 50 + }; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(semantic, 'bpmn:Event')) { + return { + width: 36, + height: 36 + }; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(semantic, 'bpmn:Participant')) { + if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(semantic)) { + return { + width: 600, + height: 250 + }; + } else { + return { + width: 400, + height: 60 + }; + } + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(semantic, 'bpmn:Lane')) { + return { + width: 400, + height: 100 + }; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(semantic, 'bpmn:DataObjectReference')) { + return { + width: 36, + height: 50 + }; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(semantic, 'bpmn:DataStoreReference')) { + return { + width: 50, + height: 50 + }; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(semantic, 'bpmn:TextAnnotation')) { + return { + width: 100, + height: 30 + }; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(semantic, 'bpmn:Group')) { + return { + width: 300, + height: 300 + }; + } + return { + width: 100, + height: 80 + }; +}; + +/** + * Create participant. + * + * @param {boolean|Object} [attrs] attrs + * + * @returns {djs.model.Shape} + */ +ElementFactory.prototype.createParticipantShape = function (attrs) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isObject)(attrs)) { + attrs = { + isExpanded: attrs + }; + } + attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + type: 'bpmn:Participant' + }, attrs || {}); + + // participants are expanded by default + if (attrs.isExpanded !== false) { + attrs.processRef = this._bpmnFactory.create('bpmn:Process'); + } + return this.createShape(attrs); +}; + +// helpers ////////////////////// + +/** + * Apply attributes from a map to the given element, + * remove attribute from the map on application. + * + * @param {Base} element + * @param {Object} attrs (in/out map of attributes) + * @param {Array} attributeNames name of attributes to apply + */ +function applyAttributes(element, attrs, attributeNames) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attributeNames, function (property) { + if (attrs[property] !== undefined) { + applyAttribute(element, attrs, property); + } + }); +} + +/** + * Apply named property to element and drain it from the attrs + * collection. + * + * @param {Base} element + * @param {Object} attrs (in/out map of attributes) + * @param {string} attributeName to apply + */ +function applyAttribute(element, attrs, attributeName) { + element[attributeName] = attrs[attributeName]; + delete attrs[attributeName]; +} + +/***/ }), + +/***/ 53548: +/*!****************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/Modeling.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Modeling) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/modeling/Modeling */ 98680); +/* harmony import */ var _cmd_UpdateModdlePropertiesHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cmd/UpdateModdlePropertiesHandler */ 87101); +/* harmony import */ var _cmd_UpdatePropertiesHandler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cmd/UpdatePropertiesHandler */ 52451); +/* harmony import */ var _cmd_UpdateCanvasRootHandler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cmd/UpdateCanvasRootHandler */ 12575); +/* harmony import */ var _cmd_AddLaneHandler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cmd/AddLaneHandler */ 37005); +/* harmony import */ var _cmd_SplitLaneHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cmd/SplitLaneHandler */ 29624); +/* harmony import */ var _cmd_ResizeLaneHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cmd/ResizeLaneHandler */ 57338); +/* harmony import */ var _cmd_UpdateFlowNodeRefsHandler__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./cmd/UpdateFlowNodeRefsHandler */ 97617); +/* harmony import */ var _cmd_IdClaimHandler__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./cmd/IdClaimHandler */ 11155); +/* harmony import */ var _cmd_SetColorHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./cmd/SetColorHandler */ 76433); +/* harmony import */ var _label_editing_cmd_UpdateLabelHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../label-editing/cmd/UpdateLabelHandler */ 20649); + + + + + + + + + + + + + +/** + * BPMN 2.0 modeling features activator + * + * @param {EventBus} eventBus + * @param {ElementFactory} elementFactory + * @param {CommandStack} commandStack + * @param {BpmnRules} bpmnRules + */ +function Modeling(eventBus, elementFactory, commandStack, bpmnRules) { + diagram_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus, elementFactory, commandStack); + this._bpmnRules = bpmnRules; +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(Modeling, diagram_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__["default"]); +Modeling.$inject = ['eventBus', 'elementFactory', 'commandStack', 'bpmnRules']; +Modeling.prototype.getHandlers = function () { + var handlers = diagram_js_lib_features_modeling_Modeling__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.getHandlers.call(this); + handlers['element.updateModdleProperties'] = _cmd_UpdateModdlePropertiesHandler__WEBPACK_IMPORTED_MODULE_2__["default"]; + handlers['element.updateProperties'] = _cmd_UpdatePropertiesHandler__WEBPACK_IMPORTED_MODULE_3__["default"]; + handlers['canvas.updateRoot'] = _cmd_UpdateCanvasRootHandler__WEBPACK_IMPORTED_MODULE_4__["default"]; + handlers['lane.add'] = _cmd_AddLaneHandler__WEBPACK_IMPORTED_MODULE_5__["default"]; + handlers['lane.resize'] = _cmd_ResizeLaneHandler__WEBPACK_IMPORTED_MODULE_6__["default"]; + handlers['lane.split'] = _cmd_SplitLaneHandler__WEBPACK_IMPORTED_MODULE_7__["default"]; + handlers['lane.updateRefs'] = _cmd_UpdateFlowNodeRefsHandler__WEBPACK_IMPORTED_MODULE_8__["default"]; + handlers['id.updateClaim'] = _cmd_IdClaimHandler__WEBPACK_IMPORTED_MODULE_9__["default"]; + handlers['element.setColor'] = _cmd_SetColorHandler__WEBPACK_IMPORTED_MODULE_10__["default"]; + handlers['element.updateLabel'] = _label_editing_cmd_UpdateLabelHandler__WEBPACK_IMPORTED_MODULE_11__["default"]; + return handlers; +}; +Modeling.prototype.updateLabel = function (element, newLabel, newBounds, hints) { + this._commandStack.execute('element.updateLabel', { + element: element, + newLabel: newLabel, + newBounds: newBounds, + hints: hints || {} + }); +}; +Modeling.prototype.connect = function (source, target, attrs, hints) { + var bpmnRules = this._bpmnRules; + if (!attrs) { + attrs = bpmnRules.canConnect(source, target); + } + if (!attrs) { + return; + } + return this.createConnection(source, target, attrs, source.parent, hints); +}; +Modeling.prototype.updateModdleProperties = function (element, moddleElement, properties) { + this._commandStack.execute('element.updateModdleProperties', { + element: element, + moddleElement: moddleElement, + properties: properties + }); +}; +Modeling.prototype.updateProperties = function (element, properties) { + this._commandStack.execute('element.updateProperties', { + element: element, + properties: properties + }); +}; +Modeling.prototype.resizeLane = function (laneShape, newBounds, balanced) { + this._commandStack.execute('lane.resize', { + shape: laneShape, + newBounds: newBounds, + balanced: balanced + }); +}; +Modeling.prototype.addLane = function (targetLaneShape, location) { + var context = { + shape: targetLaneShape, + location: location + }; + this._commandStack.execute('lane.add', context); + return context.newLane; +}; +Modeling.prototype.splitLane = function (targetLane, count) { + this._commandStack.execute('lane.split', { + shape: targetLane, + count: count + }); +}; + +/** + * Transform the current diagram into a collaboration. + * + * @return {djs.model.Root} the new root element + */ +Modeling.prototype.makeCollaboration = function () { + var collaborationElement = this._create('root', { + type: 'bpmn:Collaboration' + }); + var context = { + newRoot: collaborationElement + }; + this._commandStack.execute('canvas.updateRoot', context); + return collaborationElement; +}; +Modeling.prototype.updateLaneRefs = function (flowNodeShapes, laneShapes) { + this._commandStack.execute('lane.updateRefs', { + flowNodeShapes: flowNodeShapes, + laneShapes: laneShapes + }); +}; + +/** + * Transform the current diagram into a process. + * + * @return {djs.model.Root} the new root element + */ +Modeling.prototype.makeProcess = function () { + var processElement = this._create('root', { + type: 'bpmn:Process' + }); + var context = { + newRoot: processElement + }; + this._commandStack.execute('canvas.updateRoot', context); +}; +Modeling.prototype.claimId = function (id, moddleElement) { + this._commandStack.execute('id.updateClaim', { + id: id, + element: moddleElement, + claiming: true + }); +}; +Modeling.prototype.unclaimId = function (id, moddleElement) { + this._commandStack.execute('id.updateClaim', { + id: id, + element: moddleElement + }); +}; +Modeling.prototype.setColor = function (elements, colors) { + if (!elements.length) { + elements = [elements]; + } + this._commandStack.execute('element.setColor', { + elements: elements, + colors: colors + }); +}; + +/***/ }), + +/***/ 15351: +/*!*************************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/AdaptiveLabelPositioningBehavior.js ***! + \*************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AdaptiveLabelPositioningBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var diagram_js_lib_util_Math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/util/Math */ 28929); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/LabelUtil */ 81454); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); + + + + + +var ALIGNMENTS = ['top', 'bottom', 'left', 'right']; +var ELEMENT_LABEL_DISTANCE = 10; + +/** + * A component that makes sure that external labels are added + * together with respective elements and properly updated (DI wise) + * during move. + * + * @param {EventBus} eventBus + * @param {Modeling} modeling + */ +function AdaptiveLabelPositioningBehavior(eventBus, modeling) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this.postExecuted(['connection.create', 'connection.layout', 'connection.updateWaypoints'], function (event) { + var context = event.context, + connection = context.connection, + source = connection.source, + target = connection.target, + hints = context.hints || {}; + if (hints.createElementsBehavior !== false) { + checkLabelAdjustment(source); + checkLabelAdjustment(target); + } + }); + this.postExecuted(['label.create'], function (event) { + var context = event.context, + shape = context.shape, + hints = context.hints || {}; + if (hints.createElementsBehavior !== false) { + checkLabelAdjustment(shape.labelTarget); + } + }); + this.postExecuted(['elements.create'], function (event) { + var context = event.context, + elements = context.elements, + hints = context.hints || {}; + if (hints.createElementsBehavior !== false) { + elements.forEach(function (element) { + checkLabelAdjustment(element); + }); + } + }); + function checkLabelAdjustment(element) { + // skip non-existing labels + if (!(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__.hasExternalLabel)(element)) { + return; + } + var optimalPosition = getOptimalPosition(element); + + // no optimal position found + if (!optimalPosition) { + return; + } + adjustLabelPosition(element, optimalPosition); + } + function adjustLabelPosition(element, orientation) { + var elementMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getMid)(element), + label = element.label, + labelMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getMid)(label); + + // ignore labels that are being created + if (!label.parent) { + return; + } + var elementTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(element); + var newLabelMid; + switch (orientation) { + case 'top': + newLabelMid = { + x: elementMid.x, + y: elementTrbl.top - ELEMENT_LABEL_DISTANCE - label.height / 2 + }; + break; + case 'left': + newLabelMid = { + x: elementTrbl.left - ELEMENT_LABEL_DISTANCE - label.width / 2, + y: elementMid.y + }; + break; + case 'bottom': + newLabelMid = { + x: elementMid.x, + y: elementTrbl.bottom + ELEMENT_LABEL_DISTANCE + label.height / 2 + }; + break; + case 'right': + newLabelMid = { + x: elementTrbl.right + ELEMENT_LABEL_DISTANCE + label.width / 2, + y: elementMid.y + }; + break; + } + var delta = (0,diagram_js_lib_util_Math__WEBPACK_IMPORTED_MODULE_4__.delta)(newLabelMid, labelMid); + modeling.moveShape(label, delta); + } +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(AdaptiveLabelPositioningBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +AdaptiveLabelPositioningBehavior.$inject = ['eventBus', 'modeling']; + +// helpers ////////////////////// + +/** + * Return alignments which are taken by a boundary's host element + * + * @param {Shape} element + * + * @return {Array} + */ +function getTakenHostAlignments(element) { + var hostElement = element.host, + elementMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getMid)(element), + hostOrientation = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getOrientation)(elementMid, hostElement); + var freeAlignments; + + // check whether there is a multi-orientation, e.g. 'top-left' + if (hostOrientation.indexOf('-') >= 0) { + freeAlignments = hostOrientation.split('-'); + } else { + freeAlignments = [hostOrientation]; + } + var takenAlignments = ALIGNMENTS.filter(function (alignment) { + return freeAlignments.indexOf(alignment) === -1; + }); + return takenAlignments; +} + +/** + * Return alignments which are taken by related connections + * + * @param {Shape} element + * + * @return {Array} + */ +function getTakenConnectionAlignments(element) { + var elementMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getMid)(element); + var takenAlignments = [].concat(element.incoming.map(function (c) { + return c.waypoints[c.waypoints.length - 2]; + }), element.outgoing.map(function (c) { + return c.waypoints[1]; + })).map(function (point) { + return getApproximateOrientation(elementMid, point); + }); + return takenAlignments; +} + +/** + * Return the optimal label position around an element + * or _undefined_, if none was found. + * + * @param {Shape} element + * + * @return {string} positioning identifier + */ +function getOptimalPosition(element) { + var labelMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getMid)(element.label); + var elementMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getMid)(element); + var labelOrientation = getApproximateOrientation(elementMid, labelMid); + if (!isAligned(labelOrientation)) { + return; + } + var takenAlignments = getTakenConnectionAlignments(element); + if (element.host) { + var takenHostAlignments = getTakenHostAlignments(element); + takenAlignments = takenAlignments.concat(takenHostAlignments); + } + var freeAlignments = ALIGNMENTS.filter(function (alignment) { + return takenAlignments.indexOf(alignment) === -1; + }); + + // NOTHING TO DO; label already aligned a.O.K. + if (freeAlignments.indexOf(labelOrientation) !== -1) { + return; + } + return freeAlignments[0]; +} +function getApproximateOrientation(p0, p1) { + return (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getOrientation)(p1, p0, 5); +} +function isAligned(orientation) { + return ALIGNMENTS.indexOf(orientation) !== -1; +} + +/***/ }), + +/***/ 77022: +/*!*******************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/AppendBehavior.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AppendBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); + + + +function AppendBehavior(eventBus, elementFactory, bpmnRules) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + + // assign correct shape position unless already set + + this.preExecute('shape.append', function (context) { + var source = context.source, + shape = context.shape; + if (!context.position) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:TextAnnotation')) { + context.position = { + x: source.x + source.width / 2 + 75, + y: source.y - 50 - shape.height / 2 + }; + } else { + context.position = { + x: source.x + source.width + 80 + shape.width / 2, + y: source.y + source.height / 2 + }; + } + } + }, true); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(AppendBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +AppendBehavior.$inject = ['eventBus', 'elementFactory', 'bpmnRules']; + +/***/ }), + +/***/ 97799: +/*!************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/AssociationBehavior.js ***! + \************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AssociationBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); + + + + +function AssociationBehavior(injector, modeling) { + injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"], this); + this.postExecute('shape.move', function (context) { + var newParent = context.newParent, + shape = context.shape; + var associations = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(shape.incoming.concat(shape.outgoing), function (connection) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(connection, 'bpmn:Association'); + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(associations, function (association) { + modeling.moveConnection(association, { + x: 0, + y: 0 + }, newParent); + }); + }, true); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(AssociationBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +AssociationBehavior.$inject = ['injector', 'modeling']; + +/***/ }), + +/***/ 65459: +/*!************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/AttachEventBehavior.js ***! + \************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AttachEventBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ModelingUtil */ 4525); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/LabelUtil */ 81454); + + + + + +var LOW_PRIORITY = 500; + +/** + * Replace intermediate event with boundary event when creating or moving results in attached event. + */ +function AttachEventBehavior(bpmnReplace, injector) { + injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"], this); + this._bpmnReplace = bpmnReplace; + var self = this; + this.postExecuted('elements.create', LOW_PRIORITY, function (context) { + var elements = context.elements; + elements = elements.filter(function (shape) { + var host = shape.host; + return shouldReplace(shape, host); + }); + if (elements.length !== 1) { + return; + } + elements.map(function (element) { + return elements.indexOf(element); + }).forEach(function (index) { + var host = elements[index]; + context.elements[index] = self.replaceShape(elements[index], host); + }); + }, true); + this.preExecute('elements.move', LOW_PRIORITY, function (context) { + var shapes = context.shapes, + host = context.newHost; + if (shapes.length !== 1) { + return; + } + var shape = shapes[0]; + if (shouldReplace(shape, host)) { + context.shapes = [self.replaceShape(shape, host)]; + } + }, true); +} +AttachEventBehavior.$inject = ['bpmnReplace', 'injector']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(AttachEventBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +AttachEventBehavior.prototype.replaceShape = function (shape, host) { + var eventDefinition = getEventDefinition(shape); + var boundaryEvent = { + type: 'bpmn:BoundaryEvent', + host: host + }; + if (eventDefinition) { + boundaryEvent.eventDefinitionType = eventDefinition.$type; + } + return this._bpmnReplace.replaceElement(shape, boundaryEvent, { + layoutConnection: false + }); +}; + +// helpers ////////// + +function getEventDefinition(element) { + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(element), + eventDefinitions = businessObject.eventDefinitions; + return eventDefinitions && eventDefinitions[0]; +} +function shouldReplace(shape, host) { + return !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabel)(shape) && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(shape, ['bpmn:IntermediateThrowEvent', 'bpmn:IntermediateCatchEvent']) && !!host; +} + +/***/ }), + +/***/ 42450: +/*!**************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/BoundaryEventBehavior.js ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BoundaryEventBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); + + + + +var HIGH_PRIORITY = 2000; + +/** + * BPMN specific boundary event behavior + */ +function BoundaryEventBehavior(eventBus, moddle, modeling) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + function getBoundaryEvents(element) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(element.attachers, function (attacher) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(attacher, 'bpmn:BoundaryEvent'); + }); + } + + // remove after connecting to event-based gateway + this.postExecute('connection.create', function (event) { + var source = event.context.source, + target = event.context.target, + boundaryEvents = getBoundaryEvents(target); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(source, 'bpmn:EventBasedGateway') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:ReceiveTask') && boundaryEvents.length > 0) { + modeling.removeElements(boundaryEvents); + } + }); + + // remove after replacing connected gateway with event-based gateway + this.postExecute('connection.reconnect', function (event) { + var oldSource = event.context.oldSource, + newSource = event.context.newSource; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldSource, 'bpmn:Gateway') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newSource, 'bpmn:EventBasedGateway')) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(newSource.outgoing, function (connection) { + var target = connection.target, + attachedboundaryEvents = getBoundaryEvents(target); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:ReceiveTask') && attachedboundaryEvents.length > 0) { + modeling.removeElements(attachedboundaryEvents); + } + }); + } + }); + + // copy reference to root element on replace + eventBus.on('moddleCopy.canCopyProperty', HIGH_PRIORITY, function (context) { + var parent = context.parent, + property = context.property, + propertyName = context.propertyName; + var propertyDescriptor = moddle.getPropertyDescriptor(parent, propertyName); + if (propertyDescriptor && propertyDescriptor.isReference && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(property, 'bpmn:RootElement')) { + parent.set(propertyName, property); + } + }); +} +BoundaryEventBehavior.$inject = ['eventBus', 'moddle', 'modeling']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BoundaryEventBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/***/ }), + +/***/ 40158: +/*!*******************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/CreateBehavior.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CreateBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/ModelingUtil */ 98405); + + + + +function CreateBehavior(injector) { + injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"], this); + this.preExecute('shape.create', 1500, function (event) { + var context = event.context, + parent = context.parent, + shape = context.shape; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(parent, 'bpmn:Lane') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Lane')) { + context.parent = (0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getParent)(parent, 'bpmn:Participant'); + } + }); +} +CreateBehavior.$inject = ['injector']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(CreateBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/***/ }), + +/***/ 72893: +/*!*****************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/CreateDataObjectBehavior.js ***! + \*****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CreateDataObjectBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + + + +/** + * BPMN specific create data object behavior + */ +function CreateDataObjectBehavior(eventBus, bpmnFactory, moddle) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this.preExecute('shape.create', function (event) { + var context = event.context, + shape = context.shape; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:DataObjectReference') && shape.type !== 'label') { + // create a DataObject every time a DataObjectReference is created + var dataObject = bpmnFactory.create('bpmn:DataObject'); + + // set the reference to the DataObject + shape.businessObject.dataObjectRef = dataObject; + } + }); +} +CreateDataObjectBehavior.$inject = ['eventBus', 'bpmnFactory', 'moddle']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(CreateDataObjectBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/***/ }), + +/***/ 28937: +/*!******************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/CreateParticipantBehavior.js ***! + \******************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ PARTICIPANT_BORDER_WIDTH: () => (/* binding */ PARTICIPANT_BORDER_WIDTH), +/* harmony export */ "default": () => (/* binding */ CreateParticipantBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/LabelUtil */ 81454); +/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ 35723); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); + + + + + + + +var HORIZONTAL_PARTICIPANT_PADDING = 20, + VERTICAL_PARTICIPANT_PADDING = 20; +var PARTICIPANT_BORDER_WIDTH = 30; +var HIGH_PRIORITY = 2000; + +/** + * BPMN-specific behavior for creating participants. + */ +function CreateParticipantBehavior(canvas, eventBus, modeling) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + + // fit participant + eventBus.on(['create.start', 'shape.move.start'], HIGH_PRIORITY, function (event) { + var context = event.context, + shape = context.shape, + rootElement = canvas.getRootElement(); + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Participant') || !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(rootElement, 'bpmn:Process') || !rootElement.children.length) { + return; + } + + // ignore connections, groups and labels + var children = rootElement.children.filter(function (element) { + return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:Group') && !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabel)(element) && !isConnection(element); + }); + + // ensure for available children to calculate bounds + if (!children.length) { + return; + } + var childrenBBox = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_4__.getBBox)(children); + var participantBounds = getParticipantBounds(shape, childrenBBox); + + // assign width and height + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(shape, participantBounds); + + // assign create constraints + context.createConstraints = getParticipantCreateConstraints(shape, childrenBBox); + }); + + // force hovering process when creating first participant + eventBus.on('create.start', HIGH_PRIORITY, function (event) { + var context = event.context, + shape = context.shape, + rootElement = canvas.getRootElement(), + rootElementGfx = canvas.getGraphics(rootElement); + function ensureHoveringProcess(event) { + event.element = rootElement; + event.gfx = rootElementGfx; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Participant') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(rootElement, 'bpmn:Process')) { + eventBus.on('element.hover', HIGH_PRIORITY, ensureHoveringProcess); + eventBus.once('create.cleanup', function () { + eventBus.off('element.hover', ensureHoveringProcess); + }); + } + }); + + // turn process into collaboration when creating first participant + function getOrCreateCollaboration() { + var rootElement = canvas.getRootElement(); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(rootElement, 'bpmn:Collaboration')) { + return rootElement; + } + return modeling.makeCollaboration(); + } + + // when creating mutliple elements through `elements.create` parent must be set to collaboration + // and passed to `shape.create` as hint + this.preExecute('elements.create', HIGH_PRIORITY, function (context) { + var elements = context.elements, + parent = context.parent, + participant = findParticipant(elements), + hints; + if (participant && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(parent, 'bpmn:Process')) { + context.parent = getOrCreateCollaboration(); + hints = context.hints = context.hints || {}; + hints.participant = participant; + hints.process = parent; + hints.processRef = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(participant).get('processRef'); + } + }, true); + + // when creating single shape through `shape.create` parent must be set to collaboration + // unless it was already set through `elements.create` + this.preExecute('shape.create', function (context) { + var parent = context.parent, + shape = context.shape; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Participant') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(parent, 'bpmn:Process')) { + context.parent = getOrCreateCollaboration(); + context.process = parent; + context.processRef = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(shape).get('processRef'); + } + }, true); + + // #execute necessary because #preExecute not called on CommandStack#redo + this.execute('shape.create', function (context) { + var hints = context.hints || {}, + process = context.process || hints.process, + shape = context.shape, + participant = hints.participant; + + // both shape.create and elements.create must be handled + if (process && (!participant || shape === participant)) { + // monkey-patch process ref + (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(shape).set('processRef', (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(process)); + } + }, true); + this.revert('shape.create', function (context) { + var hints = context.hints || {}, + process = context.process || hints.process, + processRef = context.processRef || hints.processRef, + shape = context.shape, + participant = hints.participant; + + // both shape.create and elements.create must be handled + if (process && (!participant || shape === participant)) { + // monkey-patch process ref + (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(shape).set('processRef', processRef); + } + }, true); + this.postExecute('shape.create', function (context) { + var hints = context.hints || {}, + process = context.process || context.hints.process, + shape = context.shape, + participant = hints.participant; + if (process) { + var children = process.children.slice(); + + // both shape.create and elements.create must be handled + if (!participant) { + modeling.moveElements(children, { + x: 0, + y: 0 + }, shape); + } else if (shape === participant) { + modeling.moveElements(children, { + x: 0, + y: 0 + }, participant); + } + } + }, true); +} +CreateParticipantBehavior.$inject = ['canvas', 'eventBus', 'modeling']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(CreateParticipantBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +// helpers ////////// + +function getParticipantBounds(shape, childrenBBox) { + childrenBBox = { + width: childrenBBox.width + HORIZONTAL_PARTICIPANT_PADDING * 2 + PARTICIPANT_BORDER_WIDTH, + height: childrenBBox.height + VERTICAL_PARTICIPANT_PADDING * 2 + }; + var width = Math.max(shape.width, childrenBBox.width), + height = Math.max(shape.height, childrenBBox.height); + return { + x: -width / 2, + y: -height / 2, + width: width, + height: height + }; +} +function getParticipantCreateConstraints(shape, childrenBBox) { + childrenBBox = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_6__.asTRBL)(childrenBBox); + return { + bottom: childrenBBox.top + shape.height / 2 - VERTICAL_PARTICIPANT_PADDING, + left: childrenBBox.right - shape.width / 2 + HORIZONTAL_PARTICIPANT_PADDING, + top: childrenBBox.bottom - shape.height / 2 + VERTICAL_PARTICIPANT_PADDING, + right: childrenBBox.left + shape.width / 2 - HORIZONTAL_PARTICIPANT_PADDING - PARTICIPANT_BORDER_WIDTH + }; +} +function isConnection(element) { + return !!element.waypoints; +} +function findParticipant(elements) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.find)(elements, function (element) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:Participant'); + }); +} + +/***/ }), + +/***/ 3581: +/*!*********************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/DataInputAssociationBehavior.js ***! + \*********************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DataInputAssociationBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ 39233); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + + + + +var TARGET_REF_PLACEHOLDER_NAME = '__targetRef_placeholder'; + +/** + * This behavior makes sure we always set a fake + * DataInputAssociation#targetRef as demanded by the BPMN 2.0 + * XSD schema. + * + * The reference is set to a bpmn:Property{ name: '__targetRef_placeholder' } + * which is created on the fly and cleaned up afterwards if not needed + * anymore. + * + * @param {EventBus} eventBus + * @param {BpmnFactory} bpmnFactory + */ +function DataInputAssociationBehavior(eventBus, bpmnFactory) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this.executed(['connection.create', 'connection.delete', 'connection.move', 'connection.reconnect'], ifDataInputAssociation(fixTargetRef)); + this.reverted(['connection.create', 'connection.delete', 'connection.move', 'connection.reconnect'], ifDataInputAssociation(fixTargetRef)); + function usesTargetRef(element, targetRef, removedConnection) { + var inputAssociations = element.get('dataInputAssociations'); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(inputAssociations, function (association) { + return association !== removedConnection && association.targetRef === targetRef; + }); + } + function getTargetRef(element, create) { + var properties = element.get('properties'); + var targetRefProp = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(properties, function (p) { + return p.name === TARGET_REF_PLACEHOLDER_NAME; + }); + if (!targetRefProp && create) { + targetRefProp = bpmnFactory.create('bpmn:Property', { + name: TARGET_REF_PLACEHOLDER_NAME + }); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(properties, targetRefProp); + } + return targetRefProp; + } + function cleanupTargetRef(element, connection) { + var targetRefProp = getTargetRef(element); + if (!targetRefProp) { + return; + } + if (!usesTargetRef(element, targetRefProp, connection)) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(element.get('properties'), targetRefProp); + } + } + + /** + * Make sure targetRef is set to a valid property or + * `null` if the connection is detached. + * + * @param {Event} event + */ + function fixTargetRef(event) { + var context = event.context, + connection = context.connection, + connectionBo = connection.businessObject, + target = connection.target, + targetBo = target && target.businessObject, + newTarget = context.newTarget, + newTargetBo = newTarget && newTarget.businessObject, + oldTarget = context.oldTarget || context.target, + oldTargetBo = oldTarget && oldTarget.businessObject; + var dataAssociation = connection.businessObject, + targetRefProp; + if (oldTargetBo && oldTargetBo !== targetBo) { + cleanupTargetRef(oldTargetBo, connectionBo); + } + if (newTargetBo && newTargetBo !== targetBo) { + cleanupTargetRef(newTargetBo, connectionBo); + } + if (targetBo) { + targetRefProp = getTargetRef(targetBo, true); + dataAssociation.targetRef = targetRefProp; + } else { + dataAssociation.targetRef = null; + } + } +} +DataInputAssociationBehavior.$inject = ['eventBus', 'bpmnFactory']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DataInputAssociationBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/** + * Only call the given function when the event + * touches a bpmn:DataInputAssociation. + * + * @param {Function} fn + * @return {Function} + */ +function ifDataInputAssociation(fn) { + return function (event) { + var context = event.context, + connection = context.connection; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(connection, 'bpmn:DataInputAssociation')) { + return fn(event); + } + }; +} + +/***/ }), + +/***/ 56385: +/*!**********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/DataStoreBehavior.js ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DataStoreBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/ModelingUtil */ 4525); +/* harmony import */ var _cmd_UpdateSemanticParentHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cmd/UpdateSemanticParentHandler */ 36527); + + + + + + +/** + * BPMN specific data store behavior + */ +function DataStoreBehavior(canvas, commandStack, elementRegistry, eventBus) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + commandStack.registerHandler('dataStore.updateContainment', _cmd_UpdateSemanticParentHandler__WEBPACK_IMPORTED_MODULE_2__["default"]); + function getFirstParticipantWithProcessRef() { + return elementRegistry.filter(function (element) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Participant') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(element).processRef; + })[0]; + } + function getDataStores(element) { + return element.children.filter(function (child) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(child, 'bpmn:DataStoreReference') && !child.labelTarget; + }); + } + function updateDataStoreParent(dataStore, newDataStoreParent) { + var dataStoreBo = dataStore.businessObject || dataStore; + newDataStoreParent = newDataStoreParent || getFirstParticipantWithProcessRef(); + if (newDataStoreParent) { + var newDataStoreParentBo = newDataStoreParent.businessObject || newDataStoreParent; + commandStack.execute('dataStore.updateContainment', { + dataStoreBo: dataStoreBo, + newSemanticParent: newDataStoreParentBo.processRef || newDataStoreParentBo, + newDiParent: newDataStoreParentBo.di + }); + } + } + + // disable auto-resize for data stores + this.preExecute('shape.create', function (event) { + var context = event.context, + shape = context.shape; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:DataStoreReference') && shape.type !== 'label') { + if (!context.hints) { + context.hints = {}; + } + + // prevent auto resizing + context.hints.autoResize = false; + } + }); + + // disable auto-resize for data stores + this.preExecute('elements.move', function (event) { + var context = event.context, + shapes = context.shapes; + var dataStoreReferences = shapes.filter(function (shape) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:DataStoreReference'); + }); + if (dataStoreReferences.length) { + if (!context.hints) { + context.hints = {}; + } + + // prevent auto resizing for data store references + context.hints.autoResize = shapes.filter(function (shape) { + return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:DataStoreReference'); + }); + } + }); + + // update parent on data store created + this.postExecute('shape.create', function (event) { + var context = event.context, + shape = context.shape, + parent = shape.parent; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:DataStoreReference') && shape.type !== 'label' && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(parent, 'bpmn:Collaboration')) { + updateDataStoreParent(shape); + } + }); + + // update parent on data store moved + this.postExecute('shape.move', function (event) { + var context = event.context, + shape = context.shape, + oldParent = context.oldParent, + parent = shape.parent; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldParent, 'bpmn:Collaboration')) { + // do nothing if not necessary + return; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:DataStoreReference') && shape.type !== 'label' && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(parent, 'bpmn:Collaboration')) { + var participant = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldParent, 'bpmn:Participant') ? oldParent : getAncestor(oldParent, 'bpmn:Participant'); + updateDataStoreParent(shape, participant); + } + }); + + // update data store parents on participant or subprocess deleted + this.postExecute('shape.delete', function (event) { + var context = event.context, + shape = context.shape, + rootElement = canvas.getRootElement(); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(shape, ['bpmn:Participant', 'bpmn:SubProcess']) && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(rootElement, 'bpmn:Collaboration')) { + getDataStores(rootElement).filter(function (dataStore) { + return isDescendant(dataStore, shape); + }).forEach(function (dataStore) { + updateDataStoreParent(dataStore); + }); + } + }); + + // update data store parents on collaboration -> process + this.postExecute('canvas.updateRoot', function (event) { + var context = event.context, + oldRoot = context.oldRoot, + newRoot = context.newRoot; + var dataStores = getDataStores(oldRoot); + dataStores.forEach(function (dataStore) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newRoot, 'bpmn:Process')) { + updateDataStoreParent(dataStore, newRoot); + } + }); + }); +} +DataStoreBehavior.$inject = ['canvas', 'commandStack', 'elementRegistry', 'eventBus']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DataStoreBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +// helpers ////////// + +function isDescendant(descendant, ancestor) { + var descendantBo = descendant.businessObject || descendant, + ancestorBo = ancestor.businessObject || ancestor; + while (descendantBo.$parent) { + if (descendantBo.$parent === ancestorBo.processRef || ancestorBo) { + return true; + } + descendantBo = descendantBo.$parent; + } + return false; +} +function getAncestor(element, type) { + while (element.parent) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element.parent, type)) { + return element.parent; + } + element = element.parent; + } +} + +/***/ }), + +/***/ 94883: +/*!***********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/DeleteLaneBehavior.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DeleteLaneBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/LaneUtil */ 23568); +/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ 35723); + + + + + +var LOW_PRIORITY = 500; + +/** + * BPMN specific delete lane behavior + */ +function DeleteLaneBehavior(eventBus, modeling, spaceTool) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + function compensateLaneDelete(shape, oldParent) { + var siblings = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_2__.getChildLanes)(oldParent); + var topAffected = []; + var bottomAffected = []; + (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__.eachElement)(siblings, function (element) { + if (element.y > shape.y) { + bottomAffected.push(element); + } else { + topAffected.push(element); + } + return element.children; + }); + if (!siblings.length) { + return; + } + var offset; + if (bottomAffected.length && topAffected.length) { + offset = shape.height / 2; + } else { + offset = shape.height; + } + var topAdjustments, bottomAdjustments; + if (topAffected.length) { + topAdjustments = spaceTool.calculateAdjustments(topAffected, 'y', offset, shape.y - 10); + spaceTool.makeSpace(topAdjustments.movingShapes, topAdjustments.resizingShapes, { + x: 0, + y: offset + }, 's'); + } + if (bottomAffected.length) { + bottomAdjustments = spaceTool.calculateAdjustments(bottomAffected, 'y', -offset, shape.y + shape.height + 10); + spaceTool.makeSpace(bottomAdjustments.movingShapes, bottomAdjustments.resizingShapes, { + x: 0, + y: -offset + }, 'n'); + } + } + + /** + * Adjust sizes of other lanes after lane deletion + */ + this.postExecuted('shape.delete', LOW_PRIORITY, function (event) { + var context = event.context, + hints = context.hints, + shape = context.shape, + oldParent = context.oldParent; + + // only compensate lane deletes + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(shape, 'bpmn:Lane')) { + return; + } + + // compensate root deletes only + if (hints && hints.nested) { + return; + } + compensateLaneDelete(shape, oldParent); + }); +} +DeleteLaneBehavior.$inject = ['eventBus', 'modeling', 'spaceTool']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DeleteLaneBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/***/ }), + +/***/ 91097: +/*!************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/DetachEventBehavior.js ***! + \************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DetachEventBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/LabelUtil */ 81454); + + + + +var LOW_PRIORITY = 500; + +/** + * Replace boundary event with intermediate event when creating or moving results in detached event. + */ +function DetachEventBehavior(bpmnReplace, injector) { + injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"], this); + this._bpmnReplace = bpmnReplace; + var self = this; + this.postExecuted('elements.create', LOW_PRIORITY, function (context) { + var elements = context.elements; + elements.filter(function (shape) { + var host = shape.host; + return shouldReplace(shape, host); + }).map(function (shape) { + return elements.indexOf(shape); + }).forEach(function (index) { + context.elements[index] = self.replaceShape(elements[index]); + }); + }, true); + this.preExecute('elements.move', LOW_PRIORITY, function (context) { + var shapes = context.shapes, + newHost = context.newHost; + shapes.forEach(function (shape, index) { + var host = shape.host; + if (shouldReplace(shape, includes(shapes, host) ? host : newHost)) { + shapes[index] = self.replaceShape(shape); + } + }); + }, true); +} +DetachEventBehavior.$inject = ['bpmnReplace', 'injector']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DetachEventBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +DetachEventBehavior.prototype.replaceShape = function (shape) { + var eventDefinition = getEventDefinition(shape), + intermediateEvent; + if (eventDefinition) { + intermediateEvent = { + type: 'bpmn:IntermediateCatchEvent', + eventDefinitionType: eventDefinition.$type + }; + } else { + intermediateEvent = { + type: 'bpmn:IntermediateThrowEvent' + }; + } + return this._bpmnReplace.replaceElement(shape, intermediateEvent, { + layoutConnection: false + }); +}; + +// helpers ////////// + +function getEventDefinition(element) { + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(element), + eventDefinitions = businessObject.eventDefinitions; + return eventDefinitions && eventDefinitions[0]; +} +function shouldReplace(shape, host) { + return !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabel)(shape) && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:BoundaryEvent') && !host; +} +function includes(array, item) { + return array.indexOf(item) !== -1; +} + +/***/ }), + +/***/ 60914: +/*!***********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/DropOnFlowBehavior.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DropOnFlowBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var diagram_js_lib_util_LineIntersection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/util/LineIntersection */ 91373); + + + + + +function DropOnFlowBehavior(eventBus, bpmnRules, modeling) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + + /** + * Reconnect start / end of a connection after + * dropping an element on a flow. + */ + + function insertShape(shape, targetFlow, positionOrBounds) { + var waypoints = targetFlow.waypoints, + waypointsBefore, + waypointsAfter, + dockingPoint, + source, + target, + incomingConnection, + outgoingConnection, + oldOutgoing = shape.outgoing.slice(), + oldIncoming = shape.incoming.slice(); + var mid; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isNumber)(positionOrBounds.width)) { + mid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getMid)(positionOrBounds); + } else { + mid = positionOrBounds; + } + var intersection = (0,diagram_js_lib_util_LineIntersection__WEBPACK_IMPORTED_MODULE_4__.getApproxIntersection)(waypoints, mid); + if (intersection) { + waypointsBefore = waypoints.slice(0, intersection.index); + waypointsAfter = waypoints.slice(intersection.index + (intersection.bendpoint ? 1 : 0)); + + // due to inaccuracy intersection might have been found + if (!waypointsBefore.length || !waypointsAfter.length) { + return; + } + dockingPoint = intersection.bendpoint ? waypoints[intersection.index] : mid; + + // if last waypointBefore is inside shape's bounds, ignore docking point + if (waypointsBefore.length === 1 || !isPointInsideBBox(shape, waypointsBefore[waypointsBefore.length - 1])) { + waypointsBefore.push(copy(dockingPoint)); + } + + // if first waypointAfter is inside shape's bounds, ignore docking point + if (waypointsAfter.length === 1 || !isPointInsideBBox(shape, waypointsAfter[0])) { + waypointsAfter.unshift(copy(dockingPoint)); + } + } + source = targetFlow.source; + target = targetFlow.target; + if (bpmnRules.canConnect(source, shape, targetFlow)) { + // reconnect source -> inserted shape + modeling.reconnectEnd(targetFlow, shape, waypointsBefore || mid); + incomingConnection = targetFlow; + } + if (bpmnRules.canConnect(shape, target, targetFlow)) { + if (!incomingConnection) { + // reconnect inserted shape -> end + modeling.reconnectStart(targetFlow, shape, waypointsAfter || mid); + outgoingConnection = targetFlow; + } else { + outgoingConnection = modeling.connect(shape, target, { + type: targetFlow.type, + waypoints: waypointsAfter + }); + } + } + var duplicateConnections = [].concat(incomingConnection && (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(oldIncoming, function (connection) { + return connection.source === incomingConnection.source; + }) || [], outgoingConnection && (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(oldOutgoing, function (connection) { + return connection.target === outgoingConnection.target; + }) || []); + if (duplicateConnections.length) { + modeling.removeElements(duplicateConnections); + } + } + this.preExecute('elements.move', function (context) { + var newParent = context.newParent, + shapes = context.shapes, + delta = context.delta, + shape = shapes[0]; + if (!shape || !newParent) { + return; + } + + // if the new parent is a connection, + // change it to the new parent's parent + if (newParent && newParent.waypoints) { + context.newParent = newParent = newParent.parent; + } + var shapeMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getMid)(shape); + var newShapeMid = { + x: shapeMid.x + delta.x, + y: shapeMid.y + delta.y + }; + + // find a connection which intersects with the + // element's mid point + var connection = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(newParent.children, function (element) { + var canInsert = bpmnRules.canInsert(shapes, element); + return canInsert && (0,diagram_js_lib_util_LineIntersection__WEBPACK_IMPORTED_MODULE_4__.getApproxIntersection)(element.waypoints, newShapeMid); + }); + if (connection) { + context.targetFlow = connection; + context.position = newShapeMid; + } + }, true); + this.postExecuted('elements.move', function (context) { + var shapes = context.shapes, + targetFlow = context.targetFlow, + position = context.position; + if (targetFlow) { + insertShape(shapes[0], targetFlow, position); + } + }, true); + this.preExecute('shape.create', function (context) { + var parent = context.parent, + shape = context.shape; + if (bpmnRules.canInsert(shape, parent)) { + context.targetFlow = parent; + context.parent = parent.parent; + } + }, true); + this.postExecuted('shape.create', function (context) { + var shape = context.shape, + targetFlow = context.targetFlow, + positionOrBounds = context.position; + if (targetFlow) { + insertShape(shape, targetFlow, positionOrBounds); + } + }, true); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DropOnFlowBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +DropOnFlowBehavior.$inject = ['eventBus', 'bpmnRules', 'modeling']; + +// helpers ///////////////////// + +function isPointInsideBBox(bbox, point) { + var x = point.x, + y = point.y; + return x >= bbox.x && x <= bbox.x + bbox.width && y >= bbox.y && y <= bbox.y + bbox.height; +} +function copy(obj) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({}, obj); +} + +/***/ }), + +/***/ 42095: +/*!******************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/EventBasedGatewayBehavior.js ***! + \******************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ EventBasedGatewayBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + + +function EventBasedGatewayBehavior(eventBus, modeling) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + + /** + * Remove existing sequence flows of event-based target before connecting + * from event-based gateway. + */ + this.preExecuted('connection.create', function (event) { + var context = event.context, + source = context.source, + target = context.target, + existingIncomingConnections = target.incoming.slice(); + if (context.hints && context.hints.createElementsBehavior === false) { + return; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:EventBasedGateway') && target.incoming.length) { + existingIncomingConnections.filter(isSequenceFlow).forEach(function (sequenceFlow) { + modeling.removeConnection(sequenceFlow); + }); + } + }); + + /** + * After replacing shape with event-based gateway, remove incoming sequence + * flows of event-based targets which do not belong to event-based gateway + * source. + */ + this.preExecuted('shape.replace', function (event) { + var newShape = event.context.newShape, + newShapeTargets, + newShapeTargetsIncomingSequenceFlows; + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newShape, 'bpmn:EventBasedGateway')) { + return; + } + newShapeTargets = newShape.outgoing.filter(isSequenceFlow).map(function (sequenceFlow) { + return sequenceFlow.target; + }); + newShapeTargetsIncomingSequenceFlows = newShapeTargets.reduce(function (sequenceFlows, target) { + var incomingSequenceFlows = target.incoming.filter(isSequenceFlow); + return sequenceFlows.concat(incomingSequenceFlows); + }, []); + newShapeTargetsIncomingSequenceFlows.forEach(function (sequenceFlow) { + if (sequenceFlow.source !== newShape) { + modeling.removeConnection(sequenceFlow); + } + }); + }); +} +EventBasedGatewayBehavior.$inject = ['eventBus', 'modeling']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(EventBasedGatewayBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +// helpers ////////////////////// + +function isSequenceFlow(connection) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:SequenceFlow'); +} + +/***/ }), + +/***/ 29613: +/*!*********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/FixHoverBehavior.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ FixHoverBehavior) +/* harmony export */ }); +/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/LaneUtil */ 23568); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/ModelingUtil */ 4525); + + + +var HIGH_PRIORITY = 1500; +var HIGHEST_PRIORITY = 2000; + +/** + * Correct hover targets in certain situations to improve diagram interaction. + * + * @param {ElementRegistry} elementRegistry + * @param {EventBus} eventBus + * @param {Canvas} canvas + */ +function FixHoverBehavior(elementRegistry, eventBus, canvas) { + eventBus.on(['create.hover', 'create.move', 'create.out', 'create.end', 'shape.move.hover', 'shape.move.move', 'shape.move.out', 'shape.move.end'], HIGH_PRIORITY, function (event) { + var context = event.context, + shape = context.shape || event.shape, + hover = event.hover; + + // ensure elements are not dropped onto a bpmn:Lane but onto + // the underlying bpmn:Participant + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(hover, 'bpmn:Lane') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(shape, ['bpmn:Lane', 'bpmn:Participant'])) { + event.hover = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(hover); + event.hoverGfx = elementRegistry.getGraphics(event.hover); + } + var rootElement = canvas.getRootElement(); + + // ensure bpmn:Group and label elements are dropped + // always onto the root + if (hover !== rootElement && (shape.labelTarget || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Group'))) { + event.hover = rootElement; + event.hoverGfx = elementRegistry.getGraphics(event.hover); + } + }); + eventBus.on(['connect.hover', 'connect.out', 'connect.end', 'connect.cleanup', 'global-connect.hover', 'global-connect.out', 'global-connect.end', 'global-connect.cleanup'], HIGH_PRIORITY, function (event) { + var hover = event.hover; + + // ensure connections start/end on bpmn:Participant, + // not the underlying bpmn:Lane + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(hover, 'bpmn:Lane')) { + event.hover = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(hover) || hover; + event.hoverGfx = elementRegistry.getGraphics(event.hover); + } + }); + eventBus.on(['bendpoint.move.hover'], HIGH_PRIORITY, function (event) { + var context = event.context, + hover = event.hover, + type = context.type; + + // ensure reconnect start/end on bpmn:Participant, + // not the underlying bpmn:Lane + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(hover, 'bpmn:Lane') && /reconnect/.test(type)) { + event.hover = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(hover) || hover; + event.hoverGfx = elementRegistry.getGraphics(event.hover); + } + }); + eventBus.on(['connect.start'], HIGH_PRIORITY, function (event) { + var context = event.context, + start = context.start; + + // ensure connect start on bpmn:Participant, + // not the underlying bpmn:Lane + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(start, 'bpmn:Lane')) { + context.start = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(start) || start; + } + }); + + // allow movement of participants from lanes + eventBus.on('shape.move.start', HIGHEST_PRIORITY, function (event) { + var shape = event.shape; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Lane')) { + event.shape = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(shape) || shape; + } + }); +} +FixHoverBehavior.$inject = ['elementRegistry', 'eventBus', 'canvas']; + +/***/ }), + +/***/ 69955: +/*!******************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/GroupBehavior.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ GroupBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ 39233); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_CategoryUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/CategoryUtil */ 14891); + + + + + +var HIGH_PRIORITY = 2000; + +/** + * BPMN specific Group behavior + */ +function GroupBehavior(bpmnFactory, canvas, elementRegistry, eventBus, injector, moddleCopy) { + injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"], this); + + /** + * Gets process definitions + * + * @return {ModdleElement} definitions + */ + function getDefinitions() { + var rootElement = canvas.getRootElement(), + businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(rootElement); + return businessObject.$parent; + } + + /** + * Removes a referenced category value for a given group shape + * + * @param {djs.model.Shape} shape + */ + function removeReferencedCategoryValue(shape) { + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(shape), + categoryValue = businessObject.categoryValueRef; + if (!categoryValue) { + return; + } + var category = categoryValue.$parent; + if (!categoryValue) { + return; + } + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(category.categoryValue, categoryValue); + + // cleanup category if it is empty + if (category && !category.categoryValue.length) { + removeCategory(category); + } + } + + /** + * Removes a given category from the definitions + * + * @param {ModdleElement} category + */ + function removeCategory(category) { + var definitions = getDefinitions(); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(definitions.get('rootElements'), category); + } + + /** + * Returns all group element in the current registry + * + * @return {Array} a list of group shapes + */ + function getGroupElements() { + return elementRegistry.filter(function (e) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(e, 'bpmn:Group'); + }); + } + + /** + * Returns true if given categoryValue is referenced in one of the given elements + * + * @param {Array} elements + * @param {ModdleElement} categoryValue + * @return {boolean} + */ + function isReferenced(elements, categoryValue) { + return elements.some(function (e) { + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(e); + return businessObject.categoryValueRef && businessObject.categoryValueRef === categoryValue; + }); + } + + /** + * remove referenced category + value when group was deleted + */ + this.executed('shape.delete', function (event) { + var context = event.context, + shape = context.shape; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Group')) { + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(shape), + categoryValueRef = businessObject.categoryValueRef, + groupElements = getGroupElements(); + if (!isReferenced(groupElements, categoryValueRef)) { + removeReferencedCategoryValue(shape); + } + } + }); + + /** + * re-attach removed category + */ + this.reverted('shape.delete', function (event) { + var context = event.context, + shape = context.shape; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Group')) { + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(shape), + categoryValueRef = businessObject.categoryValueRef, + definitions = getDefinitions(), + category = categoryValueRef ? categoryValueRef.$parent : null; + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(category.get('categoryValue'), categoryValueRef); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(definitions.get('rootElements'), category); + } + }); + + /** + * create new category + value when group was created + */ + this.execute('shape.create', function (event) { + var context = event.context, + shape = context.shape, + businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(shape); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(businessObject, 'bpmn:Group') && !businessObject.categoryValueRef) { + var definitions = getDefinitions(), + categoryValue = (0,_util_CategoryUtil__WEBPACK_IMPORTED_MODULE_4__.createCategoryValue)(definitions, bpmnFactory); + + // link the reference to the Group + businessObject.categoryValueRef = categoryValue; + } + }); + this.revert('shape.create', function (event) { + var context = event.context, + shape = context.shape; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Group')) { + removeReferencedCategoryValue(shape); + delete (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(shape).categoryValueRef; + } + }); + + // copy bpmn:CategoryValue when copying element + eventBus.on('moddleCopy.canCopyProperty', HIGH_PRIORITY, function (context) { + var property = context.property, + categoryValue; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(property, 'bpmn:CategoryValue')) { + categoryValue = (0,_util_CategoryUtil__WEBPACK_IMPORTED_MODULE_4__.createCategoryValue)(getDefinitions(), bpmnFactory); + + // return copy of category + return moddleCopy.copyElement(property, categoryValue); + } + }); +} +GroupBehavior.$inject = ['bpmnFactory', 'canvas', 'elementRegistry', 'eventBus', 'injector', 'moddleCopy']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(GroupBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/***/ }), + +/***/ 60465: +/*!*********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/ImportDockingFix.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ImportDockingFix) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var _util_LineIntersect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/LineIntersect */ 296); + + + +/** + * Fix broken dockings after DI imports. + * + * @param {EventBus} eventBus + */ +function ImportDockingFix(eventBus) { + function adjustDocking(startPoint, nextPoint, elementMid) { + var elementTop = { + x: elementMid.x, + y: elementMid.y - 50 + }; + var elementLeft = { + x: elementMid.x - 50, + y: elementMid.y + }; + var verticalIntersect = (0,_util_LineIntersect__WEBPACK_IMPORTED_MODULE_0__["default"])(startPoint, nextPoint, elementMid, elementTop), + horizontalIntersect = (0,_util_LineIntersect__WEBPACK_IMPORTED_MODULE_0__["default"])(startPoint, nextPoint, elementMid, elementLeft); + + // original is horizontal or vertical center cross intersection + var centerIntersect; + if (verticalIntersect && horizontalIntersect) { + if (getDistance(verticalIntersect, elementMid) > getDistance(horizontalIntersect, elementMid)) { + centerIntersect = horizontalIntersect; + } else { + centerIntersect = verticalIntersect; + } + } else { + centerIntersect = verticalIntersect || horizontalIntersect; + } + startPoint.original = centerIntersect; + } + function fixDockings(connection) { + var waypoints = connection.waypoints; + adjustDocking(waypoints[0], waypoints[1], (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(connection.source)); + adjustDocking(waypoints[waypoints.length - 1], waypoints[waypoints.length - 2], (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(connection.target)); + } + eventBus.on('bpmnElement.added', function (e) { + var element = e.element; + if (element.waypoints) { + fixDockings(element); + } + }); +} +ImportDockingFix.$inject = ['eventBus']; + +// helpers ////////////////////// + +function getDistance(p1, p2) { + return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2)); +} + +/***/ }), + +/***/ 82661: +/*!********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/IsHorizontalFix.js ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ IsHorizontalFix) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ModelingUtil */ 4525); + + + + + +/** + * A component that makes sure that each created or updated + * Pool and Lane is assigned an isHorizontal property set to true. + * + * @param {EventBus} eventBus + */ +function IsHorizontalFix(eventBus) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + var elementTypesToUpdate = ['bpmn:Participant', 'bpmn:Lane']; + this.executed(['shape.move', 'shape.create', 'shape.resize'], function (event) { + var bo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(event.context.shape); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(bo, elementTypesToUpdate) && !bo.di.get('isHorizontal')) { + // set attribute directly to avoid modeling#updateProperty side effects + bo.di.set('isHorizontal', true); + } + }); +} +IsHorizontalFix.$inject = ['eventBus']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(IsHorizontalFix, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/***/ }), + +/***/ 19278: +/*!******************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/LabelBehavior.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ asEdges: () => (/* binding */ asEdges), +/* harmony export */ "default": () => (/* binding */ LabelBehavior), +/* harmony export */ getReferencePoint: () => (/* binding */ getReferencePoint), +/* harmony export */ getReferencePointDelta: () => (/* binding */ getReferencePointDelta) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/LabelUtil */ 81454); +/* harmony import */ var _label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../label-editing/LabelUtil */ 89497); +/* harmony import */ var _util_LabelLayoutUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util/LabelLayoutUtil */ 98635); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var diagram_js_lib_util_AttachUtil__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! diagram-js/lib/util/AttachUtil */ 93999); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var diagram_js_lib_util_PositionUtil__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! diagram-js/lib/util/PositionUtil */ 28929); +/* harmony import */ var _util_GeometricUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./util/GeometricUtil */ 60526); + + + + + + + + + + + + +var DEFAULT_LABEL_DIMENSIONS = { + width: 90, + height: 20 +}; +var NAME_PROPERTY = 'name'; +var TEXT_PROPERTY = 'text'; + +/** + * A component that makes sure that external labels are added + * together with respective elements and properly updated (DI wise) + * during move. + * + * @param {EventBus} eventBus + * @param {Modeling} modeling + * @param {BpmnFactory} bpmnFactory + * @param {TextRenderer} textRenderer + */ +function LabelBehavior(eventBus, modeling, bpmnFactory, textRenderer) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + + // update label if name property was updated + this.postExecute('element.updateProperties', function (e) { + var context = e.context, + element = context.element, + properties = context.properties; + if (NAME_PROPERTY in properties) { + modeling.updateLabel(element, properties[NAME_PROPERTY]); + } + if (TEXT_PROPERTY in properties && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element, 'bpmn:TextAnnotation')) { + var newBounds = textRenderer.getTextAnnotationBounds({ + x: element.x, + y: element.y, + width: element.width, + height: element.height + }, properties[TEXT_PROPERTY] || ''); + modeling.updateLabel(element, properties.text, newBounds); + } + }); + + // create label shape after shape/connection was created + this.postExecute(['shape.create', 'connection.create'], function (e) { + var context = e.context, + hints = context.hints || {}; + if (hints.createElementsBehavior === false) { + return; + } + var element = context.shape || context.connection, + businessObject = element.businessObject; + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabel)(element) || !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabelExternal)(element)) { + return; + } + + // only create label if attribute available + if (!(0,_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.getLabel)(element)) { + return; + } + var labelCenter = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.getExternalLabelMid)(element); + + // we don't care about x and y + var labelDimensions = textRenderer.getExternalLabelBounds(DEFAULT_LABEL_DIMENSIONS, (0,_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.getLabel)(element)); + modeling.createLabel(element, labelCenter, { + id: businessObject.id + '_label', + businessObject: businessObject, + width: labelDimensions.width, + height: labelDimensions.height + }); + }); + + // update label after label shape was deleted + this.postExecute('shape.delete', function (event) { + var context = event.context, + labelTarget = context.labelTarget, + hints = context.hints || {}; + + // check if label + if (labelTarget && hints.unsetLabel !== false) { + modeling.updateLabel(labelTarget, null, null, { + removeShape: false + }); + } + }); + + // update di information on label creation + this.postExecute(['label.create'], function (event) { + var context = event.context, + element = context.shape, + businessObject, + di; + + // we want to trigger on real labels only + if (!element.labelTarget) { + return; + } + + // we want to trigger on BPMN elements only + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(element.labelTarget || element, 'bpmn:BaseElement')) { + return; + } + businessObject = element.businessObject, di = businessObject.di; + if (!di.label) { + di.label = bpmnFactory.create('bpmndi:BPMNLabel', { + bounds: bpmnFactory.create('dc:Bounds') + }); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)(di.label.bounds, { + x: element.x, + y: element.y, + width: element.width, + height: element.height + }); + }); + function getVisibleLabelAdjustment(event) { + var context = event.context, + connection = context.connection, + label = connection.label, + hints = (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.assign)({}, context.hints), + newWaypoints = context.newWaypoints || connection.waypoints, + oldWaypoints = context.oldWaypoints; + if (typeof hints.startChanged === 'undefined') { + hints.startChanged = !!hints.connectionStart; + } + if (typeof hints.endChanged === 'undefined') { + hints.endChanged = !!hints.connectionEnd; + } + return (0,_util_LabelLayoutUtil__WEBPACK_IMPORTED_MODULE_6__.getLabelAdjustment)(label, newWaypoints, oldWaypoints, hints); + } + this.postExecute(['connection.layout', 'connection.updateWaypoints'], function (event) { + var context = event.context, + hints = context.hints || {}; + if (hints.labelBehavior === false) { + return; + } + var connection = context.connection, + label = connection.label, + labelAdjustment; + + // handle missing label as well as the case + // that the label parent does not exist (yet), + // because it is being pasted / created via multi element create + // + // Cf. https://github.com/bpmn-io/bpmn-js/pull/1227 + if (!label || !label.parent) { + return; + } + labelAdjustment = getVisibleLabelAdjustment(event); + modeling.moveShape(label, labelAdjustment); + }); + + // keep label position on shape replace + this.postExecute(['shape.replace'], function (event) { + var context = event.context, + newShape = context.newShape, + oldShape = context.oldShape; + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(newShape); + if (businessObject && (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.isLabelExternal)(businessObject) && oldShape.label && newShape.label) { + newShape.label.x = oldShape.label.x; + newShape.label.y = oldShape.label.y; + } + }); + + // move external label after resizing + this.postExecute('shape.resize', function (event) { + var context = event.context, + shape = context.shape, + newBounds = context.newBounds, + oldBounds = context.oldBounds; + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_3__.hasExternalLabel)(shape)) { + var label = shape.label, + labelMid = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_7__.getMid)(label), + edges = asEdges(oldBounds); + + // get nearest border point to label as reference point + var referencePoint = getReferencePoint(labelMid, edges); + var delta = getReferencePointDelta(referencePoint, oldBounds, newBounds); + modeling.moveShape(label, delta); + } + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(LabelBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +LabelBehavior.$inject = ['eventBus', 'modeling', 'bpmnFactory', 'textRenderer']; + +// helpers ////////////////////// + +/** + * Calculates a reference point delta relative to a new position + * of a certain element's bounds + * + * @param {Point} point + * @param {Bounds} oldBounds + * @param {Bounds} newBounds + * + * @return {Delta} delta + */ +function getReferencePointDelta(referencePoint, oldBounds, newBounds) { + var newReferencePoint = (0,diagram_js_lib_util_AttachUtil__WEBPACK_IMPORTED_MODULE_8__.getNewAttachPoint)(referencePoint, oldBounds, newBounds); + return (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_7__.roundPoint)((0,diagram_js_lib_util_PositionUtil__WEBPACK_IMPORTED_MODULE_9__.delta)(newReferencePoint, referencePoint)); +} + +/** + * Generates the nearest point (reference point) for a given point + * onto given set of lines + * + * @param {Array} lines + * @param {Point} point + * + * @param {Point} + */ +function getReferencePoint(point, lines) { + if (!lines.length) { + return; + } + var nearestLine = getNearestLine(point, lines); + return (0,_util_GeometricUtil__WEBPACK_IMPORTED_MODULE_10__.perpendicularFoot)(point, nearestLine); +} + +/** + * Convert the given bounds to a lines array containing all edges + * + * @param {Bounds|Point} bounds + * + * @return Array + */ +function asEdges(bounds) { + return [[ + // top + { + x: bounds.x, + y: bounds.y + }, { + x: bounds.x + (bounds.width || 0), + y: bounds.y + }], [ + // right + { + x: bounds.x + (bounds.width || 0), + y: bounds.y + }, { + x: bounds.x + (bounds.width || 0), + y: bounds.y + (bounds.height || 0) + }], [ + // bottom + { + x: bounds.x, + y: bounds.y + (bounds.height || 0) + }, { + x: bounds.x + (bounds.width || 0), + y: bounds.y + (bounds.height || 0) + }], [ + // left + { + x: bounds.x, + y: bounds.y + }, { + x: bounds.x, + y: bounds.y + (bounds.height || 0) + }]]; +} + +/** + * Returns the nearest line for a given point by distance + * @param {Point} point + * @param Array lines + * + * @return Array + */ +function getNearestLine(point, lines) { + var distances = lines.map(function (l) { + return { + line: l, + distance: (0,_util_GeometricUtil__WEBPACK_IMPORTED_MODULE_10__.getDistancePointLine)(point, l) + }; + }); + var sorted = (0,min_dash__WEBPACK_IMPORTED_MODULE_5__.sortBy)(distances, 'distance'); + return sorted[0].line; +} + +/***/ }), + +/***/ 23815: +/*!************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/MessageFlowBehavior.js ***! + \************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MessageFlowBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/DiUtil */ 55441); +/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ 35723); +/* harmony import */ var diagram_js_lib_features_modeling_cmd_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/modeling/cmd/helper/AnchorsHelper */ 25395); + + + + + + + +/** + * BPMN-specific message flow behavior. + */ +function MessageFlowBehavior(eventBus, modeling) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this.postExecute('shape.replace', function (context) { + var oldShape = context.oldShape, + newShape = context.newShape; + if (!isParticipantCollapse(oldShape, newShape)) { + return; + } + var messageFlows = getMessageFlows(oldShape); + messageFlows.incoming.forEach(function (incoming) { + var anchor = (0,diagram_js_lib_features_modeling_cmd_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_2__.getResizedTargetAnchor)(incoming, newShape, oldShape); + modeling.reconnectEnd(incoming, newShape, anchor); + }); + messageFlows.outgoing.forEach(function (outgoing) { + var anchor = (0,diagram_js_lib_features_modeling_cmd_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_2__.getResizedSourceAnchor)(outgoing, newShape, oldShape); + modeling.reconnectStart(outgoing, newShape, anchor); + }); + }, true); +} +MessageFlowBehavior.$inject = ['eventBus', 'modeling']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(MessageFlowBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +// helpers ////////// + +function isParticipantCollapse(oldShape, newShape) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldShape, 'bpmn:Participant') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(oldShape) && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newShape, 'bpmn:Participant') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(newShape); +} +function getMessageFlows(parent) { + var elements = (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_5__.selfAndAllChildren)([parent], false); + var incoming = [], + outgoing = []; + elements.forEach(function (element) { + if (element === parent) { + return; + } + element.incoming.forEach(function (connection) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(connection, 'bpmn:MessageFlow')) { + incoming.push(connection); + } + }); + element.outgoing.forEach(function (connection) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(connection, 'bpmn:MessageFlow')) { + outgoing.push(connection); + } + }); + }, []); + return { + incoming: incoming, + outgoing: outgoing + }; +} + +/***/ }), + +/***/ 7852: +/*!*********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/ModelingFeedback.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ModelingFeedback) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + +var COLLAB_ERR_MSG = 'flow elements must be children of pools/participants'; +function ModelingFeedback(eventBus, tooltips, translate) { + function showError(position, message, timeout) { + tooltips.add({ + position: { + x: position.x + 5, + y: position.y + 5 + }, + type: 'error', + timeout: timeout || 2000, + html: '
' + message + '
' + }); + } + eventBus.on(['shape.move.rejected', 'create.rejected'], function (event) { + var context = event.context, + shape = context.shape, + target = context.target; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(target, 'bpmn:Collaboration') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:FlowNode')) { + showError(event, translate(COLLAB_ERR_MSG)); + } + }); +} +ModelingFeedback.$inject = ['eventBus', 'tooltips', 'translate']; + +/***/ }), + +/***/ 5288: +/*!**************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/RemoveElementBehavior.js ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ RemoveElementBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_LineIntersect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/LineIntersect */ 296); + + + + +function RemoveElementBehavior(eventBus, bpmnRules, modeling) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + + /** + * Combine sequence flows when deleting an element + * if there is one incoming and one outgoing + * sequence flow + */ + this.preExecute('shape.delete', function (e) { + var shape = e.context.shape; + + // only handle [a] -> [shape] -> [b] patterns + if (shape.incoming.length !== 1 || shape.outgoing.length !== 1) { + return; + } + var inConnection = shape.incoming[0], + outConnection = shape.outgoing[0]; + + // only handle sequence flows + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(inConnection, 'bpmn:SequenceFlow') || !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(outConnection, 'bpmn:SequenceFlow')) { + return; + } + if (bpmnRules.canConnect(inConnection.source, outConnection.target, inConnection)) { + // compute new, combined waypoints + var newWaypoints = getNewWaypoints(inConnection.waypoints, outConnection.waypoints); + modeling.reconnectEnd(inConnection, outConnection.target, newWaypoints); + } + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(RemoveElementBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +RemoveElementBehavior.$inject = ['eventBus', 'bpmnRules', 'modeling']; + +// helpers ////////////////////// + +function getDocking(point) { + return point.original || point; +} +function getNewWaypoints(inWaypoints, outWaypoints) { + var intersection = (0,_util_LineIntersect__WEBPACK_IMPORTED_MODULE_3__["default"])(getDocking(inWaypoints[inWaypoints.length - 2]), getDocking(inWaypoints[inWaypoints.length - 1]), getDocking(outWaypoints[1]), getDocking(outWaypoints[0])); + if (intersection) { + return [].concat(inWaypoints.slice(0, inWaypoints.length - 1), [intersection], outWaypoints.slice(1)); + } else { + return [getDocking(inWaypoints[0]), getDocking(outWaypoints[outWaypoints.length - 1])]; + } +} + +/***/ }), + +/***/ 37077: +/*!******************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/RemoveParticipantBehavior.js ***! + \******************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ RemoveParticipantBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + + + +/** + * BPMN specific remove behavior + */ +function RemoveParticipantBehavior(eventBus, modeling) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + + /** + * morph collaboration diagram into process diagram + * after the last participant has been removed + */ + + this.preExecute('shape.delete', function (context) { + var shape = context.shape, + parent = shape.parent; + + // activate the behavior if the shape to be removed + // is a participant + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Participant')) { + context.collaborationRoot = parent; + } + }, true); + this.postExecute('shape.delete', function (context) { + var collaborationRoot = context.collaborationRoot; + if (collaborationRoot && !collaborationRoot.businessObject.participants.length) { + // replace empty collaboration with process diagram + modeling.makeProcess(); + } + }, true); +} +RemoveParticipantBehavior.$inject = ['eventBus', 'modeling']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(RemoveParticipantBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/***/ }), + +/***/ 5576: +/*!******************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/ReplaceConnectionBehavior.js ***! + \******************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ReplaceConnectionBehavior) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + + + +function ReplaceConnectionBehavior(eventBus, modeling, bpmnRules, injector) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + var dragging = injector.get('dragging', false); + function fixConnection(connection) { + var source = connection.source, + target = connection.target, + parent = connection.parent; + + // do not do anything if connection + // is already deleted (may happen due to other + // behaviors plugged-in before) + if (!parent) { + return; + } + var replacementType, remove; + + /** + * Check if incoming or outgoing connections + * can stay or could be substituted with an + * appropriate replacement. + * + * This holds true for SequenceFlow <> MessageFlow. + */ + + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:SequenceFlow')) { + if (!bpmnRules.canConnectSequenceFlow(source, target)) { + remove = true; + } + if (bpmnRules.canConnectMessageFlow(source, target)) { + replacementType = 'bpmn:MessageFlow'; + } + } + + // transform message flows into sequence flows, if possible + + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:MessageFlow')) { + if (!bpmnRules.canConnectMessageFlow(source, target)) { + remove = true; + } + if (bpmnRules.canConnectSequenceFlow(source, target)) { + replacementType = 'bpmn:SequenceFlow'; + } + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:Association') && !bpmnRules.canConnectAssociation(source, target)) { + remove = true; + } + + // remove invalid connection, + // unless it has been removed already + if (remove) { + modeling.removeConnection(connection); + } + + // replace SequenceFlow <> MessageFlow + + if (replacementType) { + modeling.connect(source, target, { + type: replacementType, + waypoints: connection.waypoints.slice() + }); + } + } + function replaceReconnectedConnection(event) { + var context = event.context, + connection = context.connection, + source = context.newSource || connection.source, + target = context.newTarget || connection.target, + allowed, + replacement; + allowed = bpmnRules.canConnect(source, target); + if (!allowed || allowed.type === connection.type) { + return; + } + replacement = modeling.connect(source, target, { + type: allowed.type, + waypoints: connection.waypoints.slice() + }); + + // remove old connection + modeling.removeConnection(connection); + + // replace connection in context to reconnect end/start + context.connection = replacement; + if (dragging) { + cleanDraggingSelection(connection, replacement); + } + } + + // monkey-patch selection saved in dragging in order to re-select it when operation is finished + function cleanDraggingSelection(oldConnection, newConnection) { + var context = dragging.context(), + previousSelection = context && context.payload.previousSelection, + index; + + // do nothing if not dragging or no selection was present + if (!previousSelection || !previousSelection.length) { + return; + } + index = previousSelection.indexOf(oldConnection); + if (index === -1) { + return; + } + previousSelection.splice(index, 1, newConnection); + } + + // lifecycle hooks + + this.postExecuted('elements.move', function (context) { + var closure = context.closure, + allConnections = closure.allConnections; + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(allConnections, fixConnection); + }, true); + this.preExecute('connection.reconnect', replaceReconnectedConnection); + this.postExecuted('element.updateProperties', function (event) { + var context = event.context, + properties = context.properties, + element = context.element, + businessObject = element.businessObject, + connection; + + // remove condition on change to default + if (properties.default) { + connection = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.find)(element.outgoing, (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.matchPattern)({ + id: element.businessObject.default.id + })); + if (connection) { + modeling.updateProperties(connection, { + conditionExpression: undefined + }); + } + } + + // remove default from source on change to conditional + if (properties.conditionExpression && businessObject.sourceRef.default === businessObject) { + modeling.updateProperties(element.source, { + default: undefined + }); + } + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(ReplaceConnectionBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +ReplaceConnectionBehavior.$inject = ['eventBus', 'modeling', 'bpmnRules', 'injector']; + +/***/ }), + +/***/ 57501: +/*!****************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/ReplaceElementBehaviour.js ***! + \****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ReplaceElementBehaviour) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/DiUtil */ 55441); + + + + + +/** + * BPMN-specific replace behavior. + */ +function ReplaceElementBehaviour(bpmnReplace, bpmnRules, elementRegistry, injector, modeling, selection) { + injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"], this); + this._bpmnReplace = bpmnReplace; + this._elementRegistry = elementRegistry; + this._selection = selection; + + // replace elements on create, e.g. during copy-paste + this.postExecuted(['elements.create'], 500, function (event) { + var context = event.context, + target = context.parent, + elements = context.elements; + var canReplace = bpmnRules.canReplace(elements, target); + if (canReplace) { + this.replaceElements(elements, canReplace.replacements); + } + }, this); + + // replace elements on move + this.postExecuted(['elements.move'], 500, function (event) { + var context = event.context, + target = context.newParent, + newHost = context.newHost, + elements = []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(context.closure.topLevel, function (topLevelElements) { + if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isEventSubProcess)(topLevelElements)) { + elements = elements.concat(topLevelElements.children); + } else { + elements = elements.concat(topLevelElements); + } + }); + + // set target to host if attaching + if (elements.length === 1 && newHost) { + target = newHost; + } + var canReplace = bpmnRules.canReplace(elements, target); + if (canReplace) { + this.replaceElements(elements, canReplace.replacements, newHost); + } + }, this); + + // update attachments on host replace + this.postExecute(['shape.replace'], 1500, function (e) { + var context = e.context, + oldShape = context.oldShape, + newShape = context.newShape, + attachers = oldShape.attachers, + canReplace; + if (attachers && attachers.length) { + canReplace = bpmnRules.canReplace(attachers, newShape); + this.replaceElements(attachers, canReplace.replacements); + } + }, this); + + // keep ID on shape replace + this.postExecuted(['shape.replace'], 1500, function (e) { + var context = e.context, + oldShape = context.oldShape, + newShape = context.newShape; + modeling.unclaimId(oldShape.businessObject.id, oldShape.businessObject); + modeling.updateProperties(newShape, { + id: oldShape.id + }); + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(ReplaceElementBehaviour, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +ReplaceElementBehaviour.prototype.replaceElements = function (elements, newElements) { + var elementRegistry = this._elementRegistry, + bpmnReplace = this._bpmnReplace, + selection = this._selection; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(newElements, function (replacement) { + var newElement = { + type: replacement.newElementType + }; + var oldElement = elementRegistry.get(replacement.oldElementId); + var idx = elements.indexOf(oldElement); + elements[idx] = bpmnReplace.replaceElement(oldElement, newElement, { + select: false + }); + }); + if (newElements) { + selection.select(elements); + } +}; +ReplaceElementBehaviour.$inject = ['bpmnReplace', 'bpmnRules', 'elementRegistry', 'injector', 'modeling', 'selection']; + +/***/ }), + +/***/ 79854: +/*!*******************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/ResizeBehavior.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LANE_MIN_DIMENSIONS: () => (/* binding */ LANE_MIN_DIMENSIONS), +/* harmony export */ PARTICIPANT_MIN_DIMENSIONS: () => (/* binding */ PARTICIPANT_MIN_DIMENSIONS), +/* harmony export */ SUB_PROCESS_MIN_DIMENSIONS: () => (/* binding */ SUB_PROCESS_MIN_DIMENSIONS), +/* harmony export */ TEXT_ANNOTATION_MIN_DIMENSIONS: () => (/* binding */ TEXT_ANNOTATION_MIN_DIMENSIONS), +/* harmony export */ "default": () => (/* binding */ ResizeBehavior), +/* harmony export */ getParticipantResizeConstraints: () => (/* binding */ getParticipantResizeConstraints) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/DiUtil */ 55441); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/LaneUtil */ 23568); + + + + +var HIGH_PRIORITY = 1500; +var LANE_MIN_DIMENSIONS = { + width: 300, + height: 60 +}; +var PARTICIPANT_MIN_DIMENSIONS = { + width: 300, + height: 150 +}; +var SUB_PROCESS_MIN_DIMENSIONS = { + width: 140, + height: 120 +}; +var TEXT_ANNOTATION_MIN_DIMENSIONS = { + width: 50, + height: 30 +}; + +/** + * Set minimum bounds/resize constraints on resize. + * + * @param {EventBus} eventBus + */ +function ResizeBehavior(eventBus) { + eventBus.on('resize.start', HIGH_PRIORITY, function (event) { + var context = event.context, + shape = context.shape, + direction = context.direction, + balanced = context.balanced; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Lane') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Participant')) { + context.resizeConstraints = getParticipantResizeConstraints(shape, direction, balanced); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Participant')) { + context.minDimensions = PARTICIPANT_MIN_DIMENSIONS; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(shape)) { + context.minDimensions = SUB_PROCESS_MIN_DIMENSIONS; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:TextAnnotation')) { + context.minDimensions = TEXT_ANNOTATION_MIN_DIMENSIONS; + } + }); +} +ResizeBehavior.$inject = ['eventBus']; +var abs = Math.abs, + min = Math.min, + max = Math.max; +function addToTrbl(trbl, attr, value, choice) { + var current = trbl[attr]; + + // make sure to set the value if it does not exist + // or apply the correct value by comparing against + // choice(value, currentValue) + trbl[attr] = current === undefined ? value : choice(value, current); +} +function addMin(trbl, attr, value) { + return addToTrbl(trbl, attr, value, min); +} +function addMax(trbl, attr, value) { + return addToTrbl(trbl, attr, value, max); +} +var LANE_RIGHT_PADDING = 20, + LANE_LEFT_PADDING = 50, + LANE_TOP_PADDING = 20, + LANE_BOTTOM_PADDING = 20; +function getParticipantResizeConstraints(laneShape, resizeDirection, balanced) { + var lanesRoot = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_2__.getLanesRoot)(laneShape); + var isFirst = true, + isLast = true; + + // max top/bottom size for lanes + var allLanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_2__.collectLanes)(lanesRoot, [lanesRoot]); + var laneTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(laneShape); + var maxTrbl = {}, + minTrbl = {}; + if (/e/.test(resizeDirection)) { + minTrbl.right = laneTrbl.left + LANE_MIN_DIMENSIONS.width; + } else if (/w/.test(resizeDirection)) { + minTrbl.left = laneTrbl.right - LANE_MIN_DIMENSIONS.width; + } + allLanes.forEach(function (other) { + var otherTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(other); + if (/n/.test(resizeDirection)) { + if (otherTrbl.top < laneTrbl.top - 10) { + isFirst = false; + } + + // max top size (based on next element) + if (balanced && abs(laneTrbl.top - otherTrbl.bottom) < 10) { + addMax(maxTrbl, 'top', otherTrbl.top + LANE_MIN_DIMENSIONS.height); + } + + // min top size (based on self or nested element) + if (abs(laneTrbl.top - otherTrbl.top) < 5) { + addMin(minTrbl, 'top', otherTrbl.bottom - LANE_MIN_DIMENSIONS.height); + } + } + if (/s/.test(resizeDirection)) { + if (otherTrbl.bottom > laneTrbl.bottom + 10) { + isLast = false; + } + + // max bottom size (based on previous element) + if (balanced && abs(laneTrbl.bottom - otherTrbl.top) < 10) { + addMin(maxTrbl, 'bottom', otherTrbl.bottom - LANE_MIN_DIMENSIONS.height); + } + + // min bottom size (based on self or nested element) + if (abs(laneTrbl.bottom - otherTrbl.bottom) < 5) { + addMax(minTrbl, 'bottom', otherTrbl.top + LANE_MIN_DIMENSIONS.height); + } + } + }); + + // max top/bottom/left/right size based on flow nodes + var flowElements = lanesRoot.children.filter(function (s) { + return !s.hidden && !s.waypoints && ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(s, 'bpmn:FlowElement') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(s, 'bpmn:Artifact')); + }); + flowElements.forEach(function (flowElement) { + var flowElementTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(flowElement); + if (isFirst && /n/.test(resizeDirection)) { + addMin(minTrbl, 'top', flowElementTrbl.top - LANE_TOP_PADDING); + } + if (/e/.test(resizeDirection)) { + addMax(minTrbl, 'right', flowElementTrbl.right + LANE_RIGHT_PADDING); + } + if (isLast && /s/.test(resizeDirection)) { + addMax(minTrbl, 'bottom', flowElementTrbl.bottom + LANE_BOTTOM_PADDING); + } + if (/w/.test(resizeDirection)) { + addMin(minTrbl, 'left', flowElementTrbl.left - LANE_LEFT_PADDING); + } + }); + return { + min: minTrbl, + max: maxTrbl + }; +} + +/***/ }), + +/***/ 38208: +/*!***********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/ResizeLaneBehavior.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ResizeLaneBehavior) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var diagram_js_lib_util_Mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/util/Mouse */ 53171); + + + +var SLIGHTLY_HIGHER_PRIORITY = 1001; + +/** + * Invoke {@link Modeling#resizeLane} instead of + * {@link Modeling#resizeShape} when resizing a Lane + * or Participant shape. + */ +function ResizeLaneBehavior(eventBus, modeling) { + eventBus.on('resize.start', SLIGHTLY_HIGHER_PRIORITY + 500, function (event) { + var context = event.context, + shape = context.shape; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Lane') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Participant')) { + // should we resize the opposite lane(s) in + // order to compensate for the resize operation? + context.balanced = !(0,diagram_js_lib_util_Mouse__WEBPACK_IMPORTED_MODULE_1__.hasPrimaryModifier)(event); + } + }); + + /** + * Intercept resize end and call resize lane function instead. + */ + eventBus.on('resize.end', SLIGHTLY_HIGHER_PRIORITY, function (event) { + var context = event.context, + shape = context.shape, + canExecute = context.canExecute, + newBounds = context.newBounds; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Lane') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(shape, 'bpmn:Participant')) { + if (canExecute) { + // ensure we have actual pixel values for new bounds + // (important when zoom level was > 1 during move) + newBounds = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.roundBounds)(newBounds); + + // perform the actual resize + modeling.resizeLane(shape, newBounds, context.balanced); + } + + // stop propagation + return false; + } + }); +} +ResizeLaneBehavior.$inject = ['eventBus', 'modeling']; + +/***/ }), + +/***/ 53191: +/*!*********************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/RootElementReferenceBehavior.js ***! + \*********************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ RootElementReferenceBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ 39233); +/* harmony import */ var _util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/ModelingUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../util/DiUtil */ 55441); + + + + + + + +var LOW_PRIORITY = 500; + +/** + * Add referenced root elements (error, escalation, message, signal) if they don't exist. + * Copy referenced root elements on copy & paste. + */ +function RootElementReferenceBehavior(bpmnjs, eventBus, injector, moddleCopy, bpmnFactory) { + injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"], this); + function canHaveRootElementReference(element) { + return (0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(element, ['bpmn:ReceiveTask', 'bpmn:SendTask']) || hasAnyEventDefinition(element, ['bpmn:ErrorEventDefinition', 'bpmn:EscalationEventDefinition', 'bpmn:MessageEventDefinition', 'bpmn:SignalEventDefinition']); + } + function hasRootElement(rootElement) { + var definitions = bpmnjs.getDefinitions(), + rootElements = definitions.get('rootElements'); + return !!(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.find)(rootElements, (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.matchPattern)({ + id: rootElement.id + })); + } + function getRootElementReferencePropertyName(eventDefinition) { + if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(eventDefinition, 'bpmn:ErrorEventDefinition')) { + return 'errorRef'; + } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(eventDefinition, 'bpmn:EscalationEventDefinition')) { + return 'escalationRef'; + } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(eventDefinition, 'bpmn:MessageEventDefinition')) { + return 'messageRef'; + } else if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(eventDefinition, 'bpmn:SignalEventDefinition')) { + return 'signalRef'; + } + } + function getRootElement(businessObject) { + if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(businessObject, ['bpmn:ReceiveTask', 'bpmn:SendTask'])) { + return businessObject.get('messageRef'); + } + var eventDefinitions = businessObject.get('eventDefinitions'), + eventDefinition = eventDefinitions[0]; + return eventDefinition.get(getRootElementReferencePropertyName(eventDefinition)); + } + function setRootElement(businessObject, rootElement) { + if ((0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(businessObject, ['bpmn:ReceiveTask', 'bpmn:SendTask'])) { + return businessObject.set('messageRef', rootElement); + } + var eventDefinitions = businessObject.get('eventDefinitions'), + eventDefinition = eventDefinitions[0]; + return eventDefinition.set(getRootElementReferencePropertyName(eventDefinition), rootElement); + } + + // create shape + this.executed('shape.create', function (context) { + var shape = context.shape; + if (!canHaveRootElementReference(shape)) { + return; + } + var businessObject = (0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(shape), + rootElement = getRootElement(businessObject), + rootElements; + if (rootElement && !hasRootElement(rootElement)) { + rootElements = bpmnjs.getDefinitions().get('rootElements'); + + // add root element + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_4__.add)(rootElements, rootElement); + context.addedRootElement = rootElement; + } + }, true); + this.reverted('shape.create', function (context) { + var addedRootElement = context.addedRootElement; + if (!addedRootElement) { + return; + } + var rootElements = bpmnjs.getDefinitions().get('rootElements'); + + // remove root element + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_4__.remove)(rootElements, addedRootElement); + }, true); + eventBus.on('copyPaste.copyElement', function (context) { + var descriptor = context.descriptor, + element = context.element; + if (!canHaveRootElementReference(element)) { + return; + } + var businessObject = (0,_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(element), + rootElement = getRootElement(businessObject); + if (rootElement) { + descriptor.referencedRootElement = rootElement; + } + }); + eventBus.on('copyPaste.pasteElement', LOW_PRIORITY, function (context) { + var descriptor = context.descriptor, + businessObject = descriptor.businessObject; + if (!canHaveRootElementReference(businessObject)) { + return; + } + var referencedRootElement = descriptor.referencedRootElement; + if (!referencedRootElement) { + return; + } + if (!hasRootElement(referencedRootElement)) { + referencedRootElement = moddleCopy.copyElement(referencedRootElement, bpmnFactory.create(referencedRootElement.$type)); + } + setRootElement(businessObject, referencedRootElement); + }); +} +RootElementReferenceBehavior.$inject = ['bpmnjs', 'eventBus', 'injector', 'moddleCopy', 'bpmnFactory']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(RootElementReferenceBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +// helpers ////////// + +function hasAnyEventDefinition(element, types) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isArray)(types)) { + types = [types]; + } + return (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.some)(types, function (type) { + return (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.hasEventDefinition)(element, type); + }); +} + +/***/ }), + +/***/ 54616: +/*!**********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/SpaceToolBehavior.js ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SpaceToolBehavior) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/DiUtil */ 55441); +/* harmony import */ var _ResizeBehavior__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ResizeBehavior */ 79854); +/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/LaneUtil */ 23568); + + + + + +var max = Math.max; +function SpaceToolBehavior(eventBus) { + eventBus.on('spaceTool.getMinDimensions', function (context) { + var shapes = context.shapes, + axis = context.axis, + start = context.start, + minDimensions = {}; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(shapes, function (shape) { + var id = shape.id; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:Participant')) { + if (isHorizontal(axis)) { + minDimensions[id] = _ResizeBehavior__WEBPACK_IMPORTED_MODULE_2__.PARTICIPANT_MIN_DIMENSIONS; + } else { + minDimensions[id] = { + width: _ResizeBehavior__WEBPACK_IMPORTED_MODULE_2__.PARTICIPANT_MIN_DIMENSIONS.width, + height: getParticipantMinHeight(shape, start) + }; + } + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_3__.isExpanded)(shape)) { + minDimensions[id] = _ResizeBehavior__WEBPACK_IMPORTED_MODULE_2__.SUB_PROCESS_MIN_DIMENSIONS; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(shape, 'bpmn:TextAnnotation')) { + minDimensions[id] = _ResizeBehavior__WEBPACK_IMPORTED_MODULE_2__.TEXT_ANNOTATION_MIN_DIMENSIONS; + } + }); + return minDimensions; + }); +} +SpaceToolBehavior.$inject = ['eventBus']; + +// helpers ////////// +function isHorizontal(axis) { + return axis === 'x'; +} + +/** + * Get minimum height for participant taking lanes into account. + * + * @param {} participant + * @param {number} start + * + * @returns {Object} + */ +function getParticipantMinHeight(participant, start) { + var lanesMinHeight; + if (!hasChildLanes(participant)) { + return _ResizeBehavior__WEBPACK_IMPORTED_MODULE_2__.PARTICIPANT_MIN_DIMENSIONS.height; + } + lanesMinHeight = getLanesMinHeight(participant, start); + return max(_ResizeBehavior__WEBPACK_IMPORTED_MODULE_2__.PARTICIPANT_MIN_DIMENSIONS.height, lanesMinHeight); +} +function hasChildLanes(element) { + return !!(0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__.getChildLanes)(element).length; +} +function getLanesMinHeight(participant, resizeStart) { + var lanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__.getChildLanes)(participant), + resizedLane; + + // find the nested lane which is currently resized + resizedLane = findResizedLane(lanes, resizeStart); + + // resized lane cannot shrink below the minimum height + // but remaining lanes' dimensions are kept intact + return participant.height - resizedLane.height + _ResizeBehavior__WEBPACK_IMPORTED_MODULE_2__.LANE_MIN_DIMENSIONS.height; +} + +/** + * Find nested lane which is currently resized. + * + * @param {Array} lanes + * @param {number} resizeStart + */ +function findResizedLane(lanes, resizeStart) { + var i, lane, childLanes; + for (i = 0; i < lanes.length; i++) { + lane = lanes[i]; + + // resizing current lane or a lane nested + if (resizeStart >= lane.y && resizeStart <= lane.y + lane.height) { + childLanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_4__.getChildLanes)(lane); + + // a nested lane is resized + if (childLanes.length) { + return findResizedLane(childLanes, resizeStart); + } + + // current lane is the resized one + return lane; + } + } +} + +/***/ }), + +/***/ 89277: +/*!*********************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/SubProcessStartEventBehavior.js ***! + \*********************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SubProcessStartEventBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_DiUtil_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/DiUtil.js */ 55441); + + + + + +/** + * Add start event replacing element with expanded sub process. + * + * @param {Injector} injector + * @param {Modeling} modeling + */ +function SubProcessStartEventBehavior(injector, modeling) { + injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"], this); + this.postExecuted('shape.replace', function (event) { + var oldShape = event.context.oldShape, + newShape = event.context.newShape; + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(newShape, 'bpmn:SubProcess') || !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(oldShape, 'bpmn:Task') || !(0,_util_DiUtil_js__WEBPACK_IMPORTED_MODULE_3__.isExpanded)(newShape)) { + return; + } + var position = getStartEventPosition(newShape); + modeling.createShape({ + type: 'bpmn:StartEvent' + }, position, newShape); + }); +} +SubProcessStartEventBehavior.$inject = ['injector', 'modeling']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(SubProcessStartEventBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +// helpers ////////// + +function getStartEventPosition(shape) { + return { + x: shape.x + shape.width / 6, + y: shape.y + shape.height / 2 + }; +} + +/***/ }), + +/***/ 66690: +/*!***********************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/ToggleElementCollapseBehaviour.js ***! + \***********************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ToggleElementCollapseBehaviour) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/resize/ResizeUtil */ 35434); + + + + +var LOW_PRIORITY = 500; +function ToggleElementCollapseBehaviour(eventBus, elementFactory, modeling, resize) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + function hideEmptyLabels(children) { + if (children.length) { + children.forEach(function (child) { + if (child.type === 'label' && !child.businessObject.name) { + child.hidden = true; + } + }); + } + } + function expandedBounds(shape, defaultSize) { + var children = shape.children, + newBounds = defaultSize, + visibleElements, + visibleBBox; + visibleElements = filterVisible(children).concat([shape]); + visibleBBox = (0,diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_2__.computeChildrenBBox)(visibleElements); + if (visibleBBox) { + // center to visibleBBox with max(defaultSize, childrenBounds) + newBounds.width = Math.max(visibleBBox.width, newBounds.width); + newBounds.height = Math.max(visibleBBox.height, newBounds.height); + newBounds.x = visibleBBox.x + (visibleBBox.width - newBounds.width) / 2; + newBounds.y = visibleBBox.y + (visibleBBox.height - newBounds.height) / 2; + } else { + // center to collapsed shape with defaultSize + newBounds.x = shape.x + (shape.width - newBounds.width) / 2; + newBounds.y = shape.y + (shape.height - newBounds.height) / 2; + } + return newBounds; + } + function collapsedBounds(shape, defaultSize) { + return { + x: shape.x + (shape.width - defaultSize.width) / 2, + y: shape.y + (shape.height - defaultSize.height) / 2, + width: defaultSize.width, + height: defaultSize.height + }; + } + this.executed(['shape.toggleCollapse'], LOW_PRIORITY, function (e) { + var context = e.context, + shape = context.shape; + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:SubProcess')) { + return; + } + if (!shape.collapsed) { + // all children got made visible through djs, hide empty labels + hideEmptyLabels(shape.children); + + // remove collapsed marker + (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(shape).di.isExpanded = true; + } else { + // place collapsed marker + (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(shape).di.isExpanded = false; + } + }); + this.reverted(['shape.toggleCollapse'], LOW_PRIORITY, function (e) { + var context = e.context; + var shape = context.shape; + + // revert removing/placing collapsed marker + if (!shape.collapsed) { + (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(shape).di.isExpanded = true; + } else { + (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(shape).di.isExpanded = false; + } + }); + this.postExecuted(['shape.toggleCollapse'], LOW_PRIORITY, function (e) { + var shape = e.context.shape, + defaultSize = elementFactory._getDefaultSize(shape), + newBounds; + if (shape.collapsed) { + // resize to default size of collapsed shapes + newBounds = collapsedBounds(shape, defaultSize); + } else { + // resize to bounds of max(visible children, defaultSize) + newBounds = expandedBounds(shape, defaultSize); + } + modeling.resizeShape(shape, newBounds, null, { + autoResize: shape.collapsed ? false : 'nwse' + }); + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(ToggleElementCollapseBehaviour, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +ToggleElementCollapseBehaviour.$inject = ['eventBus', 'elementFactory', 'modeling']; + +// helpers ////////////////////// + +function filterVisible(elements) { + return elements.filter(function (e) { + return !e.hidden; + }); +} + +/***/ }), + +/***/ 50484: +/*!**********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/UnclaimIdBehavior.js ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UnclaimIdBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/DiUtil */ 55441); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/LabelUtil */ 81454); + + + + + + +/** + * Unclaims model IDs on element deletion. + * + * @param {Canvas} canvas + * @param {Injector} injector + * @param {Moddle} moddle + * @param {Modeling} modeling + */ +function UnclaimIdBehavior(canvas, injector, moddle, modeling) { + injector.invoke(diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"], this); + this.preExecute('shape.delete', function (event) { + var context = event.context, + shape = context.shape, + shapeBo = shape.businessObject; + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_2__.isLabel)(shape)) { + return; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:Participant') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(shape)) { + moddle.ids.unclaim(shapeBo.processRef.id); + } + modeling.unclaimId(shapeBo.id, shapeBo); + }); + this.preExecute('connection.delete', function (event) { + var context = event.context, + connection = context.connection, + connectionBo = connection.businessObject; + modeling.unclaimId(connectionBo.id, connectionBo); + }); + this.preExecute('canvas.updateRoot', function () { + var rootElement = canvas.getRootElement(), + rootElementBo = rootElement.businessObject; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(rootElement, 'bpmn:Collaboration')) { + moddle.ids.unclaim(rootElementBo.id); + } + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(UnclaimIdBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +UnclaimIdBehavior.$inject = ['canvas', 'injector', 'moddle', 'modeling']; + +/***/ }), + +/***/ 75376: +/*!*****************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/UnsetDefaultFlowBehavior.js ***! + \*****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DeleteSequenceFlowBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + + + +/** + * A behavior that unsets the Default property of + * sequence flow source on element delete, if the + * removed element is the Gateway or Task's default flow. + * + * @param {EventBus} eventBus + * @param {Modeling} modeling + */ +function DeleteSequenceFlowBehavior(eventBus, modeling) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this.preExecute('connection.delete', function (event) { + var context = event.context, + connection = context.connection, + source = connection.source; + if (isDefaultFlow(connection, source)) { + modeling.updateProperties(source, { + 'default': null + }); + } + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DeleteSequenceFlowBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +DeleteSequenceFlowBehavior.$inject = ['eventBus', 'modeling']; + +// helpers ////////////////////// + +function isDefaultFlow(connection, source) { + if (!(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(connection, 'bpmn:SequenceFlow')) { + return false; + } + var sourceBo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(source), + sequenceFlow = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.getBusinessObject)(connection); + return sourceBo.get('default') === sequenceFlow; +} + +/***/ }), + +/***/ 11837: +/*!*******************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/UpdateFlowNodeRefsBehavior.js ***! + \*******************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UpdateFlowNodeRefsBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + + +var LOW_PRIORITY = 500, + HIGH_PRIORITY = 5000; + +/** + * BPMN specific delete lane behavior + */ +function UpdateFlowNodeRefsBehavior(eventBus, modeling, translate) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + + /** + * Ok, this is it: + * + * We have to update the Lane#flowNodeRefs _and_ + * FlowNode#lanes with every FlowNode move/resize and + * Lane move/resize. + * + * We want to group that stuff to recompute containments + * as efficient as possible. + * + * Yea! + */ + + // the update context + var context; + function initContext() { + context = context || new UpdateContext(); + context.enter(); + return context; + } + function getContext() { + if (!context) { + throw new Error(translate('out of bounds release')); + } + return context; + } + function releaseContext() { + if (!context) { + throw new Error(translate('out of bounds release')); + } + var triggerUpdate = context.leave(); + if (triggerUpdate) { + modeling.updateLaneRefs(context.flowNodes, context.lanes); + context = null; + } + return triggerUpdate; + } + var laneRefUpdateEvents = ['spaceTool', 'lane.add', 'lane.resize', 'lane.split', 'elements.create', 'elements.delete', 'elements.move', 'shape.create', 'shape.delete', 'shape.move', 'shape.resize']; + + // listen to a lot of stuff to group lane updates + + this.preExecute(laneRefUpdateEvents, HIGH_PRIORITY, function (event) { + initContext(); + }); + this.postExecuted(laneRefUpdateEvents, LOW_PRIORITY, function (event) { + releaseContext(); + }); + + // Mark flow nodes + lanes that need an update + + this.preExecute(['shape.create', 'shape.move', 'shape.delete', 'shape.resize'], function (event) { + var context = event.context, + shape = context.shape; + var updateContext = getContext(); + + // no need to update labels + if (shape.labelTarget) { + return; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:Lane')) { + updateContext.addLane(shape); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(shape, 'bpmn:FlowNode')) { + updateContext.addFlowNode(shape); + } + }); +} +UpdateFlowNodeRefsBehavior.$inject = ['eventBus', 'modeling', 'translate']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(UpdateFlowNodeRefsBehavior, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +function UpdateContext() { + this.flowNodes = []; + this.lanes = []; + this.counter = 0; + this.addLane = function (lane) { + this.lanes.push(lane); + }; + this.addFlowNode = function (flowNode) { + this.flowNodes.push(flowNode); + }; + this.enter = function () { + this.counter++; + }; + this.leave = function () { + this.counter--; + return !this.counter; + }; +} + +/***/ }), + +/***/ 80490: +/*!**********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/index.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _AdaptiveLabelPositioningBehavior__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AdaptiveLabelPositioningBehavior */ 15351); +/* harmony import */ var _AppendBehavior__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AppendBehavior */ 77022); +/* harmony import */ var _AssociationBehavior__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AssociationBehavior */ 97799); +/* harmony import */ var _AttachEventBehavior__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AttachEventBehavior */ 65459); +/* harmony import */ var _BoundaryEventBehavior__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BoundaryEventBehavior */ 42450); +/* harmony import */ var _RootElementReferenceBehavior__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RootElementReferenceBehavior */ 53191); +/* harmony import */ var _CreateBehavior__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CreateBehavior */ 40158); +/* harmony import */ var _FixHoverBehavior__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./FixHoverBehavior */ 29613); +/* harmony import */ var _CreateDataObjectBehavior__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CreateDataObjectBehavior */ 72893); +/* harmony import */ var _CreateParticipantBehavior__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CreateParticipantBehavior */ 28937); +/* harmony import */ var _DataInputAssociationBehavior__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./DataInputAssociationBehavior */ 3581); +/* harmony import */ var _DataStoreBehavior__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./DataStoreBehavior */ 56385); +/* harmony import */ var _DeleteLaneBehavior__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./DeleteLaneBehavior */ 94883); +/* harmony import */ var _DetachEventBehavior__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./DetachEventBehavior */ 91097); +/* harmony import */ var _DropOnFlowBehavior__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./DropOnFlowBehavior */ 60914); +/* harmony import */ var _EventBasedGatewayBehavior__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./EventBasedGatewayBehavior */ 42095); +/* harmony import */ var _GroupBehavior__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./GroupBehavior */ 69955); +/* harmony import */ var _ImportDockingFix__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ImportDockingFix */ 60465); +/* harmony import */ var _IsHorizontalFix__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./IsHorizontalFix */ 82661); +/* harmony import */ var _LabelBehavior__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LabelBehavior */ 19278); +/* harmony import */ var _MessageFlowBehavior__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./MessageFlowBehavior */ 23815); +/* harmony import */ var _ModelingFeedback__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ModelingFeedback */ 7852); +/* harmony import */ var _ReplaceConnectionBehavior__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./ReplaceConnectionBehavior */ 5576); +/* harmony import */ var _RemoveParticipantBehavior__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./RemoveParticipantBehavior */ 37077); +/* harmony import */ var _ReplaceElementBehaviour__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./ReplaceElementBehaviour */ 57501); +/* harmony import */ var _ResizeBehavior__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./ResizeBehavior */ 79854); +/* harmony import */ var _ResizeLaneBehavior__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./ResizeLaneBehavior */ 38208); +/* harmony import */ var _RemoveElementBehavior__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./RemoveElementBehavior */ 5288); +/* harmony import */ var _SpaceToolBehavior__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./SpaceToolBehavior */ 54616); +/* harmony import */ var _SubProcessStartEventBehavior__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./SubProcessStartEventBehavior */ 89277); +/* harmony import */ var _ToggleElementCollapseBehaviour__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./ToggleElementCollapseBehaviour */ 66690); +/* harmony import */ var _UnclaimIdBehavior__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./UnclaimIdBehavior */ 50484); +/* harmony import */ var _UpdateFlowNodeRefsBehavior__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./UpdateFlowNodeRefsBehavior */ 11837); +/* harmony import */ var _UnsetDefaultFlowBehavior__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./UnsetDefaultFlowBehavior */ 75376); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['adaptiveLabelPositioningBehavior', 'appendBehavior', 'associationBehavior', 'attachEventBehavior', 'boundaryEventBehavior', 'rootElementReferenceBehavior', 'createBehavior', 'fixHoverBehavior', 'createDataObjectBehavior', 'createParticipantBehavior', 'dataStoreBehavior', 'dataInputAssociationBehavior', 'deleteLaneBehavior', 'detachEventBehavior', 'dropOnFlowBehavior', 'eventBasedGatewayBehavior', 'groupBehavior', 'importDockingFix', 'isHorizontalFix', 'labelBehavior', 'messageFlowBehavior', 'modelingFeedback', 'removeElementBehavior', 'removeParticipantBehavior', 'replaceConnectionBehavior', 'replaceElementBehaviour', 'resizeBehavior', 'resizeLaneBehavior', 'toggleElementCollapseBehaviour', 'spaceToolBehavior', 'subProcessStartEventBehavior', 'unclaimIdBehavior', 'unsetDefaultFlowBehavior', 'updateFlowNodeRefsBehavior'], + adaptiveLabelPositioningBehavior: ['type', _AdaptiveLabelPositioningBehavior__WEBPACK_IMPORTED_MODULE_0__["default"]], + appendBehavior: ['type', _AppendBehavior__WEBPACK_IMPORTED_MODULE_1__["default"]], + associationBehavior: ['type', _AssociationBehavior__WEBPACK_IMPORTED_MODULE_2__["default"]], + attachEventBehavior: ['type', _AttachEventBehavior__WEBPACK_IMPORTED_MODULE_3__["default"]], + boundaryEventBehavior: ['type', _BoundaryEventBehavior__WEBPACK_IMPORTED_MODULE_4__["default"]], + rootElementReferenceBehavior: ['type', _RootElementReferenceBehavior__WEBPACK_IMPORTED_MODULE_5__["default"]], + createBehavior: ['type', _CreateBehavior__WEBPACK_IMPORTED_MODULE_6__["default"]], + fixHoverBehavior: ['type', _FixHoverBehavior__WEBPACK_IMPORTED_MODULE_7__["default"]], + createDataObjectBehavior: ['type', _CreateDataObjectBehavior__WEBPACK_IMPORTED_MODULE_8__["default"]], + createParticipantBehavior: ['type', _CreateParticipantBehavior__WEBPACK_IMPORTED_MODULE_9__["default"]], + dataInputAssociationBehavior: ['type', _DataInputAssociationBehavior__WEBPACK_IMPORTED_MODULE_10__["default"]], + dataStoreBehavior: ['type', _DataStoreBehavior__WEBPACK_IMPORTED_MODULE_11__["default"]], + deleteLaneBehavior: ['type', _DeleteLaneBehavior__WEBPACK_IMPORTED_MODULE_12__["default"]], + detachEventBehavior: ['type', _DetachEventBehavior__WEBPACK_IMPORTED_MODULE_13__["default"]], + dropOnFlowBehavior: ['type', _DropOnFlowBehavior__WEBPACK_IMPORTED_MODULE_14__["default"]], + eventBasedGatewayBehavior: ['type', _EventBasedGatewayBehavior__WEBPACK_IMPORTED_MODULE_15__["default"]], + groupBehavior: ['type', _GroupBehavior__WEBPACK_IMPORTED_MODULE_16__["default"]], + importDockingFix: ['type', _ImportDockingFix__WEBPACK_IMPORTED_MODULE_17__["default"]], + isHorizontalFix: ['type', _IsHorizontalFix__WEBPACK_IMPORTED_MODULE_18__["default"]], + labelBehavior: ['type', _LabelBehavior__WEBPACK_IMPORTED_MODULE_19__["default"]], + messageFlowBehavior: ['type', _MessageFlowBehavior__WEBPACK_IMPORTED_MODULE_20__["default"]], + modelingFeedback: ['type', _ModelingFeedback__WEBPACK_IMPORTED_MODULE_21__["default"]], + replaceConnectionBehavior: ['type', _ReplaceConnectionBehavior__WEBPACK_IMPORTED_MODULE_22__["default"]], + removeParticipantBehavior: ['type', _RemoveParticipantBehavior__WEBPACK_IMPORTED_MODULE_23__["default"]], + replaceElementBehaviour: ['type', _ReplaceElementBehaviour__WEBPACK_IMPORTED_MODULE_24__["default"]], + resizeBehavior: ['type', _ResizeBehavior__WEBPACK_IMPORTED_MODULE_25__["default"]], + resizeLaneBehavior: ['type', _ResizeLaneBehavior__WEBPACK_IMPORTED_MODULE_26__["default"]], + removeElementBehavior: ['type', _RemoveElementBehavior__WEBPACK_IMPORTED_MODULE_27__["default"]], + toggleElementCollapseBehaviour: ['type', _ToggleElementCollapseBehaviour__WEBPACK_IMPORTED_MODULE_28__["default"]], + spaceToolBehavior: ['type', _SpaceToolBehavior__WEBPACK_IMPORTED_MODULE_29__["default"]], + subProcessStartEventBehavior: ['type', _SubProcessStartEventBehavior__WEBPACK_IMPORTED_MODULE_30__["default"]], + unclaimIdBehavior: ['type', _UnclaimIdBehavior__WEBPACK_IMPORTED_MODULE_31__["default"]], + updateFlowNodeRefsBehavior: ['type', _UpdateFlowNodeRefsBehavior__WEBPACK_IMPORTED_MODULE_32__["default"]], + unsetDefaultFlowBehavior: ['type', _UnsetDefaultFlowBehavior__WEBPACK_IMPORTED_MODULE_33__["default"]] +}); + +/***/ }), + +/***/ 14891: +/*!**********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/util/CategoryUtil.js ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ createCategoryValue: () => (/* binding */ createCategoryValue) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ 39233); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../util/ModelUtil */ 4525); + + + +/** + * Creates a new bpmn:CategoryValue inside a new bpmn:Category + * + * @param {ModdleElement} definitions + * @param {BpmnFactory} bpmnFactory + * + * @return {ModdleElement} categoryValue. + */ +function createCategoryValue(definitions, bpmnFactory) { + var categoryValue = bpmnFactory.create('bpmn:CategoryValue'), + category = bpmnFactory.create('bpmn:Category', { + categoryValue: [categoryValue] + }); + + // add to correct place + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__.add)(definitions.get('rootElements'), category); + (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(category).$parent = definitions; + (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(categoryValue).$parent = category; + return categoryValue; +} + +/***/ }), + +/***/ 60526: +/*!***********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/util/GeometricUtil.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getAngle: () => (/* binding */ getAngle), +/* harmony export */ getDistancePointLine: () => (/* binding */ getDistancePointLine), +/* harmony export */ getDistancePointPoint: () => (/* binding */ getDistancePointPoint), +/* harmony export */ perpendicularFoot: () => (/* binding */ perpendicularFoot), +/* harmony export */ rotateVector: () => (/* binding */ rotateVector), +/* harmony export */ vectorLength: () => (/* binding */ vectorLength) +/* harmony export */ }); +/** + * Returns the length of a vector + * + * @param {Vector} + * @return {Float} + */ +function vectorLength(v) { + return Math.sqrt(Math.pow(v.x, 2) + Math.pow(v.y, 2)); +} + +/** + * Calculates the angle between a line a the yAxis + * + * @param {Array} + * @return {Float} + */ +function getAngle(line) { + // return value is between 0, 180 and -180, -0 + // @janstuemmel: maybe replace return a/b with b/a + return Math.atan((line[1].y - line[0].y) / (line[1].x - line[0].x)); +} + +/** + * Rotates a vector by a given angle + * + * @param {Vector} + * @param {Float} Angle in radians + * @return {Vector} + */ +function rotateVector(vector, angle) { + return !angle ? vector : { + x: Math.cos(angle) * vector.x - Math.sin(angle) * vector.y, + y: Math.sin(angle) * vector.x + Math.cos(angle) * vector.y + }; +} + +/** + * Solves a 2D equation system + * a + r*b = c, where a,b,c are 2D vectors + * + * @param {Vector} + * @param {Vector} + * @param {Vector} + * @return {Float} + */ +function solveLambaSystem(a, b, c) { + // the 2d system + var system = [{ + n: a[0] - c[0], + lambda: b[0] + }, { + n: a[1] - c[1], + lambda: b[1] + }]; + + // solve + var n = system[0].n * b[0] + system[1].n * b[1], + l = system[0].lambda * b[0] + system[1].lambda * b[1]; + return -n / l; +} + +/** + * Position of perpendicular foot + * + * @param {Point} + * @param [ {Point}, {Point} ] line defined through two points + * @return {Point} the perpendicular foot position + */ +function perpendicularFoot(point, line) { + var a = line[0], + b = line[1]; + + // relative position of b from a + var bd = { + x: b.x - a.x, + y: b.y - a.y + }; + + // solve equation system to the parametrized vectors param real value + var r = solveLambaSystem([a.x, a.y], [bd.x, bd.y], [point.x, point.y]); + return { + x: a.x + r * bd.x, + y: a.y + r * bd.y + }; +} + +/** + * Calculates the distance between a point and a line + * + * @param {Point} + * @param [ {Point}, {Point} ] line defined through two points + * @return {Float} distance + */ +function getDistancePointLine(point, line) { + var pfPoint = perpendicularFoot(point, line); + + // distance vector + var connectionVector = { + x: pfPoint.x - point.x, + y: pfPoint.y - point.y + }; + return vectorLength(connectionVector); +} + +/** + * Calculates the distance between two points + * + * @param {Point} + * @param {Point} + * @return {Float} distance + */ +function getDistancePointPoint(point1, point2) { + return vectorLength({ + x: point1.x - point2.x, + y: point1.y - point2.y + }); +} + +/***/ }), + +/***/ 98635: +/*!*************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/util/LabelLayoutUtil.js ***! + \*************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ findNewLabelLineStartIndex: () => (/* binding */ findNewLabelLineStartIndex), +/* harmony export */ getLabelAdjustment: () => (/* binding */ getLabelAdjustment) +/* harmony export */ }); +/* harmony import */ var _GeometricUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeometricUtil */ 60526); +/* harmony import */ var _LineAttachmentUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LineAttachmentUtil */ 22864); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); + + + +function findNewLabelLineStartIndex(oldWaypoints, newWaypoints, attachment, hints) { + var index = attachment.segmentIndex; + var offset = newWaypoints.length - oldWaypoints.length; + + // segmentMove happened + if (hints.segmentMove) { + var oldSegmentStartIndex = hints.segmentMove.segmentStartIndex, + newSegmentStartIndex = hints.segmentMove.newSegmentStartIndex; + + // if label was on moved segment return new segment index + if (index === oldSegmentStartIndex) { + return newSegmentStartIndex; + } + + // label is after new segment index + if (index >= newSegmentStartIndex) { + return index + offset < newSegmentStartIndex ? newSegmentStartIndex : index + offset; + } + + // if label is before new segment index + return index; + } + + // bendpointMove happened + if (hints.bendpointMove) { + var insert = hints.bendpointMove.insert, + bendpointIndex = hints.bendpointMove.bendpointIndex, + newIndex; + + // waypoints length didnt change + if (offset === 0) { + return index; + } + + // label behind new/removed bendpoint + if (index >= bendpointIndex) { + newIndex = insert ? index + 1 : index - 1; + } + + // label before new/removed bendpoint + if (index < bendpointIndex) { + newIndex = index; + + // decide label should take right or left segment + if (insert && attachment.type !== 'bendpoint' && bendpointIndex - 1 === index) { + var rel = relativePositionMidWaypoint(newWaypoints, bendpointIndex); + if (rel < attachment.relativeLocation) { + newIndex++; + } + } + } + return newIndex; + } + + // start/end changed + if (offset === 0) { + return index; + } + if (hints.connectionStart) { + return index === 0 ? 0 : null; + } + if (hints.connectionEnd) { + return index === oldWaypoints.length - 2 ? newWaypoints.length - 2 : null; + } + + // if nothing fits, return null + return null; +} + +/** + * Calculate the required adjustment (move delta) for the given label + * after the connection waypoints got updated. + * + * @param {djs.model.Label} label + * @param {Array} newWaypoints + * @param {Array} oldWaypoints + * @param {Object} hints + * + * @return {Point} delta + */ +function getLabelAdjustment(label, newWaypoints, oldWaypoints, hints) { + var x = 0, + y = 0; + var labelPosition = getLabelMid(label); + + // get closest attachment + var attachment = (0,_LineAttachmentUtil__WEBPACK_IMPORTED_MODULE_0__.getAttachment)(labelPosition, oldWaypoints), + oldLabelLineIndex = attachment.segmentIndex, + newLabelLineIndex = findNewLabelLineStartIndex(oldWaypoints, newWaypoints, attachment, hints); + if (newLabelLineIndex === null) { + return { + x: x, + y: y + }; + } + + // should never happen + // TODO(@janstuemmel): throw an error here when connectionSegmentMove is refactored + if (newLabelLineIndex < 0 || newLabelLineIndex > newWaypoints.length - 2) { + return { + x: x, + y: y + }; + } + var oldLabelLine = getLine(oldWaypoints, oldLabelLineIndex), + newLabelLine = getLine(newWaypoints, newLabelLineIndex), + oldFoot = attachment.position; + var relativeFootPosition = getRelativeFootPosition(oldLabelLine, oldFoot), + angleDelta = getAngleDelta(oldLabelLine, newLabelLine); + + // special rule if label on bendpoint + if (attachment.type === 'bendpoint') { + var offset = newWaypoints.length - oldWaypoints.length, + oldBendpointIndex = attachment.bendpointIndex, + oldBendpoint = oldWaypoints[oldBendpointIndex]; + + // bendpoint position hasn't changed, return same position + if (newWaypoints.indexOf(oldBendpoint) !== -1) { + return { + x: x, + y: y + }; + } + + // new bendpoint and old bendpoint have same index, then just return the offset + if (offset === 0) { + var newBendpoint = newWaypoints[oldBendpointIndex]; + return { + x: newBendpoint.x - attachment.position.x, + y: newBendpoint.y - attachment.position.y + }; + } + + // if bendpoints get removed + if (offset < 0 && oldBendpointIndex !== 0 && oldBendpointIndex < oldWaypoints.length - 1) { + relativeFootPosition = relativePositionMidWaypoint(oldWaypoints, oldBendpointIndex); + } + } + var newFoot = { + x: (newLabelLine[1].x - newLabelLine[0].x) * relativeFootPosition + newLabelLine[0].x, + y: (newLabelLine[1].y - newLabelLine[0].y) * relativeFootPosition + newLabelLine[0].y + }; + + // the rotated vector to label + var newLabelVector = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.rotateVector)({ + x: labelPosition.x - oldFoot.x, + y: labelPosition.y - oldFoot.y + }, angleDelta); + + // the new relative position + x = newFoot.x + newLabelVector.x - labelPosition.x; + y = newFoot.y + newLabelVector.y - labelPosition.y; + return (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.roundPoint)({ + x: x, + y: y + }); +} + +// HELPERS ////////////////////// + +function relativePositionMidWaypoint(waypoints, idx) { + var distanceSegment1 = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getDistancePointPoint)(waypoints[idx - 1], waypoints[idx]), + distanceSegment2 = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getDistancePointPoint)(waypoints[idx], waypoints[idx + 1]); + var relativePosition = distanceSegment1 / (distanceSegment1 + distanceSegment2); + return relativePosition; +} +function getLabelMid(label) { + return { + x: label.x + label.width / 2, + y: label.y + label.height / 2 + }; +} +function getAngleDelta(l1, l2) { + var a1 = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getAngle)(l1), + a2 = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getAngle)(l2); + return a2 - a1; +} +function getLine(waypoints, idx) { + return [waypoints[idx], waypoints[idx + 1]]; +} +function getRelativeFootPosition(line, foot) { + var length = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getDistancePointPoint)(line[0], line[1]), + lengthToFoot = (0,_GeometricUtil__WEBPACK_IMPORTED_MODULE_1__.getDistancePointPoint)(line[0], foot); + return length === 0 ? 0 : lengthToFoot / length; +} + +/***/ }), + +/***/ 22864: +/*!****************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/util/LineAttachmentUtil.js ***! + \****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getAttachment: () => (/* binding */ getAttachment) +/* harmony export */ }); +var sqrt = Math.sqrt, + min = Math.min, + max = Math.max, + abs = Math.abs; + +/** + * Calculate the square (power to two) of a number. + * + * @param {number} n + * + * @return {number} + */ +function sq(n) { + return Math.pow(n, 2); +} + +/** + * Get distance between two points. + * + * @param {Point} p1 + * @param {Point} p2 + * + * @return {number} + */ +function getDistance(p1, p2) { + return sqrt(sq(p1.x - p2.x) + sq(p1.y - p2.y)); +} + +/** + * Return the attachment of the given point on the specified line. + * + * The attachment is either a bendpoint (attached to the given point) + * or segment (attached to a location on a line segment) attachment: + * + * ```javascript + * var pointAttachment = { + * type: 'bendpoint', + * bendpointIndex: 3, + * position: { x: 10, y: 10 } // the attach point on the line + * }; + * + * var segmentAttachment = { + * type: 'segment', + * segmentIndex: 2, + * relativeLocation: 0.31, // attach point location between 0 (at start) and 1 (at end) + * position: { x: 10, y: 10 } // the attach point on the line + * }; + * ``` + * + * @param {Point} point + * @param {Array} line + * + * @return {Object} attachment + */ +function getAttachment(point, line) { + var idx = 0, + segmentStart, + segmentEnd, + segmentStartDistance, + segmentEndDistance, + attachmentPosition, + minDistance, + intersections, + attachment, + attachmentDistance, + closestAttachmentDistance, + closestAttachment; + for (idx = 0; idx < line.length - 1; idx++) { + segmentStart = line[idx]; + segmentEnd = line[idx + 1]; + if (pointsEqual(segmentStart, segmentEnd)) { + intersections = [segmentStart]; + } else { + segmentStartDistance = getDistance(point, segmentStart); + segmentEndDistance = getDistance(point, segmentEnd); + minDistance = min(segmentStartDistance, segmentEndDistance); + intersections = getCircleSegmentIntersections(segmentStart, segmentEnd, point, minDistance); + } + if (intersections.length < 1) { + throw new Error('expected between [1, 2] circle -> line intersections'); + } + + // one intersection -> bendpoint attachment + if (intersections.length === 1) { + attachment = { + type: 'bendpoint', + position: intersections[0], + segmentIndex: idx, + bendpointIndex: pointsEqual(segmentStart, intersections[0]) ? idx : idx + 1 + }; + } + + // two intersections -> segment attachment + if (intersections.length === 2) { + attachmentPosition = mid(intersections[0], intersections[1]); + attachment = { + type: 'segment', + position: attachmentPosition, + segmentIndex: idx, + relativeLocation: getDistance(segmentStart, attachmentPosition) / getDistance(segmentStart, segmentEnd) + }; + } + attachmentDistance = getDistance(attachment.position, point); + if (!closestAttachment || closestAttachmentDistance > attachmentDistance) { + closestAttachment = attachment; + closestAttachmentDistance = attachmentDistance; + } + } + return closestAttachment; +} + +/** + * Gets the intersection between a circle and a line segment. + * + * @param {Point} s1 segment start + * @param {Point} s2 segment end + * @param {Point} cc circle center + * @param {number} cr circle radius + * + * @return {Array} intersections + */ +function getCircleSegmentIntersections(s1, s2, cc, cr) { + var baX = s2.x - s1.x; + var baY = s2.y - s1.y; + var caX = cc.x - s1.x; + var caY = cc.y - s1.y; + var a = baX * baX + baY * baY; + var bBy2 = baX * caX + baY * caY; + var c = caX * caX + caY * caY - cr * cr; + var pBy2 = bBy2 / a; + var q = c / a; + var disc = pBy2 * pBy2 - q; + + // check against negative value to work around + // negative, very close to zero results (-4e-15) + // being produced in some environments + if (disc < 0 && disc > -0.000001) { + disc = 0; + } + if (disc < 0) { + return []; + } + + // if disc == 0 ... dealt with later + var tmpSqrt = sqrt(disc); + var abScalingFactor1 = -pBy2 + tmpSqrt; + var abScalingFactor2 = -pBy2 - tmpSqrt; + var i1 = { + x: s1.x - baX * abScalingFactor1, + y: s1.y - baY * abScalingFactor1 + }; + if (disc === 0) { + // abScalingFactor1 == abScalingFactor2 + return [i1]; + } + var i2 = { + x: s1.x - baX * abScalingFactor2, + y: s1.y - baY * abScalingFactor2 + }; + + // return only points on line segment + return [i1, i2].filter(function (p) { + return isPointInSegment(p, s1, s2); + }); +} +function isPointInSegment(p, segmentStart, segmentEnd) { + return fenced(p.x, segmentStart.x, segmentEnd.x) && fenced(p.y, segmentStart.y, segmentEnd.y); +} +function fenced(n, rangeStart, rangeEnd) { + // use matching threshold to work around + // precision errors in intersection computation + + return n >= min(rangeStart, rangeEnd) - EQUAL_THRESHOLD && n <= max(rangeStart, rangeEnd) + EQUAL_THRESHOLD; +} + +/** + * Calculate mid of two points. + * + * @param {Point} p1 + * @param {Point} p2 + * + * @return {Point} + */ +function mid(p1, p2) { + return { + x: (p1.x + p2.x) / 2, + y: (p1.y + p2.y) / 2 + }; +} +var EQUAL_THRESHOLD = 0.1; +function pointsEqual(p1, p2) { + return abs(p1.x - p2.x) <= EQUAL_THRESHOLD && abs(p1.y - p2.y) <= EQUAL_THRESHOLD; +} + +/***/ }), + +/***/ 296: +/*!***********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/behavior/util/LineIntersect.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ lineIntersect) +/* harmony export */ }); +/** + * Returns the intersection between two line segments a and b. + * + * @param {Point} l1s + * @param {Point} l1e + * @param {Point} l2s + * @param {Point} l2e + * + * @return {Point} + */ +function lineIntersect(l1s, l1e, l2s, l2e) { + // if the lines intersect, the result contains the x and y of the + // intersection (treating the lines as infinite) and booleans for + // whether line segment 1 or line segment 2 contain the point + var denominator, a, b, c, numerator; + denominator = (l2e.y - l2s.y) * (l1e.x - l1s.x) - (l2e.x - l2s.x) * (l1e.y - l1s.y); + if (denominator == 0) { + return null; + } + a = l1s.y - l2s.y; + b = l1s.x - l2s.x; + numerator = (l2e.x - l2s.x) * a - (l2e.y - l2s.y) * b; + c = numerator / denominator; + + // if we cast these lines infinitely in + // both directions, they intersect here + return { + x: Math.round(l1s.x + c * (l1e.x - l1s.x)), + y: Math.round(l1s.y + c * (l1e.y - l1s.y)) + }; +} + +/***/ }), + +/***/ 37005: +/*!**************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/cmd/AddLaneHandler.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AddLaneHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ 35723); +/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/LaneUtil */ 23568); + + + + +/** + * A handler that allows us to add a new lane + * above or below an existing one. + * + * @param {Modeling} modeling + * @param {SpaceTool} spaceTool + */ +function AddLaneHandler(modeling, spaceTool) { + this._modeling = modeling; + this._spaceTool = spaceTool; +} +AddLaneHandler.$inject = ['modeling', 'spaceTool']; +AddLaneHandler.prototype.preExecute = function (context) { + var spaceTool = this._spaceTool, + modeling = this._modeling; + var shape = context.shape, + location = context.location; + var lanesRoot = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.getLanesRoot)(shape); + var isRoot = lanesRoot === shape, + laneParent = isRoot ? shape : shape.parent; + var existingChildLanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.getChildLanes)(laneParent); + + // (0) add a lane if we currently got none and are adding to root + if (!existingChildLanes.length) { + modeling.createShape({ + type: 'bpmn:Lane' + }, { + x: shape.x + _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION, + y: shape.y, + width: shape.width - _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION, + height: shape.height + }, laneParent); + } + + // (1) collect affected elements to create necessary space + var allAffected = []; + (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_1__.eachElement)(lanesRoot, function (element) { + allAffected.push(element); + + // handle element labels in the diagram root + if (element.label) { + allAffected.push(element.label); + } + if (element === shape) { + return []; + } + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(element.children, function (c) { + return c !== shape; + }); + }); + var offset = location === 'top' ? -120 : 120, + lanePosition = location === 'top' ? shape.y : shape.y + shape.height, + spacePos = lanePosition + (location === 'top' ? 10 : -10), + direction = location === 'top' ? 'n' : 's'; + var adjustments = spaceTool.calculateAdjustments(allAffected, 'y', offset, spacePos); + spaceTool.makeSpace(adjustments.movingShapes, adjustments.resizingShapes, { + x: 0, + y: offset + }, direction, spacePos); + + // (2) create new lane at open space + context.newLane = modeling.createShape({ + type: 'bpmn:Lane' + }, { + x: shape.x + (isRoot ? _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION : 0), + y: lanePosition - (location === 'top' ? 120 : 0), + width: shape.width - (isRoot ? _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION : 0), + height: 120 + }, laneParent); +}; + +/***/ }), + +/***/ 11155: +/*!**************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/cmd/IdClaimHandler.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ IdClaimHandler) +/* harmony export */ }); +function IdClaimHandler(moddle) { + this._moddle = moddle; +} +IdClaimHandler.$inject = ['moddle']; +IdClaimHandler.prototype.execute = function (context) { + var ids = this._moddle.ids, + id = context.id, + element = context.element, + claiming = context.claiming; + if (claiming) { + ids.claim(id, element); + } else { + ids.unclaim(id); + } +}; + +/** + * Command revert implementation. + */ +IdClaimHandler.prototype.revert = function (context) { + var ids = this._moddle.ids, + id = context.id, + element = context.element, + claiming = context.claiming; + if (claiming) { + ids.unclaim(id); + } else { + ids.claim(id, element); + } +}; + +/***/ }), + +/***/ 57338: +/*!*****************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/cmd/ResizeLaneHandler.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ResizeLaneHandler) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/LaneUtil */ 23568); +/* harmony import */ var diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Elements */ 35723); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/resize/ResizeUtil */ 35434); + + + + + + +/** + * A handler that resizes a lane. + * + * @param {Modeling} modeling + */ +function ResizeLaneHandler(modeling, spaceTool) { + this._modeling = modeling; + this._spaceTool = spaceTool; +} +ResizeLaneHandler.$inject = ['modeling', 'spaceTool']; +ResizeLaneHandler.prototype.preExecute = function (context) { + var shape = context.shape, + newBounds = context.newBounds, + balanced = context.balanced; + if (balanced !== false) { + this.resizeBalanced(shape, newBounds); + } else { + this.resizeSpace(shape, newBounds); + } +}; + +/** + * Resize balanced, adjusting next / previous lane sizes. + * + * @param {djs.model.Shape} shape + * @param {Bounds} newBounds + */ +ResizeLaneHandler.prototype.resizeBalanced = function (shape, newBounds) { + var modeling = this._modeling; + var resizeNeeded = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.computeLanesResize)(shape, newBounds); + + // resize the lane + modeling.resizeShape(shape, newBounds); + + // resize other lanes as needed + resizeNeeded.forEach(function (r) { + modeling.resizeShape(r.shape, r.newBounds); + }); +}; + +/** + * Resize, making actual space and moving below / above elements. + * + * @param {djs.model.Shape} shape + * @param {Bounds} newBounds + */ +ResizeLaneHandler.prototype.resizeSpace = function (shape, newBounds) { + var spaceTool = this._spaceTool; + var shapeTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(shape), + newTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(newBounds); + var trblDiff = (0,diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_2__.substractTRBL)(newTrbl, shapeTrbl); + var lanesRoot = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.getLanesRoot)(shape); + var allAffected = [], + allLanes = []; + (0,diagram_js_lib_util_Elements__WEBPACK_IMPORTED_MODULE_3__.eachElement)(lanesRoot, function (element) { + allAffected.push(element); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Lane') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Participant')) { + allLanes.push(element); + } + return element.children; + }); + var change, spacePos, direction, offset, adjustments; + if (trblDiff.bottom || trblDiff.top) { + change = trblDiff.bottom || trblDiff.top; + spacePos = shape.y + (trblDiff.bottom ? shape.height : 0) + (trblDiff.bottom ? -10 : 10); + direction = trblDiff.bottom ? 's' : 'n'; + offset = trblDiff.top > 0 || trblDiff.bottom < 0 ? -change : change; + adjustments = spaceTool.calculateAdjustments(allAffected, 'y', offset, spacePos); + spaceTool.makeSpace(adjustments.movingShapes, adjustments.resizingShapes, { + x: 0, + y: change + }, direction); + } + if (trblDiff.left || trblDiff.right) { + change = trblDiff.right || trblDiff.left; + spacePos = shape.x + (trblDiff.right ? shape.width : 0) + (trblDiff.right ? -10 : 100); + direction = trblDiff.right ? 'e' : 'w'; + offset = trblDiff.left > 0 || trblDiff.right < 0 ? -change : change; + adjustments = spaceTool.calculateAdjustments(allLanes, 'x', offset, spacePos); + spaceTool.makeSpace(adjustments.movingShapes, adjustments.resizingShapes, { + x: change, + y: 0 + }, direction); + } +}; + +/***/ }), + +/***/ 76433: +/*!***************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/cmd/SetColorHandler.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SetColorHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); + +var DEFAULT_COLORS = { + fill: undefined, + stroke: undefined +}; +function SetColorHandler(commandStack) { + this._commandStack = commandStack; + this._normalizeColor = function (color) { + // Remove color for falsy values. + if (!color) { + return undefined; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isString)(color)) { + var hexColor = colorToHex(color); + if (hexColor) { + return hexColor; + } + } + throw new Error('invalid color value: ' + color); + }; +} +SetColorHandler.$inject = ['commandStack']; +SetColorHandler.prototype.postExecute = function (context) { + var elements = context.elements, + colors = context.colors || DEFAULT_COLORS; + var self = this; + var di = {}; + if ('fill' in colors) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(di, { + 'background-color': this._normalizeColor(colors.fill) + }); + } + if ('stroke' in colors) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(di, { + 'border-color': this._normalizeColor(colors.stroke) + }); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + var assignedDi = isConnection(element) ? (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.pick)(di, ['border-color']) : di; + + // TODO @barmac: remove once we drop bpmn.io properties + ensureLegacySupport(assignedDi); + if (element.labelTarget) { + // set label colors as bpmndi:BPMNLabel#color + self._commandStack.execute('element.updateModdleProperties', { + element: element, + moddleElement: element.businessObject.di.label, + properties: { + color: di['background-color'] + } + }); + } else { + // set colors bpmndi:BPMNEdge or bpmndi:BPMNShape + self._commandStack.execute('element.updateProperties', { + element: element, + properties: { + di: assignedDi + } + }); + } + }); +}; + +/** + * Convert color from rgb(a)/hsl to hex. Returns `null` for unknown color names and for colors + * with alpha less than 1.0. This depends on `` serialization of the `context.fillStyle`. + * Cf. https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-fillstyle + * + * @example + * ```js + * var color = 'fuchsia'; + * console.log(colorToHex(color)); + * // "#ff00ff" + * color = 'rgba(1,2,3,0.4)'; + * console.log(colorToHex(color)); + * // null + * ``` + * + * @param {string} color + * @returns {string|null} + */ +function colorToHex(color) { + var context = document.createElement('canvas').getContext('2d'); + + // (0) Start with transparent to account for browser default values. + context.fillStyle = 'transparent'; + + // (1) Assign color so that it's serialized. + context.fillStyle = color; + + // (2) Return null for non-hex serialization result. + return /^#[0-9a-fA-F]{6}$/.test(context.fillStyle) ? context.fillStyle : null; +} +function isConnection(element) { + return !!element.waypoints; +} + +/** + * Add legacy properties if required. + * @param {{ 'border-color': string?, 'background-color': string? }} di + */ +function ensureLegacySupport(di) { + if ('border-color' in di) { + di.stroke = di['border-color']; + } + if ('background-color' in di) { + di.fill = di['background-color']; + } +} + +/***/ }), + +/***/ 29624: +/*!****************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/cmd/SplitLaneHandler.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SplitLaneHandler) +/* harmony export */ }); +/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/LaneUtil */ 23568); + + +/** + * A handler that splits a lane into a number of sub-lanes, + * creating new sub lanes, if necessary. + * + * @param {Modeling} modeling + */ +function SplitLaneHandler(modeling, translate) { + this._modeling = modeling; + this._translate = translate; +} +SplitLaneHandler.$inject = ['modeling', 'translate']; +SplitLaneHandler.prototype.preExecute = function (context) { + var modeling = this._modeling, + translate = this._translate; + var shape = context.shape, + newLanesCount = context.count; + var childLanes = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.getChildLanes)(shape), + existingLanesCount = childLanes.length; + if (existingLanesCount > newLanesCount) { + throw new Error(translate('more than {count} child lanes', { + count: newLanesCount + })); + } + var newLanesHeight = Math.round(shape.height / newLanesCount); + + // Iterate from top to bottom in child lane order, + // resizing existing lanes and creating new ones + // so that they split the parent proportionally. + // + // Due to rounding related errors, the bottom lane + // needs to take up all the remaining space. + var laneY, laneHeight, laneBounds, newLaneAttrs, idx; + for (idx = 0; idx < newLanesCount; idx++) { + laneY = shape.y + idx * newLanesHeight; + + // if bottom lane + if (idx === newLanesCount - 1) { + laneHeight = shape.height - newLanesHeight * idx; + } else { + laneHeight = newLanesHeight; + } + laneBounds = { + x: shape.x + _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION, + y: laneY, + width: shape.width - _util_LaneUtil__WEBPACK_IMPORTED_MODULE_0__.LANE_INDENTATION, + height: laneHeight + }; + if (idx < existingLanesCount) { + // resize existing lane + modeling.resizeShape(childLanes[idx], laneBounds); + } else { + // create a new lane at position + newLaneAttrs = { + type: 'bpmn:Lane' + }; + modeling.createShape(newLaneAttrs, laneBounds, shape); + } + } +}; + +/***/ }), + +/***/ 12575: +/*!***********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/cmd/UpdateCanvasRootHandler.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UpdateCanvasRootHandler) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ 39233); + +function UpdateCanvasRootHandler(canvas, modeling) { + this._canvas = canvas; + this._modeling = modeling; +} +UpdateCanvasRootHandler.$inject = ['canvas', 'modeling']; +UpdateCanvasRootHandler.prototype.execute = function (context) { + var canvas = this._canvas; + var newRoot = context.newRoot, + newRootBusinessObject = newRoot.businessObject, + oldRoot = canvas.getRootElement(), + oldRootBusinessObject = oldRoot.businessObject, + bpmnDefinitions = oldRootBusinessObject.$parent, + diPlane = oldRootBusinessObject.di; + + // (1) replace process old <> new root + canvas.setRootElement(newRoot, true); + + // (2) update root elements + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__.add)(bpmnDefinitions.rootElements, newRootBusinessObject); + newRootBusinessObject.$parent = bpmnDefinitions; + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__.remove)(bpmnDefinitions.rootElements, oldRootBusinessObject); + oldRootBusinessObject.$parent = null; + + // (3) wire di + oldRootBusinessObject.di = null; + diPlane.bpmnElement = newRootBusinessObject; + newRootBusinessObject.di = diPlane; + context.oldRoot = oldRoot; + + // TODO(nikku): return changed elements? + // return [ newRoot, oldRoot ]; +}; + +UpdateCanvasRootHandler.prototype.revert = function (context) { + var canvas = this._canvas; + var newRoot = context.newRoot, + newRootBusinessObject = newRoot.businessObject, + oldRoot = context.oldRoot, + oldRootBusinessObject = oldRoot.businessObject, + bpmnDefinitions = newRootBusinessObject.$parent, + diPlane = newRootBusinessObject.di; + + // (1) replace process old <> new root + canvas.setRootElement(oldRoot, true); + + // (2) update root elements + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__.remove)(bpmnDefinitions.rootElements, newRootBusinessObject); + newRootBusinessObject.$parent = null; + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_0__.add)(bpmnDefinitions.rootElements, oldRootBusinessObject); + oldRootBusinessObject.$parent = bpmnDefinitions; + + // (3) wire di + newRootBusinessObject.di = null; + diPlane.bpmnElement = oldRootBusinessObject; + oldRootBusinessObject.di = diPlane; + + // TODO(nikku): return changed elements? + // return [ newRoot, oldRoot ]; +}; + +/***/ }), + +/***/ 97617: +/*!*************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/cmd/UpdateFlowNodeRefsHandler.js ***! + \*************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UpdateFlowNodeRefsHandler) +/* harmony export */ }); +/* harmony import */ var _util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/LaneUtil */ 23568); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/util/Collections */ 39233); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); + + + + +var FLOW_NODE_REFS_ATTR = 'flowNodeRef', + LANES_ATTR = 'lanes'; + +/** + * A handler that updates lane refs on changed elements + */ +function UpdateFlowNodeRefsHandler(elementRegistry) { + this._elementRegistry = elementRegistry; +} +UpdateFlowNodeRefsHandler.$inject = ['elementRegistry']; +UpdateFlowNodeRefsHandler.prototype.computeUpdates = function (flowNodeShapes, laneShapes) { + var handledNodes = []; + var updates = []; + var participantCache = {}; + var allFlowNodeShapes = []; + function isInLaneShape(element, laneShape) { + var laneTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.asTRBL)(laneShape); + var elementMid = { + x: element.x + element.width / 2, + y: element.y + element.height / 2 + }; + return elementMid.x > laneTrbl.left && elementMid.x < laneTrbl.right && elementMid.y > laneTrbl.top && elementMid.y < laneTrbl.bottom; + } + function addFlowNodeShape(flowNodeShape) { + if (handledNodes.indexOf(flowNodeShape) === -1) { + allFlowNodeShapes.push(flowNodeShape); + handledNodes.push(flowNodeShape); + } + } + function getAllLaneShapes(flowNodeShape) { + var root = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(flowNodeShape); + if (!participantCache[root.id]) { + participantCache[root.id] = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.collectLanes)(root); + } + return participantCache[root.id]; + } + function getNewLanes(flowNodeShape) { + if (!flowNodeShape.parent) { + return []; + } + var allLaneShapes = getAllLaneShapes(flowNodeShape); + return allLaneShapes.filter(function (l) { + return isInLaneShape(flowNodeShape, l); + }).map(function (shape) { + return shape.businessObject; + }); + } + laneShapes.forEach(function (laneShape) { + var root = (0,_util_LaneUtil__WEBPACK_IMPORTED_MODULE_1__.getLanesRoot)(laneShape); + if (!root || handledNodes.indexOf(root) !== -1) { + return; + } + var children = root.children.filter(function (c) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(c, 'bpmn:FlowNode'); + }); + children.forEach(addFlowNodeShape); + handledNodes.push(root); + }); + flowNodeShapes.forEach(addFlowNodeShape); + allFlowNodeShapes.forEach(function (flowNodeShape) { + var flowNode = flowNodeShape.businessObject; + var lanes = flowNode.get(LANES_ATTR), + remove = lanes.slice(), + add = getNewLanes(flowNodeShape); + updates.push({ + flowNode: flowNode, + remove: remove, + add: add + }); + }); + laneShapes.forEach(function (laneShape) { + var lane = laneShape.businessObject; + + // lane got removed XX-) + if (!laneShape.parent) { + lane.get(FLOW_NODE_REFS_ATTR).forEach(function (flowNode) { + updates.push({ + flowNode: flowNode, + remove: [lane], + add: [] + }); + }); + } + }); + return updates; +}; +UpdateFlowNodeRefsHandler.prototype.execute = function (context) { + var updates = context.updates; + if (!updates) { + updates = context.updates = this.computeUpdates(context.flowNodeShapes, context.laneShapes); + } + updates.forEach(function (update) { + var flowNode = update.flowNode, + lanes = flowNode.get(LANES_ATTR); + + // unwire old + update.remove.forEach(function (oldLane) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(lanes, oldLane); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(oldLane.get(FLOW_NODE_REFS_ATTR), flowNode); + }); + + // wire new + update.add.forEach(function (newLane) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(lanes, newLane); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(newLane.get(FLOW_NODE_REFS_ATTR), flowNode); + }); + }); + + // TODO(nikku): return changed elements + // return [ ... ]; +}; + +UpdateFlowNodeRefsHandler.prototype.revert = function (context) { + var updates = context.updates; + updates.forEach(function (update) { + var flowNode = update.flowNode, + lanes = flowNode.get(LANES_ATTR); + + // unwire new + update.add.forEach(function (newLane) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(lanes, newLane); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(newLane.get(FLOW_NODE_REFS_ATTR), flowNode); + }); + + // wire old + update.remove.forEach(function (oldLane) { + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(lanes, oldLane); + (0,diagram_js_lib_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(oldLane.get(FLOW_NODE_REFS_ATTR), flowNode); + }); + }); + + // TODO(nikku): return changed elements + // return [ ... ]; +}; + +/***/ }), + +/***/ 87101: +/*!*****************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/cmd/UpdateModdlePropertiesHandler.js ***! + \*****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UpdateModdlePropertiesHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + +function UpdateModdlePropertiesHandler(elementRegistry) { + this._elementRegistry = elementRegistry; +} +UpdateModdlePropertiesHandler.$inject = ['elementRegistry']; +UpdateModdlePropertiesHandler.prototype.execute = function (context) { + var element = context.element, + moddleElement = context.moddleElement, + properties = context.properties; + if (!moddleElement) { + throw new Error(' required'); + } + var changed = context.changed || this.getVisualReferences(moddleElement).concat(element); + var oldProperties = context.oldProperties || getModdleProperties(moddleElement, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.keys)(properties)); + setModdleProperties(moddleElement, properties); + context.oldProperties = oldProperties; + context.changed = changed; + return changed; +}; +UpdateModdlePropertiesHandler.prototype.revert = function (context) { + var oldProperties = context.oldProperties, + moddleElement = context.moddleElement, + changed = context.changed; + setModdleProperties(moddleElement, oldProperties); + return changed; +}; + +/** + * Return visual references of given moddle element within the diagram. + * + * @param {ModdleElement} moddleElement + * + * @return {Array} + */ +UpdateModdlePropertiesHandler.prototype.getVisualReferences = function (moddleElement) { + var elementRegistry = this._elementRegistry; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(moddleElement, 'bpmn:DataObject')) { + return getAllDataObjectReferences(moddleElement, elementRegistry); + } + return []; +}; + +// helpers ///////////////// + +function getModdleProperties(moddleElement, propertyNames) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(propertyNames, function (result, key) { + result[key] = moddleElement.get(key); + return result; + }, {}); +} +function setModdleProperties(moddleElement, properties) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(properties, function (value, key) { + moddleElement.set(key, value); + }); +} +function getAllDataObjectReferences(dataObject, elementRegistry) { + return elementRegistry.filter(function (element) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:DataObjectReference') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element).dataObjectRef === dataObject; + }); +} + +/***/ }), + +/***/ 52451: +/*!***********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/cmd/UpdatePropertiesHandler.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UpdatePropertiesHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + +var DEFAULT_FLOW = 'default', + ID = 'id', + DI = 'di'; +var NULL_DIMENSIONS = { + width: 0, + height: 0 +}; + +/** + * A handler that implements a BPMN 2.0 property update. + * + * This should be used to set simple properties on elements with + * an underlying BPMN business object. + * + * Use respective diagram-js provided handlers if you would + * like to perform automated modeling. + */ +function UpdatePropertiesHandler(elementRegistry, moddle, translate, modeling, textRenderer) { + this._elementRegistry = elementRegistry; + this._moddle = moddle; + this._translate = translate; + this._modeling = modeling; + this._textRenderer = textRenderer; +} +UpdatePropertiesHandler.$inject = ['elementRegistry', 'moddle', 'translate', 'modeling', 'textRenderer']; + +// api ////////////////////// + +/** + * Updates a BPMN element with a list of new properties + * + * @param {Object} context + * @param {djs.model.Base} context.element the element to update + * @param {Object} context.properties a list of properties to set on the element's + * businessObject (the BPMN model element) + * + * @return {Array} the updated element + */ +UpdatePropertiesHandler.prototype.execute = function (context) { + var element = context.element, + changed = [element], + translate = this._translate; + if (!element) { + throw new Error(translate('element required')); + } + var elementRegistry = this._elementRegistry, + ids = this._moddle.ids; + var businessObject = element.businessObject, + properties = unwrapBusinessObjects(context.properties), + oldProperties = context.oldProperties || getProperties(businessObject, properties); + if (isIdChange(properties, businessObject)) { + ids.unclaim(businessObject[ID]); + elementRegistry.updateId(element, properties[ID]); + ids.claim(properties[ID], businessObject); + } + + // correctly indicate visual changes on default flow updates + if (DEFAULT_FLOW in properties) { + if (properties[DEFAULT_FLOW]) { + changed.push(elementRegistry.get(properties[DEFAULT_FLOW].id)); + } + if (businessObject[DEFAULT_FLOW]) { + changed.push(elementRegistry.get(businessObject[DEFAULT_FLOW].id)); + } + } + + // update properties + setProperties(businessObject, properties); + + // store old values + context.oldProperties = oldProperties; + context.changed = changed; + + // indicate changed on objects affected by the update + return changed; +}; +UpdatePropertiesHandler.prototype.postExecute = function (context) { + var element = context.element, + label = element.label; + var text = label && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(label).name; + if (!text) { + return; + } + + // get layouted text bounds and resize external + // external label accordingly + var newLabelBounds = this._textRenderer.getExternalLabelBounds(label, text); + this._modeling.resizeShape(label, newLabelBounds, NULL_DIMENSIONS); +}; + +/** + * Reverts the update on a BPMN elements properties. + * + * @param {Object} context + * + * @return {djs.model.Base} the updated element + */ +UpdatePropertiesHandler.prototype.revert = function (context) { + var element = context.element, + properties = context.properties, + oldProperties = context.oldProperties, + businessObject = element.businessObject, + elementRegistry = this._elementRegistry, + ids = this._moddle.ids; + + // update properties + setProperties(businessObject, oldProperties); + if (isIdChange(properties, businessObject)) { + ids.unclaim(properties[ID]); + elementRegistry.updateId(element, oldProperties[ID]); + ids.claim(oldProperties[ID], businessObject); + } + return context.changed; +}; +function isIdChange(properties, businessObject) { + return ID in properties && properties[ID] !== businessObject[ID]; +} +function getProperties(businessObject, properties) { + var propertyNames = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.keys)(properties); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.reduce)(propertyNames, function (result, key) { + // handle DI separately + if (key !== DI) { + result[key] = businessObject.get(key); + } else { + result[key] = getDiProperties(businessObject.di, (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.keys)(properties.di)); + } + return result; + }, {}); +} +function getDiProperties(di, propertyNames) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.reduce)(propertyNames, function (result, key) { + result[key] = di.get(key); + return result; + }, {}); +} +function setProperties(businessObject, properties) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(properties, function (value, key) { + if (key !== DI) { + businessObject.set(key, value); + } else { + // only update, if businessObject.di exists + if (businessObject.di) { + setDiProperties(businessObject.di, value); + } + } + }); +} +function setDiProperties(di, properties) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(properties, function (value, key) { + di.set(key, value); + }); +} +var referencePropertyNames = ['default']; + +/** + * Make sure we unwrap the actual business object + * behind diagram element that may have been + * passed as arguments. + * + * @param {Object} properties + * + * @return {Object} unwrappedProps + */ +function unwrapBusinessObjects(properties) { + var unwrappedProps = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({}, properties); + referencePropertyNames.forEach(function (name) { + if (name in properties) { + unwrappedProps[name] = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(unwrappedProps[name]); + } + }); + return unwrappedProps; +} + +/***/ }), + +/***/ 36527: +/*!***************************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/cmd/UpdateSemanticParentHandler.js ***! + \***************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UpdateSemanticParentHandler) +/* harmony export */ }); +function UpdateSemanticParentHandler(bpmnUpdater) { + this._bpmnUpdater = bpmnUpdater; +} +UpdateSemanticParentHandler.$inject = ['bpmnUpdater']; +UpdateSemanticParentHandler.prototype.execute = function (context) { + var dataStoreBo = context.dataStoreBo, + newSemanticParent = context.newSemanticParent, + newDiParent = context.newDiParent; + context.oldSemanticParent = dataStoreBo.$parent; + context.oldDiParent = dataStoreBo.di.$parent; + + // update semantic parent + this._bpmnUpdater.updateSemanticParent(dataStoreBo, newSemanticParent); + + // update DI parent + this._bpmnUpdater.updateDiParent(dataStoreBo.di, newDiParent); +}; +UpdateSemanticParentHandler.prototype.revert = function (context) { + var dataStoreBo = context.dataStoreBo, + oldSemanticParent = context.oldSemanticParent, + oldDiParent = context.oldDiParent; + + // update semantic parent + this._bpmnUpdater.updateSemanticParent(dataStoreBo, oldSemanticParent); + + // update DI parent + this._bpmnUpdater.updateDiParent(dataStoreBo.di, oldDiParent); +}; + +/***/ }), + +/***/ 35959: +/*!*************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/index.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _behavior__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./behavior */ 80490); +/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rules */ 56859); +/* harmony import */ var _di_ordering__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../di-ordering */ 9454); +/* harmony import */ var _ordering__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ordering */ 17872); +/* harmony import */ var _replace__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../replace */ 95872); +/* harmony import */ var diagram_js_lib_command__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/command */ 25541); +/* harmony import */ var diagram_js_lib_features_tooltips__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/features/tooltips */ 37692); +/* harmony import */ var diagram_js_lib_features_label_support__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! diagram-js/lib/features/label-support */ 54392); +/* harmony import */ var diagram_js_lib_features_attach_support__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! diagram-js/lib/features/attach-support */ 15263); +/* harmony import */ var diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! diagram-js/lib/features/selection */ 26334); +/* harmony import */ var diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! diagram-js/lib/features/change-support */ 46242); +/* harmony import */ var diagram_js_lib_features_space_tool__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! diagram-js/lib/features/space-tool */ 88363); +/* harmony import */ var _BpmnFactory__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./BpmnFactory */ 25198); +/* harmony import */ var _BpmnUpdater__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./BpmnUpdater */ 22301); +/* harmony import */ var _ElementFactory__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ElementFactory */ 5557); +/* harmony import */ var _Modeling__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Modeling */ 53548); +/* harmony import */ var _BpmnLayouter__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./BpmnLayouter */ 55395); +/* harmony import */ var diagram_js_lib_layout_CroppingConnectionDocking__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! diagram-js/lib/layout/CroppingConnectionDocking */ 91569); + + + + + + + + + + + + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['modeling', 'bpmnUpdater'], + __depends__: [_behavior__WEBPACK_IMPORTED_MODULE_0__["default"], _rules__WEBPACK_IMPORTED_MODULE_1__["default"], _di_ordering__WEBPACK_IMPORTED_MODULE_2__["default"], _ordering__WEBPACK_IMPORTED_MODULE_3__["default"], _replace__WEBPACK_IMPORTED_MODULE_4__["default"], diagram_js_lib_command__WEBPACK_IMPORTED_MODULE_5__["default"], diagram_js_lib_features_tooltips__WEBPACK_IMPORTED_MODULE_6__["default"], diagram_js_lib_features_label_support__WEBPACK_IMPORTED_MODULE_7__["default"], diagram_js_lib_features_attach_support__WEBPACK_IMPORTED_MODULE_8__["default"], diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_9__["default"], diagram_js_lib_features_change_support__WEBPACK_IMPORTED_MODULE_10__["default"], diagram_js_lib_features_space_tool__WEBPACK_IMPORTED_MODULE_11__["default"]], + bpmnFactory: ['type', _BpmnFactory__WEBPACK_IMPORTED_MODULE_12__["default"]], + bpmnUpdater: ['type', _BpmnUpdater__WEBPACK_IMPORTED_MODULE_13__["default"]], + elementFactory: ['type', _ElementFactory__WEBPACK_IMPORTED_MODULE_14__["default"]], + modeling: ['type', _Modeling__WEBPACK_IMPORTED_MODULE_15__["default"]], + layouter: ['type', _BpmnLayouter__WEBPACK_IMPORTED_MODULE_16__["default"]], + connectionDocking: ['type', diagram_js_lib_layout_CroppingConnectionDocking__WEBPACK_IMPORTED_MODULE_17__["default"]] +}); + +/***/ }), + +/***/ 23568: +/*!*********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/util/LaneUtil.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LANE_INDENTATION: () => (/* binding */ LANE_INDENTATION), +/* harmony export */ collectLanes: () => (/* binding */ collectLanes), +/* harmony export */ computeLanesResize: () => (/* binding */ computeLanesResize), +/* harmony export */ getChildLanes: () => (/* binding */ getChildLanes), +/* harmony export */ getLanesRoot: () => (/* binding */ getLanesRoot) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _ModelingUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ModelingUtil */ 98405); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/resize/ResizeUtil */ 35434); + + + + +var abs = Math.abs; +function getTRBLResize(oldBounds, newBounds) { + return (0,diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_0__.substractTRBL)((0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(newBounds), (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(oldBounds)); +} +var LANE_PARENTS = ['bpmn:Participant', 'bpmn:Process', 'bpmn:SubProcess']; +var LANE_INDENTATION = 30; + +/** + * Collect all lane shapes in the given paren + * + * @param {djs.model.Shape} shape + * @param {Array} [collectedShapes] + * + * @return {Array} + */ +function collectLanes(shape, collectedShapes) { + collectedShapes = collectedShapes || []; + shape.children.filter(function (s) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(s, 'bpmn:Lane')) { + collectLanes(s, collectedShapes); + collectedShapes.push(s); + } + }); + return collectedShapes; +} + +/** + * Return the lane children of the given element. + * + * @param {djs.model.Shape} shape + * + * @return {Array} + */ +function getChildLanes(shape) { + return shape.children.filter(function (c) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(c, 'bpmn:Lane'); + }); +} + +/** + * Return the root element containing the given lane shape + * + * @param {djs.model.Shape} shape + * + * @return {djs.model.Shape} + */ +function getLanesRoot(shape) { + return (0,_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getParent)(shape, LANE_PARENTS) || shape; +} + +/** + * Compute the required resize operations for lanes + * adjacent to the given shape, assuming it will be + * resized to the given new bounds. + * + * @param {djs.model.Shape} shape + * @param {Bounds} newBounds + * + * @return {Array} + */ +function computeLanesResize(shape, newBounds) { + var rootElement = getLanesRoot(shape); + var initialShapes = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_2__.is)(rootElement, 'bpmn:Process') ? [] : [rootElement]; + var allLanes = collectLanes(rootElement, initialShapes), + shapeTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(shape), + shapeNewTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(newBounds), + trblResize = getTRBLResize(shape, newBounds), + resizeNeeded = []; + allLanes.forEach(function (other) { + if (other === shape) { + return; + } + var topResize = 0, + rightResize = trblResize.right, + bottomResize = 0, + leftResize = trblResize.left; + var otherTrbl = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(other); + if (trblResize.top) { + if (abs(otherTrbl.bottom - shapeTrbl.top) < 10) { + bottomResize = shapeNewTrbl.top - otherTrbl.bottom; + } + if (abs(otherTrbl.top - shapeTrbl.top) < 5) { + topResize = shapeNewTrbl.top - otherTrbl.top; + } + } + if (trblResize.bottom) { + if (abs(otherTrbl.top - shapeTrbl.bottom) < 10) { + topResize = shapeNewTrbl.bottom - otherTrbl.top; + } + if (abs(otherTrbl.bottom - shapeTrbl.bottom) < 5) { + bottomResize = shapeNewTrbl.bottom - otherTrbl.bottom; + } + } + if (topResize || rightResize || bottomResize || leftResize) { + resizeNeeded.push({ + shape: other, + newBounds: (0,diagram_js_lib_features_resize_ResizeUtil__WEBPACK_IMPORTED_MODULE_0__.resizeTRBL)(other, { + top: topResize, + right: rightResize, + bottom: bottomResize, + left: leftResize + }) + }); + } + }); + return resizeNeeded; +} + +/***/ }), + +/***/ 98405: +/*!*************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/modeling/util/ModelingUtil.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getParent: () => (/* binding */ getParent), +/* harmony export */ is: () => (/* reexport safe */ _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is), +/* harmony export */ isAny: () => (/* reexport safe */ _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isAny) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); + + + +/** + * Return the parent of the element with any of the given types. + * + * @param {djs.model.Base} element + * @param {string|Array} anyType + * + * @return {djs.model.Base} + */ +function getParent(element, anyType) { + if (typeof anyType === 'string') { + anyType = [anyType]; + } + while (element = element.parent) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.isAny)(element, anyType)) { + return element; + } + } + return null; +} + +/***/ }), + +/***/ 39662: +/*!****************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/ordering/BpmnOrderingProvider.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnOrderingProvider) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_features_ordering_OrderingProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/ordering/OrderingProvider */ 10347); +/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ 4525); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); + + + + + +/** + * a simple ordering provider that makes sure: + * + * (0) labels and groups are rendered always on top + * (1) elements are ordered by a {level} property + */ +function BpmnOrderingProvider(eventBus, canvas, translate) { + diagram_js_lib_features_ordering_OrderingProvider__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + var orders = [{ + type: 'bpmn:SubProcess', + order: { + level: 6 + } + }, { + type: 'bpmn:SequenceFlow', + order: { + level: 3, + containers: ['bpmn:Participant', 'bpmn:FlowElementsContainer'] + } + }, + // handle DataAssociation(s) like message flows and render them always on top + { + type: 'bpmn:DataAssociation', + order: { + level: 9, + containers: ['bpmn:Collaboration', 'bpmn:Process'] + } + }, { + type: 'bpmn:MessageFlow', + order: { + level: 9, + containers: ['bpmn:Collaboration'] + } + }, { + type: 'bpmn:Association', + order: { + level: 6, + containers: ['bpmn:Participant', 'bpmn:FlowElementsContainer', 'bpmn:Collaboration'] + } + }, { + type: 'bpmn:BoundaryEvent', + order: { + level: 8 + } + }, { + type: 'bpmn:Group', + order: { + level: 10, + containers: ['bpmn:Collaboration', 'bpmn:Process'] + } + }, { + type: 'bpmn:FlowElement', + order: { + level: 5 + } + }, { + type: 'bpmn:Participant', + order: { + level: -2 + } + }, { + type: 'bpmn:Lane', + order: { + level: -1 + } + }]; + function computeOrder(element) { + if (element.labelTarget) { + return { + level: 10 + }; + } + var entry = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(orders, function (o) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(element, [o.type]); + }); + return entry && entry.order || { + level: 1 + }; + } + function getOrder(element) { + var order = element.order; + if (!order) { + element.order = order = computeOrder(element); + } + if (!order) { + throw new Error('no order for <' + element.id + '>'); + } + return order; + } + function findActualParent(element, newParent, containers) { + var actualParent = newParent; + while (actualParent) { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(actualParent, containers)) { + break; + } + actualParent = actualParent.parent; + } + if (!actualParent) { + throw new Error('no parent for <' + element.id + '> in <' + (newParent && newParent.id) + '>'); + } + return actualParent; + } + this.getOrdering = function (element, newParent) { + // render labels always on top + if (element.labelTarget) { + return { + parent: canvas.getRootElement(), + index: -1 + }; + } + var elementOrder = getOrder(element); + if (elementOrder.containers) { + newParent = findActualParent(element, newParent, elementOrder.containers); + } + var currentIndex = newParent.children.indexOf(element); + var insertIndex = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.findIndex)(newParent.children, function (child) { + // do not compare with labels, they are created + // in the wrong order (right after elements) during import and + // mess up the positioning. + if (!element.labelTarget && child.labelTarget) { + return false; + } + return elementOrder.level < getOrder(child).level; + }); + + // if the element is already in the child list at + // a smaller index, we need to adjust the insert index. + // this takes into account that the element is being removed + // before being re-inserted + if (insertIndex !== -1) { + if (currentIndex !== -1 && currentIndex < insertIndex) { + insertIndex -= 1; + } + } + return { + index: insertIndex, + parent: newParent + }; + }; +} +BpmnOrderingProvider.$inject = ['eventBus', 'canvas', 'translate']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnOrderingProvider, diagram_js_lib_features_ordering_OrderingProvider__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/***/ }), + +/***/ 17872: +/*!*************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/ordering/index.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/i18n/translate */ 3933); +/* harmony import */ var _BpmnOrderingProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnOrderingProvider */ 39662); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['bpmnOrderingProvider'], + bpmnOrderingProvider: ['type', _BpmnOrderingProvider__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 82425: +/*!**********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/palette/PaletteProvider.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ PaletteProvider) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); + + +/** + * A palette provider for BPMN 2.0 elements. + */ +function PaletteProvider(palette, create, elementFactory, spaceTool, lassoTool, handTool, globalConnect, translate) { + this._palette = palette; + this._create = create; + this._elementFactory = elementFactory; + this._spaceTool = spaceTool; + this._lassoTool = lassoTool; + this._handTool = handTool; + this._globalConnect = globalConnect; + this._translate = translate; + palette.registerProvider(this); +} +PaletteProvider.$inject = ['palette', 'create', 'elementFactory', 'spaceTool', 'lassoTool', 'handTool', 'globalConnect', 'translate']; +PaletteProvider.prototype.getPaletteEntries = function (element) { + var actions = {}, + create = this._create, + elementFactory = this._elementFactory, + spaceTool = this._spaceTool, + lassoTool = this._lassoTool, + handTool = this._handTool, + globalConnect = this._globalConnect, + translate = this._translate; + function createAction(type, group, className, title, options) { + function createListener(event) { + var shape = elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ + type: type + }, options)); + if (options) { + shape.businessObject.di.isExpanded = options.isExpanded; + } + create.start(event, shape); + } + var shortType = type.replace(/^bpmn:/, ''); + return { + group: group, + className: className, + title: title || translate('Create {type}', { + type: shortType + }), + action: { + dragstart: createListener, + click: createListener + } + }; + } + function createSubprocess(event) { + var subProcess = elementFactory.createShape({ + type: 'bpmn:SubProcess', + x: 0, + y: 0, + isExpanded: true + }); + var startEvent = elementFactory.createShape({ + type: 'bpmn:StartEvent', + x: 40, + y: 82, + parent: subProcess + }); + create.start(event, [subProcess, startEvent], { + hints: { + autoSelect: [subProcess] + } + }); + } + function createParticipant(event) { + create.start(event, elementFactory.createParticipantShape()); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(actions, { + 'hand-tool': { + group: 'tools', + className: 'bpmn-icon-hand-tool', + title: translate('Activate the hand tool'), + action: { + click: function (event) { + handTool.activateHand(event); + } + } + }, + 'lasso-tool': { + group: 'tools', + className: 'bpmn-icon-lasso-tool', + title: translate('Activate the lasso tool'), + action: { + click: function (event) { + lassoTool.activateSelection(event); + } + } + }, + 'space-tool': { + group: 'tools', + className: 'bpmn-icon-space-tool', + title: translate('Activate the create/remove space tool'), + action: { + click: function (event) { + spaceTool.activateSelection(event); + } + } + }, + 'global-connect-tool': { + group: 'tools', + className: 'bpmn-icon-connection-multi', + title: translate('Activate the global connect tool'), + action: { + click: function (event) { + globalConnect.start(event); + } + } + }, + 'tool-separator': { + group: 'tools', + separator: true + }, + 'create.start-event': createAction('bpmn:StartEvent', 'event', 'bpmn-icon-start-event-none', translate('Create StartEvent')), + 'create.intermediate-event': createAction('bpmn:IntermediateThrowEvent', 'event', 'bpmn-icon-intermediate-event-none', translate('Create Intermediate/Boundary Event')), + 'create.end-event': createAction('bpmn:EndEvent', 'event', 'bpmn-icon-end-event-none', translate('Create EndEvent')), + 'create.exclusive-gateway': createAction('bpmn:ExclusiveGateway', 'gateway', 'bpmn-icon-gateway-none', translate('Create Gateway')), + 'create.task': createAction('bpmn:Task', 'activity', 'bpmn-icon-task', translate('Create Task')), + 'create.data-object': createAction('bpmn:DataObjectReference', 'data-object', 'bpmn-icon-data-object', translate('Create DataObjectReference')), + 'create.data-store': createAction('bpmn:DataStoreReference', 'data-store', 'bpmn-icon-data-store', translate('Create DataStoreReference')), + 'create.subprocess-expanded': { + group: 'activity', + className: 'bpmn-icon-subprocess-expanded', + title: translate('Create expanded SubProcess'), + action: { + dragstart: createSubprocess, + click: createSubprocess + } + }, + 'create.participant-expanded': { + group: 'collaboration', + className: 'bpmn-icon-participant', + title: translate('Create Pool/Participant'), + action: { + dragstart: createParticipant, + click: createParticipant + } + }, + 'create.group': createAction('bpmn:Group', 'artifact', 'bpmn-icon-group', translate('Create Group')) + }); + return actions; +}; + +/***/ }), + +/***/ 57763: +/*!************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/palette/index.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_palette__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/palette */ 42383); +/* harmony import */ var diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/create */ 48256); +/* harmony import */ var diagram_js_lib_features_space_tool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/space-tool */ 88363); +/* harmony import */ var diagram_js_lib_features_lasso_tool__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/features/lasso-tool */ 10707); +/* harmony import */ var diagram_js_lib_features_hand_tool__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! diagram-js/lib/features/hand-tool */ 14590); +/* harmony import */ var diagram_js_lib_features_global_connect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/features/global-connect */ 27432); +/* harmony import */ var diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! diagram-js/lib/i18n/translate */ 3933); +/* harmony import */ var _PaletteProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PaletteProvider */ 82425); + + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_palette__WEBPACK_IMPORTED_MODULE_0__["default"], diagram_js_lib_features_create__WEBPACK_IMPORTED_MODULE_1__["default"], diagram_js_lib_features_space_tool__WEBPACK_IMPORTED_MODULE_2__["default"], diagram_js_lib_features_lasso_tool__WEBPACK_IMPORTED_MODULE_3__["default"], diagram_js_lib_features_hand_tool__WEBPACK_IMPORTED_MODULE_4__["default"], diagram_js_lib_features_global_connect__WEBPACK_IMPORTED_MODULE_5__["default"], diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_6__["default"]], + __init__: ['paletteProvider'], + paletteProvider: ['type', _PaletteProvider__WEBPACK_IMPORTED_MODULE_7__["default"]] +}); + +/***/ }), + +/***/ 12224: +/*!*****************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/popup-menu/ReplaceMenuProvider.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ReplaceMenuProvider) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/DiUtil */ 55441); +/* harmony import */ var _util_TypeUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/TypeUtil */ 94871); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../replace/ReplaceOptions */ 5180); + + + + + + +/** + * This module is an element agnostic replace menu provider for the popup menu. + */ +function ReplaceMenuProvider(bpmnFactory, popupMenu, modeling, moddle, bpmnReplace, rules, translate) { + this._bpmnFactory = bpmnFactory; + this._popupMenu = popupMenu; + this._modeling = modeling; + this._moddle = moddle; + this._bpmnReplace = bpmnReplace; + this._rules = rules; + this._translate = translate; + this.register(); +} +ReplaceMenuProvider.$inject = ['bpmnFactory', 'popupMenu', 'modeling', 'moddle', 'bpmnReplace', 'rules', 'translate']; + +/** + * Register replace menu provider in the popup menu + */ +ReplaceMenuProvider.prototype.register = function () { + this._popupMenu.registerProvider('bpmn-replace', this); +}; + +/** + * Get all entries from replaceOptions for the given element and apply filters + * on them. Get for example only elements, which are different from the current one. + * + * @param {djs.model.Base} element + * + * @return {Array} a list of menu entry items + */ +ReplaceMenuProvider.prototype.getEntries = function (element) { + var businessObject = element.businessObject; + var rules = this._rules; + var entries; + if (!rules.allowed('shape.replace', { + element: element + })) { + return []; + } + var differentType = (0,_util_TypeUtil__WEBPACK_IMPORTED_MODULE_0__.isDifferentType)(element); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:DataObjectReference')) { + return this._createEntries(element, _replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.DATA_OBJECT_REFERENCE); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:DataStoreReference') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element.parent, 'bpmn:Collaboration')) { + return this._createEntries(element, _replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.DATA_STORE_REFERENCE); + } + + // start events outside sub processes + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:StartEvent') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.$parent, 'bpmn:SubProcess')) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.START_EVENT, differentType); + return this._createEntries(element, entries); + } + + // expanded/collapsed pools + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:Participant')) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.PARTICIPANT, function (entry) { + return (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(businessObject) !== entry.target.isExpanded; + }); + return this._createEntries(element, entries); + } + + // start events inside event sub processes + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:StartEvent') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isEventSubProcess)(businessObject.$parent)) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.EVENT_SUB_PROCESS_START_EVENT, function (entry) { + var target = entry.target; + var isInterrupting = target.isInterrupting !== false; + var isInterruptingEqual = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element).isInterrupting === isInterrupting; + + // filters elements which types and event definition are equal but have have different interrupting types + return differentType(entry) || !differentType(entry) && !isInterruptingEqual; + }); + return this._createEntries(element, entries); + } + + // start events inside sub processes + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:StartEvent') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isEventSubProcess)(businessObject.$parent) && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.$parent, 'bpmn:SubProcess')) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.START_EVENT_SUB_PROCESS, differentType); + return this._createEntries(element, entries); + } + + // end events + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:EndEvent')) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.END_EVENT, function (entry) { + var target = entry.target; + + // hide cancel end events outside transactions + if (target.eventDefinitionType == 'bpmn:CancelEventDefinition' && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.$parent, 'bpmn:Transaction')) { + return false; + } + return differentType(entry); + }); + return this._createEntries(element, entries); + } + + // boundary events + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:BoundaryEvent')) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.BOUNDARY_EVENT, function (entry) { + var target = entry.target; + if (target.eventDefinitionType == 'bpmn:CancelEventDefinition' && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.attachedToRef, 'bpmn:Transaction')) { + return false; + } + var cancelActivity = target.cancelActivity !== false; + var isCancelActivityEqual = businessObject.cancelActivity == cancelActivity; + return differentType(entry) || !differentType(entry) && !isCancelActivityEqual; + }); + return this._createEntries(element, entries); + } + + // intermediate events + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:IntermediateCatchEvent') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:IntermediateThrowEvent')) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.INTERMEDIATE_EVENT, differentType); + return this._createEntries(element, entries); + } + + // gateways + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:Gateway')) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.GATEWAY, differentType); + return this._createEntries(element, entries); + } + + // transactions + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:Transaction')) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.TRANSACTION, differentType); + return this._createEntries(element, entries); + } + + // expanded event sub processes + if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isEventSubProcess)(businessObject) && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(businessObject)) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.EVENT_SUB_PROCESS, differentType); + return this._createEntries(element, entries); + } + + // expanded sub processes + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(businessObject)) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.SUBPROCESS_EXPANDED, differentType); + return this._createEntries(element, entries); + } + + // collapsed ad hoc sub processes + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:AdHocSubProcess') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(businessObject)) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.TASK, function (entry) { + var target = entry.target; + var isTargetSubProcess = target.type === 'bpmn:SubProcess'; + var isTargetExpanded = target.isExpanded === true; + return (0,_util_TypeUtil__WEBPACK_IMPORTED_MODULE_0__.isDifferentType)(element, target) && (!isTargetSubProcess || isTargetExpanded); + }); + return this._createEntries(element, entries); + } + + // sequence flows + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:SequenceFlow')) { + return this._createSequenceFlowEntries(element, _replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.SEQUENCE_FLOW); + } + + // flow nodes + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:FlowNode')) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(_replace_ReplaceOptions__WEBPACK_IMPORTED_MODULE_2__.TASK, differentType); + + // collapsed SubProcess can not be replaced with itself + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:SubProcess') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(businessObject)) { + entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(entries, function (entry) { + return entry.label !== 'Sub Process (collapsed)'; + }); + } + return this._createEntries(element, entries); + } + return []; +}; + +/** + * Get a list of header items for the given element. This includes buttons + * for multi instance markers and for the ad hoc marker. + * + * @param {djs.model.Base} element + * + * @return {Array} a list of menu entry items + */ +ReplaceMenuProvider.prototype.getHeaderEntries = function (element) { + var headerEntries = []; + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Activity') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isEventSubProcess)(element)) { + headerEntries = headerEntries.concat(this._getLoopEntries(element)); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:DataObjectReference')) { + headerEntries = headerEntries.concat(this._getDataObjectIsCollection(element)); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Participant')) { + headerEntries = headerEntries.concat(this._getParticipantMultiplicity(element)); + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:SubProcess') && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(element, 'bpmn:Transaction') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isEventSubProcess)(element)) { + headerEntries.push(this._getAdHocEntry(element)); + } + return headerEntries; +}; + +/** + * Creates an array of menu entry objects for a given element and filters the replaceOptions + * according to a filter function. + * + * @param {djs.model.Base} element + * @param {Object} replaceOptions + * + * @return {Array} a list of menu items + */ +ReplaceMenuProvider.prototype._createEntries = function (element, replaceOptions) { + var menuEntries = []; + var self = this; + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(replaceOptions, function (definition) { + var entry = self._createMenuEntry(definition, element); + menuEntries.push(entry); + }); + return menuEntries; +}; + +/** + * Creates an array of menu entry objects for a given sequence flow. + * + * @param {djs.model.Base} element + * @param {Object} replaceOptions + + * @return {Array} a list of menu items + */ +ReplaceMenuProvider.prototype._createSequenceFlowEntries = function (element, replaceOptions) { + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element); + var menuEntries = []; + var modeling = this._modeling, + moddle = this._moddle; + var self = this; + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(replaceOptions, function (entry) { + switch (entry.actionName) { + case 'replace-with-default-flow': + if (businessObject.sourceRef.default !== businessObject && ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.sourceRef, 'bpmn:ExclusiveGateway') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.sourceRef, 'bpmn:InclusiveGateway') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.sourceRef, 'bpmn:ComplexGateway') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.sourceRef, 'bpmn:Activity'))) { + menuEntries.push(self._createMenuEntry(entry, element, function () { + modeling.updateProperties(element.source, { + default: businessObject + }); + })); + } + break; + case 'replace-with-conditional-flow': + if (!businessObject.conditionExpression && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.sourceRef, 'bpmn:Activity')) { + menuEntries.push(self._createMenuEntry(entry, element, function () { + var conditionExpression = moddle.create('bpmn:FormalExpression', { + body: '' + }); + modeling.updateProperties(element, { + conditionExpression: conditionExpression + }); + })); + } + break; + default: + // default flows + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.sourceRef, 'bpmn:Activity') && businessObject.conditionExpression) { + return menuEntries.push(self._createMenuEntry(entry, element, function () { + modeling.updateProperties(element, { + conditionExpression: undefined + }); + })); + } + + // conditional flows + if (((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.sourceRef, 'bpmn:ExclusiveGateway') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.sourceRef, 'bpmn:InclusiveGateway') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.sourceRef, 'bpmn:ComplexGateway') || (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject.sourceRef, 'bpmn:Activity')) && businessObject.sourceRef.default === businessObject) { + return menuEntries.push(self._createMenuEntry(entry, element, function () { + modeling.updateProperties(element.source, { + default: undefined + }); + })); + } + } + }); + return menuEntries; +}; + +/** + * Creates and returns a single menu entry item. + * + * @param {Object} definition a single replace options definition object + * @param {djs.model.Base} element + * @param {Function} [action] an action callback function which gets called when + * the menu entry is being triggered. + * + * @return {Object} menu entry item + */ +ReplaceMenuProvider.prototype._createMenuEntry = function (definition, element, action) { + var translate = this._translate; + var replaceElement = this._bpmnReplace.replaceElement; + var replaceAction = function () { + return replaceElement(element, definition.target); + }; + var label = definition.label; + if (label && typeof label === 'function') { + label = label(element); + } + action = action || replaceAction; + var menuEntry = { + label: translate(label), + className: definition.className, + id: definition.actionName, + action: action + }; + return menuEntry; +}; + +/** + * Get a list of menu items containing buttons for multi instance markers + * + * @param {djs.model.Base} element + * + * @return {Array} a list of menu items + */ +ReplaceMenuProvider.prototype._getLoopEntries = function (element) { + var self = this; + var translate = this._translate; + function toggleLoopEntry(event, entry) { + var loopCharacteristics; + if (entry.active) { + loopCharacteristics = undefined; + } else { + loopCharacteristics = self._moddle.create(entry.options.loopCharacteristics); + if (entry.options.isSequential) { + loopCharacteristics.isSequential = entry.options.isSequential; + } + } + self._modeling.updateProperties(element, { + loopCharacteristics: loopCharacteristics + }); + } + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element), + loopCharacteristics = businessObject.loopCharacteristics; + var isSequential, isLoop, isParallel; + if (loopCharacteristics) { + isSequential = loopCharacteristics.isSequential; + isLoop = loopCharacteristics.isSequential === undefined; + isParallel = loopCharacteristics.isSequential !== undefined && !loopCharacteristics.isSequential; + } + var loopEntries = [{ + id: 'toggle-parallel-mi', + className: 'bpmn-icon-parallel-mi-marker', + title: translate('Parallel Multi Instance'), + active: isParallel, + action: toggleLoopEntry, + options: { + loopCharacteristics: 'bpmn:MultiInstanceLoopCharacteristics', + isSequential: false + } + }, { + id: 'toggle-sequential-mi', + className: 'bpmn-icon-sequential-mi-marker', + title: translate('Sequential Multi Instance'), + active: isSequential, + action: toggleLoopEntry, + options: { + loopCharacteristics: 'bpmn:MultiInstanceLoopCharacteristics', + isSequential: true + } + }, { + id: 'toggle-loop', + className: 'bpmn-icon-loop-marker', + title: translate('Loop'), + active: isLoop, + action: toggleLoopEntry, + options: { + loopCharacteristics: 'bpmn:StandardLoopCharacteristics' + } + }]; + return loopEntries; +}; + +/** + * Get a list of menu items containing a button for the collection marker + * + * @param {djs.model.Base} element + * + * @return {Array} a list of menu items + */ +ReplaceMenuProvider.prototype._getDataObjectIsCollection = function (element) { + var self = this; + var translate = this._translate; + function toggleIsCollection(event, entry) { + self._modeling.updateModdleProperties(element, dataObject, { + isCollection: !entry.active + }); + } + var dataObject = element.businessObject.dataObjectRef, + isCollection = dataObject.isCollection; + var dataObjectEntries = [{ + id: 'toggle-is-collection', + className: 'bpmn-icon-parallel-mi-marker', + title: translate('Collection'), + active: isCollection, + action: toggleIsCollection + }]; + return dataObjectEntries; +}; + +/** + * Get a list of menu items containing a button for the participant multiplicity marker + * + * @param {djs.model.Base} element + * + * @return {Array} a list of menu items + */ +ReplaceMenuProvider.prototype._getParticipantMultiplicity = function (element) { + var self = this; + var bpmnFactory = this._bpmnFactory; + var translate = this._translate; + function toggleParticipantMultiplicity(event, entry) { + var isActive = entry.active; + var participantMultiplicity; + if (!isActive) { + participantMultiplicity = bpmnFactory.create('bpmn:ParticipantMultiplicity'); + } + self._modeling.updateProperties(element, { + participantMultiplicity: participantMultiplicity + }); + } + var participantMultiplicity = element.businessObject.participantMultiplicity; + var participantEntries = [{ + id: 'toggle-participant-multiplicity', + className: 'bpmn-icon-parallel-mi-marker', + title: translate('Participant Multiplicity'), + active: !!participantMultiplicity, + action: toggleParticipantMultiplicity + }]; + return participantEntries; +}; + +/** + * Get the menu items containing a button for the ad hoc marker + * + * @param {djs.model.Base} element + * + * @return {Object} a menu item + */ +ReplaceMenuProvider.prototype._getAdHocEntry = function (element) { + var translate = this._translate; + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.getBusinessObject)(element); + var isAdHoc = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_1__.is)(businessObject, 'bpmn:AdHocSubProcess'); + var replaceElement = this._bpmnReplace.replaceElement; + var adHocEntry = { + id: 'toggle-adhoc', + className: 'bpmn-icon-ad-hoc-marker', + title: translate('Ad-hoc'), + active: isAdHoc, + action: function (event, entry) { + if (isAdHoc) { + return replaceElement(element, { + type: 'bpmn:SubProcess' + }, { + autoResize: false, + layoutConnection: false + }); + } else { + return replaceElement(element, { + type: 'bpmn:AdHocSubProcess' + }, { + autoResize: false, + layoutConnection: false + }); + } + } + }; + return adHocEntry; +}; + +/***/ }), + +/***/ 30918: +/*!***************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/popup-menu/index.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/popup-menu */ 63162); +/* harmony import */ var _replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../replace */ 95872); +/* harmony import */ var _ReplaceMenuProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ReplaceMenuProvider */ 12224); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_popup_menu__WEBPACK_IMPORTED_MODULE_0__["default"], _replace__WEBPACK_IMPORTED_MODULE_1__["default"]], + __init__: ['replaceMenuProvider'], + replaceMenuProvider: ['type', _ReplaceMenuProvider__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 94871: +/*!***********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/popup-menu/util/TypeUtil.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isDifferentType: () => (/* binding */ isDifferentType) +/* harmony export */ }); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/ModelUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/DiUtil */ 55441); + + + +/** + * Returns true, if an element is from a different type + * than a target definition. Takes into account the type, + * event definition type and triggeredByEvent property. + * + * @param {djs.model.Base} element + * + * @return {boolean} + */ +function isDifferentType(element) { + return function (entry) { + var target = entry.target; + var businessObject = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element), + eventDefinition = businessObject.eventDefinitions && businessObject.eventDefinitions[0]; + var isTypeEqual = businessObject.$type === target.type; + var isEventDefinitionEqual = (eventDefinition && eventDefinition.$type) === target.eventDefinitionType; + var isTriggeredByEventEqual = businessObject.triggeredByEvent === target.triggeredByEvent; + var isExpandedEqual = target.isExpanded === undefined || target.isExpanded === (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(businessObject); + return !isTypeEqual || !isEventDefinitionEqual || !isTriggeredByEventEqual || !isExpandedEqual; + }; +} + +/***/ }), + +/***/ 19588: +/*!*********************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/replace-preview/BpmnReplacePreview.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnReplacePreview) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/command/CommandInterceptor */ 35353); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var css_escape__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! css.escape */ 96169); +/* harmony import */ var css_escape__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(css_escape__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tiny-svg */ 57491); + + + + + + +var LOW_PRIORITY = 250; +function BpmnReplacePreview(eventBus, elementRegistry, elementFactory, canvas, previewSupport) { + diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_2__["default"].call(this, eventBus); + + /** + * Replace the visuals of all elements in the context which can be replaced + * + * @param {Object} context + */ + function replaceVisual(context) { + var replacements = context.canExecute.replacements; + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(replacements, function (replacement) { + var id = replacement.oldElementId; + var newElement = { + type: replacement.newElementType + }; + + // if the visual of the element is already replaced + if (context.visualReplacements[id]) { + return; + } + var element = elementRegistry.get(id); + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(newElement, { + x: element.x, + y: element.y + }); + + // create a temporary shape + var tempShape = elementFactory.createShape(newElement); + canvas.addShape(tempShape, element.parent); + + // select the original SVG element related to the element and hide it + var gfx = (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.query)('[data-element-id="' + css_escape__WEBPACK_IMPORTED_MODULE_1___default()(element.id) + '"]', context.dragGroup); + if (gfx) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_5__.attr)(gfx, { + display: 'none' + }); + } + + // clone the gfx of the temporary shape and add it to the drag group + var dragger = previewSupport.addDragger(tempShape, context.dragGroup); + context.visualReplacements[id] = dragger; + canvas.removeShape(tempShape); + }); + } + + /** + * Restore the original visuals of the previously replaced elements + * + * @param {Object} context + */ + function restoreVisual(context) { + var visualReplacements = context.visualReplacements; + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(visualReplacements, function (dragger, id) { + var originalGfx = (0,min_dom__WEBPACK_IMPORTED_MODULE_4__.query)('[data-element-id="' + css_escape__WEBPACK_IMPORTED_MODULE_1___default()(id) + '"]', context.dragGroup); + if (originalGfx) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_5__.attr)(originalGfx, { + display: 'inline' + }); + } + dragger.remove(); + if (visualReplacements[id]) { + delete visualReplacements[id]; + } + }); + } + eventBus.on('shape.move.move', LOW_PRIORITY, function (event) { + var context = event.context, + canExecute = context.canExecute; + if (!context.visualReplacements) { + context.visualReplacements = {}; + } + if (canExecute && canExecute.replacements) { + replaceVisual(context); + } else { + restoreVisual(context); + } + }); +} +BpmnReplacePreview.$inject = ['eventBus', 'elementRegistry', 'elementFactory', 'canvas', 'previewSupport']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnReplacePreview, diagram_js_lib_command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_2__["default"]); + +/***/ }), + +/***/ 47353: +/*!********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/replace-preview/index.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_preview_support__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/preview-support */ 86726); +/* harmony import */ var _BpmnReplacePreview__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnReplacePreview */ 19588); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_preview_support__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['bpmnReplacePreview'], + bpmnReplacePreview: ['type', _BpmnReplacePreview__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 30783: +/*!******************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/replace/BpmnReplace.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnReplace) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ 4525); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/DiUtil */ 55441); +/* harmony import */ var _copy_paste_ModdleCopy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../copy-paste/ModdleCopy */ 66545); + + + + + +function copyProperties(source, target, properties) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(properties)) { + properties = [properties]; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(properties, function (property) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isUndefined)(source[property])) { + target[property] = source[property]; + } + }); +} +var CUSTOM_PROPERTIES = ['cancelActivity', 'instantiate', 'eventGatewayType', 'triggeredByEvent', 'isInterrupting']; +function toggeling(element, target) { + var oldCollapsed = element && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(element, 'collapsed') ? element.collapsed : !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(element); + var targetCollapsed; + if (target && ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(target, 'collapsed') || (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(target, 'isExpanded'))) { + // property is explicitly set so use it + targetCollapsed = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(target, 'collapsed') ? target.collapsed : !target.isExpanded; + } else { + // keep old state + targetCollapsed = oldCollapsed; + } + if (oldCollapsed !== targetCollapsed) { + element.collapsed = oldCollapsed; + return true; + } + return false; +} + +/** + * This module takes care of replacing BPMN elements + */ +function BpmnReplace(bpmnFactory, elementFactory, moddleCopy, modeling, replace, rules, selection) { + /** + * Prepares a new business object for the replacement element + * and triggers the replace operation. + * + * @param {djs.model.Base} element + * @param {Object} target + * @param {Object} [hints] + * + * @return {djs.model.Base} the newly created element + */ + function replaceElement(element, target, hints) { + hints = hints || {}; + var type = target.type, + oldBusinessObject = element.businessObject; + if (isSubProcess(oldBusinessObject)) { + if (type === 'bpmn:SubProcess') { + if (toggeling(element, target)) { + // expanding or collapsing process + modeling.toggleCollapse(element); + return element; + } + } + } + var newBusinessObject = bpmnFactory.create(type); + var newElement = { + type: type, + businessObject: newBusinessObject + }; + var elementProps = (0,_copy_paste_ModdleCopy__WEBPACK_IMPORTED_MODULE_2__.getPropertyNames)(oldBusinessObject.$descriptor), + newElementProps = (0,_copy_paste_ModdleCopy__WEBPACK_IMPORTED_MODULE_2__.getPropertyNames)(newBusinessObject.$descriptor, true), + copyProps = intersection(elementProps, newElementProps); + + // initialize special properties defined in target definition + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(newBusinessObject, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.pick)(target, CUSTOM_PROPERTIES)); + var properties = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(copyProps, function (propertyName) { + // copying event definitions, unless we replace + if (propertyName === 'eventDefinitions') { + return hasEventDefinition(element, target.eventDefinitionType); + } + + // retain loop characteristics if the target element + // is not an event sub process + if (propertyName === 'loopCharacteristics') { + return !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isEventSubProcess)(newBusinessObject); + } + + // so the applied properties from 'target' don't get lost + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(newBusinessObject, propertyName)) { + return false; + } + if (propertyName === 'processRef' && target.isExpanded === false) { + return false; + } + if (propertyName === 'triggeredByEvent') { + return false; + } + return true; + }); + newBusinessObject = moddleCopy.copyElement(oldBusinessObject, newBusinessObject, properties); + + // initialize custom BPMN extensions + if (target.eventDefinitionType) { + // only initialize with new eventDefinition + // if we did not set an event definition yet, + // i.e. because we copied it + if (!hasEventDefinition(newBusinessObject, target.eventDefinitionType)) { + newElement.eventDefinitionType = target.eventDefinitionType; + newElement.eventDefinitionAttrs = target.eventDefinitionAttrs; + } + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldBusinessObject, 'bpmn:Activity')) { + if (isSubProcess(oldBusinessObject)) { + // no toggeling, so keep old state + newElement.isExpanded = (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(oldBusinessObject); + } + + // else if property is explicitly set, use it + else if (target && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.has)(target, 'isExpanded')) { + newElement.isExpanded = target.isExpanded; + } + + // TODO: need also to respect min/max Size + // copy size, from an expanded subprocess to an expanded alternative subprocess + // except bpmn:Task, because Task is always expanded + if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_1__.isExpanded)(oldBusinessObject) && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldBusinessObject, 'bpmn:Task') && newElement.isExpanded) { + newElement.width = element.width; + newElement.height = element.height; + } + } + + // remove children if not expanding sub process + if (isSubProcess(oldBusinessObject) && !isSubProcess(newBusinessObject)) { + hints.moveChildren = false; + } + + // transform collapsed/expanded pools + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldBusinessObject, 'bpmn:Participant')) { + // create expanded pool + if (target.isExpanded === true) { + newBusinessObject.processRef = bpmnFactory.create('bpmn:Process'); + } else { + // remove children when transforming to collapsed pool + hints.moveChildren = false; + } + + // apply same width and default height + newElement.width = element.width; + newElement.height = elementFactory._getDefaultSize(newBusinessObject).height; + } + if (!rules.allowed('shape.resize', { + shape: newBusinessObject + })) { + newElement.height = elementFactory._getDefaultSize(newBusinessObject).height; + newElement.width = elementFactory._getDefaultSize(newBusinessObject).width; + } + newBusinessObject.name = oldBusinessObject.name; + + // retain default flow's reference between inclusive <-> exclusive gateways and activities + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(oldBusinessObject, ['bpmn:ExclusiveGateway', 'bpmn:InclusiveGateway', 'bpmn:Activity']) && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(newBusinessObject, ['bpmn:ExclusiveGateway', 'bpmn:InclusiveGateway', 'bpmn:Activity'])) { + newBusinessObject.default = oldBusinessObject.default; + } + if (target.host && !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(oldBusinessObject, 'bpmn:BoundaryEvent') && (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(newBusinessObject, 'bpmn:BoundaryEvent')) { + newElement.host = target.host; + } + + // The DataStoreReference element is 14px wider than the DataObjectReference element + // This ensures that they stay centered on the x axis when replaced + if (newElement.type === 'bpmn:DataStoreReference' || newElement.type === 'bpmn:DataObjectReference') { + newElement.x = element.x + (element.width - newElement.width) / 2; + } + newElement.di = {}; + + // colors will be set to DI + copyProperties(oldBusinessObject.di, newElement.di, ['fill', 'stroke', 'background-color', 'border-color', 'color']); + newElement = replace.replaceElement(element, newElement, hints); + if (hints.select !== false) { + selection.select(newElement); + } + return newElement; + } + this.replaceElement = replaceElement; +} +BpmnReplace.$inject = ['bpmnFactory', 'elementFactory', 'moddleCopy', 'modeling', 'replace', 'rules', 'selection']; +function isSubProcess(bo) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(bo, 'bpmn:SubProcess'); +} +function hasEventDefinition(element, type) { + var bo = (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(element); + return type && bo.get('eventDefinitions').some(function (definition) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(definition, type); + }); +} + +/** + * Compute intersection between two arrays. + */ +function intersection(a1, a2) { + return a1.filter(function (el) { + return a2.indexOf(el) !== -1; + }); +} + +/***/ }), + +/***/ 5180: +/*!*********************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/replace/ReplaceOptions.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ BOUNDARY_EVENT: () => (/* binding */ BOUNDARY_EVENT), +/* harmony export */ DATA_OBJECT_REFERENCE: () => (/* binding */ DATA_OBJECT_REFERENCE), +/* harmony export */ DATA_STORE_REFERENCE: () => (/* binding */ DATA_STORE_REFERENCE), +/* harmony export */ END_EVENT: () => (/* binding */ END_EVENT), +/* harmony export */ EVENT_SUB_PROCESS: () => (/* binding */ EVENT_SUB_PROCESS), +/* harmony export */ EVENT_SUB_PROCESS_START_EVENT: () => (/* binding */ EVENT_SUB_PROCESS_START_EVENT), +/* harmony export */ GATEWAY: () => (/* binding */ GATEWAY), +/* harmony export */ INTERMEDIATE_EVENT: () => (/* binding */ INTERMEDIATE_EVENT), +/* harmony export */ PARTICIPANT: () => (/* binding */ PARTICIPANT), +/* harmony export */ SEQUENCE_FLOW: () => (/* binding */ SEQUENCE_FLOW), +/* harmony export */ START_EVENT: () => (/* binding */ START_EVENT), +/* harmony export */ START_EVENT_SUB_PROCESS: () => (/* binding */ START_EVENT_SUB_PROCESS), +/* harmony export */ SUBPROCESS_EXPANDED: () => (/* binding */ SUBPROCESS_EXPANDED), +/* harmony export */ TASK: () => (/* binding */ TASK), +/* harmony export */ TRANSACTION: () => (/* binding */ TRANSACTION) +/* harmony export */ }); +var START_EVENT = [{ + label: 'Start Event', + actionName: 'replace-with-none-start', + className: 'bpmn-icon-start-event-none', + target: { + type: 'bpmn:StartEvent' + } +}, { + label: 'Intermediate Throw Event', + actionName: 'replace-with-none-intermediate-throwing', + className: 'bpmn-icon-intermediate-event-none', + target: { + type: 'bpmn:IntermediateThrowEvent' + } +}, { + label: 'End Event', + actionName: 'replace-with-none-end', + className: 'bpmn-icon-end-event-none', + target: { + type: 'bpmn:EndEvent' + } +}, { + label: 'Message Start Event', + actionName: 'replace-with-message-start', + className: 'bpmn-icon-start-event-message', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:MessageEventDefinition' + } +}, { + label: 'Timer Start Event', + actionName: 'replace-with-timer-start', + className: 'bpmn-icon-start-event-timer', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:TimerEventDefinition' + } +}, { + label: 'Conditional Start Event', + actionName: 'replace-with-conditional-start', + className: 'bpmn-icon-start-event-condition', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:ConditionalEventDefinition' + } +}, { + label: 'Signal Start Event', + actionName: 'replace-with-signal-start', + className: 'bpmn-icon-start-event-signal', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:SignalEventDefinition' + } +}]; +var START_EVENT_SUB_PROCESS = [{ + label: 'Start Event', + actionName: 'replace-with-none-start', + className: 'bpmn-icon-start-event-none', + target: { + type: 'bpmn:StartEvent' + } +}, { + label: 'Intermediate Throw Event', + actionName: 'replace-with-none-intermediate-throwing', + className: 'bpmn-icon-intermediate-event-none', + target: { + type: 'bpmn:IntermediateThrowEvent' + } +}, { + label: 'End Event', + actionName: 'replace-with-none-end', + className: 'bpmn-icon-end-event-none', + target: { + type: 'bpmn:EndEvent' + } +}]; +var INTERMEDIATE_EVENT = [{ + label: 'Start Event', + actionName: 'replace-with-none-start', + className: 'bpmn-icon-start-event-none', + target: { + type: 'bpmn:StartEvent' + } +}, { + label: 'Intermediate Throw Event', + actionName: 'replace-with-none-intermediate-throw', + className: 'bpmn-icon-intermediate-event-none', + target: { + type: 'bpmn:IntermediateThrowEvent' + } +}, { + label: 'End Event', + actionName: 'replace-with-none-end', + className: 'bpmn-icon-end-event-none', + target: { + type: 'bpmn:EndEvent' + } +}, { + label: 'Message Intermediate Catch Event', + actionName: 'replace-with-message-intermediate-catch', + className: 'bpmn-icon-intermediate-event-catch-message', + target: { + type: 'bpmn:IntermediateCatchEvent', + eventDefinitionType: 'bpmn:MessageEventDefinition' + } +}, { + label: 'Message Intermediate Throw Event', + actionName: 'replace-with-message-intermediate-throw', + className: 'bpmn-icon-intermediate-event-throw-message', + target: { + type: 'bpmn:IntermediateThrowEvent', + eventDefinitionType: 'bpmn:MessageEventDefinition' + } +}, { + label: 'Timer Intermediate Catch Event', + actionName: 'replace-with-timer-intermediate-catch', + className: 'bpmn-icon-intermediate-event-catch-timer', + target: { + type: 'bpmn:IntermediateCatchEvent', + eventDefinitionType: 'bpmn:TimerEventDefinition' + } +}, { + label: 'Escalation Intermediate Throw Event', + actionName: 'replace-with-escalation-intermediate-throw', + className: 'bpmn-icon-intermediate-event-throw-escalation', + target: { + type: 'bpmn:IntermediateThrowEvent', + eventDefinitionType: 'bpmn:EscalationEventDefinition' + } +}, { + label: 'Conditional Intermediate Catch Event', + actionName: 'replace-with-conditional-intermediate-catch', + className: 'bpmn-icon-intermediate-event-catch-condition', + target: { + type: 'bpmn:IntermediateCatchEvent', + eventDefinitionType: 'bpmn:ConditionalEventDefinition' + } +}, { + label: 'Link Intermediate Catch Event', + actionName: 'replace-with-link-intermediate-catch', + className: 'bpmn-icon-intermediate-event-catch-link', + target: { + type: 'bpmn:IntermediateCatchEvent', + eventDefinitionType: 'bpmn:LinkEventDefinition', + eventDefinitionAttrs: { + name: '' + } + } +}, { + label: 'Link Intermediate Throw Event', + actionName: 'replace-with-link-intermediate-throw', + className: 'bpmn-icon-intermediate-event-throw-link', + target: { + type: 'bpmn:IntermediateThrowEvent', + eventDefinitionType: 'bpmn:LinkEventDefinition', + eventDefinitionAttrs: { + name: '' + } + } +}, { + label: 'Compensation Intermediate Throw Event', + actionName: 'replace-with-compensation-intermediate-throw', + className: 'bpmn-icon-intermediate-event-throw-compensation', + target: { + type: 'bpmn:IntermediateThrowEvent', + eventDefinitionType: 'bpmn:CompensateEventDefinition' + } +}, { + label: 'Signal Intermediate Catch Event', + actionName: 'replace-with-signal-intermediate-catch', + className: 'bpmn-icon-intermediate-event-catch-signal', + target: { + type: 'bpmn:IntermediateCatchEvent', + eventDefinitionType: 'bpmn:SignalEventDefinition' + } +}, { + label: 'Signal Intermediate Throw Event', + actionName: 'replace-with-signal-intermediate-throw', + className: 'bpmn-icon-intermediate-event-throw-signal', + target: { + type: 'bpmn:IntermediateThrowEvent', + eventDefinitionType: 'bpmn:SignalEventDefinition' + } +}]; +var END_EVENT = [{ + label: 'Start Event', + actionName: 'replace-with-none-start', + className: 'bpmn-icon-start-event-none', + target: { + type: 'bpmn:StartEvent' + } +}, { + label: 'Intermediate Throw Event', + actionName: 'replace-with-none-intermediate-throw', + className: 'bpmn-icon-intermediate-event-none', + target: { + type: 'bpmn:IntermediateThrowEvent' + } +}, { + label: 'End Event', + actionName: 'replace-with-none-end', + className: 'bpmn-icon-end-event-none', + target: { + type: 'bpmn:EndEvent' + } +}, { + label: 'Message End Event', + actionName: 'replace-with-message-end', + className: 'bpmn-icon-end-event-message', + target: { + type: 'bpmn:EndEvent', + eventDefinitionType: 'bpmn:MessageEventDefinition' + } +}, { + label: 'Escalation End Event', + actionName: 'replace-with-escalation-end', + className: 'bpmn-icon-end-event-escalation', + target: { + type: 'bpmn:EndEvent', + eventDefinitionType: 'bpmn:EscalationEventDefinition' + } +}, { + label: 'Error End Event', + actionName: 'replace-with-error-end', + className: 'bpmn-icon-end-event-error', + target: { + type: 'bpmn:EndEvent', + eventDefinitionType: 'bpmn:ErrorEventDefinition' + } +}, { + label: 'Cancel End Event', + actionName: 'replace-with-cancel-end', + className: 'bpmn-icon-end-event-cancel', + target: { + type: 'bpmn:EndEvent', + eventDefinitionType: 'bpmn:CancelEventDefinition' + } +}, { + label: 'Compensation End Event', + actionName: 'replace-with-compensation-end', + className: 'bpmn-icon-end-event-compensation', + target: { + type: 'bpmn:EndEvent', + eventDefinitionType: 'bpmn:CompensateEventDefinition' + } +}, { + label: 'Signal End Event', + actionName: 'replace-with-signal-end', + className: 'bpmn-icon-end-event-signal', + target: { + type: 'bpmn:EndEvent', + eventDefinitionType: 'bpmn:SignalEventDefinition' + } +}, { + label: 'Terminate End Event', + actionName: 'replace-with-terminate-end', + className: 'bpmn-icon-end-event-terminate', + target: { + type: 'bpmn:EndEvent', + eventDefinitionType: 'bpmn:TerminateEventDefinition' + } +}]; +var GATEWAY = [{ + label: 'Exclusive Gateway', + actionName: 'replace-with-exclusive-gateway', + className: 'bpmn-icon-gateway-xor', + target: { + type: 'bpmn:ExclusiveGateway' + } +}, { + label: 'Parallel Gateway', + actionName: 'replace-with-parallel-gateway', + className: 'bpmn-icon-gateway-parallel', + target: { + type: 'bpmn:ParallelGateway' + } +}, { + label: 'Inclusive Gateway', + actionName: 'replace-with-inclusive-gateway', + className: 'bpmn-icon-gateway-or', + target: { + type: 'bpmn:InclusiveGateway' + } +}, { + label: 'Complex Gateway', + actionName: 'replace-with-complex-gateway', + className: 'bpmn-icon-gateway-complex', + target: { + type: 'bpmn:ComplexGateway' + } +}, { + label: 'Event based Gateway', + actionName: 'replace-with-event-based-gateway', + className: 'bpmn-icon-gateway-eventbased', + target: { + type: 'bpmn:EventBasedGateway', + instantiate: false, + eventGatewayType: 'Exclusive' + } +} + +// Gateways deactivated until https://github.com/bpmn-io/bpmn-js/issues/194 +// { +// label: 'Event based instantiating Gateway', +// actionName: 'replace-with-exclusive-event-based-gateway', +// className: 'bpmn-icon-exclusive-event-based', +// target: { +// type: 'bpmn:EventBasedGateway' +// }, +// options: { +// businessObject: { instantiate: true, eventGatewayType: 'Exclusive' } +// } +// }, +// { +// label: 'Parallel Event based instantiating Gateway', +// actionName: 'replace-with-parallel-event-based-instantiate-gateway', +// className: 'bpmn-icon-parallel-event-based-instantiate-gateway', +// target: { +// type: 'bpmn:EventBasedGateway' +// }, +// options: { +// businessObject: { instantiate: true, eventGatewayType: 'Parallel' } +// } +// } +]; + +var SUBPROCESS_EXPANDED = [{ + label: 'Transaction', + actionName: 'replace-with-transaction', + className: 'bpmn-icon-transaction', + target: { + type: 'bpmn:Transaction', + isExpanded: true + } +}, { + label: 'Event Sub Process', + actionName: 'replace-with-event-subprocess', + className: 'bpmn-icon-event-subprocess-expanded', + target: { + type: 'bpmn:SubProcess', + triggeredByEvent: true, + isExpanded: true + } +}, { + label: 'Sub Process (collapsed)', + actionName: 'replace-with-collapsed-subprocess', + className: 'bpmn-icon-subprocess-collapsed', + target: { + type: 'bpmn:SubProcess', + isExpanded: false + } +}]; +var TRANSACTION = [{ + label: 'Sub Process', + actionName: 'replace-with-subprocess', + className: 'bpmn-icon-subprocess-expanded', + target: { + type: 'bpmn:SubProcess', + isExpanded: true + } +}, { + label: 'Event Sub Process', + actionName: 'replace-with-event-subprocess', + className: 'bpmn-icon-event-subprocess-expanded', + target: { + type: 'bpmn:SubProcess', + triggeredByEvent: true, + isExpanded: true + } +}]; +var EVENT_SUB_PROCESS = [{ + label: 'Sub Process', + actionName: 'replace-with-subprocess', + className: 'bpmn-icon-subprocess-expanded', + target: { + type: 'bpmn:SubProcess', + isExpanded: true + } +}, { + label: 'Transaction', + actionName: 'replace-with-transaction', + className: 'bpmn-icon-transaction', + target: { + type: 'bpmn:Transaction', + isExpanded: true + } +}]; +var TASK = [{ + label: 'Task', + actionName: 'replace-with-task', + className: 'bpmn-icon-task', + target: { + type: 'bpmn:Task' + } +}, { + label: 'Send Task', + actionName: 'replace-with-send-task', + className: 'bpmn-icon-send', + target: { + type: 'bpmn:SendTask' + } +}, { + label: 'Receive Task', + actionName: 'replace-with-receive-task', + className: 'bpmn-icon-receive', + target: { + type: 'bpmn:ReceiveTask' + } +}, { + label: 'User Task', + actionName: 'replace-with-user-task', + className: 'bpmn-icon-user', + target: { + type: 'bpmn:UserTask' + } +}, { + label: 'Manual Task', + actionName: 'replace-with-manual-task', + className: 'bpmn-icon-manual', + target: { + type: 'bpmn:ManualTask' + } +}, { + label: 'Business Rule Task', + actionName: 'replace-with-rule-task', + className: 'bpmn-icon-business-rule', + target: { + type: 'bpmn:BusinessRuleTask' + } +}, { + label: 'Service Task', + actionName: 'replace-with-service-task', + className: 'bpmn-icon-service', + target: { + type: 'bpmn:ServiceTask' + } +}, { + label: 'Script Task', + actionName: 'replace-with-script-task', + className: 'bpmn-icon-script', + target: { + type: 'bpmn:ScriptTask' + } +}, { + label: 'Call Activity', + actionName: 'replace-with-call-activity', + className: 'bpmn-icon-call-activity', + target: { + type: 'bpmn:CallActivity' + } +}, { + label: 'Sub Process (collapsed)', + actionName: 'replace-with-collapsed-subprocess', + className: 'bpmn-icon-subprocess-collapsed', + target: { + type: 'bpmn:SubProcess', + isExpanded: false + } +}, { + label: 'Sub Process (expanded)', + actionName: 'replace-with-expanded-subprocess', + className: 'bpmn-icon-subprocess-expanded', + target: { + type: 'bpmn:SubProcess', + isExpanded: true + } +}]; +var DATA_OBJECT_REFERENCE = [{ + label: 'Data Store Reference', + actionName: 'replace-with-data-store-reference', + className: 'bpmn-icon-data-store', + target: { + type: 'bpmn:DataStoreReference' + } +}]; +var DATA_STORE_REFERENCE = [{ + label: 'Data Object Reference', + actionName: 'replace-with-data-object-reference', + className: 'bpmn-icon-data-object', + target: { + type: 'bpmn:DataObjectReference' + } +}]; +var BOUNDARY_EVENT = [{ + label: 'Message Boundary Event', + actionName: 'replace-with-message-boundary', + className: 'bpmn-icon-intermediate-event-catch-message', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:MessageEventDefinition' + } +}, { + label: 'Timer Boundary Event', + actionName: 'replace-with-timer-boundary', + className: 'bpmn-icon-intermediate-event-catch-timer', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:TimerEventDefinition' + } +}, { + label: 'Escalation Boundary Event', + actionName: 'replace-with-escalation-boundary', + className: 'bpmn-icon-intermediate-event-catch-escalation', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:EscalationEventDefinition' + } +}, { + label: 'Conditional Boundary Event', + actionName: 'replace-with-conditional-boundary', + className: 'bpmn-icon-intermediate-event-catch-condition', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:ConditionalEventDefinition' + } +}, { + label: 'Error Boundary Event', + actionName: 'replace-with-error-boundary', + className: 'bpmn-icon-intermediate-event-catch-error', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:ErrorEventDefinition' + } +}, { + label: 'Cancel Boundary Event', + actionName: 'replace-with-cancel-boundary', + className: 'bpmn-icon-intermediate-event-catch-cancel', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:CancelEventDefinition' + } +}, { + label: 'Signal Boundary Event', + actionName: 'replace-with-signal-boundary', + className: 'bpmn-icon-intermediate-event-catch-signal', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:SignalEventDefinition' + } +}, { + label: 'Compensation Boundary Event', + actionName: 'replace-with-compensation-boundary', + className: 'bpmn-icon-intermediate-event-catch-compensation', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:CompensateEventDefinition' + } +}, { + label: 'Message Boundary Event (non-interrupting)', + actionName: 'replace-with-non-interrupting-message-boundary', + className: 'bpmn-icon-intermediate-event-catch-non-interrupting-message', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:MessageEventDefinition', + cancelActivity: false + } +}, { + label: 'Timer Boundary Event (non-interrupting)', + actionName: 'replace-with-non-interrupting-timer-boundary', + className: 'bpmn-icon-intermediate-event-catch-non-interrupting-timer', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:TimerEventDefinition', + cancelActivity: false + } +}, { + label: 'Escalation Boundary Event (non-interrupting)', + actionName: 'replace-with-non-interrupting-escalation-boundary', + className: 'bpmn-icon-intermediate-event-catch-non-interrupting-escalation', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:EscalationEventDefinition', + cancelActivity: false + } +}, { + label: 'Conditional Boundary Event (non-interrupting)', + actionName: 'replace-with-non-interrupting-conditional-boundary', + className: 'bpmn-icon-intermediate-event-catch-non-interrupting-condition', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:ConditionalEventDefinition', + cancelActivity: false + } +}, { + label: 'Signal Boundary Event (non-interrupting)', + actionName: 'replace-with-non-interrupting-signal-boundary', + className: 'bpmn-icon-intermediate-event-catch-non-interrupting-signal', + target: { + type: 'bpmn:BoundaryEvent', + eventDefinitionType: 'bpmn:SignalEventDefinition', + cancelActivity: false + } +}]; +var EVENT_SUB_PROCESS_START_EVENT = [{ + label: 'Message Start Event', + actionName: 'replace-with-message-start', + className: 'bpmn-icon-start-event-message', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:MessageEventDefinition' + } +}, { + label: 'Timer Start Event', + actionName: 'replace-with-timer-start', + className: 'bpmn-icon-start-event-timer', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:TimerEventDefinition' + } +}, { + label: 'Conditional Start Event', + actionName: 'replace-with-conditional-start', + className: 'bpmn-icon-start-event-condition', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:ConditionalEventDefinition' + } +}, { + label: 'Signal Start Event', + actionName: 'replace-with-signal-start', + className: 'bpmn-icon-start-event-signal', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:SignalEventDefinition' + } +}, { + label: 'Error Start Event', + actionName: 'replace-with-error-start', + className: 'bpmn-icon-start-event-error', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:ErrorEventDefinition' + } +}, { + label: 'Escalation Start Event', + actionName: 'replace-with-escalation-start', + className: 'bpmn-icon-start-event-escalation', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:EscalationEventDefinition' + } +}, { + label: 'Compensation Start Event', + actionName: 'replace-with-compensation-start', + className: 'bpmn-icon-start-event-compensation', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:CompensateEventDefinition' + } +}, { + label: 'Message Start Event (non-interrupting)', + actionName: 'replace-with-non-interrupting-message-start', + className: 'bpmn-icon-start-event-non-interrupting-message', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:MessageEventDefinition', + isInterrupting: false + } +}, { + label: 'Timer Start Event (non-interrupting)', + actionName: 'replace-with-non-interrupting-timer-start', + className: 'bpmn-icon-start-event-non-interrupting-timer', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:TimerEventDefinition', + isInterrupting: false + } +}, { + label: 'Conditional Start Event (non-interrupting)', + actionName: 'replace-with-non-interrupting-conditional-start', + className: 'bpmn-icon-start-event-non-interrupting-condition', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:ConditionalEventDefinition', + isInterrupting: false + } +}, { + label: 'Signal Start Event (non-interrupting)', + actionName: 'replace-with-non-interrupting-signal-start', + className: 'bpmn-icon-start-event-non-interrupting-signal', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:SignalEventDefinition', + isInterrupting: false + } +}, { + label: 'Escalation Start Event (non-interrupting)', + actionName: 'replace-with-non-interrupting-escalation-start', + className: 'bpmn-icon-start-event-non-interrupting-escalation', + target: { + type: 'bpmn:StartEvent', + eventDefinitionType: 'bpmn:EscalationEventDefinition', + isInterrupting: false + } +}]; +var SEQUENCE_FLOW = [{ + label: 'Sequence Flow', + actionName: 'replace-with-sequence-flow', + className: 'bpmn-icon-connection' +}, { + label: 'Default Flow', + actionName: 'replace-with-default-flow', + className: 'bpmn-icon-default-flow' +}, { + label: 'Conditional Flow', + actionName: 'replace-with-conditional-flow', + className: 'bpmn-icon-conditional-flow' +}]; +var PARTICIPANT = [{ + label: 'Expanded Pool', + actionName: 'replace-with-expanded-pool', + className: 'bpmn-icon-participant', + target: { + type: 'bpmn:Participant', + isExpanded: true + } +}, { + label: function (element) { + var label = 'Empty Pool'; + if (element.children && element.children.length) { + label += ' (removes content)'; + } + return label; + }, + actionName: 'replace-with-collapsed-pool', + // TODO(@janstuemmel): maybe design new icon + className: 'bpmn-icon-lane', + target: { + type: 'bpmn:Participant', + isExpanded: false + } +}]; + +/***/ }), + +/***/ 95872: +/*!************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/replace/index.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _copy_paste__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../copy-paste */ 82375); +/* harmony import */ var diagram_js_lib_features_replace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/replace */ 77740); +/* harmony import */ var diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/selection */ 26334); +/* harmony import */ var _BpmnReplace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BpmnReplace */ 30783); + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_copy_paste__WEBPACK_IMPORTED_MODULE_0__["default"], diagram_js_lib_features_replace__WEBPACK_IMPORTED_MODULE_1__["default"], diagram_js_lib_features_selection__WEBPACK_IMPORTED_MODULE_2__["default"]], + bpmnReplace: ['type', _BpmnReplace__WEBPACK_IMPORTED_MODULE_3__["default"]] +}); + +/***/ }), + +/***/ 14499: +/*!**************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/rules/BpmnRules.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnRules) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ 4525); +/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ 98405); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/LabelUtil */ 81454); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/DiUtil */ 55441); +/* harmony import */ var diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/rules/RuleProvider */ 19812); +/* harmony import */ var _snapping_BpmnSnappingUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../snapping/BpmnSnappingUtil */ 2859); + + + + + + + + + +/** + * BPMN specific modeling rule + */ +function BpmnRules(eventBus) { + diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnRules, diagram_js_lib_features_rules_RuleProvider__WEBPACK_IMPORTED_MODULE_1__["default"]); +BpmnRules.$inject = ['eventBus']; +BpmnRules.prototype.init = function () { + this.addRule('connection.start', function (context) { + var source = context.source; + return canStartConnection(source); + }); + this.addRule('connection.create', function (context) { + var source = context.source, + target = context.target, + hints = context.hints || {}, + targetParent = hints.targetParent, + targetAttach = hints.targetAttach; + + // don't allow incoming connections on + // newly created boundary events + // to boundary events + if (targetAttach) { + return false; + } + + // temporarily set target parent for scoping + // checks to work + if (targetParent) { + target.parent = targetParent; + } + try { + return canConnect(source, target); + } finally { + // unset temporary target parent + if (targetParent) { + target.parent = null; + } + } + }); + this.addRule('connection.reconnect', function (context) { + var connection = context.connection, + source = context.source, + target = context.target; + return canConnect(source, target, connection); + }); + this.addRule('connection.updateWaypoints', function (context) { + return { + type: context.connection.type + }; + }); + this.addRule('shape.resize', function (context) { + var shape = context.shape, + newBounds = context.newBounds; + return canResize(shape, newBounds); + }); + this.addRule('elements.create', function (context) { + var elements = context.elements, + position = context.position, + target = context.target; + if (isConnection(target) && !canInsert(elements, target, position)) { + return false; + } + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.every)(elements, function (element) { + if (isConnection(element)) { + return canConnect(element.source, element.target, element); + } + if (element.host) { + return canAttach(element, element.host, null, position); + } + return canCreate(element, target, null, position); + }); + }); + this.addRule('elements.move', function (context) { + var target = context.target, + shapes = context.shapes, + position = context.position; + return canAttach(shapes, target, null, position) || canReplace(shapes, target, position) || canMove(shapes, target, position) || canInsert(shapes, target, position); + }); + this.addRule('shape.create', function (context) { + return canCreate(context.shape, context.target, context.source, context.position); + }); + this.addRule('shape.attach', function (context) { + return canAttach(context.shape, context.target, null, context.position); + }); + this.addRule('element.copy', function (context) { + var element = context.element, + elements = context.elements; + return canCopy(elements, element); + }); +}; +BpmnRules.prototype.canConnectMessageFlow = canConnectMessageFlow; +BpmnRules.prototype.canConnectSequenceFlow = canConnectSequenceFlow; +BpmnRules.prototype.canConnectDataAssociation = canConnectDataAssociation; +BpmnRules.prototype.canConnectAssociation = canConnectAssociation; +BpmnRules.prototype.canMove = canMove; +BpmnRules.prototype.canAttach = canAttach; +BpmnRules.prototype.canReplace = canReplace; +BpmnRules.prototype.canDrop = canDrop; +BpmnRules.prototype.canInsert = canInsert; +BpmnRules.prototype.canCreate = canCreate; +BpmnRules.prototype.canConnect = canConnect; +BpmnRules.prototype.canResize = canResize; +BpmnRules.prototype.canCopy = canCopy; + +/** + * Utility functions for rule checking + */ + +/** + * Checks if given element can be used for starting connection. + * + * @param {Element} source + * @return {boolean} + */ +function canStartConnection(element) { + if (nonExistingOrLabel(element)) { + return null; + } + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(element, ['bpmn:FlowNode', 'bpmn:InteractionNode', 'bpmn:DataObjectReference', 'bpmn:DataStoreReference', 'bpmn:Group', 'bpmn:TextAnnotation']); +} +function nonExistingOrLabel(element) { + return !element || (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.isLabel)(element); +} +function isSame(a, b) { + return a === b; +} +function getOrganizationalParent(element) { + do { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Process')) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(element); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Participant')) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(element).processRef || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(element); + } + } while (element = element.parent); +} +function isTextAnnotation(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:TextAnnotation'); +} +function isGroup(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Group') && !element.labelTarget; +} +function isCompensationBoundary(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:BoundaryEvent') && hasEventDefinition(element, 'bpmn:CompensateEventDefinition'); +} +function isForCompensation(e) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(e).isForCompensation; +} +function isSameOrganization(a, b) { + var parentA = getOrganizationalParent(a), + parentB = getOrganizationalParent(b); + return parentA === parentB; +} +function isMessageFlowSource(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:InteractionNode') && !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:BoundaryEvent') && (!(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Event') || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:ThrowEvent') && hasEventDefinitionOrNone(element, 'bpmn:MessageEventDefinition')); +} +function isMessageFlowTarget(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:InteractionNode') && !isForCompensation(element) && (!(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Event') || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:CatchEvent') && hasEventDefinitionOrNone(element, 'bpmn:MessageEventDefinition')) && !((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:BoundaryEvent') && !hasEventDefinition(element, 'bpmn:MessageEventDefinition')); +} +function getScopeParent(element) { + var parent = element; + while (parent = parent.parent) { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(parent, 'bpmn:FlowElementsContainer')) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(parent); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(parent, 'bpmn:Participant')) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(parent).processRef; + } + } + return null; +} +function isSameScope(a, b) { + var scopeParentA = getScopeParent(a), + scopeParentB = getScopeParent(b); + return scopeParentA === scopeParentB; +} +function hasEventDefinition(element, eventDefinition) { + var bo = (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(element); + return !!(0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(bo.eventDefinitions || [], function (definition) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(definition, eventDefinition); + }); +} +function hasEventDefinitionOrNone(element, eventDefinition) { + var bo = (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(element); + return (bo.eventDefinitions || []).every(function (definition) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(definition, eventDefinition); + }); +} +function isSequenceFlowSource(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:FlowNode') && !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:EndEvent') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isEventSubProcess)(element) && !((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:IntermediateThrowEvent') && hasEventDefinition(element, 'bpmn:LinkEventDefinition')) && !isCompensationBoundary(element) && !isForCompensation(element); +} +function isSequenceFlowTarget(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:FlowNode') && !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:StartEvent') && !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:BoundaryEvent') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isEventSubProcess)(element) && !((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:IntermediateCatchEvent') && hasEventDefinition(element, 'bpmn:LinkEventDefinition')) && !isForCompensation(element); +} +function isEventBasedTarget(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:ReceiveTask') || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:IntermediateCatchEvent') && (hasEventDefinition(element, 'bpmn:MessageEventDefinition') || hasEventDefinition(element, 'bpmn:TimerEventDefinition') || hasEventDefinition(element, 'bpmn:ConditionalEventDefinition') || hasEventDefinition(element, 'bpmn:SignalEventDefinition')); +} +function isConnection(element) { + return element.waypoints; +} +function getParents(element) { + var parents = []; + while (element) { + element = element.parent; + if (element) { + parents.push(element); + } + } + return parents; +} +function isParent(possibleParent, element) { + var allParents = getParents(element); + return allParents.indexOf(possibleParent) !== -1; +} +function canConnect(source, target, connection) { + if (nonExistingOrLabel(source) || nonExistingOrLabel(target)) { + return null; + } + if (!(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(connection, 'bpmn:DataAssociation')) { + if (canConnectMessageFlow(source, target)) { + return { + type: 'bpmn:MessageFlow' + }; + } + if (canConnectSequenceFlow(source, target)) { + return { + type: 'bpmn:SequenceFlow' + }; + } + } + var connectDataAssociation = canConnectDataAssociation(source, target); + if (connectDataAssociation) { + return connectDataAssociation; + } + if (isCompensationBoundary(source) && isForCompensation(target)) { + return { + type: 'bpmn:Association', + associationDirection: 'One' + }; + } + if (canConnectAssociation(source, target)) { + return { + type: 'bpmn:Association' + }; + } + return false; +} + +/** + * Can an element be dropped into the target element + * + * @return {boolean} + */ +function canDrop(element, target, position) { + // can move labels and groups everywhere + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.isLabel)(element) || isGroup(element)) { + return true; + } + + // disallow to create elements on collapsed pools + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:Participant') && !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(target)) { + return false; + } + + // allow to create new participants on + // existing collaboration and process diagrams + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Participant')) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:Process') || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:Collaboration'); + } + + // allow moving DataInput / DataOutput within its original container only + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(element, ['bpmn:DataInput', 'bpmn:DataOutput'])) { + if (element.parent) { + return target === element.parent; + } + } + + // allow creating lanes on participants and other lanes only + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Lane')) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:Participant') || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:Lane'); + } + + // disallow dropping boundary events which cannot replace with intermediate event + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:BoundaryEvent') && !isDroppableBoundaryEvent(element)) { + return false; + } + + // drop flow elements onto flow element containers + // and participants + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:FlowElement') && !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:DataStoreReference')) { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:FlowElementsContainer')) { + return (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(target); + } + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(target, ['bpmn:Participant', 'bpmn:Lane']); + } + + // disallow dropping data store reference if there is no process to append to + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:DataStoreReference') && (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:Collaboration')) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.some)((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(target).get('participants'), function (participant) { + return !!participant.get('processRef'); + }); + } + + // account for the fact that data associations are always + // rendered and moved to top (Process or Collaboration level) + // + // artifacts may be placed wherever, too + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(element, ['bpmn:Artifact', 'bpmn:DataAssociation', 'bpmn:DataStoreReference'])) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(target, ['bpmn:Collaboration', 'bpmn:Lane', 'bpmn:Participant', 'bpmn:Process', 'bpmn:SubProcess']); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:MessageFlow')) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:Collaboration') || element.source.parent == target || element.target.parent == target; + } + return false; +} +function isDroppableBoundaryEvent(event) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(event).cancelActivity && (hasNoEventDefinition(event) || hasCommonBoundaryIntermediateEventDefinition(event)); +} +function isBoundaryEvent(element) { + return !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.isLabel)(element) && (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:BoundaryEvent'); +} +function isLane(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Lane'); +} + +/** + * We treat IntermediateThrowEvents as boundary events during create, + * this must be reflected in the rules. + */ +function isBoundaryCandidate(element) { + if (isBoundaryEvent(element)) { + return true; + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:IntermediateThrowEvent') && hasNoEventDefinition(element)) { + return true; + } + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:IntermediateCatchEvent') && hasCommonBoundaryIntermediateEventDefinition(element); +} +function hasNoEventDefinition(element) { + var bo = (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.getBusinessObject)(element); + return bo && !(bo.eventDefinitions && bo.eventDefinitions.length); +} +function hasCommonBoundaryIntermediateEventDefinition(element) { + return hasOneOfEventDefinitions(element, ['bpmn:MessageEventDefinition', 'bpmn:TimerEventDefinition', 'bpmn:SignalEventDefinition', 'bpmn:ConditionalEventDefinition']); +} +function hasOneOfEventDefinitions(element, eventDefinitions) { + return eventDefinitions.some(function (definition) { + return hasEventDefinition(element, definition); + }); +} +function isReceiveTaskAfterEventBasedGateway(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:ReceiveTask') && (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(element.incoming, function (incoming) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(incoming.source, 'bpmn:EventBasedGateway'); + }); +} +function canAttach(elements, target, source, position) { + if (!Array.isArray(elements)) { + elements = [elements]; + } + + // only (re-)attach one element at a time + if (elements.length !== 1) { + return false; + } + var element = elements[0]; + + // do not attach labels + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.isLabel)(element)) { + return false; + } + + // only handle boundary events + if (!isBoundaryCandidate(element)) { + return false; + } + + // disallow drop on event sub processes + if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isEventSubProcess)(target)) { + return false; + } + + // only allow drop on non compensation activities + if (!(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:Activity') || isForCompensation(target)) { + return false; + } + + // only attach to subprocess border + if (position && !(0,_snapping_BpmnSnappingUtil__WEBPACK_IMPORTED_MODULE_6__.getBoundaryAttachment)(position, target)) { + return false; + } + + // do not attach on receive tasks after event based gateways + if (isReceiveTaskAfterEventBasedGateway(target)) { + return false; + } + return 'attach'; +} + +/** + * Defines how to replace elements for a given target. + * + * Returns an array containing all elements which will be replaced. + * + * @example + * + * [{ id: 'IntermediateEvent_2', + * type: 'bpmn:StartEvent' + * }, + * { id: 'IntermediateEvent_5', + * type: 'bpmn:EndEvent' + * }] + * + * @param {Array} elements + * @param {Object} target + * + * @return {Object} an object containing all elements which have to be replaced + */ +function canReplace(elements, target, position) { + if (!target) { + return false; + } + var canExecute = { + replacements: [] + }; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(elements, function (element) { + if (!(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isEventSubProcess)(target)) { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:StartEvent') && element.type !== 'label' && canDrop(element, target)) { + // replace a non-interrupting start event by a blank interrupting start event + // when the target is not an event sub process + if (!(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isInterrupting)(element)) { + canExecute.replacements.push({ + oldElementId: element.id, + newElementType: 'bpmn:StartEvent' + }); + } + + // replace an error/escalation/compensate start event by a blank interrupting start event + // when the target is not an event sub process + if ((0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.hasErrorEventDefinition)(element) || (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.hasEscalationEventDefinition)(element) || (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.hasCompensateEventDefinition)(element)) { + canExecute.replacements.push({ + oldElementId: element.id, + newElementType: 'bpmn:StartEvent' + }); + } + + // replace a typed start event by a blank interrupting start event + // when the target is a sub process but not an event sub process + if (hasOneOfEventDefinitions(element, ['bpmn:MessageEventDefinition', 'bpmn:TimerEventDefinition', 'bpmn:SignalEventDefinition', 'bpmn:ConditionalEventDefinition']) && (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:SubProcess')) { + canExecute.replacements.push({ + oldElementId: element.id, + newElementType: 'bpmn:StartEvent' + }); + } + } + } + if (!(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(target, 'bpmn:Transaction')) { + if (hasEventDefinition(element, 'bpmn:CancelEventDefinition') && element.type !== 'label') { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:EndEvent') && canDrop(element, target)) { + canExecute.replacements.push({ + oldElementId: element.id, + newElementType: 'bpmn:EndEvent' + }); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:BoundaryEvent') && canAttach(element, target, null, position)) { + canExecute.replacements.push({ + oldElementId: element.id, + newElementType: 'bpmn:BoundaryEvent' + }); + } + } + } + }); + return canExecute.replacements.length ? canExecute : false; +} +function canMove(elements, target) { + // do not move selection containing lanes + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.some)(elements, isLane)) { + return false; + } + + // allow default move check to start move operation + if (!target) { + return true; + } + return elements.every(function (element) { + return canDrop(element, target); + }); +} +function canCreate(shape, target, source, position) { + if (!target) { + return false; + } + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.isLabel)(shape) || isGroup(shape)) { + return true; + } + if (isSame(source, target)) { + return false; + } + + // ensure we do not drop the element + // into source + if (source && isParent(source, target)) { + return false; + } + return canDrop(shape, target, position) || canInsert(shape, target, position); +} +function canResize(shape, newBounds) { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:SubProcess')) { + return (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_5__.isExpanded)(shape) && (!newBounds || newBounds.width >= 100 && newBounds.height >= 80); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:Lane')) { + return !newBounds || newBounds.width >= 130 && newBounds.height >= 60; + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:Participant')) { + return !newBounds || newBounds.width >= 250 && newBounds.height >= 50; + } + if (isTextAnnotation(shape)) { + return true; + } + if (isGroup(shape)) { + return true; + } + return false; +} + +/** + * Check, whether one side of the relationship + * is a text annotation. + */ +function isOneTextAnnotation(source, target) { + var sourceTextAnnotation = isTextAnnotation(source), + targetTextAnnotation = isTextAnnotation(target); + return (sourceTextAnnotation || targetTextAnnotation) && sourceTextAnnotation !== targetTextAnnotation; +} +function canConnectAssociation(source, target) { + // do not connect connections + if (isConnection(source) || isConnection(target)) { + return false; + } + + // compensation boundary events are exception + if (isCompensationBoundary(source) && isForCompensation(target)) { + return true; + } + + // don't connect parent <-> child + if (isParent(target, source) || isParent(source, target)) { + return false; + } + + // allow connection of associations between and + if (isOneTextAnnotation(source, target)) { + return true; + } + + // can connect associations where we can connect + // data associations, too (!) + return !!canConnectDataAssociation(source, target); +} +function canConnectMessageFlow(source, target) { + // during connect user might move mouse out of canvas + // https://github.com/bpmn-io/bpmn-js/issues/1033 + if (getRootElement(source) && !getRootElement(target)) { + return false; + } + return isMessageFlowSource(source) && isMessageFlowTarget(target) && !isSameOrganization(source, target); +} +function canConnectSequenceFlow(source, target) { + if (isEventBasedTarget(target) && target.incoming.length > 0 && areOutgoingEventBasedGatewayConnections(target.incoming) && !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(source, 'bpmn:EventBasedGateway')) { + return false; + } + return isSequenceFlowSource(source) && isSequenceFlowTarget(target) && isSameScope(source, target) && !((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(source, 'bpmn:EventBasedGateway') && !isEventBasedTarget(target)); +} +function canConnectDataAssociation(source, target) { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(source, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference']) && (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(target, ['bpmn:Activity', 'bpmn:ThrowEvent'])) { + return { + type: 'bpmn:DataInputAssociation' + }; + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(target, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference']) && (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(source, ['bpmn:Activity', 'bpmn:CatchEvent'])) { + return { + type: 'bpmn:DataOutputAssociation' + }; + } + return false; +} +function canInsert(shape, flow, position) { + if (!flow) { + return false; + } + if (Array.isArray(shape)) { + if (shape.length !== 1) { + return false; + } + shape = shape[0]; + } + if (flow.source === shape || flow.target === shape) { + return false; + } + + // return true if we can drop on the + // underlying flow parent + // + // at this point we are not really able to talk + // about connection rules (yet) + + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.isAny)(flow, ['bpmn:SequenceFlow', 'bpmn:MessageFlow']) && !(0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.isLabel)(flow) && (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:FlowNode') && !(0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(shape, 'bpmn:BoundaryEvent') && canDrop(shape, flow.parent, position); +} +function includes(elements, element) { + return elements && element && elements.indexOf(element) !== -1; +} +function canCopy(elements, element) { + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_4__.isLabel)(element)) { + return true; + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(element, 'bpmn:Lane') && !includes(elements, element.parent)) { + return false; + } + return true; +} +function isOutgoingEventBasedGatewayConnection(connection) { + if (connection && connection.source) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_3__.is)(connection.source, 'bpmn:EventBasedGateway'); + } +} +function areOutgoingEventBasedGatewayConnections(connections) { + connections = connections || []; + return connections.some(isOutgoingEventBasedGatewayConnection); +} +function getRootElement(element) { + return (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_7__.getParent)(element, 'bpmn:Process') || (0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_7__.getParent)(element, 'bpmn:Collaboration'); +} + +/***/ }), + +/***/ 56859: +/*!**********************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/rules/index.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_rules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/rules */ 8807); +/* harmony import */ var _BpmnRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnRules */ 14499); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_rules__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['bpmnRules'], + bpmnRules: ['type', _BpmnRules__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 33086: +/*!************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/search/BpmnSearchProvider.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnSearchProvider) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../label-editing/LabelUtil */ 89497); + + + +/** + * Provides ability to search through BPMN elements + */ +function BpmnSearchProvider(elementRegistry, searchPad, canvas) { + this._elementRegistry = elementRegistry; + this._canvas = canvas; + searchPad.registerProvider(this); +} +BpmnSearchProvider.$inject = ['elementRegistry', 'searchPad', 'canvas']; + +/** + * Finds all elements that match given pattern + * + * : + * { + * primaryTokens: >, + * secondaryTokens: >, + * element: + * } + * + * : + * { + * normal|matched: + * } + * + * @param {string} pattern + * @return {Array} + */ +BpmnSearchProvider.prototype.find = function (pattern) { + var rootElement = this._canvas.getRootElement(); + var elements = this._elementRegistry.filter(function (element) { + if (element.labelTarget) { + return false; + } + return true; + }); + + // do not include root element + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function (element) { + return element !== rootElement; + }); + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(elements, function (element) { + return { + primaryTokens: matchAndSplit((0,_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.getLabel)(element), pattern), + secondaryTokens: matchAndSplit(element.id, pattern), + element: element + }; + }); + + // exclude non-matched elements + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function (element) { + return hasMatched(element.primaryTokens) || hasMatched(element.secondaryTokens); + }); + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(elements, function (element) { + return (0,_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_1__.getLabel)(element.element) + element.element.id; + }); + return elements; +}; +function hasMatched(tokens) { + var matched = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(tokens, function (t) { + return !!t.matched; + }); + return matched.length > 0; +} +function matchAndSplit(text, pattern) { + var tokens = [], + originalText = text; + if (!text) { + return tokens; + } + text = text.toLowerCase(); + pattern = pattern.toLowerCase(); + var i = text.indexOf(pattern); + if (i > -1) { + if (i !== 0) { + tokens.push({ + normal: originalText.substr(0, i) + }); + } + tokens.push({ + matched: originalText.substr(i, pattern.length) + }); + if (pattern.length + i < text.length) { + tokens.push({ + normal: originalText.substr(pattern.length + i, text.length) + }); + } + } else { + tokens.push({ + normal: originalText + }); + } + return tokens; +} + +/***/ }), + +/***/ 51652: +/*!***********************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/search/index.js ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_search_pad__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/search-pad */ 72784); +/* harmony import */ var _BpmnSearchProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnSearchProvider */ 33086); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_search_pad__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['bpmnSearch'], + bpmnSearch: ['type', _BpmnSearchProvider__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 1097: +/*!***************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/snapping/BpmnConnectSnapping.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnConnectSnapping) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/snapping/SnapUtil */ 99298); +/* harmony import */ var diagram_js_lib_features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/keyboard/KeyboardUtil */ 13488); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var _modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../modeling/util/ModelingUtil */ 4525); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ 54796); + + + + + + +var HIGHER_PRIORITY = 1250; +var BOUNDARY_TO_HOST_THRESHOLD = 40; +var TARGET_BOUNDS_PADDING = 20, + TASK_BOUNDS_PADDING = 10; +var TARGET_CENTER_PADDING = 20; +var AXES = ['x', 'y']; +var abs = Math.abs; + +/** + * Snap during connect. + * + * @param {EventBus} eventBus + */ +function BpmnConnectSnapping(eventBus) { + eventBus.on(['connect.hover', 'connect.move', 'connect.end'], HIGHER_PRIORITY, function (event) { + var context = event.context, + canExecute = context.canExecute, + start = context.start, + hover = context.hover, + source = context.source, + target = context.target; + + // do NOT snap on CMD + if (event.originalEvent && (0,diagram_js_lib_features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd)(event.originalEvent)) { + return; + } + if (!context.initialConnectionStart) { + context.initialConnectionStart = context.connectionStart; + } + + // snap hover + if (canExecute && hover) { + snapToShape(event, hover, getTargetBoundsPadding(hover)); + } + if (hover && isAnyType(canExecute, ['bpmn:Association', 'bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation', 'bpmn:SequenceFlow'])) { + context.connectionStart = (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(start); + + // snap hover + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(hover, ['bpmn:Event', 'bpmn:Gateway'])) { + snapToPosition(event, (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(hover)); + } + + // snap hover + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.isAny)(hover, ['bpmn:Task', 'bpmn:SubProcess'])) { + snapToTargetMid(event, hover); + } + + // snap source and target + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(source, 'bpmn:BoundaryEvent') && target === source.host) { + snapBoundaryEventLoop(event); + } + } else if (isType(canExecute, 'bpmn:MessageFlow')) { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(start, 'bpmn:Event')) { + // snap start + context.connectionStart = (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(start); + } + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(hover, 'bpmn:Event')) { + // snap hover + snapToPosition(event, (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(hover)); + } + } else { + // un-snap source + context.connectionStart = context.initialConnectionStart; + } + }); +} +BpmnConnectSnapping.$inject = ['eventBus']; + +// helpers ////////// + +// snap to target if event in target +function snapToShape(event, target, padding) { + AXES.forEach(function (axis) { + var dimensionForAxis = getDimensionForAxis(axis, target); + if (event[axis] < target[axis] + padding) { + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, axis, target[axis] + padding); + } else if (event[axis] > target[axis] + dimensionForAxis - padding) { + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, axis, target[axis] + dimensionForAxis - padding); + } + }); +} + +// snap to target mid if event in target mid +function snapToTargetMid(event, target) { + var targetMid = (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(target); + AXES.forEach(function (axis) { + if (isMid(event, target, axis)) { + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, axis, targetMid[axis]); + } + }); +} + +// snap to prevent loop overlapping boundary event +function snapBoundaryEventLoop(event) { + var context = event.context, + source = context.source, + target = context.target; + if (isReverse(context)) { + return; + } + var sourceMid = (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(source), + orientation = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.getOrientation)(sourceMid, target, -10), + axes = []; + if (/top|bottom/.test(orientation)) { + axes.push('x'); + } + if (/left|right/.test(orientation)) { + axes.push('y'); + } + axes.forEach(function (axis) { + var coordinate = event[axis], + newCoordinate; + if (abs(coordinate - sourceMid[axis]) < BOUNDARY_TO_HOST_THRESHOLD) { + if (coordinate > sourceMid[axis]) { + newCoordinate = sourceMid[axis] + BOUNDARY_TO_HOST_THRESHOLD; + } else { + newCoordinate = sourceMid[axis] - BOUNDARY_TO_HOST_THRESHOLD; + } + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, axis, newCoordinate); + } + }); +} +function snapToPosition(event, position) { + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'x', position.x); + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'y', position.y); +} +function isType(attrs, type) { + return attrs && attrs.type === type; +} +function isAnyType(attrs, types) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.some)(types, function (type) { + return isType(attrs, type); + }); +} +function getDimensionForAxis(axis, element) { + return axis === 'x' ? element.width : element.height; +} +function getTargetBoundsPadding(target) { + if ((0,_modeling_util_ModelingUtil__WEBPACK_IMPORTED_MODULE_2__.is)(target, 'bpmn:Task')) { + return TASK_BOUNDS_PADDING; + } else { + return TARGET_BOUNDS_PADDING; + } +} +function isMid(event, target, axis) { + return event[axis] > target[axis] + TARGET_CENTER_PADDING && event[axis] < target[axis] + getDimensionForAxis(axis, target) - TARGET_CENTER_PADDING; +} +function isReverse(context) { + var hover = context.hover, + source = context.source; + return hover && source && hover === source; +} + +/***/ }), + +/***/ 8530: +/*!******************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/snapping/BpmnCreateMoveSnapping.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnCreateMoveSnapping) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/snapping/CreateMoveSnapping */ 23111); +/* harmony import */ var diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! diagram-js/lib/features/snapping/SnapUtil */ 99298); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/DiUtil */ 55441); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/ModelUtil */ 4525); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var _BpmnSnappingUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BpmnSnappingUtil */ 2859); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 54796); + + + + + + + + +var HIGH_PRIORITY = 1500; + +/** + * Snap during create and move. + * + * @param {EventBus} eventBus + * @param {Injector} injector + */ +function BpmnCreateMoveSnapping(eventBus, injector) { + injector.invoke(diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_1__["default"], this); + + // creating first participant + eventBus.on(['create.move', 'create.end'], HIGH_PRIORITY, setSnappedIfConstrained); + + // snap boundary events + eventBus.on(['create.move', 'create.end', 'shape.move.move', 'shape.move.end'], HIGH_PRIORITY, function (event) { + var context = event.context, + canExecute = context.canExecute, + target = context.target; + var canAttach = canExecute && (canExecute === 'attach' || canExecute.attach); + if (canAttach && !(0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.isSnapped)(event)) { + snapBoundaryEvent(event, target); + } + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BpmnCreateMoveSnapping, diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_1__["default"]); +BpmnCreateMoveSnapping.$inject = ['eventBus', 'injector']; +BpmnCreateMoveSnapping.prototype.initSnap = function (event) { + var snapContext = diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.initSnap.call(this, event); + var shape = event.shape; + var isMove = !!this._elementRegistry.get(shape.id); + + // snap to docking points + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(shape.outgoing, function (connection) { + var docking = connection.waypoints[0]; + docking = docking.original || docking; + snapContext.setSnapOrigin(connection.id + '-docking', getDockingSnapOrigin(docking, isMove, event)); + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(shape.incoming, function (connection) { + var docking = connection.waypoints[connection.waypoints.length - 1]; + docking = docking.original || docking; + snapContext.setSnapOrigin(connection.id + '-docking', getDockingSnapOrigin(docking, isMove, event)); + }); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(shape, 'bpmn:Participant')) { + // snap to borders with higher priority + snapContext.setSnapLocations(['top-left', 'bottom-right', 'mid']); + } + return snapContext; +}; +BpmnCreateMoveSnapping.prototype.addSnapTargetPoints = function (snapPoints, shape, target) { + diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.addSnapTargetPoints.call(this, snapPoints, shape, target); + var snapTargets = this.getSnapTargets(shape, target); + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(snapTargets, function (snapTarget) { + // handle TRBL alignment + // + // * with container elements + // * with text annotations + if (isContainer(snapTarget) || areAll([shape, snapTarget], 'bpmn:TextAnnotation')) { + snapPoints.add('top-left', (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.topLeft)(snapTarget)); + snapPoints.add('bottom-right', (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.bottomRight)(snapTarget)); + } + }); + var elementRegistry = this._elementRegistry; + + // snap to docking points if not create mode + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(shape.incoming, function (connection) { + if (elementRegistry.get(shape.id)) { + if (!includes(snapTargets, connection.source)) { + snapPoints.add('mid', (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(connection.source)); + } + var docking = connection.waypoints[0]; + snapPoints.add(connection.id + '-docking', docking.original || docking); + } + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(shape.outgoing, function (connection) { + if (elementRegistry.get(shape.id)) { + if (!includes(snapTargets, connection.target)) { + snapPoints.add('mid', (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(connection.target)); + } + var docking = connection.waypoints[connection.waypoints.length - 1]; + snapPoints.add(connection.id + '-docking', docking.original || docking); + } + }); + + // add sequence flow parents as snap targets + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(target, 'bpmn:SequenceFlow')) { + snapPoints = this.addSnapTargetPoints(snapPoints, shape, target.parent); + } + return snapPoints; +}; +BpmnCreateMoveSnapping.prototype.getSnapTargets = function (shape, target) { + return diagram_js_lib_features_snapping_CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.getSnapTargets.call(this, shape, target).filter(function (snapTarget) { + // do not snap to lanes + return !(0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(snapTarget, 'bpmn:Lane'); + }); +}; + +// helpers ////////// + +function snapBoundaryEvent(event, target) { + var targetTRBL = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.asTRBL)(target); + var direction = (0,_BpmnSnappingUtil__WEBPACK_IMPORTED_MODULE_6__.getBoundaryAttachment)(event, target); + var context = event.context, + shape = context.shape; + var offset; + if (shape.parent) { + offset = { + x: 0, + y: 0 + }; + } else { + offset = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.getMid)(shape); + } + if (/top/.test(direction)) { + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'y', targetTRBL.top - offset.y); + } else if (/bottom/.test(direction)) { + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'y', targetTRBL.bottom - offset.y); + } + if (/left/.test(direction)) { + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'x', targetTRBL.left - offset.x); + } else if (/right/.test(direction)) { + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'x', targetTRBL.right - offset.x); + } +} +function areAll(elements, type) { + return elements.every(function (el) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(el, type); + }); +} +function isContainer(element) { + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:SubProcess') && (0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_7__.isExpanded)(element)) { + return true; + } + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_4__.is)(element, 'bpmn:Participant'); +} +function setSnappedIfConstrained(event) { + var context = event.context, + createConstraints = context.createConstraints; + if (!createConstraints) { + return; + } + var top = createConstraints.top, + right = createConstraints.right, + bottom = createConstraints.bottom, + left = createConstraints.left; + if (left && left >= event.x || right && right <= event.x) { + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'x', event.x); + } + if (top && top >= event.y || bottom && bottom <= event.y) { + (0,diagram_js_lib_features_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, 'y', event.y); + } +} +function includes(array, value) { + return array.indexOf(value) !== -1; +} +function getDockingSnapOrigin(docking, isMove, event) { + return isMove ? { + x: docking.x - event.x, + y: docking.y - event.y + } : { + x: docking.x, + y: docking.y + }; +} + +/***/ }), + +/***/ 2859: +/*!************************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/snapping/BpmnSnappingUtil.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getBoundaryAttachment: () => (/* binding */ getBoundaryAttachment) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); + +function getBoundaryAttachment(position, targetBounds) { + var orientation = (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getOrientation)(position, targetBounds, -15); + if (orientation !== 'intersect') { + return orientation; + } else { + return null; + } +} + +/***/ }), + +/***/ 49652: +/*!*************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/features/snapping/index.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _BpmnConnectSnapping__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnConnectSnapping */ 1097); +/* harmony import */ var _BpmnCreateMoveSnapping__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BpmnCreateMoveSnapping */ 8530); +/* harmony import */ var diagram_js_lib_features_snapping__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/features/snapping */ 22760); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_snapping__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['connectSnapping', 'createMoveSnapping'], + connectSnapping: ['type', _BpmnConnectSnapping__WEBPACK_IMPORTED_MODULE_1__["default"]], + createMoveSnapping: ['type', _BpmnCreateMoveSnapping__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 56538: +/*!*********************************************************!*\ + !*** ./node_modules/bpmn-js/lib/import/BpmnImporter.js ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnImporter) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/ModelUtil */ 4525); +/* harmony import */ var _util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/LabelUtil */ 81454); +/* harmony import */ var diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/layout/LayoutUtil */ 8610); +/* harmony import */ var _util_DiUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/DiUtil */ 55441); +/* harmony import */ var _features_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../features/label-editing/LabelUtil */ 89497); +/* harmony import */ var _Util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Util */ 92885); + + + + + + + +function elementData(semantic, attrs) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ + id: semantic.id, + type: semantic.$type, + businessObject: semantic + }, attrs); +} +function getWaypoints(bo, source, target) { + var waypoints = bo.di.waypoint; + if (!waypoints || waypoints.length < 2) { + return [(0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source), (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(target)]; + } + return waypoints.map(function (p) { + return { + x: p.x, + y: p.y + }; + }); +} +function notYetDrawn(translate, semantic, refSemantic, property) { + return new Error(translate('element {element} referenced by {referenced}#{property} not yet drawn', { + element: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(refSemantic), + referenced: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(semantic), + property: property + })); +} + +/** + * An importer that adds bpmn elements to the canvas + * + * @param {EventBus} eventBus + * @param {Canvas} canvas + * @param {ElementFactory} elementFactory + * @param {ElementRegistry} elementRegistry + * @param {Function} translate + * @param {TextRenderer} textRenderer + */ +function BpmnImporter(eventBus, canvas, elementFactory, elementRegistry, translate, textRenderer) { + this._eventBus = eventBus; + this._canvas = canvas; + this._elementFactory = elementFactory; + this._elementRegistry = elementRegistry; + this._translate = translate; + this._textRenderer = textRenderer; +} +BpmnImporter.$inject = ['eventBus', 'canvas', 'elementFactory', 'elementRegistry', 'translate', 'textRenderer']; + +/** + * Add bpmn element (semantic) to the canvas onto the + * specified parent shape. + */ +BpmnImporter.prototype.add = function (semantic, parentElement) { + var di = semantic.di, + element, + translate = this._translate, + hidden; + var parentIndex; + + // ROOT ELEMENT + // handle the special case that we deal with a + // invisible root element (process or collaboration) + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(di, 'bpmndi:BPMNPlane')) { + // add a virtual element (not being drawn) + element = this._elementFactory.createRoot(elementData(semantic)); + this._canvas.setRootElement(element); + } + + // SHAPE + else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(di, 'bpmndi:BPMNShape')) { + var collapsed = !(0,_util_DiUtil__WEBPACK_IMPORTED_MODULE_4__.isExpanded)(semantic), + isFrame = isFrameElement(semantic); + hidden = parentElement && (parentElement.hidden || parentElement.collapsed); + var bounds = semantic.di.bounds; + element = this._elementFactory.createShape(elementData(semantic, { + collapsed: collapsed, + hidden: hidden, + x: Math.round(bounds.x), + y: Math.round(bounds.y), + width: Math.round(bounds.width), + height: Math.round(bounds.height), + isFrame: isFrame + })); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:BoundaryEvent')) { + this._attachBoundary(semantic, element); + } + + // insert lanes behind other flow nodes (cf. #727) + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:Lane')) { + parentIndex = 0; + } + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:DataStoreReference')) { + // check whether data store is inside our outside of its semantic parent + if (!isPointInsideBBox(parentElement, (0,diagram_js_lib_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(bounds))) { + parentElement = this._canvas.getRootElement(); + } + } + this._canvas.addShape(element, parentElement, parentIndex); + } + + // CONNECTION + else if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(di, 'bpmndi:BPMNEdge')) { + var source = this._getSource(semantic), + target = this._getTarget(semantic); + hidden = parentElement && (parentElement.hidden || parentElement.collapsed); + element = this._elementFactory.createConnection(elementData(semantic, { + hidden: hidden, + source: source, + target: target, + waypoints: getWaypoints(semantic, source, target) + })); + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:DataAssociation')) { + // render always on top; this ensures DataAssociations + // are rendered correctly across different "hacks" people + // love to model such as cross participant / sub process + // associations + parentElement = null; + } + + // insert sequence flows behind other flow nodes (cf. #727) + if ((0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:SequenceFlow')) { + parentIndex = 0; + } + this._canvas.addConnection(element, parentElement, parentIndex); + } else { + throw new Error(translate('unknown di {di} for element {semantic}', { + di: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(di), + semantic: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(semantic) + })); + } + + // (optional) LABEL + if ((0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.isLabelExternal)(semantic) && (0,_features_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_6__.getLabel)(element)) { + this.addLabel(semantic, element); + } + this._eventBus.fire('bpmnElement.added', { + element: element + }); + return element; +}; + +/** + * Attach the boundary element to the given host + * + * @param {ModdleElement} boundarySemantic + * @param {djs.model.Base} boundaryElement + */ +BpmnImporter.prototype._attachBoundary = function (boundarySemantic, boundaryElement) { + var translate = this._translate; + var hostSemantic = boundarySemantic.attachedToRef; + if (!hostSemantic) { + throw new Error(translate('missing {semantic}#attachedToRef', { + semantic: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(boundarySemantic) + })); + } + var host = this._elementRegistry.get(hostSemantic.id), + attachers = host && host.attachers; + if (!host) { + throw notYetDrawn(translate, boundarySemantic, hostSemantic, 'attachedToRef'); + } + + // wire element.host <> host.attachers + boundaryElement.host = host; + if (!attachers) { + host.attachers = attachers = []; + } + if (attachers.indexOf(boundaryElement) === -1) { + attachers.push(boundaryElement); + } +}; + +/** + * add label for an element + */ +BpmnImporter.prototype.addLabel = function (semantic, element) { + var bounds, text, label; + bounds = (0,_util_LabelUtil__WEBPACK_IMPORTED_MODULE_5__.getExternalLabelBounds)(semantic, element); + text = (0,_features_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_6__.getLabel)(element); + if (text) { + // get corrected bounds from actual layouted text + bounds = this._textRenderer.getExternalLabelBounds(bounds, text); + } + label = this._elementFactory.createLabel(elementData(semantic, { + id: semantic.id + '_label', + labelTarget: element, + type: 'label', + hidden: element.hidden || !(0,_features_label_editing_LabelUtil__WEBPACK_IMPORTED_MODULE_6__.getLabel)(element), + x: Math.round(bounds.x), + y: Math.round(bounds.y), + width: Math.round(bounds.width), + height: Math.round(bounds.height) + })); + return this._canvas.addShape(label, element.parent); +}; + +/** + * Return the drawn connection end based on the given side. + * + * @throws {Error} if the end is not yet drawn + */ +BpmnImporter.prototype._getEnd = function (semantic, side) { + var element, + refSemantic, + type = semantic.$type, + translate = this._translate; + refSemantic = semantic[side + 'Ref']; + + // handle mysterious isMany DataAssociation#sourceRef + if (side === 'source' && type === 'bpmn:DataInputAssociation') { + refSemantic = refSemantic && refSemantic[0]; + } + + // fix source / target for DataInputAssociation / DataOutputAssociation + if (side === 'source' && type === 'bpmn:DataOutputAssociation' || side === 'target' && type === 'bpmn:DataInputAssociation') { + refSemantic = semantic.$parent; + } + element = refSemantic && this._getElement(refSemantic); + if (element) { + return element; + } + if (refSemantic) { + throw notYetDrawn(translate, semantic, refSemantic, side + 'Ref'); + } else { + throw new Error(translate('{semantic}#{side} Ref not specified', { + semantic: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(semantic), + side: side + })); + } +}; +BpmnImporter.prototype._getSource = function (semantic) { + return this._getEnd(semantic, 'source'); +}; +BpmnImporter.prototype._getTarget = function (semantic) { + return this._getEnd(semantic, 'target'); +}; +BpmnImporter.prototype._getElement = function (semantic) { + return this._elementRegistry.get(semantic.id); +}; + +// helpers //////////////////// + +function isPointInsideBBox(bbox, point) { + var x = point.x, + y = point.y; + return x >= bbox.x && x <= bbox.x + bbox.width && y >= bbox.y && y <= bbox.y + bbox.height; +} +function isFrameElement(semantic) { + return (0,_util_ModelUtil__WEBPACK_IMPORTED_MODULE_3__.is)(semantic, 'bpmn:Group'); +} + +/***/ }), + +/***/ 26010: +/*!***********************************************************!*\ + !*** ./node_modules/bpmn-js/lib/import/BpmnTreeWalker.js ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BpmnTreeWalker) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var object_refs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! object-refs */ 16712); +/* harmony import */ var object_refs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(object_refs__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Util */ 92885); + + + +var diRefs = new (object_refs__WEBPACK_IMPORTED_MODULE_0___default())({ + name: 'bpmnElement', + enumerable: true +}, { + name: 'di', + configurable: true +}); + +/** + * Returns true if an element has the given meta-model type + * + * @param {ModdleElement} element + * @param {string} type + * + * @return {boolean} + */ +function is(element, type) { + return element.$instanceOf(type); +} + +/** + * Find a suitable display candidate for definitions where the DI does not + * correctly specify one. + */ +function findDisplayCandidate(definitions) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(definitions.rootElements, function (e) { + return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration'); + }); +} +function BpmnTreeWalker(handler, translate) { + // list of containers already walked + var handledElements = {}; + + // list of elements to handle deferred to ensure + // prerequisites are drawn + var deferred = []; + + // Helpers ////////////////////// + + function contextual(fn, ctx) { + return function (e) { + fn(e, ctx); + }; + } + function handled(element) { + handledElements[element.id] = element; + } + function isHandled(element) { + return handledElements[element.id]; + } + function visit(element, ctx) { + var gfx = element.gfx; + + // avoid multiple rendering of elements + if (gfx) { + throw new Error(translate('already rendered {element}', { + element: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(element) + })); + } + + // call handler + return handler.element(element, ctx); + } + function visitRoot(element, diagram) { + return handler.root(element, diagram); + } + function visitIfDi(element, ctx) { + try { + var gfx = element.di && visit(element, ctx); + handled(element); + return gfx; + } catch (e) { + logError(e.message, { + element: element, + error: e + }); + console.error(translate('failed to import {element}', { + element: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(element) + })); + console.error(e); + } + } + function logError(message, context) { + handler.error(message, context); + } + + // DI handling ////////////////////// + + function registerDi(di) { + var bpmnElement = di.bpmnElement; + if (bpmnElement) { + if (bpmnElement.di) { + logError(translate('multiple DI elements defined for {element}', { + element: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(bpmnElement) + }), { + element: bpmnElement + }); + } else { + diRefs.bind(bpmnElement, 'di'); + bpmnElement.di = di; + } + } else { + logError(translate('no bpmnElement referenced in {element}', { + element: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(di) + }), { + element: di + }); + } + } + function handleDiagram(diagram) { + handlePlane(diagram.plane); + } + function handlePlane(plane) { + registerDi(plane); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(plane.planeElement, handlePlaneElement); + } + function handlePlaneElement(planeElement) { + registerDi(planeElement); + } + + // Semantic handling ////////////////////// + + /** + * Handle definitions and return the rendered diagram (if any) + * + * @param {ModdleElement} definitions to walk and import + * @param {ModdleElement} [diagram] specific diagram to import and display + * + * @throws {Error} if no diagram to display could be found + */ + function handleDefinitions(definitions, diagram) { + // make sure we walk the correct bpmnElement + + var diagrams = definitions.diagrams; + if (diagram && diagrams.indexOf(diagram) === -1) { + throw new Error(translate('diagram not part of bpmn:Definitions')); + } + if (!diagram && diagrams && diagrams.length) { + diagram = diagrams[0]; + } + + // no diagram -> nothing to import + if (!diagram) { + throw new Error(translate('no diagram to display')); + } + + // load DI from selected diagram only + handleDiagram(diagram); + var plane = diagram.plane; + if (!plane) { + throw new Error(translate('no plane for {element}', { + element: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(diagram) + })); + } + var rootElement = plane.bpmnElement; + + // ensure we default to a suitable display candidate (process or collaboration), + // even if non is specified in DI + if (!rootElement) { + rootElement = findDisplayCandidate(definitions); + if (!rootElement) { + throw new Error(translate('no process or collaboration to display')); + } else { + logError(translate('correcting missing bpmnElement on {plane} to {rootElement}', { + plane: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(plane), + rootElement: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(rootElement) + })); + + // correct DI on the fly + plane.bpmnElement = rootElement; + registerDi(plane); + } + } + var ctx = visitRoot(rootElement, plane); + if (is(rootElement, 'bpmn:Process')) { + handleProcess(rootElement, ctx); + } else if (is(rootElement, 'bpmn:Collaboration')) { + handleCollaboration(rootElement, ctx); + + // force drawing of everything not yet drawn that is part of the target DI + handleUnhandledProcesses(definitions.rootElements, ctx); + } else { + throw new Error(translate('unsupported bpmnElement for {plane}: {rootElement}', { + plane: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(plane), + rootElement: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(rootElement) + })); + } + + // handle all deferred elements + handleDeferred(deferred); + } + function handleDeferred() { + var fn; + + // drain deferred until empty + while (deferred.length) { + fn = deferred.shift(); + fn(); + } + } + function handleProcess(process, context) { + handleFlowElementsContainer(process, context); + handleIoSpecification(process.ioSpecification, context); + handleArtifacts(process.artifacts, context); + + // log process handled + handled(process); + } + function handleUnhandledProcesses(rootElements, ctx) { + // walk through all processes that have not yet been drawn and draw them + // if they contain lanes with DI information. + // we do this to pass the free-floating lane test cases in the MIWG test suite + var processes = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(rootElements, function (e) { + return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets; + }); + processes.forEach(contextual(handleProcess, ctx)); + } + function handleMessageFlow(messageFlow, context) { + visitIfDi(messageFlow, context); + } + function handleMessageFlows(messageFlows, context) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(messageFlows, contextual(handleMessageFlow, context)); + } + function handleDataAssociation(association, context) { + visitIfDi(association, context); + } + function handleDataInput(dataInput, context) { + visitIfDi(dataInput, context); + } + function handleDataOutput(dataOutput, context) { + visitIfDi(dataOutput, context); + } + function handleArtifact(artifact, context) { + // bpmn:TextAnnotation + // bpmn:Group + // bpmn:Association + + visitIfDi(artifact, context); + } + function handleArtifacts(artifacts, context) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(artifacts, function (e) { + if (is(e, 'bpmn:Association')) { + deferred.push(function () { + handleArtifact(e, context); + }); + } else { + handleArtifact(e, context); + } + }); + } + function handleIoSpecification(ioSpecification, context) { + if (!ioSpecification) { + return; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(ioSpecification.dataInputs, contextual(handleDataInput, context)); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(ioSpecification.dataOutputs, contextual(handleDataOutput, context)); + } + function handleSubProcess(subProcess, context) { + handleFlowElementsContainer(subProcess, context); + handleArtifacts(subProcess.artifacts, context); + } + function handleFlowNode(flowNode, context) { + var childCtx = visitIfDi(flowNode, context); + if (is(flowNode, 'bpmn:SubProcess')) { + handleSubProcess(flowNode, childCtx || context); + } + if (is(flowNode, 'bpmn:Activity')) { + handleIoSpecification(flowNode.ioSpecification, context); + } + + // defer handling of associations + // affected types: + // + // * bpmn:Activity + // * bpmn:ThrowEvent + // * bpmn:CatchEvent + // + deferred.push(function () { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(flowNode.dataInputAssociations, contextual(handleDataAssociation, context)); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context)); + }); + } + function handleSequenceFlow(sequenceFlow, context) { + visitIfDi(sequenceFlow, context); + } + function handleDataElement(dataObject, context) { + visitIfDi(dataObject, context); + } + function handleLane(lane, context) { + deferred.push(function () { + var newContext = visitIfDi(lane, context); + if (lane.childLaneSet) { + handleLaneSet(lane.childLaneSet, newContext || context); + } + wireFlowNodeRefs(lane); + }); + } + function handleLaneSet(laneSet, context) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(laneSet.lanes, contextual(handleLane, context)); + } + function handleLaneSets(laneSets, context) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(laneSets, contextual(handleLaneSet, context)); + } + function handleFlowElementsContainer(container, context) { + handleFlowElements(container.flowElements, context); + if (container.laneSets) { + handleLaneSets(container.laneSets, context); + } + } + function handleFlowElements(flowElements, context) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(flowElements, function (e) { + if (is(e, 'bpmn:SequenceFlow')) { + deferred.push(function () { + handleSequenceFlow(e, context); + }); + } else if (is(e, 'bpmn:BoundaryEvent')) { + deferred.unshift(function () { + handleFlowNode(e, context); + }); + } else if (is(e, 'bpmn:FlowNode')) { + handleFlowNode(e, context); + } else if (is(e, 'bpmn:DataObject')) { + + // SKIP (assume correct referencing via DataObjectReference) + } else if (is(e, 'bpmn:DataStoreReference')) { + handleDataElement(e, context); + } else if (is(e, 'bpmn:DataObjectReference')) { + handleDataElement(e, context); + } else { + logError(translate('unrecognized flowElement {element} in context {context}', { + element: (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(e), + context: context ? (0,_Util__WEBPACK_IMPORTED_MODULE_2__.elementToString)(context.businessObject) : 'null' + }), { + element: e, + context: context + }); + } + }); + } + function handleParticipant(participant, context) { + var newCtx = visitIfDi(participant, context); + var process = participant.processRef; + if (process) { + handleProcess(process, newCtx || context); + } + } + function handleCollaboration(collaboration) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(collaboration.participants, contextual(handleParticipant)); + handleArtifacts(collaboration.artifacts); + + // handle message flows latest in the process + deferred.push(function () { + handleMessageFlows(collaboration.messageFlows); + }); + } + function wireFlowNodeRefs(lane) { + // wire the virtual flowNodeRefs <-> relationship + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(lane.flowNodeRef, function (flowNode) { + var lanes = flowNode.get('lanes'); + if (lanes) { + lanes.push(lane); + } + }); + } + + // API ////////////////////// + + return { + handleDeferred: handleDeferred, + handleDefinitions: handleDefinitions, + handleSubProcess: handleSubProcess, + registerDi: registerDi + }; +} + +/***/ }), + +/***/ 90415: +/*!*****************************************************!*\ + !*** ./node_modules/bpmn-js/lib/import/Importer.js ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ importBpmnDiagram: () => (/* binding */ importBpmnDiagram) +/* harmony export */ }); +/* harmony import */ var _BpmnTreeWalker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BpmnTreeWalker */ 26010); + + +/** + * The importBpmnDiagram result. + * + * @typedef {Object} ImportBPMNDiagramResult + * + * @property {Array} warnings + */ + +/** +* The importBpmnDiagram error. +* +* @typedef {Error} ImportBPMNDiagramError +* +* @property {Array} warnings +*/ + +/** + * Import the definitions into a diagram. + * + * Errors and warnings are reported through the specified callback. + * + * @param {djs.Diagram} diagram + * @param {ModdleElement} definitions + * @param {ModdleElement} [bpmnDiagram] the diagram to be rendered + * (if not provided, the first one will be rendered) + * + * Returns {Promise} + */ +function importBpmnDiagram(diagram, definitions, bpmnDiagram) { + var importer, eventBus, translate; + var error, + warnings = []; + + /** + * Walk the diagram semantically, importing (=drawing) + * all elements you encounter. + * + * @param {ModdleElement} definitions + * @param {ModdleElement} bpmnDiagram + */ + function render(definitions, bpmnDiagram) { + var visitor = { + root: function (element) { + return importer.add(element); + }, + element: function (element, parentShape) { + return importer.add(element, parentShape); + }, + error: function (message, context) { + warnings.push({ + message: message, + context: context + }); + } + }; + var walker = new _BpmnTreeWalker__WEBPACK_IMPORTED_MODULE_0__["default"](visitor, translate); + + // traverse BPMN 2.0 document model, + // starting at definitions + walker.handleDefinitions(definitions, bpmnDiagram); + } + return new Promise(function (resolve, reject) { + try { + importer = diagram.get('bpmnImporter'); + eventBus = diagram.get('eventBus'); + translate = diagram.get('translate'); + eventBus.fire('import.render.start', { + definitions: definitions + }); + render(definitions, bpmnDiagram); + eventBus.fire('import.render.complete', { + error: error, + warnings: warnings + }); + return resolve({ + warnings: warnings + }); + } catch (e) { + e.warnings = warnings; + return reject(e); + } + }); +} + +/***/ }), + +/***/ 92885: +/*!*************************************************!*\ + !*** ./node_modules/bpmn-js/lib/import/Util.js ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ elementToString: () => (/* binding */ elementToString) +/* harmony export */ }); +function elementToString(e) { + if (!e) { + return ''; + } + return '<' + e.$type + (e.id ? ' id="' + e.id : '') + '" />'; +} + +/***/ }), + +/***/ 57733: +/*!**************************************************!*\ + !*** ./node_modules/bpmn-js/lib/import/index.js ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! diagram-js/lib/i18n/translate */ 3933); +/* harmony import */ var _BpmnImporter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BpmnImporter */ 56538); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_i18n_translate__WEBPACK_IMPORTED_MODULE_0__["default"]], + bpmnImporter: ['type', _BpmnImporter__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 84720: +/*!************************************************************!*\ + !*** ./node_modules/bpmn-js/lib/util/CompatibilityUtil.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ wrapForCompatibility: () => (/* binding */ wrapForCompatibility) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); + + +// TODO(nikku): remove with future bpmn-js version + +/** + * Wraps APIs to check: + * + * 1) If a callback is passed -> Warn users about callback deprecation. + * 2) If Promise class is implemented in current environment. + * + * @private + */ +function wrapForCompatibility(api) { + return function () { + if (!window.Promise) { + throw new Error('Promises is not supported in this environment. Please polyfill Promise.'); + } + var argLen = arguments.length; + if (argLen >= 1 && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(arguments[argLen - 1])) { + var callback = arguments[argLen - 1]; + console.warn(new Error('Passing callbacks to ' + api.name + ' is deprecated and will be removed in a future major release. ' + 'Please switch to promises: https://bpmn.io/l/moving-to-promises.html')); + var argsWithoutCallback = Array.prototype.slice.call(arguments, 0, -1); + api.apply(this, argsWithoutCallback).then(function (result) { + var firstKey = Object.keys(result)[0]; + + // The APIs we are wrapping all resolve a single item depending on the API. + // For instance, importXML resolves { warnings } and saveXML returns { xml }. + // That's why we can call the callback with the first item of result. + return callback(null, result[firstKey]); + + // Passing a second paramter instead of catch because we don't want to + // catch errors thrown by callback(). + }, function (err) { + return callback(err, err.warnings); + }); + } else { + return api.apply(this, arguments); + } + }; +} + +/***/ }), + +/***/ 55441: +/*!*************************************************!*\ + !*** ./node_modules/bpmn-js/lib/util/DiUtil.js ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ hasCompensateEventDefinition: () => (/* binding */ hasCompensateEventDefinition), +/* harmony export */ hasErrorEventDefinition: () => (/* binding */ hasErrorEventDefinition), +/* harmony export */ hasEscalationEventDefinition: () => (/* binding */ hasEscalationEventDefinition), +/* harmony export */ hasEventDefinition: () => (/* binding */ hasEventDefinition), +/* harmony export */ isEventSubProcess: () => (/* binding */ isEventSubProcess), +/* harmony export */ isExpanded: () => (/* binding */ isExpanded), +/* harmony export */ isInterrupting: () => (/* binding */ isInterrupting) +/* harmony export */ }); +/* harmony import */ var _ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ModelUtil */ 4525); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 54796); + + +function isExpanded(element) { + if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:CallActivity')) { + return false; + } + if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:SubProcess')) { + return (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element).di && !!(0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element).di.isExpanded; + } + if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Participant')) { + return !!(0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element).processRef; + } + return true; +} +function isInterrupting(element) { + return element && (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element).isInterrupting !== false; +} +function isEventSubProcess(element) { + return element && !!(0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element).triggeredByEvent; +} +function hasEventDefinition(element, eventType) { + var bo = (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.getBusinessObject)(element), + hasEventDefinition = false; + if (bo.eventDefinitions) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(bo.eventDefinitions, function (event) { + if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(event, eventType)) { + hasEventDefinition = true; + } + }); + } + return hasEventDefinition; +} +function hasErrorEventDefinition(element) { + return hasEventDefinition(element, 'bpmn:ErrorEventDefinition'); +} +function hasEscalationEventDefinition(element) { + return hasEventDefinition(element, 'bpmn:EscalationEventDefinition'); +} +function hasCompensateEventDefinition(element) { + return hasEventDefinition(element, 'bpmn:CompensateEventDefinition'); +} + +/***/ }), + +/***/ 81454: +/*!****************************************************!*\ + !*** ./node_modules/bpmn-js/lib/util/LabelUtil.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DEFAULT_LABEL_SIZE: () => (/* binding */ DEFAULT_LABEL_SIZE), +/* harmony export */ FLOW_LABEL_INDENT: () => (/* binding */ FLOW_LABEL_INDENT), +/* harmony export */ getExternalLabelBounds: () => (/* binding */ getExternalLabelBounds), +/* harmony export */ getExternalLabelMid: () => (/* binding */ getExternalLabelMid), +/* harmony export */ getFlowLabelPosition: () => (/* binding */ getFlowLabelPosition), +/* harmony export */ getWaypointsMid: () => (/* binding */ getWaypointsMid), +/* harmony export */ hasExternalLabel: () => (/* binding */ hasExternalLabel), +/* harmony export */ isLabel: () => (/* binding */ isLabel), +/* harmony export */ isLabelExternal: () => (/* binding */ isLabelExternal) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 54796); +/* harmony import */ var _ModelUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ModelUtil */ 4525); + + +var DEFAULT_LABEL_SIZE = { + width: 90, + height: 20 +}; +var FLOW_LABEL_INDENT = 15; + +/** + * Returns true if the given semantic has an external label + * + * @param {BpmnElement} semantic + * @return {boolean} true if has label + */ +function isLabelExternal(semantic) { + return (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:Event') || (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:Gateway') || (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:DataStoreReference') || (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:DataObjectReference') || (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:DataInput') || (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:DataOutput') || (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:SequenceFlow') || (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:MessageFlow') || (0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(semantic, 'bpmn:Group'); +} + +/** + * Returns true if the given element has an external label + * + * @param {djs.model.shape} element + * @return {boolean} true if has label + */ +function hasExternalLabel(element) { + return isLabel(element.label); +} + +/** + * Get the position for sequence flow labels + * + * @param {Array} waypoints + * @return {Point} the label position + */ +function getFlowLabelPosition(waypoints) { + // get the waypoints mid + var mid = waypoints.length / 2 - 1; + var first = waypoints[Math.floor(mid)]; + var second = waypoints[Math.ceil(mid + 0.01)]; + + // get position + var position = getWaypointsMid(waypoints); + + // calculate angle + var angle = Math.atan((second.y - first.y) / (second.x - first.x)); + var x = position.x, + y = position.y; + if (Math.abs(angle) < Math.PI / 2) { + y -= FLOW_LABEL_INDENT; + } else { + x += FLOW_LABEL_INDENT; + } + return { + x: x, + y: y + }; +} + +/** + * Get the middle of a number of waypoints + * + * @param {Array} waypoints + * @return {Point} the mid point + */ +function getWaypointsMid(waypoints) { + var mid = waypoints.length / 2 - 1; + var first = waypoints[Math.floor(mid)]; + var second = waypoints[Math.ceil(mid + 0.01)]; + return { + x: first.x + (second.x - first.x) / 2, + y: first.y + (second.y - first.y) / 2 + }; +} +function getExternalLabelMid(element) { + if (element.waypoints) { + return getFlowLabelPosition(element.waypoints); + } else if ((0,_ModelUtil__WEBPACK_IMPORTED_MODULE_0__.is)(element, 'bpmn:Group')) { + return { + x: element.x + element.width / 2, + y: element.y + DEFAULT_LABEL_SIZE.height / 2 + }; + } else { + return { + x: element.x + element.width / 2, + y: element.y + element.height + DEFAULT_LABEL_SIZE.height / 2 + }; + } +} + +/** + * Returns the bounds of an elements label, parsed from the elements DI or + * generated from its bounds. + * + * @param {BpmnElement} semantic + * @param {djs.model.Base} element + */ +function getExternalLabelBounds(semantic, element) { + var mid, + size, + bounds, + di = semantic.di, + label = di.label; + if (label && label.bounds) { + bounds = label.bounds; + size = { + width: Math.max(DEFAULT_LABEL_SIZE.width, bounds.width), + height: bounds.height + }; + mid = { + x: bounds.x + bounds.width / 2, + y: bounds.y + bounds.height / 2 + }; + } else { + mid = getExternalLabelMid(element); + size = DEFAULT_LABEL_SIZE; + } + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ + x: mid.x - size.width / 2, + y: mid.y - size.height / 2 + }, size); +} +function isLabel(element) { + return element && !!element.labelTarget; +} + +/***/ }), + +/***/ 4525: +/*!****************************************************!*\ + !*** ./node_modules/bpmn-js/lib/util/ModelUtil.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getBusinessObject: () => (/* binding */ getBusinessObject), +/* harmony export */ getDi: () => (/* binding */ getDi), +/* harmony export */ is: () => (/* binding */ is), +/* harmony export */ isAny: () => (/* binding */ isAny) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 54796); + + +/** + * Is an element of the given BPMN type? + * + * @param {djs.model.Base|ModdleElement} element + * @param {string} type + * + * @return {boolean} + */ +function is(element, type) { + var bo = getBusinessObject(element); + return bo && typeof bo.$instanceOf === 'function' && bo.$instanceOf(type); +} + +/** + * Return true if element has any of the given types. + * + * @param {djs.model.Base} element + * @param {Array} types + * + * @return {boolean} + */ +function isAny(element, types) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.some)(types, function (t) { + return is(element, t); + }); +} + +/** + * Return the business object for a given element. + * + * @param {djs.model.Base|ModdleElement} element + * + * @return {ModdleElement} + */ +function getBusinessObject(element) { + return element && element.businessObject || element; +} + +/** + * Return the di object for a given element. + * + * @param {djs.model.Base} element + * + * @return {ModdleElement} + */ +function getDi(element) { + var bo = getBusinessObject(element); + return bo && bo.di; +} + +/***/ }), + +/***/ 49397: +/*!********************************************************!*\ + !*** ./node_modules/bpmn-js/lib/util/PoweredByUtil.js ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ BPMNIO_IMG: () => (/* binding */ BPMNIO_IMG), +/* harmony export */ LINK_STYLES: () => (/* binding */ LINK_STYLES), +/* harmony export */ open: () => (/* binding */ open) +/* harmony export */ }); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dom */ 73599); +/** + * This file must not be changed or exchanged. + * + * @see http://bpmn.io/license for more information. + */ + + + +// inlined ../../resources/logo.svg +var BPMNIO_LOGO_SVG = ''; +var BPMNIO_IMG = BPMNIO_LOGO_SVG; +function css(attrs) { + return attrs.join(';'); +} +var LINK_STYLES = css(['color: #404040']); +var LIGHTBOX_STYLES = css(['z-index: 1001', 'position: fixed', 'top: 0', 'left: 0', 'right: 0', 'bottom: 0']); +var BACKDROP_STYLES = css(['width: 100%', 'height: 100%', 'background: rgba(40,40,40,0.2)']); +var NOTICE_STYLES = css(['position: absolute', 'left: 50%', 'top: 40%', 'transform: translate(-50%)', 'width: 260px', 'padding: 10px', 'background: white', 'box-shadow: 0 1px 4px rgba(0,0,0,0.3)', 'font-family: Helvetica, Arial, sans-serif', 'font-size: 14px', 'display: flex', 'line-height: 1.3']); +var LIGHTBOX_MARKUP = '
' + '
' + '
' + '' + BPMNIO_IMG + '' + '' + 'Web-based tooling for BPMN, DMN and CMMN diagrams ' + 'powered by bpmn.io.' + '' + '
' + '
'; +var lightbox; +function open() { + if (!lightbox) { + lightbox = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)(LIGHTBOX_MARKUP); + min_dom__WEBPACK_IMPORTED_MODULE_0__.delegate.bind(lightbox, '.backdrop', 'click', function (event) { + document.body.removeChild(lightbox); + }); + } + document.body.appendChild(lightbox); +} + +/***/ }), + +/***/ 54796: +/*!**********************************************************************!*\ + !*** ./node_modules/bpmn-js/node_modules/min-dash/dist/index.esm.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ assign: () => (/* binding */ assign), +/* harmony export */ bind: () => (/* binding */ bind), +/* harmony export */ debounce: () => (/* binding */ debounce), +/* harmony export */ ensureArray: () => (/* binding */ ensureArray), +/* harmony export */ every: () => (/* binding */ every), +/* harmony export */ filter: () => (/* binding */ filter), +/* harmony export */ find: () => (/* binding */ find), +/* harmony export */ findIndex: () => (/* binding */ findIndex), +/* harmony export */ flatten: () => (/* binding */ flatten), +/* harmony export */ forEach: () => (/* binding */ forEach), +/* harmony export */ get: () => (/* binding */ get), +/* harmony export */ groupBy: () => (/* binding */ groupBy), +/* harmony export */ has: () => (/* binding */ has), +/* harmony export */ isArray: () => (/* binding */ isArray), +/* harmony export */ isDefined: () => (/* binding */ isDefined), +/* harmony export */ isFunction: () => (/* binding */ isFunction), +/* harmony export */ isNil: () => (/* binding */ isNil), +/* harmony export */ isNumber: () => (/* binding */ isNumber), +/* harmony export */ isObject: () => (/* binding */ isObject), +/* harmony export */ isString: () => (/* binding */ isString), +/* harmony export */ isUndefined: () => (/* binding */ isUndefined), +/* harmony export */ keys: () => (/* binding */ keys), +/* harmony export */ map: () => (/* binding */ map), +/* harmony export */ matchPattern: () => (/* binding */ matchPattern), +/* harmony export */ merge: () => (/* binding */ merge), +/* harmony export */ omit: () => (/* binding */ omit), +/* harmony export */ pick: () => (/* binding */ pick), +/* harmony export */ reduce: () => (/* binding */ reduce), +/* harmony export */ set: () => (/* binding */ set), +/* harmony export */ size: () => (/* binding */ size), +/* harmony export */ some: () => (/* binding */ some), +/* harmony export */ sortBy: () => (/* binding */ sortBy), +/* harmony export */ throttle: () => (/* binding */ throttle), +/* harmony export */ unionBy: () => (/* binding */ unionBy), +/* harmony export */ uniqueBy: () => (/* binding */ uniqueBy), +/* harmony export */ values: () => (/* binding */ values), +/* harmony export */ without: () => (/* binding */ without) +/* harmony export */ }); +/** + * Flatten array, one level deep. + * + * @param {Array} arr + * + * @return {Array} + */ +function flatten(arr) { + return Array.prototype.concat.apply([], arr); +} +var nativeToString = Object.prototype.toString; +var nativeHasOwnProperty = Object.prototype.hasOwnProperty; +function isUndefined(obj) { + return obj === undefined; +} +function isDefined(obj) { + return obj !== undefined; +} +function isNil(obj) { + return obj == null; +} +function isArray(obj) { + return nativeToString.call(obj) === '[object Array]'; +} +function isObject(obj) { + return nativeToString.call(obj) === '[object Object]'; +} +function isNumber(obj) { + return nativeToString.call(obj) === '[object Number]'; +} +function isFunction(obj) { + var tag = nativeToString.call(obj); + return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]'; +} +function isString(obj) { + return nativeToString.call(obj) === '[object String]'; +} +/** + * Ensure collection is an array. + * + * @param {Object} obj + */ + +function ensureArray(obj) { + if (isArray(obj)) { + return; + } + throw new Error('must supply array'); +} +/** + * Return true, if target owns a property with the given key. + * + * @param {Object} target + * @param {String} key + * + * @return {Boolean} + */ + +function has(target, key) { + return nativeHasOwnProperty.call(target, key); +} + +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function|Object} matcher + * + * @return {Object} + */ + +function find(collection, matcher) { + matcher = toMatcher(matcher); + var match; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + match = val; + return false; + } + }); + return match; +} +/** + * Find element index in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Object} + */ + +function findIndex(collection, matcher) { + matcher = toMatcher(matcher); + var idx = isArray(collection) ? -1 : undefined; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + idx = key; + return false; + } + }); + return idx; +} +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Array} result + */ + +function filter(collection, matcher) { + var result = []; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + result.push(val); + } + }); + return result; +} +/** + * Iterate over collection; returning something + * (non-undefined) will stop iteration. + * + * @param {Array|Object} collection + * @param {Function} iterator + * + * @return {Object} return result that stopped the iteration + */ + +function forEach(collection, iterator) { + var val, result; + if (isUndefined(collection)) { + return; + } + var convertKey = isArray(collection) ? toNum : identity; + for (var key in collection) { + if (has(collection, key)) { + val = collection[key]; + result = iterator(val, convertKey(key)); + if (result === false) { + return val; + } + } + } +} +/** + * Return collection without element. + * + * @param {Array} arr + * @param {Function} matcher + * + * @return {Array} + */ + +function without(arr, matcher) { + if (isUndefined(arr)) { + return []; + } + ensureArray(arr); + matcher = toMatcher(matcher); + return arr.filter(function (el, idx) { + return !matcher(el, idx); + }); +} +/** + * Reduce collection, returning a single result. + * + * @param {Object|Array} collection + * @param {Function} iterator + * @param {Any} result + * + * @return {Any} result returned from last iterator + */ + +function reduce(collection, iterator, result) { + forEach(collection, function (value, idx) { + result = iterator(result, value, idx); + }); + return result; +} +/** + * Return true if every element in the collection + * matches the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function every(collection, matcher) { + return !!reduce(collection, function (matches, val, key) { + return matches && matcher(val, key); + }, true); +} +/** + * Return true if some elements in the collection + * match the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function some(collection, matcher) { + return !!find(collection, matcher); +} +/** + * Transform a collection into another collection + * by piping each member through the given fn. + * + * @param {Object|Array} collection + * @param {Function} fn + * + * @return {Array} transformed collection + */ + +function map(collection, fn) { + var result = []; + forEach(collection, function (val, key) { + result.push(fn(val, key)); + }); + return result; +} +/** + * Get the collections keys. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function keys(collection) { + return collection && Object.keys(collection) || []; +} +/** + * Shorthand for `keys(o).length`. + * + * @param {Object|Array} collection + * + * @return {Number} + */ + +function size(collection) { + return keys(collection).length; +} +/** + * Get the values in the collection. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function values(collection) { + return map(collection, function (val) { + return val; + }); +} +/** + * Group collection members by attribute. + * + * @param {Object|Array} collection + * @param {Function} extractor + * + * @return {Object} map with { attrValue => [ a, b, c ] } + */ + +function groupBy(collection, extractor) { + var grouped = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + extractor = toExtractor(extractor); + forEach(collection, function (val) { + var discriminator = extractor(val) || '_'; + var group = grouped[discriminator]; + if (!group) { + group = grouped[discriminator] = []; + } + group.push(val); + }); + return grouped; +} +function uniqueBy(extractor) { + extractor = toExtractor(extractor); + var grouped = {}; + for (var _len = arguments.length, collections = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + collections[_key - 1] = arguments[_key]; + } + forEach(collections, function (c) { + return groupBy(c, extractor, grouped); + }); + var result = map(grouped, function (val, key) { + return val[0]; + }); + return result; +} +var unionBy = uniqueBy; +/** + * Sort collection by criteria. + * + * @param {Object|Array} collection + * @param {String|Function} extractor + * + * @return {Array} + */ + +function sortBy(collection, extractor) { + extractor = toExtractor(extractor); + var sorted = []; + forEach(collection, function (value, key) { + var disc = extractor(value, key); + var entry = { + d: disc, + v: value + }; + for (var idx = 0; idx < sorted.length; idx++) { + var d = sorted[idx].d; + if (disc < d) { + sorted.splice(idx, 0, entry); + return; + } + } // not inserted, append (!) + + sorted.push(entry); + }); + return map(sorted, function (e) { + return e.v; + }); +} +/** + * Create an object pattern matcher. + * + * @example + * + * const matcher = matchPattern({ id: 1 }); + * + * let element = find(elements, matcher); + * + * @param {Object} pattern + * + * @return {Function} matcherFn + */ + +function matchPattern(pattern) { + return function (el) { + return every(pattern, function (val, key) { + return el[key] === val; + }); + }; +} +function toExtractor(extractor) { + return isFunction(extractor) ? extractor : function (e) { + return e[extractor]; + }; +} +function toMatcher(matcher) { + return isFunction(matcher) ? matcher : function (e) { + return e === matcher; + }; +} +function identity(arg) { + return arg; +} +function toNum(arg) { + return Number(arg); +} + +/** + * Debounce fn, calling it only once if the given time + * elapsed between calls. + * + * Lodash-style the function exposes methods to `#clear` + * and `#flush` to control internal behavior. + * + * @param {Function} fn + * @param {Number} timeout + * + * @return {Function} debounced function + */ +function debounce(fn, timeout) { + var timer; + var lastArgs; + var lastThis; + var lastNow; + function fire(force) { + var now = Date.now(); + var scheduledDiff = force ? 0 : lastNow + timeout - now; + if (scheduledDiff > 0) { + return schedule(scheduledDiff); + } + fn.apply(lastThis, lastArgs); + clear(); + } + function schedule(timeout) { + timer = setTimeout(fire, timeout); + } + function clear() { + if (timer) { + clearTimeout(timer); + } + timer = lastNow = lastArgs = lastThis = undefined; + } + function flush() { + if (timer) { + fire(true); + } + clear(); + } + function callback() { + lastNow = Date.now(); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + lastArgs = args; + lastThis = this; // ensure an execution is scheduled + + if (!timer) { + schedule(timeout); + } + } + callback.flush = flush; + callback.cancel = clear; + return callback; +} +/** + * Throttle fn, calling at most once + * in the given interval. + * + * @param {Function} fn + * @param {Number} interval + * + * @return {Function} throttled function + */ + +function throttle(fn, interval) { + var throttling = false; + return function () { + if (throttling) { + return; + } + fn.apply(void 0, arguments); + throttling = true; + setTimeout(function () { + throttling = false; + }, interval); + }; +} +/** + * Bind function against target . + * + * @param {Function} fn + * @param {Object} target + * + * @return {Function} bound function + */ + +function bind(fn, target) { + return fn.bind(target); +} +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + return _typeof(obj); +} +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends.apply(this, arguments); +} + +/** + * Convenience wrapper for `Object.assign`. + * + * @param {Object} target + * @param {...Object} others + * + * @return {Object} the target + */ + +function assign(target) { + for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + others[_key - 1] = arguments[_key]; + } + return _extends.apply(void 0, [target].concat(others)); +} +/** + * Sets a nested property of a given object to the specified value. + * + * This mutates the object and returns it. + * + * @param {Object} target The target of the set operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} value The value to set. + */ + +function set(target, path, value) { + var currentTarget = target; + forEach(path, function (key, idx) { + if (typeof key !== 'number' && typeof key !== 'string') { + throw new Error('illegal key type: ' + _typeof(key) + '. Key should be of type number or string.'); + } + if (key === 'constructor') { + throw new Error('illegal key: constructor'); + } + if (key === '__proto__') { + throw new Error('illegal key: __proto__'); + } + var nextKey = path[idx + 1]; + var nextTarget = currentTarget[key]; + if (isDefined(nextKey) && isNil(nextTarget)) { + nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : []; + } + if (isUndefined(nextKey)) { + if (isUndefined(value)) { + delete currentTarget[key]; + } else { + currentTarget[key] = value; + } + } else { + currentTarget = nextTarget; + } + }); + return target; +} +/** + * Gets a nested property of a given object. + * + * @param {Object} target The target of the get operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} [defaultValue] The value to return if no value exists. + */ + +function get(target, path, defaultValue) { + var currentTarget = target; + forEach(path, function (key) { + // accessing nil property yields + if (isNil(currentTarget)) { + currentTarget = undefined; + return false; + } + currentTarget = currentTarget[key]; + }); + return isUndefined(currentTarget) ? defaultValue : currentTarget; +} +/** + * Pick given properties from the target object. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function pick(target, properties) { + var result = {}; + var obj = Object(target); + forEach(properties, function (prop) { + if (prop in obj) { + result[prop] = target[prop]; + } + }); + return result; +} +/** + * Pick all target properties, excluding the given ones. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function omit(target, properties) { + var result = {}; + var obj = Object(target); + forEach(obj, function (prop, key) { + if (properties.indexOf(key) === -1) { + result[key] = prop; + } + }); + return result; +} +/** + * Recursively merge `...sources` into given target. + * + * Does support merging objects; does not support merging arrays. + * + * @param {Object} target + * @param {...Object} sources + * + * @return {Object} the target + */ + +function merge(target) { + for (var _len2 = arguments.length, sources = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + sources[_key2 - 1] = arguments[_key2]; + } + if (!sources.length) { + return target; + } + forEach(sources, function (source) { + // skip non-obj sources, i.e. null + if (!source || !isObject(source)) { + return; + } + forEach(source, function (sourceVal, key) { + if (key === '__proto__') { + return; + } + var targetVal = target[key]; + if (isObject(sourceVal)) { + if (!isObject(targetVal)) { + // override target[key] with object + targetVal = {}; + } + target[key] = merge(targetVal, sourceVal); + } else { + target[key] = sourceVal; + } + }); + }); + return target; +} + + +/***/ }), + +/***/ 18357: +/*!****************************************************!*\ + !*** ./node_modules/bpmn-moddle/dist/index.esm.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ simple) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 64432); +/* harmony import */ var moddle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moddle */ 22377); +/* harmony import */ var moddle_xml__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moddle-xml */ 54045); + + + + +/** + * A sub class of {@link Moddle} with support for import and export of BPMN 2.0 xml files. + * + * @class BpmnModdle + * @extends Moddle + * + * @param {Object|Array} packages to use for instantiating the model + * @param {Object} [options] additional options to pass over + */ +function BpmnModdle(packages, options) { + moddle__WEBPACK_IMPORTED_MODULE_0__.Moddle.call(this, packages, options); +} +BpmnModdle.prototype = Object.create(moddle__WEBPACK_IMPORTED_MODULE_0__.Moddle.prototype); + +/** + * The fromXML result. + * + * @typedef {Object} ParseResult + * + * @property {ModdleElement} rootElement + * @property {Array} references + * @property {Array} warnings + * @property {Object} elementsById - a mapping containing each ID -> ModdleElement + */ + +/** + * The fromXML error. + * + * @typedef {Error} ParseError + * + * @property {Array} warnings + */ + +/** + * Instantiates a BPMN model tree from a given xml string. + * + * @param {String} xmlStr + * @param {String} [typeName='bpmn:Definitions'] name of the root element + * @param {Object} [options] options to pass to the underlying reader + * + * @returns {Promise} + */ +BpmnModdle.prototype.fromXML = function (xmlStr, typeName, options) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isString)(typeName)) { + options = typeName; + typeName = 'bpmn:Definitions'; + } + var reader = new moddle_xml__WEBPACK_IMPORTED_MODULE_2__.Reader((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ + model: this, + lax: true + }, options)); + var rootHandler = reader.handler(typeName); + return reader.fromXML(xmlStr, rootHandler); +}; + +/** + * The toXML result. + * + * @typedef {Object} SerializationResult + * + * @property {String} xml + */ + +/** + * Serializes a BPMN 2.0 object tree to XML. + * + * @param {String} element the root element, typically an instance of `bpmn:Definitions` + * @param {Object} [options] to pass to the underlying writer + * + * @returns {Promise} + */ +BpmnModdle.prototype.toXML = function (element, options) { + var writer = new moddle_xml__WEBPACK_IMPORTED_MODULE_2__.Writer(options); + return new Promise(function (resolve, reject) { + try { + var result = writer.toXML(element); + return resolve({ + xml: result + }); + } catch (err) { + return reject(err); + } + }); +}; +var name$5 = "BPMN20"; +var uri$5 = "http://www.omg.org/spec/BPMN/20100524/MODEL"; +var prefix$5 = "bpmn"; +var associations$5 = []; +var types$5 = [{ + name: "Interface", + superClass: ["RootElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "operations", + type: "Operation", + isMany: true + }, { + name: "implementationRef", + isAttr: true, + type: "String" + }] +}, { + name: "Operation", + superClass: ["BaseElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "inMessageRef", + type: "Message", + isReference: true + }, { + name: "outMessageRef", + type: "Message", + isReference: true + }, { + name: "errorRef", + type: "Error", + isMany: true, + isReference: true + }, { + name: "implementationRef", + isAttr: true, + type: "String" + }] +}, { + name: "EndPoint", + superClass: ["RootElement"] +}, { + name: "Auditing", + superClass: ["BaseElement"] +}, { + name: "GlobalTask", + superClass: ["CallableElement"], + properties: [{ + name: "resources", + type: "ResourceRole", + isMany: true + }] +}, { + name: "Monitoring", + superClass: ["BaseElement"] +}, { + name: "Performer", + superClass: ["ResourceRole"] +}, { + name: "Process", + superClass: ["FlowElementsContainer", "CallableElement"], + properties: [{ + name: "processType", + type: "ProcessType", + isAttr: true + }, { + name: "isClosed", + isAttr: true, + type: "Boolean" + }, { + name: "auditing", + type: "Auditing" + }, { + name: "monitoring", + type: "Monitoring" + }, { + name: "properties", + type: "Property", + isMany: true + }, { + name: "laneSets", + isMany: true, + replaces: "FlowElementsContainer#laneSets", + type: "LaneSet" + }, { + name: "flowElements", + isMany: true, + replaces: "FlowElementsContainer#flowElements", + type: "FlowElement" + }, { + name: "artifacts", + type: "Artifact", + isMany: true + }, { + name: "resources", + type: "ResourceRole", + isMany: true + }, { + name: "correlationSubscriptions", + type: "CorrelationSubscription", + isMany: true + }, { + name: "supports", + type: "Process", + isMany: true, + isReference: true + }, { + name: "definitionalCollaborationRef", + type: "Collaboration", + isAttr: true, + isReference: true + }, { + name: "isExecutable", + isAttr: true, + type: "Boolean" + }] +}, { + name: "LaneSet", + superClass: ["BaseElement"], + properties: [{ + name: "lanes", + type: "Lane", + isMany: true + }, { + name: "name", + isAttr: true, + type: "String" + }] +}, { + name: "Lane", + superClass: ["BaseElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "partitionElementRef", + type: "BaseElement", + isAttr: true, + isReference: true + }, { + name: "partitionElement", + type: "BaseElement" + }, { + name: "flowNodeRef", + type: "FlowNode", + isMany: true, + isReference: true + }, { + name: "childLaneSet", + type: "LaneSet", + xml: { + serialize: "xsi:type" + } + }] +}, { + name: "GlobalManualTask", + superClass: ["GlobalTask"] +}, { + name: "ManualTask", + superClass: ["Task"] +}, { + name: "UserTask", + superClass: ["Task"], + properties: [{ + name: "renderings", + type: "Rendering", + isMany: true + }, { + name: "implementation", + isAttr: true, + type: "String" + }] +}, { + name: "Rendering", + superClass: ["BaseElement"] +}, { + name: "HumanPerformer", + superClass: ["Performer"] +}, { + name: "PotentialOwner", + superClass: ["HumanPerformer"] +}, { + name: "GlobalUserTask", + superClass: ["GlobalTask"], + properties: [{ + name: "implementation", + isAttr: true, + type: "String" + }, { + name: "renderings", + type: "Rendering", + isMany: true + }] +}, { + name: "Gateway", + isAbstract: true, + superClass: ["FlowNode"], + properties: [{ + name: "gatewayDirection", + type: "GatewayDirection", + "default": "Unspecified", + isAttr: true + }] +}, { + name: "EventBasedGateway", + superClass: ["Gateway"], + properties: [{ + name: "instantiate", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "eventGatewayType", + type: "EventBasedGatewayType", + isAttr: true, + "default": "Exclusive" + }] +}, { + name: "ComplexGateway", + superClass: ["Gateway"], + properties: [{ + name: "activationCondition", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }, { + name: "default", + type: "SequenceFlow", + isAttr: true, + isReference: true + }] +}, { + name: "ExclusiveGateway", + superClass: ["Gateway"], + properties: [{ + name: "default", + type: "SequenceFlow", + isAttr: true, + isReference: true + }] +}, { + name: "InclusiveGateway", + superClass: ["Gateway"], + properties: [{ + name: "default", + type: "SequenceFlow", + isAttr: true, + isReference: true + }] +}, { + name: "ParallelGateway", + superClass: ["Gateway"] +}, { + name: "RootElement", + isAbstract: true, + superClass: ["BaseElement"] +}, { + name: "Relationship", + superClass: ["BaseElement"], + properties: [{ + name: "type", + isAttr: true, + type: "String" + }, { + name: "direction", + type: "RelationshipDirection", + isAttr: true + }, { + name: "source", + isMany: true, + isReference: true, + type: "Element" + }, { + name: "target", + isMany: true, + isReference: true, + type: "Element" + }] +}, { + name: "BaseElement", + isAbstract: true, + properties: [{ + name: "id", + isAttr: true, + type: "String", + isId: true + }, { + name: "documentation", + type: "Documentation", + isMany: true + }, { + name: "extensionDefinitions", + type: "ExtensionDefinition", + isMany: true, + isReference: true + }, { + name: "extensionElements", + type: "ExtensionElements" + }] +}, { + name: "Extension", + properties: [{ + name: "mustUnderstand", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "definition", + type: "ExtensionDefinition", + isAttr: true, + isReference: true + }] +}, { + name: "ExtensionDefinition", + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "extensionAttributeDefinitions", + type: "ExtensionAttributeDefinition", + isMany: true + }] +}, { + name: "ExtensionAttributeDefinition", + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "type", + isAttr: true, + type: "String" + }, { + name: "isReference", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "extensionDefinition", + type: "ExtensionDefinition", + isAttr: true, + isReference: true + }] +}, { + name: "ExtensionElements", + properties: [{ + name: "valueRef", + isAttr: true, + isReference: true, + type: "Element" + }, { + name: "values", + type: "Element", + isMany: true + }, { + name: "extensionAttributeDefinition", + type: "ExtensionAttributeDefinition", + isAttr: true, + isReference: true + }] +}, { + name: "Documentation", + superClass: ["BaseElement"], + properties: [{ + name: "text", + type: "String", + isBody: true + }, { + name: "textFormat", + "default": "text/plain", + isAttr: true, + type: "String" + }] +}, { + name: "Event", + isAbstract: true, + superClass: ["FlowNode", "InteractionNode"], + properties: [{ + name: "properties", + type: "Property", + isMany: true + }] +}, { + name: "IntermediateCatchEvent", + superClass: ["CatchEvent"] +}, { + name: "IntermediateThrowEvent", + superClass: ["ThrowEvent"] +}, { + name: "EndEvent", + superClass: ["ThrowEvent"] +}, { + name: "StartEvent", + superClass: ["CatchEvent"], + properties: [{ + name: "isInterrupting", + "default": true, + isAttr: true, + type: "Boolean" + }] +}, { + name: "ThrowEvent", + isAbstract: true, + superClass: ["Event"], + properties: [{ + name: "dataInputs", + type: "DataInput", + isMany: true + }, { + name: "dataInputAssociations", + type: "DataInputAssociation", + isMany: true + }, { + name: "inputSet", + type: "InputSet" + }, { + name: "eventDefinitions", + type: "EventDefinition", + isMany: true + }, { + name: "eventDefinitionRef", + type: "EventDefinition", + isMany: true, + isReference: true + }] +}, { + name: "CatchEvent", + isAbstract: true, + superClass: ["Event"], + properties: [{ + name: "parallelMultiple", + isAttr: true, + type: "Boolean", + "default": false + }, { + name: "dataOutputs", + type: "DataOutput", + isMany: true + }, { + name: "dataOutputAssociations", + type: "DataOutputAssociation", + isMany: true + }, { + name: "outputSet", + type: "OutputSet" + }, { + name: "eventDefinitions", + type: "EventDefinition", + isMany: true + }, { + name: "eventDefinitionRef", + type: "EventDefinition", + isMany: true, + isReference: true + }] +}, { + name: "BoundaryEvent", + superClass: ["CatchEvent"], + properties: [{ + name: "cancelActivity", + "default": true, + isAttr: true, + type: "Boolean" + }, { + name: "attachedToRef", + type: "Activity", + isAttr: true, + isReference: true + }] +}, { + name: "EventDefinition", + isAbstract: true, + superClass: ["RootElement"] +}, { + name: "CancelEventDefinition", + superClass: ["EventDefinition"] +}, { + name: "ErrorEventDefinition", + superClass: ["EventDefinition"], + properties: [{ + name: "errorRef", + type: "Error", + isAttr: true, + isReference: true + }] +}, { + name: "TerminateEventDefinition", + superClass: ["EventDefinition"] +}, { + name: "EscalationEventDefinition", + superClass: ["EventDefinition"], + properties: [{ + name: "escalationRef", + type: "Escalation", + isAttr: true, + isReference: true + }] +}, { + name: "Escalation", + properties: [{ + name: "structureRef", + type: "ItemDefinition", + isAttr: true, + isReference: true + }, { + name: "name", + isAttr: true, + type: "String" + }, { + name: "escalationCode", + isAttr: true, + type: "String" + }], + superClass: ["RootElement"] +}, { + name: "CompensateEventDefinition", + superClass: ["EventDefinition"], + properties: [{ + name: "waitForCompletion", + isAttr: true, + type: "Boolean", + "default": true + }, { + name: "activityRef", + type: "Activity", + isAttr: true, + isReference: true + }] +}, { + name: "TimerEventDefinition", + superClass: ["EventDefinition"], + properties: [{ + name: "timeDate", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }, { + name: "timeCycle", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }, { + name: "timeDuration", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }] +}, { + name: "LinkEventDefinition", + superClass: ["EventDefinition"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "target", + type: "LinkEventDefinition", + isAttr: true, + isReference: true + }, { + name: "source", + type: "LinkEventDefinition", + isMany: true, + isReference: true + }] +}, { + name: "MessageEventDefinition", + superClass: ["EventDefinition"], + properties: [{ + name: "messageRef", + type: "Message", + isAttr: true, + isReference: true + }, { + name: "operationRef", + type: "Operation", + isAttr: true, + isReference: true + }] +}, { + name: "ConditionalEventDefinition", + superClass: ["EventDefinition"], + properties: [{ + name: "condition", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }] +}, { + name: "SignalEventDefinition", + superClass: ["EventDefinition"], + properties: [{ + name: "signalRef", + type: "Signal", + isAttr: true, + isReference: true + }] +}, { + name: "Signal", + superClass: ["RootElement"], + properties: [{ + name: "structureRef", + type: "ItemDefinition", + isAttr: true, + isReference: true + }, { + name: "name", + isAttr: true, + type: "String" + }] +}, { + name: "ImplicitThrowEvent", + superClass: ["ThrowEvent"] +}, { + name: "DataState", + superClass: ["BaseElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }] +}, { + name: "ItemAwareElement", + superClass: ["BaseElement"], + properties: [{ + name: "itemSubjectRef", + type: "ItemDefinition", + isAttr: true, + isReference: true + }, { + name: "dataState", + type: "DataState" + }] +}, { + name: "DataAssociation", + superClass: ["BaseElement"], + properties: [{ + name: "sourceRef", + type: "ItemAwareElement", + isMany: true, + isReference: true + }, { + name: "targetRef", + type: "ItemAwareElement", + isReference: true + }, { + name: "transformation", + type: "FormalExpression", + xml: { + serialize: "property" + } + }, { + name: "assignment", + type: "Assignment", + isMany: true + }] +}, { + name: "DataInput", + superClass: ["ItemAwareElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "isCollection", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "inputSetRef", + type: "InputSet", + isMany: true, + isVirtual: true, + isReference: true + }, { + name: "inputSetWithOptional", + type: "InputSet", + isMany: true, + isVirtual: true, + isReference: true + }, { + name: "inputSetWithWhileExecuting", + type: "InputSet", + isMany: true, + isVirtual: true, + isReference: true + }] +}, { + name: "DataOutput", + superClass: ["ItemAwareElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "isCollection", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "outputSetRef", + type: "OutputSet", + isMany: true, + isVirtual: true, + isReference: true + }, { + name: "outputSetWithOptional", + type: "OutputSet", + isMany: true, + isVirtual: true, + isReference: true + }, { + name: "outputSetWithWhileExecuting", + type: "OutputSet", + isMany: true, + isVirtual: true, + isReference: true + }] +}, { + name: "InputSet", + superClass: ["BaseElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "dataInputRefs", + type: "DataInput", + isMany: true, + isReference: true + }, { + name: "optionalInputRefs", + type: "DataInput", + isMany: true, + isReference: true + }, { + name: "whileExecutingInputRefs", + type: "DataInput", + isMany: true, + isReference: true + }, { + name: "outputSetRefs", + type: "OutputSet", + isMany: true, + isReference: true + }] +}, { + name: "OutputSet", + superClass: ["BaseElement"], + properties: [{ + name: "dataOutputRefs", + type: "DataOutput", + isMany: true, + isReference: true + }, { + name: "name", + isAttr: true, + type: "String" + }, { + name: "inputSetRefs", + type: "InputSet", + isMany: true, + isReference: true + }, { + name: "optionalOutputRefs", + type: "DataOutput", + isMany: true, + isReference: true + }, { + name: "whileExecutingOutputRefs", + type: "DataOutput", + isMany: true, + isReference: true + }] +}, { + name: "Property", + superClass: ["ItemAwareElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }] +}, { + name: "DataInputAssociation", + superClass: ["DataAssociation"] +}, { + name: "DataOutputAssociation", + superClass: ["DataAssociation"] +}, { + name: "InputOutputSpecification", + superClass: ["BaseElement"], + properties: [{ + name: "dataInputs", + type: "DataInput", + isMany: true + }, { + name: "dataOutputs", + type: "DataOutput", + isMany: true + }, { + name: "inputSets", + type: "InputSet", + isMany: true + }, { + name: "outputSets", + type: "OutputSet", + isMany: true + }] +}, { + name: "DataObject", + superClass: ["FlowElement", "ItemAwareElement"], + properties: [{ + name: "isCollection", + "default": false, + isAttr: true, + type: "Boolean" + }] +}, { + name: "InputOutputBinding", + properties: [{ + name: "inputDataRef", + type: "InputSet", + isAttr: true, + isReference: true + }, { + name: "outputDataRef", + type: "OutputSet", + isAttr: true, + isReference: true + }, { + name: "operationRef", + type: "Operation", + isAttr: true, + isReference: true + }] +}, { + name: "Assignment", + superClass: ["BaseElement"], + properties: [{ + name: "from", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }, { + name: "to", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }] +}, { + name: "DataStore", + superClass: ["RootElement", "ItemAwareElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "capacity", + isAttr: true, + type: "Integer" + }, { + name: "isUnlimited", + "default": true, + isAttr: true, + type: "Boolean" + }] +}, { + name: "DataStoreReference", + superClass: ["ItemAwareElement", "FlowElement"], + properties: [{ + name: "dataStoreRef", + type: "DataStore", + isAttr: true, + isReference: true + }] +}, { + name: "DataObjectReference", + superClass: ["ItemAwareElement", "FlowElement"], + properties: [{ + name: "dataObjectRef", + type: "DataObject", + isAttr: true, + isReference: true + }] +}, { + name: "ConversationLink", + superClass: ["BaseElement"], + properties: [{ + name: "sourceRef", + type: "InteractionNode", + isAttr: true, + isReference: true + }, { + name: "targetRef", + type: "InteractionNode", + isAttr: true, + isReference: true + }, { + name: "name", + isAttr: true, + type: "String" + }] +}, { + name: "ConversationAssociation", + superClass: ["BaseElement"], + properties: [{ + name: "innerConversationNodeRef", + type: "ConversationNode", + isAttr: true, + isReference: true + }, { + name: "outerConversationNodeRef", + type: "ConversationNode", + isAttr: true, + isReference: true + }] +}, { + name: "CallConversation", + superClass: ["ConversationNode"], + properties: [{ + name: "calledCollaborationRef", + type: "Collaboration", + isAttr: true, + isReference: true + }, { + name: "participantAssociations", + type: "ParticipantAssociation", + isMany: true + }] +}, { + name: "Conversation", + superClass: ["ConversationNode"] +}, { + name: "SubConversation", + superClass: ["ConversationNode"], + properties: [{ + name: "conversationNodes", + type: "ConversationNode", + isMany: true + }] +}, { + name: "ConversationNode", + isAbstract: true, + superClass: ["InteractionNode", "BaseElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "participantRef", + type: "Participant", + isMany: true, + isReference: true + }, { + name: "messageFlowRefs", + type: "MessageFlow", + isMany: true, + isReference: true + }, { + name: "correlationKeys", + type: "CorrelationKey", + isMany: true + }] +}, { + name: "GlobalConversation", + superClass: ["Collaboration"] +}, { + name: "PartnerEntity", + superClass: ["RootElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "participantRef", + type: "Participant", + isMany: true, + isReference: true + }] +}, { + name: "PartnerRole", + superClass: ["RootElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "participantRef", + type: "Participant", + isMany: true, + isReference: true + }] +}, { + name: "CorrelationProperty", + superClass: ["RootElement"], + properties: [{ + name: "correlationPropertyRetrievalExpression", + type: "CorrelationPropertyRetrievalExpression", + isMany: true + }, { + name: "name", + isAttr: true, + type: "String" + }, { + name: "type", + type: "ItemDefinition", + isAttr: true, + isReference: true + }] +}, { + name: "Error", + superClass: ["RootElement"], + properties: [{ + name: "structureRef", + type: "ItemDefinition", + isAttr: true, + isReference: true + }, { + name: "name", + isAttr: true, + type: "String" + }, { + name: "errorCode", + isAttr: true, + type: "String" + }] +}, { + name: "CorrelationKey", + superClass: ["BaseElement"], + properties: [{ + name: "correlationPropertyRef", + type: "CorrelationProperty", + isMany: true, + isReference: true + }, { + name: "name", + isAttr: true, + type: "String" + }] +}, { + name: "Expression", + superClass: ["BaseElement"], + isAbstract: false, + properties: [{ + name: "body", + isBody: true, + type: "String" + }] +}, { + name: "FormalExpression", + superClass: ["Expression"], + properties: [{ + name: "language", + isAttr: true, + type: "String" + }, { + name: "evaluatesToTypeRef", + type: "ItemDefinition", + isAttr: true, + isReference: true + }] +}, { + name: "Message", + superClass: ["RootElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "itemRef", + type: "ItemDefinition", + isAttr: true, + isReference: true + }] +}, { + name: "ItemDefinition", + superClass: ["RootElement"], + properties: [{ + name: "itemKind", + type: "ItemKind", + isAttr: true + }, { + name: "structureRef", + isAttr: true, + type: "String" + }, { + name: "isCollection", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "import", + type: "Import", + isAttr: true, + isReference: true + }] +}, { + name: "FlowElement", + isAbstract: true, + superClass: ["BaseElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "auditing", + type: "Auditing" + }, { + name: "monitoring", + type: "Monitoring" + }, { + name: "categoryValueRef", + type: "CategoryValue", + isMany: true, + isReference: true + }] +}, { + name: "SequenceFlow", + superClass: ["FlowElement"], + properties: [{ + name: "isImmediate", + isAttr: true, + type: "Boolean" + }, { + name: "conditionExpression", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }, { + name: "sourceRef", + type: "FlowNode", + isAttr: true, + isReference: true + }, { + name: "targetRef", + type: "FlowNode", + isAttr: true, + isReference: true + }] +}, { + name: "FlowElementsContainer", + isAbstract: true, + superClass: ["BaseElement"], + properties: [{ + name: "laneSets", + type: "LaneSet", + isMany: true + }, { + name: "flowElements", + type: "FlowElement", + isMany: true + }] +}, { + name: "CallableElement", + isAbstract: true, + superClass: ["RootElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "ioSpecification", + type: "InputOutputSpecification", + xml: { + serialize: "property" + } + }, { + name: "supportedInterfaceRef", + type: "Interface", + isMany: true, + isReference: true + }, { + name: "ioBinding", + type: "InputOutputBinding", + isMany: true, + xml: { + serialize: "property" + } + }] +}, { + name: "FlowNode", + isAbstract: true, + superClass: ["FlowElement"], + properties: [{ + name: "incoming", + type: "SequenceFlow", + isMany: true, + isReference: true + }, { + name: "outgoing", + type: "SequenceFlow", + isMany: true, + isReference: true + }, { + name: "lanes", + type: "Lane", + isMany: true, + isVirtual: true, + isReference: true + }] +}, { + name: "CorrelationPropertyRetrievalExpression", + superClass: ["BaseElement"], + properties: [{ + name: "messagePath", + type: "FormalExpression" + }, { + name: "messageRef", + type: "Message", + isAttr: true, + isReference: true + }] +}, { + name: "CorrelationPropertyBinding", + superClass: ["BaseElement"], + properties: [{ + name: "dataPath", + type: "FormalExpression" + }, { + name: "correlationPropertyRef", + type: "CorrelationProperty", + isAttr: true, + isReference: true + }] +}, { + name: "Resource", + superClass: ["RootElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "resourceParameters", + type: "ResourceParameter", + isMany: true + }] +}, { + name: "ResourceParameter", + superClass: ["BaseElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "isRequired", + isAttr: true, + type: "Boolean" + }, { + name: "type", + type: "ItemDefinition", + isAttr: true, + isReference: true + }] +}, { + name: "CorrelationSubscription", + superClass: ["BaseElement"], + properties: [{ + name: "correlationKeyRef", + type: "CorrelationKey", + isAttr: true, + isReference: true + }, { + name: "correlationPropertyBinding", + type: "CorrelationPropertyBinding", + isMany: true + }] +}, { + name: "MessageFlow", + superClass: ["BaseElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "sourceRef", + type: "InteractionNode", + isAttr: true, + isReference: true + }, { + name: "targetRef", + type: "InteractionNode", + isAttr: true, + isReference: true + }, { + name: "messageRef", + type: "Message", + isAttr: true, + isReference: true + }] +}, { + name: "MessageFlowAssociation", + superClass: ["BaseElement"], + properties: [{ + name: "innerMessageFlowRef", + type: "MessageFlow", + isAttr: true, + isReference: true + }, { + name: "outerMessageFlowRef", + type: "MessageFlow", + isAttr: true, + isReference: true + }] +}, { + name: "InteractionNode", + isAbstract: true, + properties: [{ + name: "incomingConversationLinks", + type: "ConversationLink", + isMany: true, + isVirtual: true, + isReference: true + }, { + name: "outgoingConversationLinks", + type: "ConversationLink", + isMany: true, + isVirtual: true, + isReference: true + }] +}, { + name: "Participant", + superClass: ["InteractionNode", "BaseElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "interfaceRef", + type: "Interface", + isMany: true, + isReference: true + }, { + name: "participantMultiplicity", + type: "ParticipantMultiplicity" + }, { + name: "endPointRefs", + type: "EndPoint", + isMany: true, + isReference: true + }, { + name: "processRef", + type: "Process", + isAttr: true, + isReference: true + }] +}, { + name: "ParticipantAssociation", + superClass: ["BaseElement"], + properties: [{ + name: "innerParticipantRef", + type: "Participant", + isAttr: true, + isReference: true + }, { + name: "outerParticipantRef", + type: "Participant", + isAttr: true, + isReference: true + }] +}, { + name: "ParticipantMultiplicity", + properties: [{ + name: "minimum", + "default": 0, + isAttr: true, + type: "Integer" + }, { + name: "maximum", + "default": 1, + isAttr: true, + type: "Integer" + }], + superClass: ["BaseElement"] +}, { + name: "Collaboration", + superClass: ["RootElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "isClosed", + isAttr: true, + type: "Boolean" + }, { + name: "participants", + type: "Participant", + isMany: true + }, { + name: "messageFlows", + type: "MessageFlow", + isMany: true + }, { + name: "artifacts", + type: "Artifact", + isMany: true + }, { + name: "conversations", + type: "ConversationNode", + isMany: true + }, { + name: "conversationAssociations", + type: "ConversationAssociation" + }, { + name: "participantAssociations", + type: "ParticipantAssociation", + isMany: true + }, { + name: "messageFlowAssociations", + type: "MessageFlowAssociation", + isMany: true + }, { + name: "correlationKeys", + type: "CorrelationKey", + isMany: true + }, { + name: "choreographyRef", + type: "Choreography", + isMany: true, + isReference: true + }, { + name: "conversationLinks", + type: "ConversationLink", + isMany: true + }] +}, { + name: "ChoreographyActivity", + isAbstract: true, + superClass: ["FlowNode"], + properties: [{ + name: "participantRef", + type: "Participant", + isMany: true, + isReference: true + }, { + name: "initiatingParticipantRef", + type: "Participant", + isAttr: true, + isReference: true + }, { + name: "correlationKeys", + type: "CorrelationKey", + isMany: true + }, { + name: "loopType", + type: "ChoreographyLoopType", + "default": "None", + isAttr: true + }] +}, { + name: "CallChoreography", + superClass: ["ChoreographyActivity"], + properties: [{ + name: "calledChoreographyRef", + type: "Choreography", + isAttr: true, + isReference: true + }, { + name: "participantAssociations", + type: "ParticipantAssociation", + isMany: true + }] +}, { + name: "SubChoreography", + superClass: ["ChoreographyActivity", "FlowElementsContainer"], + properties: [{ + name: "artifacts", + type: "Artifact", + isMany: true + }] +}, { + name: "ChoreographyTask", + superClass: ["ChoreographyActivity"], + properties: [{ + name: "messageFlowRef", + type: "MessageFlow", + isMany: true, + isReference: true + }] +}, { + name: "Choreography", + superClass: ["Collaboration", "FlowElementsContainer"] +}, { + name: "GlobalChoreographyTask", + superClass: ["Choreography"], + properties: [{ + name: "initiatingParticipantRef", + type: "Participant", + isAttr: true, + isReference: true + }] +}, { + name: "TextAnnotation", + superClass: ["Artifact"], + properties: [{ + name: "text", + type: "String" + }, { + name: "textFormat", + "default": "text/plain", + isAttr: true, + type: "String" + }] +}, { + name: "Group", + superClass: ["Artifact"], + properties: [{ + name: "categoryValueRef", + type: "CategoryValue", + isAttr: true, + isReference: true + }] +}, { + name: "Association", + superClass: ["Artifact"], + properties: [{ + name: "associationDirection", + type: "AssociationDirection", + isAttr: true + }, { + name: "sourceRef", + type: "BaseElement", + isAttr: true, + isReference: true + }, { + name: "targetRef", + type: "BaseElement", + isAttr: true, + isReference: true + }] +}, { + name: "Category", + superClass: ["RootElement"], + properties: [{ + name: "categoryValue", + type: "CategoryValue", + isMany: true + }, { + name: "name", + isAttr: true, + type: "String" + }] +}, { + name: "Artifact", + isAbstract: true, + superClass: ["BaseElement"] +}, { + name: "CategoryValue", + superClass: ["BaseElement"], + properties: [{ + name: "categorizedFlowElements", + type: "FlowElement", + isMany: true, + isVirtual: true, + isReference: true + }, { + name: "value", + isAttr: true, + type: "String" + }] +}, { + name: "Activity", + isAbstract: true, + superClass: ["FlowNode"], + properties: [{ + name: "isForCompensation", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "default", + type: "SequenceFlow", + isAttr: true, + isReference: true + }, { + name: "ioSpecification", + type: "InputOutputSpecification", + xml: { + serialize: "property" + } + }, { + name: "boundaryEventRefs", + type: "BoundaryEvent", + isMany: true, + isReference: true + }, { + name: "properties", + type: "Property", + isMany: true + }, { + name: "dataInputAssociations", + type: "DataInputAssociation", + isMany: true + }, { + name: "dataOutputAssociations", + type: "DataOutputAssociation", + isMany: true + }, { + name: "startQuantity", + "default": 1, + isAttr: true, + type: "Integer" + }, { + name: "resources", + type: "ResourceRole", + isMany: true + }, { + name: "completionQuantity", + "default": 1, + isAttr: true, + type: "Integer" + }, { + name: "loopCharacteristics", + type: "LoopCharacteristics" + }] +}, { + name: "ServiceTask", + superClass: ["Task"], + properties: [{ + name: "implementation", + isAttr: true, + type: "String" + }, { + name: "operationRef", + type: "Operation", + isAttr: true, + isReference: true + }] +}, { + name: "SubProcess", + superClass: ["Activity", "FlowElementsContainer", "InteractionNode"], + properties: [{ + name: "triggeredByEvent", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "artifacts", + type: "Artifact", + isMany: true + }] +}, { + name: "LoopCharacteristics", + isAbstract: true, + superClass: ["BaseElement"] +}, { + name: "MultiInstanceLoopCharacteristics", + superClass: ["LoopCharacteristics"], + properties: [{ + name: "isSequential", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "behavior", + type: "MultiInstanceBehavior", + "default": "All", + isAttr: true + }, { + name: "loopCardinality", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }, { + name: "loopDataInputRef", + type: "ItemAwareElement", + isReference: true + }, { + name: "loopDataOutputRef", + type: "ItemAwareElement", + isReference: true + }, { + name: "inputDataItem", + type: "DataInput", + xml: { + serialize: "property" + } + }, { + name: "outputDataItem", + type: "DataOutput", + xml: { + serialize: "property" + } + }, { + name: "complexBehaviorDefinition", + type: "ComplexBehaviorDefinition", + isMany: true + }, { + name: "completionCondition", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }, { + name: "oneBehaviorEventRef", + type: "EventDefinition", + isAttr: true, + isReference: true + }, { + name: "noneBehaviorEventRef", + type: "EventDefinition", + isAttr: true, + isReference: true + }] +}, { + name: "StandardLoopCharacteristics", + superClass: ["LoopCharacteristics"], + properties: [{ + name: "testBefore", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "loopCondition", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }, { + name: "loopMaximum", + type: "Integer", + isAttr: true + }] +}, { + name: "CallActivity", + superClass: ["Activity", "InteractionNode"], + properties: [{ + name: "calledElement", + type: "String", + isAttr: true + }] +}, { + name: "Task", + superClass: ["Activity", "InteractionNode"] +}, { + name: "SendTask", + superClass: ["Task"], + properties: [{ + name: "implementation", + isAttr: true, + type: "String" + }, { + name: "operationRef", + type: "Operation", + isAttr: true, + isReference: true + }, { + name: "messageRef", + type: "Message", + isAttr: true, + isReference: true + }] +}, { + name: "ReceiveTask", + superClass: ["Task"], + properties: [{ + name: "implementation", + isAttr: true, + type: "String" + }, { + name: "instantiate", + "default": false, + isAttr: true, + type: "Boolean" + }, { + name: "operationRef", + type: "Operation", + isAttr: true, + isReference: true + }, { + name: "messageRef", + type: "Message", + isAttr: true, + isReference: true + }] +}, { + name: "ScriptTask", + superClass: ["Task"], + properties: [{ + name: "scriptFormat", + isAttr: true, + type: "String" + }, { + name: "script", + type: "String" + }] +}, { + name: "BusinessRuleTask", + superClass: ["Task"], + properties: [{ + name: "implementation", + isAttr: true, + type: "String" + }] +}, { + name: "AdHocSubProcess", + superClass: ["SubProcess"], + properties: [{ + name: "completionCondition", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }, { + name: "ordering", + type: "AdHocOrdering", + isAttr: true + }, { + name: "cancelRemainingInstances", + "default": true, + isAttr: true, + type: "Boolean" + }] +}, { + name: "Transaction", + superClass: ["SubProcess"], + properties: [{ + name: "protocol", + isAttr: true, + type: "String" + }, { + name: "method", + isAttr: true, + type: "String" + }] +}, { + name: "GlobalScriptTask", + superClass: ["GlobalTask"], + properties: [{ + name: "scriptLanguage", + isAttr: true, + type: "String" + }, { + name: "script", + isAttr: true, + type: "String" + }] +}, { + name: "GlobalBusinessRuleTask", + superClass: ["GlobalTask"], + properties: [{ + name: "implementation", + isAttr: true, + type: "String" + }] +}, { + name: "ComplexBehaviorDefinition", + superClass: ["BaseElement"], + properties: [{ + name: "condition", + type: "FormalExpression" + }, { + name: "event", + type: "ImplicitThrowEvent" + }] +}, { + name: "ResourceRole", + superClass: ["BaseElement"], + properties: [{ + name: "resourceRef", + type: "Resource", + isReference: true + }, { + name: "resourceParameterBindings", + type: "ResourceParameterBinding", + isMany: true + }, { + name: "resourceAssignmentExpression", + type: "ResourceAssignmentExpression" + }, { + name: "name", + isAttr: true, + type: "String" + }] +}, { + name: "ResourceParameterBinding", + properties: [{ + name: "expression", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }, { + name: "parameterRef", + type: "ResourceParameter", + isAttr: true, + isReference: true + }], + superClass: ["BaseElement"] +}, { + name: "ResourceAssignmentExpression", + properties: [{ + name: "expression", + type: "Expression", + xml: { + serialize: "xsi:type" + } + }], + superClass: ["BaseElement"] +}, { + name: "Import", + properties: [{ + name: "importType", + isAttr: true, + type: "String" + }, { + name: "location", + isAttr: true, + type: "String" + }, { + name: "namespace", + isAttr: true, + type: "String" + }] +}, { + name: "Definitions", + superClass: ["BaseElement"], + properties: [{ + name: "name", + isAttr: true, + type: "String" + }, { + name: "targetNamespace", + isAttr: true, + type: "String" + }, { + name: "expressionLanguage", + "default": "http://www.w3.org/1999/XPath", + isAttr: true, + type: "String" + }, { + name: "typeLanguage", + "default": "http://www.w3.org/2001/XMLSchema", + isAttr: true, + type: "String" + }, { + name: "imports", + type: "Import", + isMany: true + }, { + name: "extensions", + type: "Extension", + isMany: true + }, { + name: "rootElements", + type: "RootElement", + isMany: true + }, { + name: "diagrams", + isMany: true, + type: "bpmndi:BPMNDiagram" + }, { + name: "exporter", + isAttr: true, + type: "String" + }, { + name: "relationships", + type: "Relationship", + isMany: true + }, { + name: "exporterVersion", + isAttr: true, + type: "String" + }] +}]; +var enumerations$3 = [{ + name: "ProcessType", + literalValues: [{ + name: "None" + }, { + name: "Public" + }, { + name: "Private" + }] +}, { + name: "GatewayDirection", + literalValues: [{ + name: "Unspecified" + }, { + name: "Converging" + }, { + name: "Diverging" + }, { + name: "Mixed" + }] +}, { + name: "EventBasedGatewayType", + literalValues: [{ + name: "Parallel" + }, { + name: "Exclusive" + }] +}, { + name: "RelationshipDirection", + literalValues: [{ + name: "None" + }, { + name: "Forward" + }, { + name: "Backward" + }, { + name: "Both" + }] +}, { + name: "ItemKind", + literalValues: [{ + name: "Physical" + }, { + name: "Information" + }] +}, { + name: "ChoreographyLoopType", + literalValues: [{ + name: "None" + }, { + name: "Standard" + }, { + name: "MultiInstanceSequential" + }, { + name: "MultiInstanceParallel" + }] +}, { + name: "AssociationDirection", + literalValues: [{ + name: "None" + }, { + name: "One" + }, { + name: "Both" + }] +}, { + name: "MultiInstanceBehavior", + literalValues: [{ + name: "None" + }, { + name: "One" + }, { + name: "All" + }, { + name: "Complex" + }] +}, { + name: "AdHocOrdering", + literalValues: [{ + name: "Parallel" + }, { + name: "Sequential" + }] +}]; +var xml$1 = { + tagAlias: "lowerCase", + typePrefix: "t" +}; +var BpmnPackage = { + name: name$5, + uri: uri$5, + prefix: prefix$5, + associations: associations$5, + types: types$5, + enumerations: enumerations$3, + xml: xml$1 +}; +var name$4 = "BPMNDI"; +var uri$4 = "http://www.omg.org/spec/BPMN/20100524/DI"; +var prefix$4 = "bpmndi"; +var types$4 = [{ + name: "BPMNDiagram", + properties: [{ + name: "plane", + type: "BPMNPlane", + redefines: "di:Diagram#rootElement" + }, { + name: "labelStyle", + type: "BPMNLabelStyle", + isMany: true + }], + superClass: ["di:Diagram"] +}, { + name: "BPMNPlane", + properties: [{ + name: "bpmnElement", + isAttr: true, + isReference: true, + type: "bpmn:BaseElement", + redefines: "di:DiagramElement#modelElement" + }], + superClass: ["di:Plane"] +}, { + name: "BPMNShape", + properties: [{ + name: "bpmnElement", + isAttr: true, + isReference: true, + type: "bpmn:BaseElement", + redefines: "di:DiagramElement#modelElement" + }, { + name: "isHorizontal", + isAttr: true, + type: "Boolean" + }, { + name: "isExpanded", + isAttr: true, + type: "Boolean" + }, { + name: "isMarkerVisible", + isAttr: true, + type: "Boolean" + }, { + name: "label", + type: "BPMNLabel" + }, { + name: "isMessageVisible", + isAttr: true, + type: "Boolean" + }, { + name: "participantBandKind", + type: "ParticipantBandKind", + isAttr: true + }, { + name: "choreographyActivityShape", + type: "BPMNShape", + isAttr: true, + isReference: true + }], + superClass: ["di:LabeledShape"] +}, { + name: "BPMNEdge", + properties: [{ + name: "label", + type: "BPMNLabel" + }, { + name: "bpmnElement", + isAttr: true, + isReference: true, + type: "bpmn:BaseElement", + redefines: "di:DiagramElement#modelElement" + }, { + name: "sourceElement", + isAttr: true, + isReference: true, + type: "di:DiagramElement", + redefines: "di:Edge#source" + }, { + name: "targetElement", + isAttr: true, + isReference: true, + type: "di:DiagramElement", + redefines: "di:Edge#target" + }, { + name: "messageVisibleKind", + type: "MessageVisibleKind", + isAttr: true, + "default": "initiating" + }], + superClass: ["di:LabeledEdge"] +}, { + name: "BPMNLabel", + properties: [{ + name: "labelStyle", + type: "BPMNLabelStyle", + isAttr: true, + isReference: true, + redefines: "di:DiagramElement#style" + }], + superClass: ["di:Label"] +}, { + name: "BPMNLabelStyle", + properties: [{ + name: "font", + type: "dc:Font" + }], + superClass: ["di:Style"] +}]; +var enumerations$2 = [{ + name: "ParticipantBandKind", + literalValues: [{ + name: "top_initiating" + }, { + name: "middle_initiating" + }, { + name: "bottom_initiating" + }, { + name: "top_non_initiating" + }, { + name: "middle_non_initiating" + }, { + name: "bottom_non_initiating" + }] +}, { + name: "MessageVisibleKind", + literalValues: [{ + name: "initiating" + }, { + name: "non_initiating" + }] +}]; +var associations$4 = []; +var BpmnDiPackage = { + name: name$4, + uri: uri$4, + prefix: prefix$4, + types: types$4, + enumerations: enumerations$2, + associations: associations$4 +}; +var name$3 = "DC"; +var uri$3 = "http://www.omg.org/spec/DD/20100524/DC"; +var prefix$3 = "dc"; +var types$3 = [{ + name: "Boolean" +}, { + name: "Integer" +}, { + name: "Real" +}, { + name: "String" +}, { + name: "Font", + properties: [{ + name: "name", + type: "String", + isAttr: true + }, { + name: "size", + type: "Real", + isAttr: true + }, { + name: "isBold", + type: "Boolean", + isAttr: true + }, { + name: "isItalic", + type: "Boolean", + isAttr: true + }, { + name: "isUnderline", + type: "Boolean", + isAttr: true + }, { + name: "isStrikeThrough", + type: "Boolean", + isAttr: true + }] +}, { + name: "Point", + properties: [{ + name: "x", + type: "Real", + "default": "0", + isAttr: true + }, { + name: "y", + type: "Real", + "default": "0", + isAttr: true + }] +}, { + name: "Bounds", + properties: [{ + name: "x", + type: "Real", + "default": "0", + isAttr: true + }, { + name: "y", + type: "Real", + "default": "0", + isAttr: true + }, { + name: "width", + type: "Real", + isAttr: true + }, { + name: "height", + type: "Real", + isAttr: true + }] +}]; +var associations$3 = []; +var DcPackage = { + name: name$3, + uri: uri$3, + prefix: prefix$3, + types: types$3, + associations: associations$3 +}; +var name$2 = "DI"; +var uri$2 = "http://www.omg.org/spec/DD/20100524/DI"; +var prefix$2 = "di"; +var types$2 = [{ + name: "DiagramElement", + isAbstract: true, + properties: [{ + name: "id", + isAttr: true, + isId: true, + type: "String" + }, { + name: "extension", + type: "Extension" + }, { + name: "owningDiagram", + type: "Diagram", + isReadOnly: true, + isVirtual: true, + isReference: true + }, { + name: "owningElement", + type: "DiagramElement", + isReadOnly: true, + isVirtual: true, + isReference: true + }, { + name: "modelElement", + isReadOnly: true, + isVirtual: true, + isReference: true, + type: "Element" + }, { + name: "style", + type: "Style", + isReadOnly: true, + isVirtual: true, + isReference: true + }, { + name: "ownedElement", + type: "DiagramElement", + isReadOnly: true, + isMany: true, + isVirtual: true + }] +}, { + name: "Node", + isAbstract: true, + superClass: ["DiagramElement"] +}, { + name: "Edge", + isAbstract: true, + superClass: ["DiagramElement"], + properties: [{ + name: "source", + type: "DiagramElement", + isReadOnly: true, + isVirtual: true, + isReference: true + }, { + name: "target", + type: "DiagramElement", + isReadOnly: true, + isVirtual: true, + isReference: true + }, { + name: "waypoint", + isUnique: false, + isMany: true, + type: "dc:Point", + xml: { + serialize: "xsi:type" + } + }] +}, { + name: "Diagram", + isAbstract: true, + properties: [{ + name: "id", + isAttr: true, + isId: true, + type: "String" + }, { + name: "rootElement", + type: "DiagramElement", + isReadOnly: true, + isVirtual: true + }, { + name: "name", + isAttr: true, + type: "String" + }, { + name: "documentation", + isAttr: true, + type: "String" + }, { + name: "resolution", + isAttr: true, + type: "Real" + }, { + name: "ownedStyle", + type: "Style", + isReadOnly: true, + isMany: true, + isVirtual: true + }] +}, { + name: "Shape", + isAbstract: true, + superClass: ["Node"], + properties: [{ + name: "bounds", + type: "dc:Bounds" + }] +}, { + name: "Plane", + isAbstract: true, + superClass: ["Node"], + properties: [{ + name: "planeElement", + type: "DiagramElement", + subsettedProperty: "DiagramElement-ownedElement", + isMany: true + }] +}, { + name: "LabeledEdge", + isAbstract: true, + superClass: ["Edge"], + properties: [{ + name: "ownedLabel", + type: "Label", + isReadOnly: true, + subsettedProperty: "DiagramElement-ownedElement", + isMany: true, + isVirtual: true + }] +}, { + name: "LabeledShape", + isAbstract: true, + superClass: ["Shape"], + properties: [{ + name: "ownedLabel", + type: "Label", + isReadOnly: true, + subsettedProperty: "DiagramElement-ownedElement", + isMany: true, + isVirtual: true + }] +}, { + name: "Label", + isAbstract: true, + superClass: ["Node"], + properties: [{ + name: "bounds", + type: "dc:Bounds" + }] +}, { + name: "Style", + isAbstract: true, + properties: [{ + name: "id", + isAttr: true, + isId: true, + type: "String" + }] +}, { + name: "Extension", + properties: [{ + name: "values", + isMany: true, + type: "Element" + }] +}]; +var associations$2 = []; +var xml = { + tagAlias: "lowerCase" +}; +var DiPackage = { + name: name$2, + uri: uri$2, + prefix: prefix$2, + types: types$2, + associations: associations$2, + xml: xml +}; +var name$1 = "bpmn.io colors for BPMN"; +var uri$1 = "http://bpmn.io/schema/bpmn/biocolor/1.0"; +var prefix$1 = "bioc"; +var types$1 = [{ + name: "ColoredShape", + "extends": ["bpmndi:BPMNShape"], + properties: [{ + name: "stroke", + isAttr: true, + type: "String" + }, { + name: "fill", + isAttr: true, + type: "String" + }] +}, { + name: "ColoredEdge", + "extends": ["bpmndi:BPMNEdge"], + properties: [{ + name: "stroke", + isAttr: true, + type: "String" + }, { + name: "fill", + isAttr: true, + type: "String" + }] +}]; +var enumerations$1 = []; +var associations$1 = []; +var BiocPackage = { + name: name$1, + uri: uri$1, + prefix: prefix$1, + types: types$1, + enumerations: enumerations$1, + associations: associations$1 +}; +var name = "BPMN in Color"; +var uri = "http://www.omg.org/spec/BPMN/non-normative/color/1.0"; +var prefix = "color"; +var types = [{ + name: "ColoredLabel", + "extends": ["bpmndi:BPMNLabel"], + properties: [{ + name: "color", + isAttr: true, + type: "String" + }] +}, { + name: "ColoredShape", + "extends": ["bpmndi:BPMNShape"], + properties: [{ + name: "background-color", + isAttr: true, + type: "String" + }, { + name: "border-color", + isAttr: true, + type: "String" + }] +}, { + name: "ColoredEdge", + "extends": ["bpmndi:BPMNEdge"], + properties: [{ + name: "border-color", + isAttr: true, + type: "String" + }] +}]; +var enumerations = []; +var associations = []; +var BpmnInColorPackage = { + name: name, + uri: uri, + prefix: prefix, + types: types, + enumerations: enumerations, + associations: associations +}; +var packages = { + bpmn: BpmnPackage, + bpmndi: BpmnDiPackage, + dc: DcPackage, + di: DiPackage, + bioc: BiocPackage, + color: BpmnInColorPackage +}; +function simple(additionalPackages, options) { + var pks = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({}, packages, additionalPackages); + return new BpmnModdle(pks, options); +} + + +/***/ }), + +/***/ 64432: +/*!****************!*\ + !*** min-dash ***! + \****************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ assign: () => (/* binding */ assign), +/* harmony export */ bind: () => (/* binding */ bind), +/* harmony export */ debounce: () => (/* binding */ debounce), +/* harmony export */ ensureArray: () => (/* binding */ ensureArray), +/* harmony export */ every: () => (/* binding */ every), +/* harmony export */ filter: () => (/* binding */ filter), +/* harmony export */ find: () => (/* binding */ find), +/* harmony export */ findIndex: () => (/* binding */ findIndex), +/* harmony export */ flatten: () => (/* binding */ flatten), +/* harmony export */ forEach: () => (/* binding */ forEach), +/* harmony export */ get: () => (/* binding */ get), +/* harmony export */ groupBy: () => (/* binding */ groupBy), +/* harmony export */ has: () => (/* binding */ has), +/* harmony export */ isArray: () => (/* binding */ isArray), +/* harmony export */ isDefined: () => (/* binding */ isDefined), +/* harmony export */ isFunction: () => (/* binding */ isFunction), +/* harmony export */ isNil: () => (/* binding */ isNil), +/* harmony export */ isNumber: () => (/* binding */ isNumber), +/* harmony export */ isObject: () => (/* binding */ isObject), +/* harmony export */ isString: () => (/* binding */ isString), +/* harmony export */ isUndefined: () => (/* binding */ isUndefined), +/* harmony export */ keys: () => (/* binding */ keys), +/* harmony export */ map: () => (/* binding */ map), +/* harmony export */ matchPattern: () => (/* binding */ matchPattern), +/* harmony export */ merge: () => (/* binding */ merge), +/* harmony export */ omit: () => (/* binding */ omit), +/* harmony export */ pick: () => (/* binding */ pick), +/* harmony export */ reduce: () => (/* binding */ reduce), +/* harmony export */ set: () => (/* binding */ set), +/* harmony export */ size: () => (/* binding */ size), +/* harmony export */ some: () => (/* binding */ some), +/* harmony export */ sortBy: () => (/* binding */ sortBy), +/* harmony export */ throttle: () => (/* binding */ throttle), +/* harmony export */ unionBy: () => (/* binding */ unionBy), +/* harmony export */ uniqueBy: () => (/* binding */ uniqueBy), +/* harmony export */ values: () => (/* binding */ values), +/* harmony export */ without: () => (/* binding */ without) +/* harmony export */ }); +/** + * Flatten array, one level deep. + * + * @param {Array} arr + * + * @return {Array} + */ +function flatten(arr) { + return Array.prototype.concat.apply([], arr); +} +var nativeToString = Object.prototype.toString; +var nativeHasOwnProperty = Object.prototype.hasOwnProperty; +function isUndefined(obj) { + return obj === undefined; +} +function isDefined(obj) { + return obj !== undefined; +} +function isNil(obj) { + return obj == null; +} +function isArray(obj) { + return nativeToString.call(obj) === '[object Array]'; +} +function isObject(obj) { + return nativeToString.call(obj) === '[object Object]'; +} +function isNumber(obj) { + return nativeToString.call(obj) === '[object Number]'; +} +function isFunction(obj) { + var tag = nativeToString.call(obj); + return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]'; +} +function isString(obj) { + return nativeToString.call(obj) === '[object String]'; +} +/** + * Ensure collection is an array. + * + * @param {Object} obj + */ + +function ensureArray(obj) { + if (isArray(obj)) { + return; + } + throw new Error('must supply array'); +} +/** + * Return true, if target owns a property with the given key. + * + * @param {Object} target + * @param {String} key + * + * @return {Boolean} + */ + +function has(target, key) { + return nativeHasOwnProperty.call(target, key); +} + +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function|Object} matcher + * + * @return {Object} + */ + +function find(collection, matcher) { + matcher = toMatcher(matcher); + var match; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + match = val; + return false; + } + }); + return match; +} +/** + * Find element index in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Object} + */ + +function findIndex(collection, matcher) { + matcher = toMatcher(matcher); + var idx = isArray(collection) ? -1 : undefined; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + idx = key; + return false; + } + }); + return idx; +} +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Array} result + */ + +function filter(collection, matcher) { + var result = []; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + result.push(val); + } + }); + return result; +} +/** + * Iterate over collection; returning something + * (non-undefined) will stop iteration. + * + * @param {Array|Object} collection + * @param {Function} iterator + * + * @return {Object} return result that stopped the iteration + */ + +function forEach(collection, iterator) { + var val, result; + if (isUndefined(collection)) { + return; + } + var convertKey = isArray(collection) ? toNum : identity; + for (var key in collection) { + if (has(collection, key)) { + val = collection[key]; + result = iterator(val, convertKey(key)); + if (result === false) { + return val; + } + } + } +} +/** + * Return collection without element. + * + * @param {Array} arr + * @param {Function} matcher + * + * @return {Array} + */ + +function without(arr, matcher) { + if (isUndefined(arr)) { + return []; + } + ensureArray(arr); + matcher = toMatcher(matcher); + return arr.filter(function (el, idx) { + return !matcher(el, idx); + }); +} +/** + * Reduce collection, returning a single result. + * + * @param {Object|Array} collection + * @param {Function} iterator + * @param {Any} result + * + * @return {Any} result returned from last iterator + */ + +function reduce(collection, iterator, result) { + forEach(collection, function (value, idx) { + result = iterator(result, value, idx); + }); + return result; +} +/** + * Return true if every element in the collection + * matches the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function every(collection, matcher) { + return !!reduce(collection, function (matches, val, key) { + return matches && matcher(val, key); + }, true); +} +/** + * Return true if some elements in the collection + * match the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function some(collection, matcher) { + return !!find(collection, matcher); +} +/** + * Transform a collection into another collection + * by piping each member through the given fn. + * + * @param {Object|Array} collection + * @param {Function} fn + * + * @return {Array} transformed collection + */ + +function map(collection, fn) { + var result = []; + forEach(collection, function (val, key) { + result.push(fn(val, key)); + }); + return result; +} +/** + * Get the collections keys. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function keys(collection) { + return collection && Object.keys(collection) || []; +} +/** + * Shorthand for `keys(o).length`. + * + * @param {Object|Array} collection + * + * @return {Number} + */ + +function size(collection) { + return keys(collection).length; +} +/** + * Get the values in the collection. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function values(collection) { + return map(collection, function (val) { + return val; + }); +} +/** + * Group collection members by attribute. + * + * @param {Object|Array} collection + * @param {Function} extractor + * + * @return {Object} map with { attrValue => [ a, b, c ] } + */ + +function groupBy(collection, extractor) { + var grouped = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + extractor = toExtractor(extractor); + forEach(collection, function (val) { + var discriminator = extractor(val) || '_'; + var group = grouped[discriminator]; + if (!group) { + group = grouped[discriminator] = []; + } + group.push(val); + }); + return grouped; +} +function uniqueBy(extractor) { + extractor = toExtractor(extractor); + var grouped = {}; + for (var _len = arguments.length, collections = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + collections[_key - 1] = arguments[_key]; + } + forEach(collections, function (c) { + return groupBy(c, extractor, grouped); + }); + var result = map(grouped, function (val, key) { + return val[0]; + }); + return result; +} +var unionBy = uniqueBy; +/** + * Sort collection by criteria. + * + * @param {Object|Array} collection + * @param {String|Function} extractor + * + * @return {Array} + */ + +function sortBy(collection, extractor) { + extractor = toExtractor(extractor); + var sorted = []; + forEach(collection, function (value, key) { + var disc = extractor(value, key); + var entry = { + d: disc, + v: value + }; + for (var idx = 0; idx < sorted.length; idx++) { + var d = sorted[idx].d; + if (disc < d) { + sorted.splice(idx, 0, entry); + return; + } + } // not inserted, append (!) + + sorted.push(entry); + }); + return map(sorted, function (e) { + return e.v; + }); +} +/** + * Create an object pattern matcher. + * + * @example + * + * const matcher = matchPattern({ id: 1 }); + * + * let element = find(elements, matcher); + * + * @param {Object} pattern + * + * @return {Function} matcherFn + */ + +function matchPattern(pattern) { + return function (el) { + return every(pattern, function (val, key) { + return el[key] === val; + }); + }; +} +function toExtractor(extractor) { + return isFunction(extractor) ? extractor : function (e) { + return e[extractor]; + }; +} +function toMatcher(matcher) { + return isFunction(matcher) ? matcher : function (e) { + return e === matcher; + }; +} +function identity(arg) { + return arg; +} +function toNum(arg) { + return Number(arg); +} + +/** + * Debounce fn, calling it only once if the given time + * elapsed between calls. + * + * Lodash-style the function exposes methods to `#clear` + * and `#flush` to control internal behavior. + * + * @param {Function} fn + * @param {Number} timeout + * + * @return {Function} debounced function + */ +function debounce(fn, timeout) { + var timer; + var lastArgs; + var lastThis; + var lastNow; + function fire(force) { + var now = Date.now(); + var scheduledDiff = force ? 0 : lastNow + timeout - now; + if (scheduledDiff > 0) { + return schedule(scheduledDiff); + } + fn.apply(lastThis, lastArgs); + clear(); + } + function schedule(timeout) { + timer = setTimeout(fire, timeout); + } + function clear() { + if (timer) { + clearTimeout(timer); + } + timer = lastNow = lastArgs = lastThis = undefined; + } + function flush() { + if (timer) { + fire(true); + } + clear(); + } + function callback() { + lastNow = Date.now(); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + lastArgs = args; + lastThis = this; // ensure an execution is scheduled + + if (!timer) { + schedule(timeout); + } + } + callback.flush = flush; + callback.cancel = clear; + return callback; +} +/** + * Throttle fn, calling at most once + * in the given interval. + * + * @param {Function} fn + * @param {Number} interval + * + * @return {Function} throttled function + */ + +function throttle(fn, interval) { + var throttling = false; + return function () { + if (throttling) { + return; + } + fn.apply(void 0, arguments); + throttling = true; + setTimeout(function () { + throttling = false; + }, interval); + }; +} +/** + * Bind function against target . + * + * @param {Function} fn + * @param {Object} target + * + * @return {Function} bound function + */ + +function bind(fn, target) { + return fn.bind(target); +} +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + return _typeof(obj); +} +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends.apply(this, arguments); +} + +/** + * Convenience wrapper for `Object.assign`. + * + * @param {Object} target + * @param {...Object} others + * + * @return {Object} the target + */ + +function assign(target) { + for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + others[_key - 1] = arguments[_key]; + } + return _extends.apply(void 0, [target].concat(others)); +} +/** + * Sets a nested property of a given object to the specified value. + * + * This mutates the object and returns it. + * + * @param {Object} target The target of the set operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} value The value to set. + */ + +function set(target, path, value) { + var currentTarget = target; + forEach(path, function (key, idx) { + if (typeof key !== 'number' && typeof key !== 'string') { + throw new Error('illegal key type: ' + _typeof(key) + '. Key should be of type number or string.'); + } + if (key === 'constructor') { + throw new Error('illegal key: constructor'); + } + if (key === '__proto__') { + throw new Error('illegal key: __proto__'); + } + var nextKey = path[idx + 1]; + var nextTarget = currentTarget[key]; + if (isDefined(nextKey) && isNil(nextTarget)) { + nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : []; + } + if (isUndefined(nextKey)) { + if (isUndefined(value)) { + delete currentTarget[key]; + } else { + currentTarget[key] = value; + } + } else { + currentTarget = nextTarget; + } + }); + return target; +} +/** + * Gets a nested property of a given object. + * + * @param {Object} target The target of the get operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} [defaultValue] The value to return if no value exists. + */ + +function get(target, path, defaultValue) { + var currentTarget = target; + forEach(path, function (key) { + // accessing nil property yields + if (isNil(currentTarget)) { + currentTarget = undefined; + return false; + } + currentTarget = currentTarget[key]; + }); + return isUndefined(currentTarget) ? defaultValue : currentTarget; +} +/** + * Pick given properties from the target object. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function pick(target, properties) { + var result = {}; + var obj = Object(target); + forEach(properties, function (prop) { + if (prop in obj) { + result[prop] = target[prop]; + } + }); + return result; +} +/** + * Pick all target properties, excluding the given ones. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function omit(target, properties) { + var result = {}; + var obj = Object(target); + forEach(obj, function (prop, key) { + if (properties.indexOf(key) === -1) { + result[key] = prop; + } + }); + return result; +} +/** + * Recursively merge `...sources` into given target. + * + * Does support merging objects; does not support merging arrays. + * + * @param {Object} target + * @param {...Object} sources + * + * @return {Object} the target + */ + +function merge(target) { + for (var _len2 = arguments.length, sources = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + sources[_key2 - 1] = arguments[_key2]; + } + if (!sources.length) { + return target; + } + forEach(sources, function (source) { + // skip non-obj sources, i.e. null + if (!source || !isObject(source)) { + return; + } + forEach(source, function (sourceVal, key) { + if (key === '__proto__') { + return; + } + var targetVal = target[key]; + if (isObject(sourceVal)) { + if (!isObject(targetVal)) { + // override target[key] with object + targetVal = {}; + } + target[key] = merge(targetVal, sourceVal); + } else { + target[key] = sourceVal; + } + }); + }); + return target; +} + + +/***/ }), + +/***/ 26112: +/*!*********************************************!*\ + !*** ./node_modules/call-bind/callBound.js ***! + \*********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 25118); +var callBind = __webpack_require__(/*! ./ */ 37996); +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + +/***/ }), + +/***/ 37996: +/*!*****************************************!*\ + !*** ./node_modules/call-bind/index.js ***! + \*****************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var bind = __webpack_require__(/*! function-bind */ 28244); +var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 25118); +var setFunctionLength = __webpack_require__(/*! set-function-length */ 35386); +var $TypeError = __webpack_require__(/*! es-errors/type */ 70970); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); +var $defineProperty = __webpack_require__(/*! es-define-property */ 98030); +var $max = GetIntrinsic('%Math.max%'); +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength(func, 1 + $max(0, originalFunction.length - (arguments.length - 1)), true); +}; +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { + value: applyBind + }); +} else { + module.exports.apply = applyBind; +} + +/***/ }), + +/***/ 96169: +/*!***********************************************!*\ + !*** ./node_modules/css.escape/css.escape.js ***! + \***********************************************/ +/***/ (function(module) { + +/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ +; +(function (root, factory) { + // https://github.com/umdjs/umd/blob/master/returnExports.js + if (true) { + // For Node.js. + module.exports = factory(root); + } else {} +})(typeof global != 'undefined' ? global : this, function (root) { + if (root.CSS && root.CSS.escape) { + return root.CSS.escape; + } + + // https://drafts.csswg.org/cssom/#serialize-an-identifier + var cssEscape = function (value) { + if (arguments.length == 0) { + throw new TypeError('`CSS.escape` requires an argument.'); + } + var string = String(value); + var length = string.length; + var index = -1; + var codeUnit; + var result = ''; + var firstCodeUnit = string.charCodeAt(0); + while (++index < length) { + codeUnit = string.charCodeAt(index); + // Note: there’s no need to special-case astral symbols, surrogate + // pairs, or lone surrogates. + + // If the character is NULL (U+0000), then the REPLACEMENT CHARACTER + // (U+FFFD). + if (codeUnit == 0x0000) { + result += '\uFFFD'; + continue; + } + if ( + // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is + // U+007F, […] + codeUnit >= 0x0001 && codeUnit <= 0x001F || codeUnit == 0x007F || + // If the character is the first character and is in the range [0-9] + // (U+0030 to U+0039), […] + index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039 || + // If the character is the second character and is in the range [0-9] + // (U+0030 to U+0039) and the first character is a `-` (U+002D), […] + + index == 1 && codeUnit >= 0x0030 && codeUnit <= 0x0039 && firstCodeUnit == 0x002D) { + // https://drafts.csswg.org/cssom/#escape-a-character-as-code-point + result += '\\' + codeUnit.toString(16) + ' '; + continue; + } + if ( + // If the character is the first character and is a `-` (U+002D), and + // there is no second character, […] + index == 0 && length == 1 && codeUnit == 0x002D) { + result += '\\' + string.charAt(index); + continue; + } + + // If the character is not handled by one of the above rules and is + // greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or + // is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to + // U+005A), or [a-z] (U+0061 to U+007A), […] + if (codeUnit >= 0x0080 || codeUnit == 0x002D || codeUnit == 0x005F || codeUnit >= 0x0030 && codeUnit <= 0x0039 || codeUnit >= 0x0041 && codeUnit <= 0x005A || codeUnit >= 0x0061 && codeUnit <= 0x007A) { + // the character itself + result += string.charAt(index); + continue; + } + + // Otherwise, the escaped character. + // https://drafts.csswg.org/cssom/#escape-a-character + result += '\\' + string.charAt(index); + } + return result; + }; + if (!root.CSS) { + root.CSS = {}; + } + root.CSS.escape = cssEscape; + return cssEscape; +}); + +/***/ }), + +/***/ 80364: +/*!****************************************************!*\ + !*** ./node_modules/define-data-property/index.js ***! + \****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var $defineProperty = __webpack_require__(/*! es-define-property */ 98030); +var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ 28769); +var $TypeError = __webpack_require__(/*! es-errors/type */ 70970); +var gopd = __webpack_require__(/*! gopd */ 56730); + +/** @type {import('.')} */ +module.exports = function defineDataProperty(obj, property, value) { + if (!obj || typeof obj !== 'object' && typeof obj !== 'function') { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + +/***/ }), + +/***/ 32110: +/*!*********************************************************!*\ + !*** ./node_modules/diagram-js-direct-editing/index.js ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var diagram_js_lib_features_interaction_events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diagram-js/lib/features/interaction-events */ 57250); +/* harmony import */ var _lib_DirectEditing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/DirectEditing */ 61357); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [diagram_js_lib_features_interaction_events__WEBPACK_IMPORTED_MODULE_1__["default"]], + __init__: ['directEditing'], + directEditing: ['type', _lib_DirectEditing__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 61357: +/*!*********************************************************************!*\ + !*** ./node_modules/diagram-js-direct-editing/lib/DirectEditing.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DirectEditing) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 94539); +/* harmony import */ var _TextBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TextBox */ 92102); + + + +/** + * A direct editing component that allows users + * to edit an elements text directly in the diagram + * + * @param {EventBus} eventBus the event bus + */ +function DirectEditing(eventBus, canvas) { + this._eventBus = eventBus; + this._providers = []; + this._textbox = new _TextBox__WEBPACK_IMPORTED_MODULE_0__["default"]({ + container: canvas.getContainer(), + keyHandler: (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.bind)(this._handleKey, this), + resizeHandler: (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.bind)(this._handleResize, this) + }); +} +DirectEditing.$inject = ['eventBus', 'canvas']; + +/** + * Register a direct editing provider + + * @param {Object} provider the provider, must expose an #activate(element) method that returns + * an activation context ({ bounds: {x, y, width, height }, text }) if + * direct editing is available for the given element. + * Additionally the provider must expose a #update(element, value) method + * to receive direct editing updates. + */ +DirectEditing.prototype.registerProvider = function (provider) { + this._providers.push(provider); +}; + +/** + * Returns true if direct editing is currently active + * + * @param {djs.model.Base} [element] + * + * @return {boolean} + */ +DirectEditing.prototype.isActive = function (element) { + return !!(this._active && (!element || this._active.element === element)); +}; + +/** + * Cancel direct editing, if it is currently active + */ +DirectEditing.prototype.cancel = function () { + if (!this._active) { + return; + } + this._fire('cancel'); + this.close(); +}; +DirectEditing.prototype._fire = function (event, context) { + this._eventBus.fire('directEditing.' + event, context || { + active: this._active + }); +}; +DirectEditing.prototype.close = function () { + this._textbox.destroy(); + this._fire('deactivate'); + this._active = null; + this.resizable = undefined; +}; +DirectEditing.prototype.complete = function () { + var active = this._active; + if (!active) { + return; + } + var containerBounds, + previousBounds = active.context.bounds, + newBounds = this.$textbox.getBoundingClientRect(), + newText = this.getValue(), + previousText = active.context.text; + if (newText !== previousText || newBounds.height !== previousBounds.height || newBounds.width !== previousBounds.width) { + containerBounds = this._textbox.container.getBoundingClientRect(); + active.provider.update(active.element, newText, active.context.text, { + x: newBounds.left - containerBounds.left, + y: newBounds.top - containerBounds.top, + width: newBounds.width, + height: newBounds.height + }); + } + this._fire('complete'); + this.close(); +}; +DirectEditing.prototype.getValue = function () { + return this._textbox.getValue(); +}; +DirectEditing.prototype._handleKey = function (e) { + // stop bubble + e.stopPropagation(); + var key = e.keyCode || e.charCode; + + // ESC + if (key === 27) { + e.preventDefault(); + return this.cancel(); + } + + // Enter + if (key === 13 && !e.shiftKey) { + e.preventDefault(); + return this.complete(); + } +}; +DirectEditing.prototype._handleResize = function (event) { + this._fire('resize', event); +}; + +/** + * Activate direct editing on the given element + * + * @param {Object} ElementDescriptor the descriptor for a shape or connection + * @return {Boolean} true if the activation was possible + */ +DirectEditing.prototype.activate = function (element) { + if (this.isActive()) { + this.cancel(); + } + + // the direct editing context + var context; + var provider = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(this._providers, function (p) { + return (context = p.activate(element)) ? p : null; + }); + + // check if activation took place + if (context) { + this.$textbox = this._textbox.create(context.bounds, context.style, context.text, context.options); + this._active = { + element: element, + context: context, + provider: provider + }; + if (context.options && context.options.resizable) { + this.resizable = true; + } + this._fire('activate'); + } + return !!context; +}; + +/***/ }), + +/***/ 92102: +/*!***************************************************************!*\ + !*** ./node_modules/diagram-js-direct-editing/lib/TextBox.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ TextBox) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 94539); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dom */ 73599); + + +var min = Math.min, + max = Math.max; +function preventDefault(e) { + e.preventDefault(); +} +function stopPropagation(e) { + e.stopPropagation(); +} +function isTextNode(node) { + return node.nodeType === Node.TEXT_NODE; +} +function toArray(nodeList) { + return [].slice.call(nodeList); +} + +/** + * Initializes a container for a content editable div. + * + * Structure: + * + * container + * parent + * content + * resize-handle + * + * @param {object} options + * @param {DOMElement} options.container The DOM element to append the contentContainer to + * @param {Function} options.keyHandler Handler for key events + * @param {Function} options.resizeHandler Handler for resize events + */ +function TextBox(options) { + this.container = options.container; + this.parent = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)('
' + '
' + '
'); + this.content = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)('[contenteditable]', this.parent); + this.keyHandler = options.keyHandler || function () {}; + this.resizeHandler = options.resizeHandler || function () {}; + this.autoResize = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.bind)(this.autoResize, this); + this.handlePaste = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.bind)(this.handlePaste, this); +} + +/** + * Create a text box with the given position, size, style and text content + * + * @param {Object} bounds + * @param {Number} bounds.x absolute x position + * @param {Number} bounds.y absolute y position + * @param {Number} [bounds.width] fixed width value + * @param {Number} [bounds.height] fixed height value + * @param {Number} [bounds.maxWidth] maximum width value + * @param {Number} [bounds.maxHeight] maximum height value + * @param {Number} [bounds.minWidth] minimum width value + * @param {Number} [bounds.minHeight] minimum height value + * @param {Object} [style] + * @param {String} value text content + * + * @return {DOMElement} The created content DOM element + */ +TextBox.prototype.create = function (bounds, style, value, options) { + var self = this; + var parent = this.parent, + content = this.content, + container = this.container; + options = this.options = options || {}; + style = this.style = style || {}; + var parentStyle = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.pick)(style, ['width', 'height', 'maxWidth', 'maxHeight', 'minWidth', 'minHeight', 'left', 'top', 'backgroundColor', 'position', 'overflow', 'border', 'wordWrap', 'textAlign', 'outline', 'transform']); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(parent.style, { + width: bounds.width + 'px', + height: bounds.height + 'px', + maxWidth: bounds.maxWidth + 'px', + maxHeight: bounds.maxHeight + 'px', + minWidth: bounds.minWidth + 'px', + minHeight: bounds.minHeight + 'px', + left: bounds.x + 'px', + top: bounds.y + 'px', + backgroundColor: '#ffffff', + position: 'absolute', + overflow: 'visible', + border: '1px solid #ccc', + boxSizing: 'border-box', + wordWrap: 'normal', + textAlign: 'center', + outline: 'none' + }, parentStyle); + var contentStyle = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.pick)(style, ['fontFamily', 'fontSize', 'fontWeight', 'lineHeight', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft']); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(content.style, { + boxSizing: 'border-box', + width: '100%', + outline: 'none', + wordWrap: 'break-word' + }, contentStyle); + if (options.centerVertically) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(content.style, { + position: 'absolute', + top: '50%', + transform: 'translate(0, -50%)' + }, contentStyle); + } + content.innerText = value; + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(content, 'keydown', this.keyHandler); + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(content, 'mousedown', stopPropagation); + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(content, 'paste', self.handlePaste); + if (options.autoResize) { + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(content, 'input', this.autoResize); + } + if (options.resizable) { + this.resizable(style); + } + container.appendChild(parent); + + // set selection to end of text + this.setSelection(content.lastChild, content.lastChild && content.lastChild.length); + return parent; +}; + +/** + * Intercept paste events to remove formatting from pasted text. + */ +TextBox.prototype.handlePaste = function (e) { + var options = this.options, + style = this.style; + e.preventDefault(); + var text; + if (e.clipboardData) { + // Chrome, Firefox, Safari + text = e.clipboardData.getData('text/plain'); + } else { + // Internet Explorer + text = window.clipboardData.getData('Text'); + } + this.insertText(text); + if (options.autoResize) { + var hasResized = this.autoResize(style); + if (hasResized) { + this.resizeHandler(hasResized); + } + } +}; +TextBox.prototype.insertText = function (text) { + text = normalizeEndOfLineSequences(text); + + // insertText command not supported by Internet Explorer + var success = document.execCommand('insertText', false, text); + if (success) { + return; + } + this._insertTextIE(text); +}; +TextBox.prototype._insertTextIE = function (text) { + // Internet Explorer + var range = this.getSelection(), + startContainer = range.startContainer, + endContainer = range.endContainer, + startOffset = range.startOffset, + endOffset = range.endOffset, + commonAncestorContainer = range.commonAncestorContainer; + var childNodesArray = toArray(commonAncestorContainer.childNodes); + var container, offset; + if (isTextNode(commonAncestorContainer)) { + var containerTextContent = startContainer.textContent; + startContainer.textContent = containerTextContent.substring(0, startOffset) + text + containerTextContent.substring(endOffset); + container = startContainer; + offset = startOffset + text.length; + } else if (startContainer === this.content && endContainer === this.content) { + var textNode = document.createTextNode(text); + this.content.insertBefore(textNode, childNodesArray[startOffset]); + container = textNode; + offset = textNode.textContent.length; + } else { + var startContainerChildIndex = childNodesArray.indexOf(startContainer), + endContainerChildIndex = childNodesArray.indexOf(endContainer); + childNodesArray.forEach(function (childNode, index) { + if (index === startContainerChildIndex) { + childNode.textContent = startContainer.textContent.substring(0, startOffset) + text + endContainer.textContent.substring(endOffset); + } else if (index > startContainerChildIndex && index <= endContainerChildIndex) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.remove)(childNode); + } + }); + container = startContainer; + offset = startOffset + text.length; + } + if (container && offset !== undefined) { + // is necessary in Internet Explorer + setTimeout(function () { + self.setSelection(container, offset); + }); + } +}; + +/** + * Automatically resize element vertically to fit its content. + */ +TextBox.prototype.autoResize = function () { + var parent = this.parent, + content = this.content; + var fontSize = parseInt(this.style.fontSize) || 12; + if (content.scrollHeight > parent.offsetHeight || content.scrollHeight < parent.offsetHeight - fontSize) { + var bounds = parent.getBoundingClientRect(); + var height = content.scrollHeight; + parent.style.height = height + 'px'; + this.resizeHandler({ + width: bounds.width, + height: bounds.height, + dx: 0, + dy: height - bounds.height + }); + } +}; + +/** + * Make an element resizable by adding a resize handle. + */ +TextBox.prototype.resizable = function () { + var self = this; + var parent = this.parent, + resizeHandle = this.resizeHandle; + var minWidth = parseInt(this.style.minWidth) || 0, + minHeight = parseInt(this.style.minHeight) || 0, + maxWidth = parseInt(this.style.maxWidth) || Infinity, + maxHeight = parseInt(this.style.maxHeight) || Infinity; + if (!resizeHandle) { + resizeHandle = this.resizeHandle = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)('
'); + var startX, startY, startWidth, startHeight; + var onMouseDown = function (e) { + preventDefault(e); + stopPropagation(e); + startX = e.clientX; + startY = e.clientY; + var bounds = parent.getBoundingClientRect(); + startWidth = bounds.width; + startHeight = bounds.height; + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(document, 'mousemove', onMouseMove); + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(document, 'mouseup', onMouseUp); + }; + var onMouseMove = function (e) { + preventDefault(e); + stopPropagation(e); + var newWidth = min(max(startWidth + e.clientX - startX, minWidth), maxWidth); + var newHeight = min(max(startHeight + e.clientY - startY, minHeight), maxHeight); + parent.style.width = newWidth + 'px'; + parent.style.height = newHeight + 'px'; + self.resizeHandler({ + width: startWidth, + height: startHeight, + dx: e.clientX - startX, + dy: e.clientY - startY + }); + }; + var onMouseUp = function (e) { + preventDefault(e); + stopPropagation(e); + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(document, 'mousemove', onMouseMove, false); + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(document, 'mouseup', onMouseUp, false); + }; + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(resizeHandle, 'mousedown', onMouseDown); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(resizeHandle.style, { + position: 'absolute', + bottom: '0px', + right: '0px', + cursor: 'nwse-resize', + width: '0', + height: '0', + borderTop: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid transparent', + borderRight: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid #ccc', + borderBottom: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid #ccc', + borderLeft: (parseInt(this.style.fontSize) / 4 || 3) + 'px solid transparent' + }); + parent.appendChild(resizeHandle); +}; + +/** + * Clear content and style of the textbox, unbind listeners and + * reset CSS style. + */ +TextBox.prototype.destroy = function () { + var parent = this.parent, + content = this.content, + resizeHandle = this.resizeHandle; + + // clear content + content.innerText = ''; + + // clear styles + parent.removeAttribute('style'); + content.removeAttribute('style'); + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(content, 'keydown', this.keyHandler); + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(content, 'mousedown', stopPropagation); + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(content, 'input', this.autoResize); + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.unbind(content, 'paste', this.handlePaste); + if (resizeHandle) { + resizeHandle.removeAttribute('style'); + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.remove)(resizeHandle); + } + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.remove)(parent); +}; +TextBox.prototype.getValue = function () { + return this.content.innerText.trim(); +}; +TextBox.prototype.getSelection = function () { + var selection = window.getSelection(), + range = selection.getRangeAt(0); + return range; +}; +TextBox.prototype.setSelection = function (container, offset) { + var range = document.createRange(); + if (container === null) { + range.selectNodeContents(this.content); + } else { + range.setStart(container, offset); + range.setEnd(container, offset); + } + var selection = window.getSelection(); + selection.removeAllRanges(); + selection.addRange(range); +}; + +// helpers ////////// + +function normalizeEndOfLineSequences(string) { + return string.replace(/\r\n|\r|\n/g, '\n'); +} + +/***/ }), + +/***/ 94539: +/*!****************!*\ + !*** min-dash ***! + \****************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ assign: () => (/* binding */ assign), +/* harmony export */ bind: () => (/* binding */ bind), +/* harmony export */ debounce: () => (/* binding */ debounce), +/* harmony export */ ensureArray: () => (/* binding */ ensureArray), +/* harmony export */ every: () => (/* binding */ every), +/* harmony export */ filter: () => (/* binding */ filter), +/* harmony export */ find: () => (/* binding */ find), +/* harmony export */ findIndex: () => (/* binding */ findIndex), +/* harmony export */ flatten: () => (/* binding */ flatten), +/* harmony export */ forEach: () => (/* binding */ forEach), +/* harmony export */ get: () => (/* binding */ get), +/* harmony export */ groupBy: () => (/* binding */ groupBy), +/* harmony export */ has: () => (/* binding */ has), +/* harmony export */ isArray: () => (/* binding */ isArray), +/* harmony export */ isDefined: () => (/* binding */ isDefined), +/* harmony export */ isFunction: () => (/* binding */ isFunction), +/* harmony export */ isNil: () => (/* binding */ isNil), +/* harmony export */ isNumber: () => (/* binding */ isNumber), +/* harmony export */ isObject: () => (/* binding */ isObject), +/* harmony export */ isString: () => (/* binding */ isString), +/* harmony export */ isUndefined: () => (/* binding */ isUndefined), +/* harmony export */ keys: () => (/* binding */ keys), +/* harmony export */ map: () => (/* binding */ map), +/* harmony export */ matchPattern: () => (/* binding */ matchPattern), +/* harmony export */ merge: () => (/* binding */ merge), +/* harmony export */ omit: () => (/* binding */ omit), +/* harmony export */ pick: () => (/* binding */ pick), +/* harmony export */ reduce: () => (/* binding */ reduce), +/* harmony export */ set: () => (/* binding */ set), +/* harmony export */ size: () => (/* binding */ size), +/* harmony export */ some: () => (/* binding */ some), +/* harmony export */ sortBy: () => (/* binding */ sortBy), +/* harmony export */ throttle: () => (/* binding */ throttle), +/* harmony export */ unionBy: () => (/* binding */ unionBy), +/* harmony export */ uniqueBy: () => (/* binding */ uniqueBy), +/* harmony export */ values: () => (/* binding */ values), +/* harmony export */ without: () => (/* binding */ without) +/* harmony export */ }); +/** + * Flatten array, one level deep. + * + * @param {Array} arr + * + * @return {Array} + */ +function flatten(arr) { + return Array.prototype.concat.apply([], arr); +} +var nativeToString = Object.prototype.toString; +var nativeHasOwnProperty = Object.prototype.hasOwnProperty; +function isUndefined(obj) { + return obj === undefined; +} +function isDefined(obj) { + return obj !== undefined; +} +function isNil(obj) { + return obj == null; +} +function isArray(obj) { + return nativeToString.call(obj) === '[object Array]'; +} +function isObject(obj) { + return nativeToString.call(obj) === '[object Object]'; +} +function isNumber(obj) { + return nativeToString.call(obj) === '[object Number]'; +} +function isFunction(obj) { + var tag = nativeToString.call(obj); + return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]'; +} +function isString(obj) { + return nativeToString.call(obj) === '[object String]'; +} +/** + * Ensure collection is an array. + * + * @param {Object} obj + */ + +function ensureArray(obj) { + if (isArray(obj)) { + return; + } + throw new Error('must supply array'); +} +/** + * Return true, if target owns a property with the given key. + * + * @param {Object} target + * @param {String} key + * + * @return {Boolean} + */ + +function has(target, key) { + return nativeHasOwnProperty.call(target, key); +} + +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function|Object} matcher + * + * @return {Object} + */ + +function find(collection, matcher) { + matcher = toMatcher(matcher); + var match; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + match = val; + return false; + } + }); + return match; +} +/** + * Find element index in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Object} + */ + +function findIndex(collection, matcher) { + matcher = toMatcher(matcher); + var idx = isArray(collection) ? -1 : undefined; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + idx = key; + return false; + } + }); + return idx; +} +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Array} result + */ + +function filter(collection, matcher) { + var result = []; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + result.push(val); + } + }); + return result; +} +/** + * Iterate over collection; returning something + * (non-undefined) will stop iteration. + * + * @param {Array|Object} collection + * @param {Function} iterator + * + * @return {Object} return result that stopped the iteration + */ + +function forEach(collection, iterator) { + var val, result; + if (isUndefined(collection)) { + return; + } + var convertKey = isArray(collection) ? toNum : identity; + for (var key in collection) { + if (has(collection, key)) { + val = collection[key]; + result = iterator(val, convertKey(key)); + if (result === false) { + return val; + } + } + } +} +/** + * Return collection without element. + * + * @param {Array} arr + * @param {Function} matcher + * + * @return {Array} + */ + +function without(arr, matcher) { + if (isUndefined(arr)) { + return []; + } + ensureArray(arr); + matcher = toMatcher(matcher); + return arr.filter(function (el, idx) { + return !matcher(el, idx); + }); +} +/** + * Reduce collection, returning a single result. + * + * @param {Object|Array} collection + * @param {Function} iterator + * @param {Any} result + * + * @return {Any} result returned from last iterator + */ + +function reduce(collection, iterator, result) { + forEach(collection, function (value, idx) { + result = iterator(result, value, idx); + }); + return result; +} +/** + * Return true if every element in the collection + * matches the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function every(collection, matcher) { + return !!reduce(collection, function (matches, val, key) { + return matches && matcher(val, key); + }, true); +} +/** + * Return true if some elements in the collection + * match the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function some(collection, matcher) { + return !!find(collection, matcher); +} +/** + * Transform a collection into another collection + * by piping each member through the given fn. + * + * @param {Object|Array} collection + * @param {Function} fn + * + * @return {Array} transformed collection + */ + +function map(collection, fn) { + var result = []; + forEach(collection, function (val, key) { + result.push(fn(val, key)); + }); + return result; +} +/** + * Get the collections keys. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function keys(collection) { + return collection && Object.keys(collection) || []; +} +/** + * Shorthand for `keys(o).length`. + * + * @param {Object|Array} collection + * + * @return {Number} + */ + +function size(collection) { + return keys(collection).length; +} +/** + * Get the values in the collection. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function values(collection) { + return map(collection, function (val) { + return val; + }); +} +/** + * Group collection members by attribute. + * + * @param {Object|Array} collection + * @param {Function} extractor + * + * @return {Object} map with { attrValue => [ a, b, c ] } + */ + +function groupBy(collection, extractor) { + var grouped = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + extractor = toExtractor(extractor); + forEach(collection, function (val) { + var discriminator = extractor(val) || '_'; + var group = grouped[discriminator]; + if (!group) { + group = grouped[discriminator] = []; + } + group.push(val); + }); + return grouped; +} +function uniqueBy(extractor) { + extractor = toExtractor(extractor); + var grouped = {}; + for (var _len = arguments.length, collections = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + collections[_key - 1] = arguments[_key]; + } + forEach(collections, function (c) { + return groupBy(c, extractor, grouped); + }); + var result = map(grouped, function (val, key) { + return val[0]; + }); + return result; +} +var unionBy = uniqueBy; +/** + * Sort collection by criteria. + * + * @param {Object|Array} collection + * @param {String|Function} extractor + * + * @return {Array} + */ + +function sortBy(collection, extractor) { + extractor = toExtractor(extractor); + var sorted = []; + forEach(collection, function (value, key) { + var disc = extractor(value, key); + var entry = { + d: disc, + v: value + }; + for (var idx = 0; idx < sorted.length; idx++) { + var d = sorted[idx].d; + if (disc < d) { + sorted.splice(idx, 0, entry); + return; + } + } // not inserted, append (!) + + sorted.push(entry); + }); + return map(sorted, function (e) { + return e.v; + }); +} +/** + * Create an object pattern matcher. + * + * @example + * + * const matcher = matchPattern({ id: 1 }); + * + * let element = find(elements, matcher); + * + * @param {Object} pattern + * + * @return {Function} matcherFn + */ + +function matchPattern(pattern) { + return function (el) { + return every(pattern, function (val, key) { + return el[key] === val; + }); + }; +} +function toExtractor(extractor) { + return isFunction(extractor) ? extractor : function (e) { + return e[extractor]; + }; +} +function toMatcher(matcher) { + return isFunction(matcher) ? matcher : function (e) { + return e === matcher; + }; +} +function identity(arg) { + return arg; +} +function toNum(arg) { + return Number(arg); +} + +/** + * Debounce fn, calling it only once if the given time + * elapsed between calls. + * + * Lodash-style the function exposes methods to `#clear` + * and `#flush` to control internal behavior. + * + * @param {Function} fn + * @param {Number} timeout + * + * @return {Function} debounced function + */ +function debounce(fn, timeout) { + var timer; + var lastArgs; + var lastThis; + var lastNow; + function fire(force) { + var now = Date.now(); + var scheduledDiff = force ? 0 : lastNow + timeout - now; + if (scheduledDiff > 0) { + return schedule(scheduledDiff); + } + fn.apply(lastThis, lastArgs); + clear(); + } + function schedule(timeout) { + timer = setTimeout(fire, timeout); + } + function clear() { + if (timer) { + clearTimeout(timer); + } + timer = lastNow = lastArgs = lastThis = undefined; + } + function flush() { + if (timer) { + fire(true); + } + clear(); + } + function callback() { + lastNow = Date.now(); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + lastArgs = args; + lastThis = this; // ensure an execution is scheduled + + if (!timer) { + schedule(timeout); + } + } + callback.flush = flush; + callback.cancel = clear; + return callback; +} +/** + * Throttle fn, calling at most once + * in the given interval. + * + * @param {Function} fn + * @param {Number} interval + * + * @return {Function} throttled function + */ + +function throttle(fn, interval) { + var throttling = false; + return function () { + if (throttling) { + return; + } + fn.apply(void 0, arguments); + throttling = true; + setTimeout(function () { + throttling = false; + }, interval); + }; +} +/** + * Bind function against target . + * + * @param {Function} fn + * @param {Object} target + * + * @return {Function} bound function + */ + +function bind(fn, target) { + return fn.bind(target); +} +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + return _typeof(obj); +} +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends.apply(this, arguments); +} + +/** + * Convenience wrapper for `Object.assign`. + * + * @param {Object} target + * @param {...Object} others + * + * @return {Object} the target + */ + +function assign(target) { + for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + others[_key - 1] = arguments[_key]; + } + return _extends.apply(void 0, [target].concat(others)); +} +/** + * Sets a nested property of a given object to the specified value. + * + * This mutates the object and returns it. + * + * @param {Object} target The target of the set operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} value The value to set. + */ + +function set(target, path, value) { + var currentTarget = target; + forEach(path, function (key, idx) { + if (typeof key !== 'number' && typeof key !== 'string') { + throw new Error('illegal key type: ' + _typeof(key) + '. Key should be of type number or string.'); + } + if (key === 'constructor') { + throw new Error('illegal key: constructor'); + } + if (key === '__proto__') { + throw new Error('illegal key: __proto__'); + } + var nextKey = path[idx + 1]; + var nextTarget = currentTarget[key]; + if (isDefined(nextKey) && isNil(nextTarget)) { + nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : []; + } + if (isUndefined(nextKey)) { + if (isUndefined(value)) { + delete currentTarget[key]; + } else { + currentTarget[key] = value; + } + } else { + currentTarget = nextTarget; + } + }); + return target; +} +/** + * Gets a nested property of a given object. + * + * @param {Object} target The target of the get operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} [defaultValue] The value to return if no value exists. + */ + +function get(target, path, defaultValue) { + var currentTarget = target; + forEach(path, function (key) { + // accessing nil property yields + if (isNil(currentTarget)) { + currentTarget = undefined; + return false; + } + currentTarget = currentTarget[key]; + }); + return isUndefined(currentTarget) ? defaultValue : currentTarget; +} +/** + * Pick given properties from the target object. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function pick(target, properties) { + var result = {}; + var obj = Object(target); + forEach(properties, function (prop) { + if (prop in obj) { + result[prop] = target[prop]; + } + }); + return result; +} +/** + * Pick all target properties, excluding the given ones. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function omit(target, properties) { + var result = {}; + var obj = Object(target); + forEach(obj, function (prop, key) { + if (properties.indexOf(key) === -1) { + result[key] = prop; + } + }); + return result; +} +/** + * Recursively merge `...sources` into given target. + * + * Does support merging objects; does not support merging arrays. + * + * @param {Object} target + * @param {...Object} sources + * + * @return {Object} the target + */ + +function merge(target) { + for (var _len2 = arguments.length, sources = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + sources[_key2 - 1] = arguments[_key2]; + } + if (!sources.length) { + return target; + } + forEach(sources, function (source) { + // skip non-obj sources, i.e. null + if (!source || !isObject(source)) { + return; + } + forEach(source, function (sourceVal, key) { + if (key === '__proto__') { + return; + } + var targetVal = target[key]; + if (isObject(sourceVal)) { + if (!isObject(targetVal)) { + // override target[key] with object + targetVal = {}; + } + target[key] = merge(targetVal, sourceVal); + } else { + target[key] = sourceVal; + } + }); + }); + return target; +} + + +/***/ }), + +/***/ 93274: +/*!************************************************!*\ + !*** ./node_modules/diagram-js/lib/Diagram.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Diagram) +/* harmony export */ }); +/* harmony import */ var didi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! didi */ 12668); +/* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core */ 93015); + + + +/** + * Bootstrap an injector from a list of modules, instantiating a number of default components + * + * @ignore + * @param {Array} bootstrapModules + * + * @return {didi.Injector} a injector to use to access the components + */ +function bootstrap(bootstrapModules) { + var modules = [], + components = []; + function hasModule(m) { + return modules.indexOf(m) >= 0; + } + function addModule(m) { + modules.push(m); + } + function visit(m) { + if (hasModule(m)) { + return; + } + (m.__depends__ || []).forEach(visit); + if (hasModule(m)) { + return; + } + addModule(m); + (m.__init__ || []).forEach(function (c) { + components.push(c); + }); + } + bootstrapModules.forEach(visit); + var injector = new didi__WEBPACK_IMPORTED_MODULE_0__.Injector(modules); + components.forEach(function (c) { + try { + // eagerly resolve component (fn or string) + injector[typeof c === 'string' ? 'get' : 'invoke'](c); + } catch (e) { + console.error('Failed to instantiate component'); + console.error(e.stack); + throw e; + } + }); + return injector; +} + +/** + * Creates an injector from passed options. + * + * @ignore + * @param {Object} options + * @return {didi.Injector} + */ +function createInjector(options) { + options = options || {}; + var configModule = { + 'config': ['value', options] + }; + var modules = [configModule, _core__WEBPACK_IMPORTED_MODULE_1__["default"]].concat(options.modules || []); + return bootstrap(modules); +} + +/** + * The main diagram-js entry point that bootstraps the diagram with the given + * configuration. + * + * To register extensions with the diagram, pass them as Array to the constructor. + * + * @class djs.Diagram + * @memberOf djs + * @constructor + * + * @example + * + * Creating a plug-in that logs whenever a shape is added to the canvas. + * + * // plug-in implemenentation + * function MyLoggingPlugin(eventBus) { + * eventBus.on('shape.added', function(event) { + * console.log('shape ', event.shape, ' was added to the diagram'); + * }); + * } + * + * // export as module + * export default { + * __init__: [ 'myLoggingPlugin' ], + * myLoggingPlugin: [ 'type', MyLoggingPlugin ] + * }; + * + * + * // instantiate the diagram with the new plug-in + * + * import MyLoggingModule from 'path-to-my-logging-plugin'; + * + * var diagram = new Diagram({ + * modules: [ + * MyLoggingModule + * ] + * }); + * + * diagram.invoke([ 'canvas', function(canvas) { + * // add shape to drawing canvas + * canvas.addShape({ x: 10, y: 10 }); + * }); + * + * // 'shape ... was added to the diagram' logged to console + * + * @param {Object} options + * @param {Array} [options.modules] external modules to instantiate with the diagram + * @param {didi.Injector} [injector] an (optional) injector to bootstrap the diagram with + */ +function Diagram(options, injector) { + // create injector unless explicitly specified + this.injector = injector = injector || createInjector(options); + + // API + + /** + * Resolves a diagram service + * + * @method Diagram#get + * + * @param {string} name the name of the diagram service to be retrieved + * @param {boolean} [strict=true] if false, resolve missing services to null + */ + this.get = injector.get; + + /** + * Executes a function into which diagram services are injected + * + * @method Diagram#invoke + * + * @param {Function|Object[]} fn the function to resolve + * @param {Object} locals a number of locals to use to resolve certain dependencies + */ + this.invoke = injector.invoke; + + // init + + // indicate via event + + /** + * An event indicating that all plug-ins are loaded. + * + * Use this event to fire other events to interested plug-ins + * + * @memberOf Diagram + * + * @event diagram.init + * + * @example + * + * eventBus.on('diagram.init', function() { + * eventBus.fire('my-custom-event', { foo: 'BAR' }); + * }); + * + * @type {Object} + */ + this.get('eventBus').fire('diagram.init'); +} + +/** + * Destroys the diagram + * + * @method Diagram#destroy + */ +Diagram.prototype.destroy = function () { + this.get('eventBus').fire('diagram.destroy'); +}; + +/** + * Clear the diagram, removing all contents. + */ +Diagram.prototype.clear = function () { + this.get('eventBus').fire('diagram.clear'); +}; + +/***/ }), + +/***/ 35353: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/command/CommandInterceptor.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CommandInterceptor) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +var DEFAULT_PRIORITY = 1000; + +/** + * A utility that can be used to plug-in into the command execution for + * extension and/or validation. + * + * @param {EventBus} eventBus + * + * @example + * + * import inherits from 'inherits'; + * + * import CommandInterceptor from 'diagram-js/lib/command/CommandInterceptor'; + * + * function CommandLogger(eventBus) { + * CommandInterceptor.call(this, eventBus); + * + * this.preExecute(function(event) { + * console.log('command pre-execute', event); + * }); + * } + * + * inherits(CommandLogger, CommandInterceptor); + * + */ +function CommandInterceptor(eventBus) { + this._eventBus = eventBus; +} +CommandInterceptor.$inject = ['eventBus']; +function unwrapEvent(fn, that) { + return function (event) { + return fn.call(that || null, event.context, event.command, event); + }; +} + +/** + * Register an interceptor for a command execution + * + * @param {string|Array} [events] list of commands to register on + * @param {string} [hook] command hook, i.e. preExecute, executed to listen on + * @param {number} [priority] the priority on which to hook into the execution + * @param {Function} handlerFn interceptor to be invoked with (event) + * @param {boolean} unwrap if true, unwrap the event and pass (context, command, event) to the + * listener instead + * @param {Object} [that] Pass context (`this`) to the handler function + */ +CommandInterceptor.prototype.on = function (events, hook, priority, handlerFn, unwrap, that) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(hook) || (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(hook)) { + that = unwrap; + unwrap = handlerFn; + handlerFn = priority; + priority = hook; + hook = null; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(priority)) { + that = unwrap; + unwrap = handlerFn; + handlerFn = priority; + priority = DEFAULT_PRIORITY; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(unwrap)) { + that = unwrap; + unwrap = false; + } + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handlerFn)) { + throw new Error('handlerFn must be a function'); + } + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(events)) { + events = [events]; + } + var eventBus = this._eventBus; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(events, function (event) { + // concat commandStack(.event)?(.hook)? + var fullEvent = ['commandStack', event, hook].filter(function (e) { + return e; + }).join('.'); + eventBus.on(fullEvent, priority, unwrap ? unwrapEvent(handlerFn, that) : handlerFn, that); + }); +}; +var hooks = ['canExecute', 'preExecute', 'preExecuted', 'execute', 'executed', 'postExecute', 'postExecuted', 'revert', 'reverted']; + +/* + * Install hook shortcuts + * + * This will generate the CommandInterceptor#(preExecute|...|reverted) methods + * which will in term forward to CommandInterceptor#on. + */ +(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(hooks, function (hook) { + /** + * {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted} + * + * A named hook for plugging into the command execution + * + * @param {string|Array} [events] list of commands to register on + * @param {number} [priority] the priority on which to hook into the execution + * @param {Function} handlerFn interceptor to be invoked with (event) + * @param {boolean} [unwrap=false] if true, unwrap the event and pass (context, command, event) to the + * listener instead + * @param {Object} [that] Pass context (`this`) to the handler function + */ + CommandInterceptor.prototype[hook] = function (events, priority, handlerFn, unwrap, that) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(events) || (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(events)) { + that = unwrap; + unwrap = handlerFn; + handlerFn = priority; + priority = events; + events = null; + } + this.on(events, hook, priority, handlerFn, unwrap, that); + }; +}); + +/***/ }), + +/***/ 77738: +/*!*************************************************************!*\ + !*** ./node_modules/diagram-js/lib/command/CommandStack.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CommandStack) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * A service that offers un- and redoable execution of commands. + * + * The command stack is responsible for executing modeling actions + * in a un- and redoable manner. To do this it delegates the actual + * command execution to {@link CommandHandler}s. + * + * Command handlers provide {@link CommandHandler#execute(ctx)} and + * {@link CommandHandler#revert(ctx)} methods to un- and redo a command + * identified by a command context. + * + * + * ## Life-Cycle events + * + * In the process the command stack fires a number of life-cycle events + * that other components to participate in the command execution. + * + * * preExecute + * * preExecuted + * * execute + * * executed + * * postExecute + * * postExecuted + * * revert + * * reverted + * + * A special event is used for validating, whether a command can be + * performed prior to its execution. + * + * * canExecute + * + * Each of the events is fired as `commandStack.{eventName}` and + * `commandStack.{commandName}.{eventName}`, respectively. This gives + * components fine grained control on where to hook into. + * + * The event object fired transports `command`, the name of the + * command and `context`, the command context. + * + * + * ## Creating Command Handlers + * + * Command handlers should provide the {@link CommandHandler#execute(ctx)} + * and {@link CommandHandler#revert(ctx)} methods to implement + * redoing and undoing of a command. + * + * A command handler _must_ ensure undo is performed properly in order + * not to break the undo chain. It must also return the shapes that + * got changed during the `execute` and `revert` operations. + * + * Command handlers may execute other modeling operations (and thus + * commands) in their `preExecute` and `postExecute` phases. The command + * stack will properly group all commands together into a logical unit + * that may be re- and undone atomically. + * + * Command handlers must not execute other commands from within their + * core implementation (`execute`, `revert`). + * + * + * ## Change Tracking + * + * During the execution of the CommandStack it will keep track of all + * elements that have been touched during the command's execution. + * + * At the end of the CommandStack execution it will notify interested + * components via an 'elements.changed' event with all the dirty + * elements. + * + * The event can be picked up by components that are interested in the fact + * that elements have been changed. One use case for this is updating + * their graphical representation after moving / resizing or deletion. + * + * @see CommandHandler + * + * @param {EventBus} eventBus + * @param {Injector} injector + */ +function CommandStack(eventBus, injector) { + /** + * A map of all registered command handlers. + * + * @type {Object} + */ + this._handlerMap = {}; + + /** + * A stack containing all re/undoable actions on the diagram + * + * @type {Array} + */ + this._stack = []; + + /** + * The current index on the stack + * + * @type {number} + */ + this._stackIdx = -1; + + /** + * Current active commandStack execution + * + * @type {Object} + * @property {Object[]} actions + * @property {Object[]} dirty + * @property { 'undo' | 'redo' | 'clear' | 'execute' | null } trigger the cause of the current excecution + */ + this._currentExecution = { + actions: [], + dirty: [], + trigger: null + }; + this._injector = injector; + this._eventBus = eventBus; + this._uid = 1; + eventBus.on(['diagram.destroy', 'diagram.clear'], function () { + this.clear(false); + }, this); +} +CommandStack.$inject = ['eventBus', 'injector']; + +/** + * Execute a command + * + * @param {string} command the command to execute + * @param {Object} context the environment to execute the command in + */ +CommandStack.prototype.execute = function (command, context) { + if (!command) { + throw new Error('command required'); + } + this._currentExecution.trigger = 'execute'; + var action = { + command: command, + context: context + }; + this._pushAction(action); + this._internalExecute(action); + this._popAction(action); +}; + +/** + * Ask whether a given command can be executed. + * + * Implementors may hook into the mechanism on two ways: + * + * * in event listeners: + * + * Users may prevent the execution via an event listener. + * It must prevent the default action for `commandStack.(.)canExecute` events. + * + * * in command handlers: + * + * If the method {@link CommandHandler#canExecute} is implemented in a handler + * it will be called to figure out whether the execution is allowed. + * + * @param {string} command the command to execute + * @param {Object} context the environment to execute the command in + * + * @return {boolean} true if the command can be executed + */ +CommandStack.prototype.canExecute = function (command, context) { + var action = { + command: command, + context: context + }; + var handler = this._getHandler(command); + var result = this._fire(command, 'canExecute', action); + + // handler#canExecute will only be called if no listener + // decided on a result already + if (result === undefined) { + if (!handler) { + return false; + } + if (handler.canExecute) { + result = handler.canExecute(context); + } + } + return result; +}; + +/** + * Clear the command stack, erasing all undo / redo history + */ +CommandStack.prototype.clear = function (emit) { + this._stack.length = 0; + this._stackIdx = -1; + if (emit !== false) { + this._fire('changed', { + trigger: 'clear' + }); + } +}; + +/** + * Undo last command(s) + */ +CommandStack.prototype.undo = function () { + var action = this._getUndoAction(), + next; + if (action) { + this._currentExecution.trigger = 'undo'; + this._pushAction(action); + while (action) { + this._internalUndo(action); + next = this._getUndoAction(); + if (!next || next.id !== action.id) { + break; + } + action = next; + } + this._popAction(); + } +}; + +/** + * Redo last command(s) + */ +CommandStack.prototype.redo = function () { + var action = this._getRedoAction(), + next; + if (action) { + this._currentExecution.trigger = 'redo'; + this._pushAction(action); + while (action) { + this._internalExecute(action, true); + next = this._getRedoAction(); + if (!next || next.id !== action.id) { + break; + } + action = next; + } + this._popAction(); + } +}; + +/** + * Register a handler instance with the command stack + * + * @param {string} command + * @param {CommandHandler} handler + */ +CommandStack.prototype.register = function (command, handler) { + this._setHandler(command, handler); +}; + +/** + * Register a handler type with the command stack + * by instantiating it and injecting its dependencies. + * + * @param {string} command + * @param {Function} a constructor for a {@link CommandHandler} + */ +CommandStack.prototype.registerHandler = function (command, handlerCls) { + if (!command || !handlerCls) { + throw new Error('command and handlerCls must be defined'); + } + var handler = this._injector.instantiate(handlerCls); + this.register(command, handler); +}; +CommandStack.prototype.canUndo = function () { + return !!this._getUndoAction(); +}; +CommandStack.prototype.canRedo = function () { + return !!this._getRedoAction(); +}; + +// stack access ////////////////////// + +CommandStack.prototype._getRedoAction = function () { + return this._stack[this._stackIdx + 1]; +}; +CommandStack.prototype._getUndoAction = function () { + return this._stack[this._stackIdx]; +}; + +// internal functionality ////////////////////// + +CommandStack.prototype._internalUndo = function (action) { + var self = this; + var command = action.command, + context = action.context; + var handler = this._getHandler(command); + + // guard against illegal nested command stack invocations + this._atomicDo(function () { + self._fire(command, 'revert', action); + if (handler.revert) { + self._markDirty(handler.revert(context)); + } + self._revertedAction(action); + self._fire(command, 'reverted', action); + }); +}; +CommandStack.prototype._fire = function (command, qualifier, event) { + if (arguments.length < 3) { + event = qualifier; + qualifier = null; + } + var names = qualifier ? [command + '.' + qualifier, qualifier] : [command], + i, + name, + result; + event = this._eventBus.createEvent(event); + for (i = 0; name = names[i]; i++) { + result = this._eventBus.fire('commandStack.' + name, event); + if (event.cancelBubble) { + break; + } + } + return result; +}; +CommandStack.prototype._createId = function () { + return this._uid++; +}; +CommandStack.prototype._atomicDo = function (fn) { + var execution = this._currentExecution; + execution.atomic = true; + try { + fn(); + } finally { + execution.atomic = false; + } +}; +CommandStack.prototype._internalExecute = function (action, redo) { + var self = this; + var command = action.command, + context = action.context; + var handler = this._getHandler(command); + if (!handler) { + throw new Error('no command handler registered for <' + command + '>'); + } + this._pushAction(action); + if (!redo) { + this._fire(command, 'preExecute', action); + if (handler.preExecute) { + handler.preExecute(context); + } + this._fire(command, 'preExecuted', action); + } + + // guard against illegal nested command stack invocations + this._atomicDo(function () { + self._fire(command, 'execute', action); + if (handler.execute) { + // actual execute + mark return results as dirty + self._markDirty(handler.execute(context)); + } + + // log to stack + self._executedAction(action, redo); + self._fire(command, 'executed', action); + }); + if (!redo) { + this._fire(command, 'postExecute', action); + if (handler.postExecute) { + handler.postExecute(context); + } + this._fire(command, 'postExecuted', action); + } + this._popAction(action); +}; +CommandStack.prototype._pushAction = function (action) { + var execution = this._currentExecution, + actions = execution.actions; + var baseAction = actions[0]; + if (execution.atomic) { + throw new Error('illegal invocation in or phase (action: ' + action.command + ')'); + } + if (!action.id) { + action.id = baseAction && baseAction.id || this._createId(); + } + actions.push(action); +}; +CommandStack.prototype._popAction = function () { + var execution = this._currentExecution, + trigger = execution.trigger, + actions = execution.actions, + dirty = execution.dirty; + actions.pop(); + if (!actions.length) { + this._eventBus.fire('elements.changed', { + elements: (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.uniqueBy)('id', dirty.reverse()) + }); + dirty.length = 0; + this._fire('changed', { + trigger: trigger + }); + execution.trigger = null; + } +}; +CommandStack.prototype._markDirty = function (elements) { + var execution = this._currentExecution; + if (!elements) { + return; + } + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(elements) ? elements : [elements]; + execution.dirty = execution.dirty.concat(elements); +}; +CommandStack.prototype._executedAction = function (action, redo) { + var stackIdx = ++this._stackIdx; + if (!redo) { + this._stack.splice(stackIdx, this._stack.length, action); + } +}; +CommandStack.prototype._revertedAction = function (action) { + this._stackIdx--; +}; +CommandStack.prototype._getHandler = function (command) { + return this._handlerMap[command]; +}; +CommandStack.prototype._setHandler = function (command, handler) { + if (!command || !handler) { + throw new Error('command and handler required'); + } + if (this._handlerMap[command]) { + throw new Error('overriding handler for command <' + command + '>'); + } + this._handlerMap[command] = handler; +}; + +/***/ }), + +/***/ 25541: +/*!******************************************************!*\ + !*** ./node_modules/diagram-js/lib/command/index.js ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _CommandStack__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CommandStack */ 77738); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + commandStack: ['type', _CommandStack__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 29975: +/*!****************************************************!*\ + !*** ./node_modules/diagram-js/lib/core/Canvas.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Canvas) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/Collections */ 39233); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/Elements */ 35723); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../layout/LayoutUtil */ 8610); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ 57491); + + + + + + +function round(number, resolution) { + return Math.round(number * resolution) / resolution; +} +function ensurePx(number) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(number) ? number + 'px' : number; +} +function findRoot(element) { + while (element.parent) { + element = element.parent; + } + return element; +} + +/** + * Creates a HTML container element for a SVG element with + * the given configuration + * + * @param {Object} options + * @return {HTMLElement} the container element + */ +function createContainer(options) { + options = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, { + width: '100%', + height: '100%' + }, options); + var container = options.container || document.body; + + // create a
around the svg element with the respective size + // this way we can always get the correct container size + // (this is impossible for elements at the moment) + var parent = document.createElement('div'); + parent.setAttribute('class', 'djs-container'); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(parent.style, { + position: 'relative', + overflow: 'hidden', + width: ensurePx(options.width), + height: ensurePx(options.height) + }); + container.appendChild(parent); + return parent; +} +function createGroup(parent, cls, childIndex) { + var group = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(group).add(cls); + var index = childIndex !== undefined ? childIndex : parent.childNodes.length - 1; + + // must ensure second argument is node or _null_ + // cf. https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore + parent.insertBefore(group, parent.childNodes[index] || null); + return group; +} +var BASE_LAYER = 'base'; +var HIDDEN_MARKER = 'djs-element-hidden'; + +// render plane contents behind utility layers +var PLANE_LAYER_INDEX = 0; +var UTILITY_LAYER_INDEX = 1; +var REQUIRED_MODEL_ATTRS = { + shape: ['x', 'y', 'width', 'height'], + connection: ['waypoints'] +}; + +/** + * The main drawing canvas. + * + * @class + * @constructor + * + * @emits Canvas#canvas.init + * + * @param {Object} config + * @param {EventBus} eventBus + * @param {GraphicsFactory} graphicsFactory + * @param {ElementRegistry} elementRegistry + */ +function Canvas(config, eventBus, graphicsFactory, elementRegistry) { + this._eventBus = eventBus; + this._elementRegistry = elementRegistry; + this._graphicsFactory = graphicsFactory; + this._init(config || {}); +} +Canvas.$inject = ['config.canvas', 'eventBus', 'graphicsFactory', 'elementRegistry']; + +/** + * Creates a element that is wrapped into a
. + * This way we are always able to correctly figure out the size of the svg element + * by querying the parent node. + + * (It is not possible to get the size of a svg element cross browser @ 2014-04-01) + + *
+ * + * ... + * + *
+ */ +Canvas.prototype._init = function (config) { + var eventBus = this._eventBus; + + // html container + var container = this._container = createContainer(config); + var svg = this._svg = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('svg'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(svg, { + width: '100%', + height: '100%' + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(container, svg); + var viewport = this._viewport = createGroup(svg, 'viewport'); + this._layers = {}; + this._planes = {}; + + // debounce canvas.viewbox.changed events + // for smoother diagram interaction + if (config.deferUpdate !== false) { + this._viewboxChanged = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.debounce)((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(this._viewboxChanged, this), 300); + } + eventBus.on('diagram.init', function () { + /** + * An event indicating that the canvas is ready to be drawn on. + * + * @memberOf Canvas + * + * @event canvas.init + * + * @type {Object} + * @property {SVGElement} svg the created svg element + * @property {SVGElement} viewport the direct parent of diagram elements and shapes + */ + eventBus.fire('canvas.init', { + svg: svg, + viewport: viewport + }); + }, this); + + // reset viewbox on shape changes to + // recompute the viewbox + eventBus.on(['shape.added', 'connection.added', 'shape.removed', 'connection.removed', 'elements.changed', 'plane.set'], function () { + delete this._cachedViewbox; + }, this); + eventBus.on('diagram.destroy', 500, this._destroy, this); + eventBus.on('diagram.clear', 500, this._clear, this); +}; +Canvas.prototype._destroy = function (emit) { + this._eventBus.fire('canvas.destroy', { + svg: this._svg, + viewport: this._viewport + }); + var parent = this._container.parentNode; + if (parent) { + parent.removeChild(this._container); + } + delete this._svg; + delete this._container; + delete this._layers; + delete this._planes; + delete this._activePlane; + delete this._viewport; +}; +Canvas.prototype._clear = function () { + var self = this; + var allElements = this._elementRegistry.getAll(); + + // remove all elements + allElements.forEach(function (element) { + var type = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.getType)(element); + if (type === 'root') { + self.setRootElementForPlane(null, self.findPlane(element), true); + } else { + self._removeElement(element, type); + } + }); + + // remove all planes + this._activePlane = null; + this._planes = {}; + + // force recomputation of view box + delete this._cachedViewbox; +}; + +/** + * Returns the default layer on which + * all elements are drawn. + * + * @returns {SVGElement} + */ +Canvas.prototype.getDefaultLayer = function () { + return this.getLayer(BASE_LAYER, PLANE_LAYER_INDEX); +}; + +/** + * Returns a layer that is used to draw elements + * or annotations on it. + * + * Non-existing layers retrieved through this method + * will be created. During creation, the optional index + * may be used to create layers below or above existing layers. + * A layer with a certain index is always created above all + * existing layers with the same index. + * + * @param {string} name + * @param {number} index + * + * @returns {SVGElement} + */ +Canvas.prototype.getLayer = function (name, index) { + if (!name) { + throw new Error('must specify a name'); + } + var layer = this._layers[name]; + if (!layer) { + layer = this._layers[name] = this._createLayer(name, index); + } + + // throw an error if layer creation / retrival is + // requested on different index + if (typeof index !== 'undefined' && layer.index !== index) { + throw new Error('layer <' + name + '> already created at index <' + index + '>'); + } + return layer.group; +}; + +/** + * Creates a given layer and returns it. + * + * @param {string} name + * @param {number} [index=0] + * + * @return {Object} layer descriptor with { index, group: SVGGroup } + */ +Canvas.prototype._createLayer = function (name, index) { + if (typeof index === 'undefined') { + index = UTILITY_LAYER_INDEX; + } + var childIndex = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(this._layers, function (childIndex, layer) { + if (index >= layer.index) { + childIndex++; + } + return childIndex; + }, 0); + return { + group: createGroup(this._viewport, 'layer-' + name, childIndex), + index: index + }; +}; + +/** + * Returns a plane that is used to draw elements on it. + * + * @param {string} name + * + * @return {Object} plane descriptor with { layer, rootElement, name } + */ +Canvas.prototype.getPlane = function (name) { + if (!name) { + throw new Error('must specify a name'); + } + return this._planes[name]; +}; + +/** + * Creates a plane that is used to draw elements on it. If no + * root element is provided, an implicit root will be used. + * + * @param {string} name + * @param {Object|djs.model.Root} [rootElement] optional root element + * + * @return {Object} plane descriptor with { layer, rootElement, name } + */ +Canvas.prototype.createPlane = function (name, rootElement) { + if (!name) { + throw new Error('must specify a name'); + } + if (this._planes[name]) { + throw new Error('plane ' + name + ' already exists'); + } + if (!rootElement) { + rootElement = { + id: '__implicitroot' + name, + children: [], + isImplicit: true + }; + } + var svgLayer = this.getLayer(name, PLANE_LAYER_INDEX); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(svgLayer).add(HIDDEN_MARKER); + var plane = this._planes[name] = { + layer: svgLayer, + name: name, + rootElement: null + }; + this.setRootElementForPlane(rootElement, plane); + return plane; +}; + +/** + * Sets the active plane and hides the previously active plane. + * + * @param {string|Object} plane + * + * @return {Object} plane descriptor with { layer, rootElement, name } + */ +Canvas.prototype.setActivePlane = function (plane) { + if (!plane) { + throw new Error('must specify a plane'); + } + if (typeof plane === 'string') { + plane = this.getPlane(plane); + } + + // hide previous Plane + if (this._activePlane) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(this._activePlane.layer).add(HIDDEN_MARKER); + } + this._activePlane = plane; + + // show current Plane + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(plane.layer).remove(HIDDEN_MARKER); + if (plane.rootElement) { + this._elementRegistry.updateGraphics(plane.rootElement, this._svg, true); + } + this._eventBus.fire('plane.set', { + plane: plane + }); + return plane; +}; + +/** + * Returns the currently active layer + * + * @returns {SVGElement} + */ + +Canvas.prototype.getActiveLayer = function () { + return this.getActivePlane().layer; +}; + +/** + * Returns the currently active plane. + * + * @return {Object} plane descriptor with { layer, rootElement, name } + */ +Canvas.prototype.getActivePlane = function () { + var plane = this._activePlane; + if (!plane) { + plane = this.createPlane(BASE_LAYER); + this.setActivePlane(BASE_LAYER); + } + return plane; +}; + +/** + * Returns the plane which contains the given element. + * + * @param {string|djs.model.Base} element + * + * @return {Object} plane descriptor with { layer, rootElement, name } + */ +Canvas.prototype.findPlane = function (element) { + if (typeof element === 'string') { + element = this._elementRegistry.get(element); + } + var root = findRoot(element); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(this._planes, function (plane) { + return plane.rootElement === root; + }); +}; + +/** + * Returns the html element that encloses the + * drawing canvas. + * + * @return {DOMNode} + */ +Canvas.prototype.getContainer = function () { + return this._container; +}; + +// markers ////////////////////// + +Canvas.prototype._updateMarker = function (element, marker, add) { + var container; + if (!element.id) { + element = this._elementRegistry.get(element); + } + + // we need to access all + container = this._elementRegistry._elements[element.id]; + if (!container) { + return; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)([container.gfx, container.secondaryGfx], function (gfx) { + if (gfx) { + // invoke either addClass or removeClass based on mode + if (add) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(gfx).add(marker); + } else { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(gfx).remove(marker); + } + } + }); + + /** + * An event indicating that a marker has been updated for an element + * + * @event element.marker.update + * @type {Object} + * @property {djs.model.Element} element the shape + * @property {Object} gfx the graphical representation of the shape + * @property {string} marker + * @property {boolean} add true if the marker was added, false if it got removed + */ + this._eventBus.fire('element.marker.update', { + element: element, + gfx: container.gfx, + marker: marker, + add: !!add + }); +}; + +/** + * Adds a marker to an element (basically a css class). + * + * Fires the element.marker.update event, making it possible to + * integrate extension into the marker life-cycle, too. + * + * @example + * canvas.addMarker('foo', 'some-marker'); + * + * var fooGfx = canvas.getGraphics('foo'); + * + * fooGfx; // ... + * + * @param {string|djs.model.Base} element + * @param {string} marker + */ +Canvas.prototype.addMarker = function (element, marker) { + this._updateMarker(element, marker, true); +}; + +/** + * Remove a marker from an element. + * + * Fires the element.marker.update event, making it possible to + * integrate extension into the marker life-cycle, too. + * + * @param {string|djs.model.Base} element + * @param {string} marker + */ +Canvas.prototype.removeMarker = function (element, marker) { + this._updateMarker(element, marker, false); +}; + +/** + * Check the existence of a marker on element. + * + * @param {string|djs.model.Base} element + * @param {string} marker + */ +Canvas.prototype.hasMarker = function (element, marker) { + if (!element.id) { + element = this._elementRegistry.get(element); + } + var gfx = this.getGraphics(element); + return (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(gfx).has(marker); +}; + +/** + * Toggles a marker on an element. + * + * Fires the element.marker.update event, making it possible to + * integrate extension into the marker life-cycle, too. + * + * @param {string|djs.model.Base} element + * @param {string} marker + */ +Canvas.prototype.toggleMarker = function (element, marker) { + if (this.hasMarker(element, marker)) { + this.removeMarker(element, marker); + } else { + this.addMarker(element, marker); + } +}; +Canvas.prototype.getRootElement = function () { + var plane = this.getActivePlane(); + return plane.rootElement; +}; + +// root element handling ////////////////////// + +/** + * Sets a given element as the new root element for the canvas + * and returns the new root element. + * + * @param {Object|djs.model.Root} element + * @param {boolean} [override] whether to override the current root element, if any + * + * @return {Object|djs.model.Root} new root element + */ +Canvas.prototype.setRootElement = function (element, override) { + var activePlane = this._activePlane; + if (activePlane) { + return this.setRootElementForPlane(element, activePlane, override); + } else { + var basePlane = this.createPlane(BASE_LAYER, element); + this.setActivePlane(basePlane); + return basePlane.rootElement; + } +}; + +/** + * Sets a given element as the new root element for the canvas + * and returns the new root element. + * + * @param {Object|djs.model.Root} element + * @param {Object|djs.model.Root} plane + * @param {boolean} [override] whether to override the current root element, if any + * + * @return {Object|djs.model.Root} new root element + */ +Canvas.prototype.setRootElementForPlane = function (element, plane, override) { + if (typeof plane === 'string') { + plane = this.getPlane(plane); + } + if (element) { + this._ensureValid('root', element); + } + var currentRoot = plane.rootElement, + elementRegistry = this._elementRegistry, + eventBus = this._eventBus; + if (currentRoot) { + if (!override) { + throw new Error('rootElement already set, need to specify override'); + } + + // simulate element remove event sequence + eventBus.fire('root.remove', { + element: currentRoot + }); + eventBus.fire('root.removed', { + element: currentRoot + }); + elementRegistry.remove(currentRoot); + } + if (element) { + var gfx = plane.layer; + + // resemble element add event sequence + eventBus.fire('root.add', { + element: element + }); + elementRegistry.add(element, gfx); + eventBus.fire('root.added', { + element: element, + gfx: gfx + }); + + // associate SVG with root element when active + if (plane === this._activePlane) { + this._elementRegistry.updateGraphics(element, this._svg, true); + } + } + plane.rootElement = element; + return element; +}; + +// add functionality ////////////////////// + +Canvas.prototype._ensureValid = function (type, element) { + if (!element.id) { + throw new Error('element must have an id'); + } + if (this._elementRegistry.get(element.id)) { + throw new Error('element with id ' + element.id + ' already exists'); + } + var requiredAttrs = REQUIRED_MODEL_ATTRS[type]; + var valid = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.every)(requiredAttrs, function (attr) { + return typeof element[attr] !== 'undefined'; + }); + if (!valid) { + throw new Error('must supply { ' + requiredAttrs.join(', ') + ' } with ' + type); + } +}; +Canvas.prototype._setParent = function (element, parent, parentIndex) { + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_3__.add)(parent.children, element, parentIndex); + element.parent = parent; +}; + +/** + * Adds an element to the canvas. + * + * This wires the parent <-> child relationship between the element and + * a explicitly specified parent or an implicit root element. + * + * During add it emits the events + * + * * <{type}.add> (element, parent) + * * <{type}.added> (element, gfx) + * + * Extensions may hook into these events to perform their magic. + * + * @param {string} type + * @param {Object|djs.model.Base} element + * @param {Object|djs.model.Base} [parent] + * @param {number} [parentIndex] + * + * @return {Object|djs.model.Base} the added element + */ +Canvas.prototype._addElement = function (type, element, parent, parentIndex) { + parent = parent || this.getRootElement(); + var eventBus = this._eventBus, + graphicsFactory = this._graphicsFactory; + this._ensureValid(type, element); + eventBus.fire(type + '.add', { + element: element, + parent: parent + }); + this._setParent(element, parent, parentIndex); + + // create graphics + var gfx = graphicsFactory.create(type, element, parentIndex); + this._elementRegistry.add(element, gfx); + + // update its visual + graphicsFactory.update(type, element, gfx); + eventBus.fire(type + '.added', { + element: element, + gfx: gfx + }); + return element; +}; + +/** + * Adds a shape to the canvas + * + * @param {Object|djs.model.Shape} shape to add to the diagram + * @param {djs.model.Base} [parent] + * @param {number} [parentIndex] + * + * @return {djs.model.Shape} the added shape + */ +Canvas.prototype.addShape = function (shape, parent, parentIndex) { + return this._addElement('shape', shape, parent, parentIndex); +}; + +/** + * Adds a connection to the canvas + * + * @param {Object|djs.model.Connection} connection to add to the diagram + * @param {djs.model.Base} [parent] + * @param {number} [parentIndex] + * + * @return {djs.model.Connection} the added connection + */ +Canvas.prototype.addConnection = function (connection, parent, parentIndex) { + return this._addElement('connection', connection, parent, parentIndex); +}; + +/** + * Internal remove element + */ +Canvas.prototype._removeElement = function (element, type) { + var elementRegistry = this._elementRegistry, + graphicsFactory = this._graphicsFactory, + eventBus = this._eventBus; + element = elementRegistry.get(element.id || element); + if (!element) { + // element was removed already + return; + } + eventBus.fire(type + '.remove', { + element: element + }); + graphicsFactory.remove(element); + + // unset parent <-> child relationship + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_3__.remove)(element.parent && element.parent.children, element); + element.parent = null; + eventBus.fire(type + '.removed', { + element: element + }); + elementRegistry.remove(element); + return element; +}; + +/** + * Removes a shape from the canvas + * + * @param {string|djs.model.Shape} shape or shape id to be removed + * + * @return {djs.model.Shape} the removed shape + */ +Canvas.prototype.removeShape = function (shape) { + /** + * An event indicating that a shape is about to be removed from the canvas. + * + * @memberOf Canvas + * + * @event shape.remove + * @type {Object} + * @property {djs.model.Shape} element the shape descriptor + * @property {Object} gfx the graphical representation of the shape + */ + + /** + * An event indicating that a shape has been removed from the canvas. + * + * @memberOf Canvas + * + * @event shape.removed + * @type {Object} + * @property {djs.model.Shape} element the shape descriptor + * @property {Object} gfx the graphical representation of the shape + */ + return this._removeElement(shape, 'shape'); +}; + +/** + * Removes a connection from the canvas + * + * @param {string|djs.model.Connection} connection or connection id to be removed + * + * @return {djs.model.Connection} the removed connection + */ +Canvas.prototype.removeConnection = function (connection) { + /** + * An event indicating that a connection is about to be removed from the canvas. + * + * @memberOf Canvas + * + * @event connection.remove + * @type {Object} + * @property {djs.model.Connection} element the connection descriptor + * @property {Object} gfx the graphical representation of the connection + */ + + /** + * An event indicating that a connection has been removed from the canvas. + * + * @memberOf Canvas + * + * @event connection.removed + * @type {Object} + * @property {djs.model.Connection} element the connection descriptor + * @property {Object} gfx the graphical representation of the connection + */ + return this._removeElement(connection, 'connection'); +}; + +/** + * Return the graphical object underlaying a certain diagram element + * + * @param {string|djs.model.Base} element descriptor of the element + * @param {boolean} [secondary=false] whether to return the secondary connected element + * + * @return {SVGElement} + */ +Canvas.prototype.getGraphics = function (element, secondary) { + return this._elementRegistry.getGraphics(element, secondary); +}; + +/** + * Perform a viewbox update via a given change function. + * + * @param {Function} changeFn + */ +Canvas.prototype._changeViewbox = function (changeFn) { + // notify others of the upcoming viewbox change + this._eventBus.fire('canvas.viewbox.changing'); + + // perform actual change + changeFn.apply(this); + + // reset the cached viewbox so that + // a new get operation on viewbox or zoom + // triggers a viewbox re-computation + this._cachedViewbox = null; + + // notify others of the change; this step + // may or may not be debounced + this._viewboxChanged(); +}; +Canvas.prototype._viewboxChanged = function () { + this._eventBus.fire('canvas.viewbox.changed', { + viewbox: this.viewbox() + }); +}; + +/** + * Gets or sets the view box of the canvas, i.e. the + * area that is currently displayed. + * + * The getter may return a cached viewbox (if it is currently + * changing). To force a recomputation, pass `false` as the first argument. + * + * @example + * + * canvas.viewbox({ x: 100, y: 100, width: 500, height: 500 }) + * + * // sets the visible area of the diagram to (100|100) -> (600|100) + * // and and scales it according to the diagram width + * + * var viewbox = canvas.viewbox(); // pass `false` to force recomputing the box. + * + * console.log(viewbox); + * // { + * // inner: Dimensions, + * // outer: Dimensions, + * // scale, + * // x, y, + * // width, height + * // } + * + * // if the current diagram is zoomed and scrolled, you may reset it to the + * // default zoom via this method, too: + * + * var zoomedAndScrolledViewbox = canvas.viewbox(); + * + * canvas.viewbox({ + * x: 0, + * y: 0, + * width: zoomedAndScrolledViewbox.outer.width, + * height: zoomedAndScrolledViewbox.outer.height + * }); + * + * @param {Object} [box] the new view box to set + * @param {number} box.x the top left X coordinate of the canvas visible in view box + * @param {number} box.y the top left Y coordinate of the canvas visible in view box + * @param {number} box.width the visible width + * @param {number} box.height + * + * @return {Object} the current view box + */ +Canvas.prototype.viewbox = function (box) { + if (box === undefined && this._cachedViewbox) { + return this._cachedViewbox; + } + var viewport = this._viewport, + innerBox, + outerBox = this.getSize(), + matrix, + transform, + scale, + x, + y; + if (!box) { + // compute the inner box based on the + // diagrams active plane. This allows us to exclude + // external components, such as overlays + + innerBox = this._activePlane && this._activePlane.layer.getBBox() || {}; + transform = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.transform)(viewport); + matrix = transform ? transform.matrix : (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.createMatrix)(); + scale = round(matrix.a, 1000); + x = round(-matrix.e || 0, 1000); + y = round(-matrix.f || 0, 1000); + box = this._cachedViewbox = { + x: x ? x / scale : 0, + y: y ? y / scale : 0, + width: outerBox.width / scale, + height: outerBox.height / scale, + scale: scale, + inner: { + width: innerBox.width || 0, + height: innerBox.height || 0, + x: innerBox.x || 0, + y: innerBox.y || 0 + }, + outer: outerBox + }; + return box; + } else { + this._changeViewbox(function () { + scale = Math.min(outerBox.width / box.width, outerBox.height / box.height); + var matrix = this._svg.createSVGMatrix().scale(scale).translate(-box.x, -box.y); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.transform)(viewport, matrix); + }); + } + return box; +}; + +/** + * Gets or sets the scroll of the canvas. + * + * @param {Object} [delta] the new scroll to apply. + * + * @param {number} [delta.dx] + * @param {number} [delta.dy] + */ +Canvas.prototype.scroll = function (delta) { + var node = this._viewport; + var matrix = node.getCTM(); + if (delta) { + this._changeViewbox(function () { + delta = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ + dx: 0, + dy: 0 + }, delta || {}); + matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix); + setCTM(node, matrix); + }); + } + return { + x: matrix.e, + y: matrix.f + }; +}; + +/** + * Scrolls the viewbox to contain the given element. + * Optionally specify a padding to be applied to the edges. + * + * @param {Object|String} [element] the element to scroll to. + * @param {Object|Number} [padding=100] the padding to be applied. Can also specify top, bottom, left and right. + * + */ +Canvas.prototype.scrollToElement = function (element, padding) { + var defaultPadding = 100; + if (typeof element === 'string') { + element = this._elementRegistry.get(element); + } + + // switch to correct Plane + var targetPlane = this.findPlane(element); + if (targetPlane !== this._activePlane) { + this.setActivePlane(targetPlane); + } + if (!padding) { + padding = {}; + } + if (typeof padding === 'number') { + defaultPadding = padding; + } + padding = { + top: padding.top || defaultPadding, + right: padding.right || defaultPadding, + bottom: padding.bottom || defaultPadding, + left: padding.left || defaultPadding + }; + var elementBounds = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.getBBox)(element), + elementTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_4__.asTRBL)(elementBounds), + viewboxBounds = this.viewbox(), + zoom = this.zoom(), + dx, + dy; + + // shrink viewboxBounds with padding + viewboxBounds.y += padding.top / zoom; + viewboxBounds.x += padding.left / zoom; + viewboxBounds.width -= (padding.right + padding.left) / zoom; + viewboxBounds.height -= (padding.bottom + padding.top) / zoom; + var viewboxTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_4__.asTRBL)(viewboxBounds); + var canFit = elementBounds.width < viewboxBounds.width && elementBounds.height < viewboxBounds.height; + if (!canFit) { + // top-left when element can't fit + dx = elementBounds.x - viewboxBounds.x; + dy = elementBounds.y - viewboxBounds.y; + } else { + var dRight = Math.max(0, elementTrbl.right - viewboxTrbl.right), + dLeft = Math.min(0, elementTrbl.left - viewboxTrbl.left), + dBottom = Math.max(0, elementTrbl.bottom - viewboxTrbl.bottom), + dTop = Math.min(0, elementTrbl.top - viewboxTrbl.top); + dx = dRight || dLeft; + dy = dBottom || dTop; + } + this.scroll({ + dx: -dx * zoom, + dy: -dy * zoom + }); +}; + +/** + * Gets or sets the current zoom of the canvas, optionally zooming + * to the specified position. + * + * The getter may return a cached zoom level. Call it with `false` as + * the first argument to force recomputation of the current level. + * + * @param {string|number} [newScale] the new zoom level, either a number, i.e. 0.9, + * or `fit-viewport` to adjust the size to fit the current viewport + * @param {string|Point} [center] the reference point { x: .., y: ..} to zoom to, 'auto' to zoom into mid or null + * + * @return {number} the current scale + */ +Canvas.prototype.zoom = function (newScale, center) { + if (!newScale) { + return this.viewbox(newScale).scale; + } + if (newScale === 'fit-viewport') { + return this._fitViewport(center); + } + var outer, matrix; + this._changeViewbox(function () { + if (typeof center !== 'object') { + outer = this.viewbox().outer; + center = { + x: outer.width / 2, + y: outer.height / 2 + }; + } + matrix = this._setZoom(newScale, center); + }); + return round(matrix.a, 1000); +}; +function setCTM(node, m) { + var mstr = 'matrix(' + m.a + ',' + m.b + ',' + m.c + ',' + m.d + ',' + m.e + ',' + m.f + ')'; + node.setAttribute('transform', mstr); +} +Canvas.prototype._fitViewport = function (center) { + var vbox = this.viewbox(), + outer = vbox.outer, + inner = vbox.inner, + newScale, + newViewbox; + + // display the complete diagram without zooming in. + // instead of relying on internal zoom, we perform a + // hard reset on the canvas viewbox to realize this + // + // if diagram does not need to be zoomed in, we focus it around + // the diagram origin instead + + if (inner.x >= 0 && inner.y >= 0 && inner.x + inner.width <= outer.width && inner.y + inner.height <= outer.height && !center) { + newViewbox = { + x: 0, + y: 0, + width: Math.max(inner.width + inner.x, outer.width), + height: Math.max(inner.height + inner.y, outer.height) + }; + } else { + newScale = Math.min(1, outer.width / inner.width, outer.height / inner.height); + newViewbox = { + x: inner.x + (center ? inner.width / 2 - outer.width / newScale / 2 : 0), + y: inner.y + (center ? inner.height / 2 - outer.height / newScale / 2 : 0), + width: outer.width / newScale, + height: outer.height / newScale + }; + } + this.viewbox(newViewbox); + return this.viewbox(false).scale; +}; +Canvas.prototype._setZoom = function (scale, center) { + var svg = this._svg, + viewport = this._viewport; + var matrix = svg.createSVGMatrix(); + var point = svg.createSVGPoint(); + var centerPoint, originalPoint, currentMatrix, scaleMatrix, newMatrix; + currentMatrix = viewport.getCTM(); + var currentScale = currentMatrix.a; + if (center) { + centerPoint = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(point, center); + + // revert applied viewport transformations + originalPoint = centerPoint.matrixTransform(currentMatrix.inverse()); + + // create scale matrix + scaleMatrix = matrix.translate(originalPoint.x, originalPoint.y).scale(1 / currentScale * scale).translate(-originalPoint.x, -originalPoint.y); + newMatrix = currentMatrix.multiply(scaleMatrix); + } else { + newMatrix = matrix.scale(scale); + } + setCTM(this._viewport, newMatrix); + return newMatrix; +}; + +/** + * Returns the size of the canvas + * + * @return {Dimensions} + */ +Canvas.prototype.getSize = function () { + return { + width: this._container.clientWidth, + height: this._container.clientHeight + }; +}; + +/** + * Return the absolute bounding box for the given element + * + * The absolute bounding box may be used to display overlays in the + * callers (browser) coordinate system rather than the zoomed in/out + * canvas coordinates. + * + * @param {ElementDescriptor} element + * @return {Bounds} the absolute bounding box + */ +Canvas.prototype.getAbsoluteBBox = function (element) { + var vbox = this.viewbox(); + var bbox; + + // connection + // use svg bbox + if (element.waypoints) { + var gfx = this.getGraphics(element); + bbox = gfx.getBBox(); + } + + // shapes + // use data + else { + bbox = element; + } + var x = bbox.x * vbox.scale - vbox.x * vbox.scale; + var y = bbox.y * vbox.scale - vbox.y * vbox.scale; + var width = bbox.width * vbox.scale; + var height = bbox.height * vbox.scale; + return { + x: x, + y: y, + width: width, + height: height + }; +}; + +/** + * Fires an event in order other modules can react to the + * canvas resizing + */ +Canvas.prototype.resized = function () { + // force recomputation of view box + delete this._cachedViewbox; + this._eventBus.fire('canvas.resized'); +}; + +/***/ }), + +/***/ 22037: +/*!************************************************************!*\ + !*** ./node_modules/diagram-js/lib/core/ElementFactory.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ElementFactory) +/* harmony export */ }); +/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../model */ 83377); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + + +/** + * A factory for diagram-js shapes + */ +function ElementFactory() { + this._uid = 12; +} +ElementFactory.prototype.createRoot = function (attrs) { + return this.create('root', attrs); +}; +ElementFactory.prototype.createLabel = function (attrs) { + return this.create('label', attrs); +}; +ElementFactory.prototype.createShape = function (attrs) { + return this.create('shape', attrs); +}; +ElementFactory.prototype.createConnection = function (attrs) { + return this.create('connection', attrs); +}; + +/** + * Create a model element with the given type and + * a number of pre-set attributes. + * + * @param {string} type + * @param {Object} attrs + * @return {djs.model.Base} the newly created model instance + */ +ElementFactory.prototype.create = function (type, attrs) { + attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, attrs || {}); + if (!attrs.id) { + attrs.id = type + '_' + this._uid++; + } + return (0,_model__WEBPACK_IMPORTED_MODULE_1__.create)(type, attrs); +}; + +/***/ }), + +/***/ 69440: +/*!*************************************************************!*\ + !*** ./node_modules/diagram-js/lib/core/ElementRegistry.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ElementRegistry) +/* harmony export */ }); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ 57491); +var ELEMENT_ID = 'data-element-id'; + + +/** + * @class + * + * A registry that keeps track of all shapes in the diagram. + */ +function ElementRegistry(eventBus) { + this._elements = {}; + this._eventBus = eventBus; +} +ElementRegistry.$inject = ['eventBus']; + +/** + * Register a pair of (element, gfx, (secondaryGfx)). + * + * @param {djs.model.Base} element + * @param {SVGElement} gfx + * @param {SVGElement} [secondaryGfx] optional other element to register, too + */ +ElementRegistry.prototype.add = function (element, gfx, secondaryGfx) { + var id = element.id; + this._validateId(id); + + // associate dom node with element + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(gfx, ELEMENT_ID, id); + if (secondaryGfx) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(secondaryGfx, ELEMENT_ID, id); + } + this._elements[id] = { + element: element, + gfx: gfx, + secondaryGfx: secondaryGfx + }; +}; + +/** + * Removes an element from the registry. + * + * @param {djs.model.Base} element + */ +ElementRegistry.prototype.remove = function (element) { + var elements = this._elements, + id = element.id || element, + container = id && elements[id]; + if (container) { + // unset element id on gfx + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(container.gfx, ELEMENT_ID, ''); + if (container.secondaryGfx) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(container.secondaryGfx, ELEMENT_ID, ''); + } + delete elements[id]; + } +}; + +/** + * Update the id of an element + * + * @param {djs.model.Base} element + * @param {string} newId + */ +ElementRegistry.prototype.updateId = function (element, newId) { + this._validateId(newId); + if (typeof element === 'string') { + element = this.get(element); + } + this._eventBus.fire('element.updateId', { + element: element, + newId: newId + }); + var gfx = this.getGraphics(element), + secondaryGfx = this.getGraphics(element, true); + this.remove(element); + element.id = newId; + this.add(element, gfx, secondaryGfx); +}; + +/** + * Update the graphics of an element + * + * @param {djs.model.Base} element + * @param {SVGElement} gfx + * @param {boolean} [secondary=false] whether to update the secondary connected element + */ +ElementRegistry.prototype.updateGraphics = function (filter, gfx, secondary) { + var id = filter.id || filter; + var container = this._elements[id]; + if (secondary) { + container.secondaryGfx = gfx; + } else { + container.gfx = gfx; + } + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(gfx, ELEMENT_ID, id); + return gfx; +}; + +/** + * Return the model element for a given id or graphics. + * + * @example + * + * elementRegistry.get('SomeElementId_1'); + * elementRegistry.get(gfx); + * + * + * @param {string|SVGElement} filter for selecting the element + * + * @return {djs.model.Base} + */ +ElementRegistry.prototype.get = function (filter) { + var id; + if (typeof filter === 'string') { + id = filter; + } else { + id = filter && (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(filter, ELEMENT_ID); + } + var container = this._elements[id]; + return container && container.element; +}; + +/** + * Return all elements that match a given filter function. + * + * @param {Function} fn + * + * @return {Array} + */ +ElementRegistry.prototype.filter = function (fn) { + var filtered = []; + this.forEach(function (element, gfx) { + if (fn(element, gfx)) { + filtered.push(element); + } + }); + return filtered; +}; + +/** + * Return the first element that satisfies the provided testing function. + * + * @param {Function} fn + * + * @return {djs.model.Base} + */ +ElementRegistry.prototype.find = function (fn) { + var map = this._elements, + keys = Object.keys(map); + for (var i = 0; i < keys.length; i++) { + var id = keys[i], + container = map[id], + element = container.element, + gfx = container.gfx; + if (fn(element, gfx)) { + return element; + } + } +}; + +/** + * Return all rendered model elements. + * + * @return {Array} + */ +ElementRegistry.prototype.getAll = function () { + return this.filter(function (e) { + return e; + }); +}; + +/** + * Iterate over all diagram elements. + * + * @param {Function} fn + */ +ElementRegistry.prototype.forEach = function (fn) { + var map = this._elements; + Object.keys(map).forEach(function (id) { + var container = map[id], + element = container.element, + gfx = container.gfx; + return fn(element, gfx); + }); +}; + +/** + * Return the graphical representation of an element or its id. + * + * @example + * elementRegistry.getGraphics('SomeElementId_1'); + * elementRegistry.getGraphics(rootElement); // + * + * elementRegistry.getGraphics(rootElement, true); // + * + * + * @param {string|djs.model.Base} filter + * @param {boolean} [secondary=false] whether to return the secondary connected element + * + * @return {SVGElement} + */ +ElementRegistry.prototype.getGraphics = function (filter, secondary) { + var id = filter.id || filter; + var container = this._elements[id]; + return container && (secondary ? container.secondaryGfx : container.gfx); +}; + +/** + * Validate the suitability of the given id and signals a problem + * with an exception. + * + * @param {string} id + * + * @throws {Error} if id is empty or already assigned + */ +ElementRegistry.prototype._validateId = function (id) { + if (!id) { + throw new Error('element must have an id'); + } + if (this._elements[id]) { + throw new Error('element with id ' + id + ' already added'); + } +}; + +/***/ }), + +/***/ 78069: +/*!******************************************************!*\ + !*** ./node_modules/diagram-js/lib/core/EventBus.js ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ EventBus) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +var FN_REF = '__fn'; +var DEFAULT_PRIORITY = 1000; +var slice = Array.prototype.slice; + +/** + * A general purpose event bus. + * + * This component is used to communicate across a diagram instance. + * Other parts of a diagram can use it to listen to and broadcast events. + * + * + * ## Registering for Events + * + * The event bus provides the {@link EventBus#on} and {@link EventBus#once} + * methods to register for events. {@link EventBus#off} can be used to + * remove event registrations. Listeners receive an instance of {@link Event} + * as the first argument. It allows them to hook into the event execution. + * + * ```javascript + * + * // listen for event + * eventBus.on('foo', function(event) { + * + * // access event type + * event.type; // 'foo' + * + * // stop propagation to other listeners + * event.stopPropagation(); + * + * // prevent event default + * event.preventDefault(); + * }); + * + * // listen for event with custom payload + * eventBus.on('bar', function(event, payload) { + * console.log(payload); + * }); + * + * // listen for event returning value + * eventBus.on('foobar', function(event) { + * + * // stop event propagation + prevent default + * return false; + * + * // stop event propagation + return custom result + * return { + * complex: 'listening result' + * }; + * }); + * + * + * // listen with custom priority (default=1000, higher is better) + * eventBus.on('priorityfoo', 1500, function(event) { + * console.log('invoked first!'); + * }); + * + * + * // listen for event and pass the context (`this`) + * eventBus.on('foobar', function(event) { + * this.foo(); + * }, this); + * ``` + * + * + * ## Emitting Events + * + * Events can be emitted via the event bus using {@link EventBus#fire}. + * + * ```javascript + * + * // false indicates that the default action + * // was prevented by listeners + * if (eventBus.fire('foo') === false) { + * console.log('default has been prevented!'); + * }; + * + * + * // custom args + return value listener + * eventBus.on('sum', function(event, a, b) { + * return a + b; + * }); + * + * // you can pass custom arguments + retrieve result values. + * var sum = eventBus.fire('sum', 1, 2); + * console.log(sum); // 3 + * ``` + */ +function EventBus() { + this._listeners = {}; + + // cleanup on destroy on lowest priority to allow + // message passing until the bitter end + this.on('diagram.destroy', 1, this._destroy, this); +} + +/** + * Register an event listener for events with the given name. + * + * The callback will be invoked with `event, ...additionalArguments` + * that have been passed to {@link EventBus#fire}. + * + * Returning false from a listener will prevent the events default action + * (if any is specified). To stop an event from being processed further in + * other listeners execute {@link Event#stopPropagation}. + * + * Returning anything but `undefined` from a listener will stop the listener propagation. + * + * @param {string|Array} events + * @param {number} [priority=1000] the priority in which this listener is called, larger is higher + * @param {Function} callback + * @param {Object} [that] Pass context (`this`) to the callback + */ +EventBus.prototype.on = function (events, priority, callback, that) { + events = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(events) ? events : [events]; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(priority)) { + that = callback; + callback = priority; + priority = DEFAULT_PRIORITY; + } + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(priority)) { + throw new Error('priority must be a number'); + } + var actualCallback = callback; + if (that) { + actualCallback = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(callback, that); + + // make sure we remember and are able to remove + // bound callbacks via {@link #off} using the original + // callback + actualCallback[FN_REF] = callback[FN_REF] || callback; + } + var self = this; + events.forEach(function (e) { + self._addListener(e, { + priority: priority, + callback: actualCallback, + next: null + }); + }); +}; + +/** + * Register an event listener that is executed only once. + * + * @param {string} event the event name to register for + * @param {number} [priority=1000] the priority in which this listener is called, larger is higher + * @param {Function} callback the callback to execute + * @param {Object} [that] Pass context (`this`) to the callback + */ +EventBus.prototype.once = function (event, priority, callback, that) { + var self = this; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(priority)) { + that = callback; + callback = priority; + priority = DEFAULT_PRIORITY; + } + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(priority)) { + throw new Error('priority must be a number'); + } + function wrappedCallback() { + wrappedCallback.__isTomb = true; + var result = callback.apply(that, arguments); + self.off(event, wrappedCallback); + return result; + } + + // make sure we remember and are able to remove + // bound callbacks via {@link #off} using the original + // callback + wrappedCallback[FN_REF] = callback; + this.on(event, priority, wrappedCallback); +}; + +/** + * Removes event listeners by event and callback. + * + * If no callback is given, all listeners for a given event name are being removed. + * + * @param {string|Array} events + * @param {Function} [callback] + */ +EventBus.prototype.off = function (events, callback) { + events = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(events) ? events : [events]; + var self = this; + events.forEach(function (event) { + self._removeListener(event, callback); + }); +}; + +/** + * Create an EventBus event. + * + * @param {Object} data + * + * @return {Object} event, recognized by the eventBus + */ +EventBus.prototype.createEvent = function (data) { + var event = new InternalEvent(); + event.init(data); + return event; +}; + +/** + * Fires a named event. + * + * @example + * + * // fire event by name + * events.fire('foo'); + * + * // fire event object with nested type + * var event = { type: 'foo' }; + * events.fire(event); + * + * // fire event with explicit type + * var event = { x: 10, y: 20 }; + * events.fire('element.moved', event); + * + * // pass additional arguments to the event + * events.on('foo', function(event, bar) { + * alert(bar); + * }); + * + * events.fire({ type: 'foo' }, 'I am bar!'); + * + * @param {string} [name] the optional event name + * @param {Object} [event] the event object + * @param {...Object} additional arguments to be passed to the callback functions + * + * @return {boolean} the events return value, if specified or false if the + * default action was prevented by listeners + */ +EventBus.prototype.fire = function (type, data) { + var event, firstListener, returnValue, args; + args = slice.call(arguments); + if (typeof type === 'object') { + data = type; + type = data.type; + } + if (!type) { + throw new Error('no event type specified'); + } + firstListener = this._listeners[type]; + if (!firstListener) { + return; + } + + // we make sure we fire instances of our home made + // events here. We wrap them only once, though + if (data instanceof InternalEvent) { + // we are fine, we alread have an event + event = data; + } else { + event = this.createEvent(data); + } + + // ensure we pass the event as the first parameter + args[0] = event; + + // original event type (in case we delegate) + var originalType = event.type; + + // update event type before delegation + if (type !== originalType) { + event.type = type; + } + try { + returnValue = this._invokeListeners(event, args, firstListener); + } finally { + // reset event type after delegation + if (type !== originalType) { + event.type = originalType; + } + } + + // set the return value to false if the event default + // got prevented and no other return value exists + if (returnValue === undefined && event.defaultPrevented) { + returnValue = false; + } + return returnValue; +}; +EventBus.prototype.handleError = function (error) { + return this.fire('error', { + error: error + }) === false; +}; +EventBus.prototype._destroy = function () { + this._listeners = {}; +}; +EventBus.prototype._invokeListeners = function (event, args, listener) { + var returnValue; + while (listener) { + // handle stopped propagation + if (event.cancelBubble) { + break; + } + returnValue = this._invokeListener(event, args, listener); + listener = listener.next; + } + return returnValue; +}; +EventBus.prototype._invokeListener = function (event, args, listener) { + var returnValue; + if (listener.callback.__isTomb) { + return returnValue; + } + try { + // returning false prevents the default action + returnValue = invokeFunction(listener.callback, args); + + // stop propagation on return value + if (returnValue !== undefined) { + event.returnValue = returnValue; + event.stopPropagation(); + } + + // prevent default on return false + if (returnValue === false) { + event.preventDefault(); + } + } catch (error) { + if (!this.handleError(error)) { + console.error('unhandled error in event listener', error); + throw error; + } + } + return returnValue; +}; + +/* + * Add new listener with a certain priority to the list + * of listeners (for the given event). + * + * The semantics of listener registration / listener execution are + * first register, first serve: New listeners will always be inserted + * after existing listeners with the same priority. + * + * Example: Inserting two listeners with priority 1000 and 1300 + * + * * before: [ 1500, 1500, 1000, 1000 ] + * * after: [ 1500, 1500, (new=1300), 1000, 1000, (new=1000) ] + * + * @param {string} event + * @param {Object} listener { priority, callback } + */ +EventBus.prototype._addListener = function (event, newListener) { + var listener = this._getListeners(event), + previousListener; + + // no prior listeners + if (!listener) { + this._setListeners(event, newListener); + return; + } + + // ensure we order listeners by priority from + // 0 (high) to n > 0 (low) + while (listener) { + if (listener.priority < newListener.priority) { + newListener.next = listener; + if (previousListener) { + previousListener.next = newListener; + } else { + this._setListeners(event, newListener); + } + return; + } + previousListener = listener; + listener = listener.next; + } + + // add new listener to back + previousListener.next = newListener; +}; +EventBus.prototype._getListeners = function (name) { + return this._listeners[name]; +}; +EventBus.prototype._setListeners = function (name, listener) { + this._listeners[name] = listener; +}; +EventBus.prototype._removeListener = function (event, callback) { + var listener = this._getListeners(event), + nextListener, + previousListener, + listenerCallback; + if (!callback) { + // clear listeners + this._setListeners(event, null); + return; + } + while (listener) { + nextListener = listener.next; + listenerCallback = listener.callback; + if (listenerCallback === callback || listenerCallback[FN_REF] === callback) { + if (previousListener) { + previousListener.next = nextListener; + } else { + // new first listener + this._setListeners(event, nextListener); + } + } + previousListener = listener; + listener = nextListener; + } +}; + +/** + * A event that is emitted via the event bus. + */ +function InternalEvent() {} +InternalEvent.prototype.stopPropagation = function () { + this.cancelBubble = true; +}; +InternalEvent.prototype.preventDefault = function () { + this.defaultPrevented = true; +}; +InternalEvent.prototype.init = function (data) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(this, data || {}); +}; + +/** + * Invoke function. Be fast... + * + * @param {Function} fn + * @param {Array} args + * + * @return {Any} + */ +function invokeFunction(fn, args) { + return fn.apply(null, args); +} + +/***/ }), + +/***/ 55994: +/*!*************************************************************!*\ + !*** ./node_modules/diagram-js/lib/core/GraphicsFactory.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ GraphicsFactory) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/GraphicsUtil */ 35451); +/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/SvgTransformUtil */ 81384); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/Elements */ 35723); + + + + + + + +/** + * A factory that creates graphical elements + * + * @param {EventBus} eventBus + * @param {ElementRegistry} elementRegistry + */ +function GraphicsFactory(eventBus, elementRegistry) { + this._eventBus = eventBus; + this._elementRegistry = elementRegistry; +} +GraphicsFactory.$inject = ['eventBus', 'elementRegistry']; +GraphicsFactory.prototype._getChildrenContainer = function (element) { + var gfx = this._elementRegistry.getGraphics(element); + var childrenGfx; + + // root element + if (!element.parent) { + childrenGfx = gfx; + } else { + childrenGfx = (0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_0__.getChildren)(gfx); + if (!childrenGfx) { + childrenGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(childrenGfx).add('djs-children'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(gfx.parentNode, childrenGfx); + } + } + return childrenGfx; +}; + +/** + * Clears the graphical representation of the element and returns the + * cleared visual (the element). + */ +GraphicsFactory.prototype._clear = function (gfx) { + var visual = (0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_0__.getVisual)(gfx); + (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.clear)(visual); + return visual; +}; + +/** + * Creates a gfx container for shapes and connections + * + * The layout is as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * @param {string} type the type of the element, i.e. shape | connection + * @param {SVGElement} [childrenGfx] + * @param {number} [parentIndex] position to create container in parent + * @param {boolean} [isFrame] is frame element + * + * @return {SVGElement} + */ +GraphicsFactory.prototype._createContainer = function (type, childrenGfx, parentIndex, isFrame) { + var outerGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(outerGfx).add('djs-group'); + + // insert node at position + if (typeof parentIndex !== 'undefined') { + prependTo(outerGfx, childrenGfx, childrenGfx.childNodes[parentIndex]); + } else { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(childrenGfx, outerGfx); + } + var gfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(gfx).add('djs-element'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(gfx).add('djs-' + type); + if (isFrame) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(gfx).add('djs-frame'); + } + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(outerGfx, gfx); + + // create visual + var visual = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(visual).add('djs-visual'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(gfx, visual); + return gfx; +}; +GraphicsFactory.prototype.create = function (type, element, parentIndex) { + var childrenGfx = this._getChildrenContainer(element.parent); + return this._createContainer(type, childrenGfx, parentIndex, (0,_util_Elements__WEBPACK_IMPORTED_MODULE_3__.isFrameElement)(element)); +}; +GraphicsFactory.prototype.updateContainments = function (elements) { + var self = this, + elementRegistry = this._elementRegistry, + parents; + parents = (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.reduce)(elements, function (map, e) { + if (e.parent) { + map[e.parent.id] = e.parent; + } + return map; + }, {}); + + // update all parents of changed and reorganized their children + // in the correct order (as indicated in our model) + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.forEach)(parents, function (parent) { + var children = parent.children; + if (!children) { + return; + } + var childrenGfx = self._getChildrenContainer(parent); + (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.forEach)(children.slice().reverse(), function (child) { + var childGfx = elementRegistry.getGraphics(child); + prependTo(childGfx.parentNode, childrenGfx); + }); + }); +}; +GraphicsFactory.prototype.drawShape = function (visual, element) { + var eventBus = this._eventBus; + return eventBus.fire('render.shape', { + gfx: visual, + element: element + }); +}; +GraphicsFactory.prototype.getShapePath = function (element) { + var eventBus = this._eventBus; + return eventBus.fire('render.getShapePath', element); +}; +GraphicsFactory.prototype.drawConnection = function (visual, element) { + var eventBus = this._eventBus; + return eventBus.fire('render.connection', { + gfx: visual, + element: element + }); +}; +GraphicsFactory.prototype.getConnectionPath = function (waypoints) { + var eventBus = this._eventBus; + return eventBus.fire('render.getConnectionPath', waypoints); +}; +GraphicsFactory.prototype.update = function (type, element, gfx) { + // do NOT update root element + if (!element.parent) { + return; + } + var visual = this._clear(gfx); + + // redraw + if (type === 'shape') { + this.drawShape(visual, element); + + // update positioning + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__.translate)(gfx, element.x, element.y); + } else if (type === 'connection') { + this.drawConnection(visual, element); + } else { + throw new Error('unknown type: ' + type); + } + if (element.hidden) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(gfx, 'display', 'none'); + } else { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(gfx, 'display', 'block'); + } +}; +GraphicsFactory.prototype.remove = function (element) { + var gfx = this._elementRegistry.getGraphics(element); + + // remove + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(gfx.parentNode); +}; + +// helpers ////////// + +function prependTo(newNode, parentNode, siblingNode) { + var node = siblingNode || parentNode.firstChild; + + // do not prepend node to itself to prevent IE from crashing + // https://github.com/bpmn-io/bpmn-js/issues/746 + if (newNode === node) { + return; + } + parentNode.insertBefore(newNode, node); +} + +/***/ }), + +/***/ 93015: +/*!***************************************************!*\ + !*** ./node_modules/diagram-js/lib/core/index.js ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _draw__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../draw */ 33122); +/* harmony import */ var _Canvas__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Canvas */ 29975); +/* harmony import */ var _ElementRegistry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ElementRegistry */ 69440); +/* harmony import */ var _ElementFactory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ElementFactory */ 22037); +/* harmony import */ var _EventBus__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./EventBus */ 78069); +/* harmony import */ var _GraphicsFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./GraphicsFactory */ 55994); + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_draw__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['canvas'], + canvas: ['type', _Canvas__WEBPACK_IMPORTED_MODULE_1__["default"]], + elementRegistry: ['type', _ElementRegistry__WEBPACK_IMPORTED_MODULE_2__["default"]], + elementFactory: ['type', _ElementFactory__WEBPACK_IMPORTED_MODULE_3__["default"]], + eventBus: ['type', _EventBus__WEBPACK_IMPORTED_MODULE_4__["default"]], + graphicsFactory: ['type', _GraphicsFactory__WEBPACK_IMPORTED_MODULE_5__["default"]] +}); + +/***/ }), + +/***/ 14694: +/*!**********************************************************!*\ + !*** ./node_modules/diagram-js/lib/draw/BaseRenderer.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BaseRenderer) +/* harmony export */ }); +var DEFAULT_RENDER_PRIORITY = 1000; + +/** + * The base implementation of shape and connection renderers. + * + * @param {EventBus} eventBus + * @param {number} [renderPriority=1000] + */ +function BaseRenderer(eventBus, renderPriority) { + var self = this; + renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY; + eventBus.on(['render.shape', 'render.connection'], renderPriority, function (evt, context) { + var type = evt.type, + element = context.element, + visuals = context.gfx, + attrs = context.attrs; + if (self.canRender(element)) { + if (type === 'render.shape') { + return self.drawShape(visuals, element, attrs); + } else { + return self.drawConnection(visuals, element, attrs); + } + } + }); + eventBus.on(['render.getShapePath', 'render.getConnectionPath'], renderPriority, function (evt, element) { + if (self.canRender(element)) { + if (evt.type === 'render.getShapePath') { + return self.getShapePath(element); + } else { + return self.getConnectionPath(element); + } + } + }); +} + +/** + * Should check whether *this* renderer can render + * the element/connection. + * + * @param {element} element + * + * @returns {boolean} + */ +BaseRenderer.prototype.canRender = function () {}; + +/** + * Provides the shape's snap svg element to be drawn on the `canvas`. + * + * @param {djs.Graphics} visuals + * @param {Shape} shape + * + * @returns {Snap.svg} [returns a Snap.svg paper element ] + */ +BaseRenderer.prototype.drawShape = function () {}; + +/** + * Provides the shape's snap svg element to be drawn on the `canvas`. + * + * @param {djs.Graphics} visuals + * @param {Connection} connection + * + * @returns {Snap.svg} [returns a Snap.svg paper element ] + */ +BaseRenderer.prototype.drawConnection = function () {}; + +/** + * Gets the SVG path of a shape that represents it's visual bounds. + * + * @param {Shape} shape + * + * @return {string} svg path + */ +BaseRenderer.prototype.getShapePath = function () {}; + +/** + * Gets the SVG path of a connection that represents it's visual bounds. + * + * @param {Connection} connection + * + * @return {string} svg path + */ +BaseRenderer.prototype.getConnectionPath = function () {}; + +/***/ }), + +/***/ 43416: +/*!*************************************************************!*\ + !*** ./node_modules/diagram-js/lib/draw/DefaultRenderer.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DefaultRenderer) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _BaseRenderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BaseRenderer */ 14694); +/* harmony import */ var _util_RenderUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/RenderUtil */ 96546); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/Elements */ 35723); + + + + + + + +// apply default renderer with lowest possible priority +// so that it only kicks in if noone else could render +var DEFAULT_RENDER_PRIORITY = 1; + +/** + * The default renderer used for shapes and connections. + * + * @param {EventBus} eventBus + * @param {Styles} styles + */ +function DefaultRenderer(eventBus, styles) { + // + _BaseRenderer__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus, DEFAULT_RENDER_PRIORITY); + this.CONNECTION_STYLE = styles.style(['no-fill'], { + strokeWidth: 5, + stroke: 'fuchsia' + }); + this.SHAPE_STYLE = styles.style({ + fill: 'white', + stroke: 'fuchsia', + strokeWidth: 2 + }); + this.FRAME_STYLE = styles.style(['no-fill'], { + stroke: 'fuchsia', + strokeDasharray: 4, + strokeWidth: 2 + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(DefaultRenderer, _BaseRenderer__WEBPACK_IMPORTED_MODULE_1__["default"]); +DefaultRenderer.prototype.canRender = function () { + return true; +}; +DefaultRenderer.prototype.drawShape = function drawShape(visuals, element, attrs) { + var rect = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('rect'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(rect, { + x: 0, + y: 0, + width: element.width || 0, + height: element.height || 0 + }); + if ((0,_util_Elements__WEBPACK_IMPORTED_MODULE_3__.isFrameElement)(element)) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(rect, (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)({}, this.FRAME_STYLE, attrs || {})); + } else { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(rect, (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)({}, this.SHAPE_STYLE, attrs || {})); + } + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(visuals, rect); + return rect; +}; +DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) { + var line = (0,_util_RenderUtil__WEBPACK_IMPORTED_MODULE_5__.createLine)(connection.waypoints, (0,min_dash__WEBPACK_IMPORTED_MODULE_4__.assign)({}, this.CONNECTION_STYLE, attrs || {})); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(visuals, line); + return line; +}; +DefaultRenderer.prototype.getShapePath = function getShapePath(shape) { + var x = shape.x, + y = shape.y, + width = shape.width, + height = shape.height; + var shapePath = [['M', x, y], ['l', width, 0], ['l', 0, height], ['l', -width, 0], ['z']]; + return (0,_util_RenderUtil__WEBPACK_IMPORTED_MODULE_5__.componentsToPath)(shapePath); +}; +DefaultRenderer.prototype.getConnectionPath = function getConnectionPath(connection) { + var waypoints = connection.waypoints; + var idx, + point, + connectionPath = []; + for (idx = 0; point = waypoints[idx]; idx++) { + // take invisible docking into account + // when creating the path + point = point.original || point; + connectionPath.push([idx === 0 ? 'M' : 'L', point.x, point.y]); + } + return (0,_util_RenderUtil__WEBPACK_IMPORTED_MODULE_5__.componentsToPath)(connectionPath); +}; +DefaultRenderer.$inject = ['eventBus', 'styles']; + +/***/ }), + +/***/ 66270: +/*!****************************************************!*\ + !*** ./node_modules/diagram-js/lib/draw/Styles.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Styles) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * A component that manages shape styles + */ +function Styles() { + var defaultTraits = { + 'no-fill': { + fill: 'none' + }, + 'no-border': { + strokeOpacity: 0.0 + }, + 'no-events': { + pointerEvents: 'none' + } + }; + var self = this; + + /** + * Builds a style definition from a className, a list of traits and an object of additional attributes. + * + * @param {string} className + * @param {Array} traits + * @param {Object} additionalAttrs + * + * @return {Object} the style defintion + */ + this.cls = function (className, traits, additionalAttrs) { + var attrs = this.style(traits, additionalAttrs); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(attrs, { + 'class': className + }); + }; + + /** + * Builds a style definition from a list of traits and an object of additional attributes. + * + * @param {Array} traits + * @param {Object} additionalAttrs + * + * @return {Object} the style defintion + */ + this.style = function (traits, additionalAttrs) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(traits) && !additionalAttrs) { + additionalAttrs = traits; + traits = []; + } + var attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(traits, function (attrs, t) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(attrs, defaultTraits[t] || {}); + }, {}); + return additionalAttrs ? (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(attrs, additionalAttrs) : attrs; + }; + this.computeStyle = function (custom, traits, defaultStyles) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(traits)) { + defaultStyles = traits; + traits = []; + } + return self.style(traits || [], (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, defaultStyles, custom || {})); + }; +} + +/***/ }), + +/***/ 33122: +/*!***************************************************!*\ + !*** ./node_modules/diagram-js/lib/draw/index.js ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _DefaultRenderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DefaultRenderer */ 43416); +/* harmony import */ var _Styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Styles */ 66270); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['defaultRenderer'], + defaultRenderer: ['type', _DefaultRenderer__WEBPACK_IMPORTED_MODULE_0__["default"]], + styles: ['type', _Styles__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 20377: +/*!******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/align-elements/AlignElements.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AlignElements) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +function last(arr) { + return arr && arr[arr.length - 1]; +} +function sortTopOrMiddle(element) { + return element.y; +} +function sortLeftOrCenter(element) { + return element.x; +} + +/** + * Sorting functions for different types of alignment + * + * @type {Object} + * + * @return {Function} + */ +var ALIGNMENT_SORTING = { + left: sortLeftOrCenter, + center: sortLeftOrCenter, + right: function (element) { + return element.x + element.width; + }, + top: sortTopOrMiddle, + middle: sortTopOrMiddle, + bottom: function (element) { + return element.y + element.height; + } +}; +function AlignElements(modeling) { + this._modeling = modeling; +} +AlignElements.$inject = ['modeling']; + +/** + * Get the relevant "axis" and "dimension" related to the current type of alignment + * + * @param {string} type left|right|center|top|bottom|middle + * + * @return {Object} { axis, dimension } + */ +AlignElements.prototype._getOrientationDetails = function (type) { + var vertical = ['top', 'bottom', 'middle'], + axis = 'x', + dimension = 'width'; + if (vertical.indexOf(type) !== -1) { + axis = 'y'; + dimension = 'height'; + } + return { + axis: axis, + dimension: dimension + }; +}; +AlignElements.prototype._isType = function (type, types) { + return types.indexOf(type) !== -1; +}; + +/** + * Get a point on the relevant axis where elements should align to + * + * @param {string} type left|right|center|top|bottom|middle + * @param {Array} sortedElements + * + * @return {Object} + */ +AlignElements.prototype._alignmentPosition = function (type, sortedElements) { + var orientation = this._getOrientationDetails(type), + axis = orientation.axis, + dimension = orientation.dimension, + alignment = {}, + centers = {}, + hasSharedCenters = false, + centeredElements, + firstElement, + lastElement; + function getMiddleOrTop(first, last) { + return Math.round((first[axis] + last[axis] + last[dimension]) / 2); + } + if (this._isType(type, ['left', 'top'])) { + alignment[type] = sortedElements[0][axis]; + } else if (this._isType(type, ['right', 'bottom'])) { + lastElement = last(sortedElements); + alignment[type] = lastElement[axis] + lastElement[dimension]; + } else if (this._isType(type, ['center', 'middle'])) { + // check if there is a center shared by more than one shape + // if not, just take the middle of the range + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(sortedElements, function (element) { + var center = element[axis] + Math.round(element[dimension] / 2); + if (centers[center]) { + centers[center].elements.push(element); + } else { + centers[center] = { + elements: [element], + center: center + }; + } + }); + centeredElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(centers, function (center) { + if (center.elements.length > 1) { + hasSharedCenters = true; + } + return center.elements.length; + }); + if (hasSharedCenters) { + alignment[type] = last(centeredElements).center; + return alignment; + } + firstElement = sortedElements[0]; + sortedElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(sortedElements, function (element) { + return element[axis] + element[dimension]; + }); + lastElement = last(sortedElements); + alignment[type] = getMiddleOrTop(firstElement, lastElement); + } + return alignment; +}; + +/** + * Executes the alignment of a selection of elements + * + * @param {Array} elements + * @param {string} type left|right|center|top|bottom|middle + */ +AlignElements.prototype.trigger = function (elements, type) { + var modeling = this._modeling; + var filteredElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function (element) { + return !(element.waypoints || element.host || element.labelTarget); + }); + if (filteredElements.length < 2) { + return; + } + var sortFn = ALIGNMENT_SORTING[type]; + var sortedElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(filteredElements, sortFn); + var alignment = this._alignmentPosition(type, sortedElements); + modeling.alignElements(sortedElements, alignment); +}; + +/***/ }), + +/***/ 81765: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/align-elements/index.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _AlignElements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AlignElements */ 20377); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['alignElements'], + alignElements: ['type', _AlignElements__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 37411: +/*!******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/attach-support/AttachSupport.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AttachSupport) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Removal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/Removal */ 80324); +/* harmony import */ var _util_AttachUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/AttachUtil */ 93999); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../command/CommandInterceptor */ 35353); + + + + + +var LOW_PRIORITY = 251, + HIGH_PRIORITY = 1401; +var MARKER_ATTACH = 'attach-ok'; + +/** + * Adds the notion of attached elements to the modeler. + * + * Optionally depends on `diagram-js/lib/features/move` to render + * the attached elements during move preview. + * + * Optionally depends on `diagram-js/lib/features/label-support` + * to render attached labels during move preview. + * + * @param {didi.Injector} injector + * @param {EventBus} eventBus + * @param {Canvas} canvas + * @param {Rules} rules + * @param {Modeling} modeling + */ +function AttachSupport(injector, eventBus, canvas, rules, modeling) { + _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + var movePreview = injector.get('movePreview', false); + + // remove all the attached elements from the shapes to be validated + // add all the attached shapes to the overall list of moved shapes + eventBus.on('shape.move.start', HIGH_PRIORITY, function (e) { + var context = e.context, + shapes = context.shapes, + validatedShapes = context.validatedShapes; + context.shapes = addAttached(shapes); + context.validatedShapes = removeAttached(validatedShapes); + }); + + // add attachers to the visual's group + movePreview && eventBus.on('shape.move.start', LOW_PRIORITY, function (e) { + var context = e.context, + shapes = context.shapes, + attachers = getAttachers(shapes); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attachers, function (attacher) { + movePreview.makeDraggable(context, attacher, true); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attacher.labels, function (label) { + movePreview.makeDraggable(context, label, true); + }); + }); + }); + + // add attach-ok marker to current host + movePreview && eventBus.on('shape.move.start', function (event) { + var context = event.context, + shapes = context.shapes; + if (shapes.length !== 1) { + return; + } + var shape = shapes[0]; + var host = shape.host; + if (host) { + canvas.addMarker(host, MARKER_ATTACH); + eventBus.once(['shape.move.out', 'shape.move.cleanup'], function () { + canvas.removeMarker(host, MARKER_ATTACH); + }); + } + }); + + // add all attachers to move closure + this.preExecuted('elements.move', HIGH_PRIORITY, function (e) { + var context = e.context, + closure = context.closure, + shapes = context.shapes, + attachers = getAttachers(shapes); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attachers, function (attacher) { + closure.add(attacher, closure.topLevel[attacher.host.id]); + }); + }); + + // perform the attaching after shapes are done moving + this.postExecuted('elements.move', function (e) { + var context = e.context, + shapes = context.shapes, + newHost = context.newHost, + attachers; + + // only single elements can be attached + // multiply elements can be detached + if (newHost && shapes.length !== 1) { + return; + } + if (newHost) { + attachers = shapes; + } else { + // find attachers moved without host + attachers = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(shapes, function (shape) { + var host = shape.host; + return isAttacher(shape) && !includes(shapes, host); + }); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attachers, function (attacher) { + modeling.updateAttachment(attacher, newHost); + }); + }); + + // ensure invalid attachment connections are removed + this.postExecuted('elements.move', function (e) { + var shapes = e.context.shapes; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(shapes, function (shape) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(shape.attachers, function (attacher) { + // remove invalid outgoing connections + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attacher.outgoing.slice(), function (connection) { + var allowed = rules.allowed('connection.reconnect', { + connection: connection, + source: connection.source, + target: connection.target + }); + if (!allowed) { + modeling.removeConnection(connection); + } + }); + + // remove invalid incoming connections + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attacher.incoming.slice(), function (connection) { + var allowed = rules.allowed('connection.reconnect', { + connection: connection, + source: connection.source, + target: connection.target + }); + if (!allowed) { + modeling.removeConnection(connection); + } + }); + }); + }); + }); + this.postExecute('shape.create', function (e) { + var context = e.context, + shape = context.shape, + host = context.host; + if (host) { + modeling.updateAttachment(shape, host); + } + }); + + // update attachments if the host is replaced + this.postExecute('shape.replace', function (e) { + var context = e.context, + oldShape = context.oldShape, + newShape = context.newShape; + + // move the attachers to the new host + (0,_util_Removal__WEBPACK_IMPORTED_MODULE_3__.saveClear)(oldShape.attachers, function (attacher) { + var allowed = rules.allowed('elements.move', { + target: newShape, + shapes: [attacher] + }); + if (allowed === 'attach') { + modeling.updateAttachment(attacher, newShape); + } else { + modeling.removeShape(attacher); + } + }); + + // move attachers if new host has different size + if (newShape.attachers.length) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(newShape.attachers, function (attacher) { + var delta = (0,_util_AttachUtil__WEBPACK_IMPORTED_MODULE_4__.getNewAttachShapeDelta)(attacher, oldShape, newShape); + modeling.moveShape(attacher, delta, attacher.parent); + }); + } + }); + + // move shape on host resize + this.postExecute('shape.resize', function (event) { + var context = event.context, + shape = context.shape, + oldBounds = context.oldBounds, + newBounds = context.newBounds, + attachers = shape.attachers, + hints = context.hints || {}; + if (hints.attachSupport === false) { + return; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attachers, function (attacher) { + var delta = (0,_util_AttachUtil__WEBPACK_IMPORTED_MODULE_4__.getNewAttachShapeDelta)(attacher, oldBounds, newBounds); + modeling.moveShape(attacher, delta, attacher.parent); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attacher.labels, function (label) { + modeling.moveShape(label, delta, label.parent); + }); + }); + }); + + // remove attachments + this.preExecute('shape.delete', function (event) { + var shape = event.context.shape; + (0,_util_Removal__WEBPACK_IMPORTED_MODULE_3__.saveClear)(shape.attachers, function (attacher) { + modeling.removeShape(attacher); + }); + if (shape.host) { + modeling.updateAttachment(shape, null); + } + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(AttachSupport, _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +AttachSupport.$inject = ['injector', 'eventBus', 'canvas', 'rules', 'modeling']; + +/** + * Return attachers of the given shapes + * + * @param {Array} shapes + * @return {Array} + */ +function getAttachers(shapes) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.flatten)((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.map)(shapes, function (s) { + return s.attachers || []; + })); +} + +/** + * Return a combined list of elements and + * attachers. + * + * @param {Array} elements + * @return {Array} filtered + */ +function addAttached(elements) { + var attachers = getAttachers(elements); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.unionBy)('id', elements, attachers); +} + +/** + * Return a filtered list of elements that do not + * contain attached elements with hosts being part + * of the selection. + * + * @param {Array} elements + * + * @return {Array} filtered + */ +function removeAttached(elements) { + var ids = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.groupBy)(elements, 'id'); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(elements, function (element) { + while (element) { + // host in selection + if (element.host && ids[element.host.id]) { + return false; + } + element = element.parent; + } + return true; + }); +} +function isAttacher(shape) { + return !!shape.host; +} +function includes(array, item) { + return array.indexOf(item) !== -1; +} + +/***/ }), + +/***/ 15263: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/attach-support/index.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rules */ 8807); +/* harmony import */ var _AttachSupport__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AttachSupport */ 37411); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_rules__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['attachSupport'], + attachSupport: ['type', _AttachSupport__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 21759: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/auto-place/AutoPlace.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AutoPlace) +/* harmony export */ }); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); +/* harmony import */ var _AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AutoPlaceUtil */ 7851); + + +var LOW_PRIORITY = 100; + +/** + * A service that places elements connected to existing ones + * to an appropriate position in an _automated_ fashion. + * + * @param {EventBus} eventBus + * @param {Modeling} modeling + */ +function AutoPlace(eventBus, modeling, canvas) { + eventBus.on('autoPlace', LOW_PRIORITY, function (context) { + var shape = context.shape, + source = context.source; + return getNewShapePosition(source, shape); + }); + eventBus.on('autoPlace.end', function (event) { + canvas.scrollToElement(event.shape); + }); + + /** + * Append shape to source at appropriate position. + * + * @param {djs.model.Shape} source + * @param {djs.model.Shape} shape + * + * @return {djs.model.Shape} appended shape + */ + this.append = function (source, shape, hints) { + eventBus.fire('autoPlace.start', { + source: source, + shape: shape + }); + + // allow others to provide the position + var position = eventBus.fire('autoPlace', { + source: source, + shape: shape + }); + var newShape = modeling.appendShape(source, shape, position, source.parent, hints); + eventBus.fire('autoPlace.end', { + source: source, + shape: newShape + }); + return newShape; + }; +} +AutoPlace.$inject = ['eventBus', 'modeling', 'canvas']; + +// helpers ////////// + +/** + * Find the new position for the target element to + * connect to source. + * + * @param {djs.model.Shape} source + * @param {djs.model.Shape} element + * @param {Object} [hints] + * @param {Object} [hints.defaultDistance] + * + * @returns {Point} + */ +function getNewShapePosition(source, element, hints) { + if (!hints) { + hints = {}; + } + var distance = hints.defaultDistance || _AutoPlaceUtil__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_DISTANCE; + var sourceMid = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source), + sourceTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(source); + + // simply put element right next to source + return { + x: sourceTrbl.right + distance + element.width / 2, + y: sourceMid.y + }; +} + +/***/ }), + +/***/ 48775: +/*!***************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/auto-place/AutoPlaceSelectionBehavior.js ***! + \***************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AutoPlaceSelectionBehavior) +/* harmony export */ }); +/** + * Select element after auto placement. + * + * @param {EventBus} eventBus + * @param {Selection} selection + */ +function AutoPlaceSelectionBehavior(eventBus, selection) { + eventBus.on('autoPlace.end', 500, function (e) { + selection.select(e.shape); + }); +} +AutoPlaceSelectionBehavior.$inject = ['eventBus', 'selection']; + +/***/ }), + +/***/ 7851: +/*!**************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/auto-place/AutoPlaceUtil.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DEFAULT_DISTANCE: () => (/* binding */ DEFAULT_DISTANCE), +/* harmony export */ findFreePosition: () => (/* binding */ findFreePosition), +/* harmony export */ generateGetNextPosition: () => (/* binding */ generateGetNextPosition), +/* harmony export */ getConnectedAtPosition: () => (/* binding */ getConnectedAtPosition), +/* harmony export */ getConnectedDistance: () => (/* binding */ getConnectedDistance) +/* harmony export */ }); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + + +// padding to detect element placement +var PLACEMENT_DETECTION_PAD = 10; +var DEFAULT_DISTANCE = 50; +var DEFAULT_MAX_DISTANCE = 250; + +/** + * Get free position starting from given position. + * + * @param {djs.model.Shape} source + * @param {djs.model.Shape} element + * @param {Point} position + * @param {Function} getNextPosition + * + * @return {Point} + */ +function findFreePosition(source, element, position, getNextPosition) { + var connectedAtPosition; + while (connectedAtPosition = getConnectedAtPosition(source, position, element)) { + position = getNextPosition(element, position, connectedAtPosition); + } + return position; +} + +/** + * Returns function that returns next position. + * + * @param {Object} nextPositionDirection + * @param {Object} [nextPositionDirection.x] + * @param {Object} [nextPositionDirection.y] + * + * @returns {Function} + */ +function generateGetNextPosition(nextPositionDirection) { + return function (element, previousPosition, connectedAtPosition) { + var nextPosition = { + x: previousPosition.x, + y: previousPosition.y + }; + ['x', 'y'].forEach(function (axis) { + var nextPositionDirectionForAxis = nextPositionDirection[axis]; + if (!nextPositionDirectionForAxis) { + return; + } + var dimension = axis === 'x' ? 'width' : 'height'; + var margin = nextPositionDirectionForAxis.margin, + minDistance = nextPositionDirectionForAxis.minDistance; + if (margin < 0) { + nextPosition[axis] = Math.min(connectedAtPosition[axis] + margin - element[dimension] / 2, previousPosition[axis] - minDistance + margin); + } else { + nextPosition[axis] = Math.max(connectedAtPosition[axis] + connectedAtPosition[dimension] + margin + element[dimension] / 2, previousPosition[axis] + minDistance + margin); + } + }); + return nextPosition; + }; +} + +/** + * Return target at given position, if defined. + * + * This takes connected elements from host and attachers + * into account, too. + */ +function getConnectedAtPosition(source, position, element) { + var bounds = { + x: position.x - element.width / 2, + y: position.y - element.height / 2, + width: element.width, + height: element.height + }; + var closure = getAutoPlaceClosure(source, element); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(closure, function (target) { + if (target === element) { + return false; + } + var orientation = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getOrientation)(target, bounds, PLACEMENT_DETECTION_PAD); + return orientation === 'intersect'; + }); +} + +/** +* Compute optimal distance between source and target based on existing connections to and from source. +* Assumes left-to-right and top-to-down modeling. +* +* @param {djs.model.Shape} source +* @param {Object} [hints] +* @param {number} [hints.defaultDistance] +* @param {string} [hints.direction] +* @param {Function} [hints.filter] +* @param {Function} [hints.getWeight] +* @param {number} [hints.maxDistance] +* @param {string} [hints.reference] +* +* @return {number} +*/ +function getConnectedDistance(source, hints) { + if (!hints) { + hints = {}; + } + + // targets > sources by default + function getDefaultWeight(connection) { + return connection.source === source ? 1 : -1; + } + var defaultDistance = hints.defaultDistance || DEFAULT_DISTANCE, + direction = hints.direction || 'e', + filter = hints.filter, + getWeight = hints.getWeight || getDefaultWeight, + maxDistance = hints.maxDistance || DEFAULT_MAX_DISTANCE, + reference = hints.reference || 'start'; + if (!filter) { + filter = noneFilter; + } + function getDistance(a, b) { + if (direction === 'n') { + if (reference === 'start') { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).top - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).bottom; + } else if (reference === 'center') { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).top - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(b).y; + } else { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).top - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).top; + } + } else if (direction === 'w') { + if (reference === 'start') { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).left - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).right; + } else if (reference === 'center') { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).left - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(b).x; + } else { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).left - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).left; + } + } else if (direction === 's') { + if (reference === 'start') { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).top - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).bottom; + } else if (reference === 'center') { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(b).y - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).bottom; + } else { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).bottom - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).bottom; + } + } else { + if (reference === 'start') { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).left - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).right; + } else if (reference === 'center') { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(b).x - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).right; + } else { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(b).right - (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(a).right; + } + } + } + var sourcesDistances = source.incoming.filter(filter).map(function (connection) { + var weight = getWeight(connection); + var distance = weight < 0 ? getDistance(connection.source, source) : getDistance(source, connection.source); + return { + id: connection.source.id, + distance: distance, + weight: weight + }; + }); + var targetsDistances = source.outgoing.filter(filter).map(function (connection) { + var weight = getWeight(connection); + var distance = weight > 0 ? getDistance(source, connection.target) : getDistance(connection.target, source); + return { + id: connection.target.id, + distance: distance, + weight: weight + }; + }); + var distances = sourcesDistances.concat(targetsDistances).reduce(function (accumulator, currentValue) { + accumulator[currentValue.id + '__weight_' + currentValue.weight] = currentValue; + return accumulator; + }, {}); + var distancesGrouped = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(distances, function (accumulator, currentValue) { + var distance = currentValue.distance, + weight = currentValue.weight; + if (distance < 0 || distance > maxDistance) { + return accumulator; + } + if (!accumulator[String(distance)]) { + accumulator[String(distance)] = 0; + } + accumulator[String(distance)] += 1 * weight; + if (!accumulator.distance || accumulator[accumulator.distance] < accumulator[String(distance)]) { + accumulator.distance = distance; + } + return accumulator; + }, {}); + return distancesGrouped.distance || defaultDistance; +} + +/** + * Returns all connected elements around the given source. + * + * This includes: + * + * - connected elements + * - host connected elements + * - attachers connected elements + * + * @param {djs.model.Shape} source + * + * @return {Array} + */ +function getAutoPlaceClosure(source) { + var allConnected = getConnected(source); + if (source.host) { + allConnected = allConnected.concat(getConnected(source.host)); + } + if (source.attachers) { + allConnected = allConnected.concat(source.attachers.reduce(function (shapes, attacher) { + return shapes.concat(getConnected(attacher)); + }, [])); + } + return allConnected; +} +function getConnected(element) { + return getTargets(element).concat(getSources(element)); +} +function getSources(shape) { + return shape.incoming.map(function (connection) { + return connection.source; + }); +} +function getTargets(shape) { + return shape.outgoing.map(function (connection) { + return connection.target; + }); +} +function noneFilter() { + return true; +} + +/***/ }), + +/***/ 28261: +/*!******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/auto-place/index.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _AutoPlace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AutoPlace */ 21759); +/* harmony import */ var _AutoPlaceSelectionBehavior__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AutoPlaceSelectionBehavior */ 48775); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['autoPlaceSelectionBehavior'], + autoPlace: ['type', _AutoPlace__WEBPACK_IMPORTED_MODULE_0__["default"]], + autoPlaceSelectionBehavior: ['type', _AutoPlaceSelectionBehavior__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 70111: +/*!************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/auto-resize/AutoResize.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AutoResize) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/Elements */ 35723); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../command/CommandInterceptor */ 35353); + + + + + + +/** + * An auto resize component that takes care of expanding a parent element + * if child elements are created or moved close the parents edge. + * + * @param {EventBus} eventBus + * @param {ElementRegistry} elementRegistry + * @param {Modeling} modeling + * @param {Rules} rules + */ +function AutoResize(eventBus, elementRegistry, modeling, rules) { + _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this._elementRegistry = elementRegistry; + this._modeling = modeling; + this._rules = rules; + var self = this; + this.postExecuted(['shape.create'], function (event) { + var context = event.context, + hints = context.hints || {}, + shape = context.shape, + parent = context.parent || context.newParent; + if (hints.autoResize === false) { + return; + } + self._expand([shape], parent); + }); + this.postExecuted(['elements.move'], function (event) { + var context = event.context, + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.flatten)((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.values)(context.closure.topLevel)), + hints = context.hints; + var autoResize = hints ? hints.autoResize : true; + if (autoResize === false) { + return; + } + var expandings = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.groupBy)(elements, function (element) { + return element.parent.id; + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(expandings, function (elements, parentId) { + // optionally filter elements to be considered when resizing + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isArray)(autoResize)) { + elements = elements.filter(function (element) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(autoResize, (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.matchPattern)({ + id: element.id + })); + }); + } + self._expand(elements, parentId); + }); + }); + this.postExecuted(['shape.toggleCollapse'], function (event) { + var context = event.context, + hints = context.hints, + shape = context.shape; + if (hints && hints.autoResize === false) { + return; + } + if (shape.collapsed) { + return; + } + self._expand(shape.children || [], shape); + }); + this.postExecuted(['shape.resize'], function (event) { + var context = event.context, + hints = context.hints, + shape = context.shape, + parent = shape.parent; + if (hints && hints.autoResize === false) { + return; + } + if (parent) { + self._expand([shape], parent); + } + }); +} +AutoResize.$inject = ['eventBus', 'elementRegistry', 'modeling', 'rules']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(AutoResize, _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/** + * Calculate the new bounds of the target shape, given + * a number of elements have been moved or added into the parent. + * + * This method considers the current size, the added elements as well as + * the provided padding for the new bounds. + * + * @param {Array} elements + * @param {djs.model.Shape} target + */ +AutoResize.prototype._getOptimalBounds = function (elements, target) { + var offset = this.getOffset(target), + padding = this.getPadding(target); + var elementsTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)((0,_util_Elements__WEBPACK_IMPORTED_MODULE_4__.getBBox)(elements)), + targetTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(target); + var newTrbl = {}; + if (elementsTrbl.top - targetTrbl.top < padding.top) { + newTrbl.top = elementsTrbl.top - offset.top; + } + if (elementsTrbl.left - targetTrbl.left < padding.left) { + newTrbl.left = elementsTrbl.left - offset.left; + } + if (targetTrbl.right - elementsTrbl.right < padding.right) { + newTrbl.right = elementsTrbl.right + offset.right; + } + if (targetTrbl.bottom - elementsTrbl.bottom < padding.bottom) { + newTrbl.bottom = elementsTrbl.bottom + offset.bottom; + } + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asBounds)((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({}, targetTrbl, newTrbl)); +}; + +/** + * Expand the target shape respecting rules, offset and padding + * + * @param {Array} elements + * @param {djs.model.Shape|string} target|targetId + */ +AutoResize.prototype._expand = function (elements, target) { + if (typeof target === 'string') { + target = this._elementRegistry.get(target); + } + var allowed = this._rules.allowed('element.autoResize', { + elements: elements, + target: target + }); + if (!allowed) { + return; + } + + // calculate the new bounds + var newBounds = this._getOptimalBounds(elements, target); + if (!boundsChanged(newBounds, target)) { + return; + } + var resizeDirections = getResizeDirections((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.pick)(target, ['x', 'y', 'width', 'height']), newBounds); + + // resize the parent shape + this.resize(target, newBounds, { + autoResize: resizeDirections + }); + var parent = target.parent; + + // recursively expand parent elements + if (parent) { + this._expand([target], parent); + } +}; + +/** + * Get the amount to expand the given shape in each direction. + * + * @param {djs.model.Shape} shape + * + * @return {TRBL} + */ +AutoResize.prototype.getOffset = function (shape) { + return { + top: 60, + bottom: 60, + left: 100, + right: 100 + }; +}; + +/** + * Get the activation threshold for each side for which + * resize triggers. + * + * @param {djs.model.Shape} shape + * + * @return {TRBL} + */ +AutoResize.prototype.getPadding = function (shape) { + return { + top: 2, + bottom: 2, + left: 15, + right: 15 + }; +}; + +/** + * Perform the actual resize operation. + * + * @param {djs.model.Shape} shape + * @param {Bounds} newBounds + * @param {Object} [hints] + * @param {string} [hints.autoResize] + */ +AutoResize.prototype.resize = function (shape, newBounds, hints) { + this._modeling.resizeShape(shape, newBounds, null, hints); +}; +function boundsChanged(newBounds, oldBounds) { + return newBounds.x !== oldBounds.x || newBounds.y !== oldBounds.y || newBounds.width !== oldBounds.width || newBounds.height !== oldBounds.height; +} + +/** + * Get directions of resize as {n|w|s|e} e.g. "nw". + * + * @param {Bounds} oldBounds + * @param {Bounds} newBounds + * + * @returns {string} Resize directions as {n|w|s|e}. + */ +function getResizeDirections(oldBounds, newBounds) { + var directions = ''; + oldBounds = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(oldBounds); + newBounds = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_3__.asTRBL)(newBounds); + if (oldBounds.top > newBounds.top) { + directions = directions.concat('n'); + } + if (oldBounds.right < newBounds.right) { + directions = directions.concat('w'); + } + if (oldBounds.bottom < newBounds.bottom) { + directions = directions.concat('s'); + } + if (oldBounds.left > newBounds.left) { + directions = directions.concat('e'); + } + return directions; +} + +/***/ }), + +/***/ 862: +/*!********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/auto-resize/AutoResizeProvider.js ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AutoResizeProvider) +/* harmony export */ }); +/* harmony import */ var _rules_RuleProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rules/RuleProvider */ 19812); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); + + + +/** + * This is a base rule provider for the element.autoResize rule. + */ +function AutoResizeProvider(eventBus) { + _rules_RuleProvider__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + var self = this; + this.addRule('element.autoResize', function (context) { + return self.canResize(context.elements, context.target); + }); +} +AutoResizeProvider.$inject = ['eventBus']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(AutoResizeProvider, _rules_RuleProvider__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/** + * Needs to be implemented by sub classes to allow actual auto resize + * + * @param {Array} elements + * @param {djs.model.Shape} target + * + * @return {boolean} + */ +AutoResizeProvider.prototype.canResize = function (elements, target) { + return false; +}; + +/***/ }), + +/***/ 14477: +/*!************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/auto-scroll/AutoScroll.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AutoScroll) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Event */ 74716); + + + +/** + * Initiates canvas scrolling if current cursor point is close to a border. + * Cancelled when current point moves back inside the scrolling borders + * or cancelled manually. + * + * Default options : + * scrollThresholdIn: [ 20, 20, 20, 20 ], + * scrollThresholdOut: [ 0, 0, 0, 0 ], + * scrollRepeatTimeout: 15, + * scrollStep: 10 + * + * Threshold order: + * [ left, top, right, bottom ] + */ +function AutoScroll(config, eventBus, canvas) { + this._canvas = canvas; + this._opts = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ + scrollThresholdIn: [20, 20, 20, 20], + scrollThresholdOut: [0, 0, 0, 0], + scrollRepeatTimeout: 15, + scrollStep: 10 + }, config); + var self = this; + eventBus.on('drag.move', function (e) { + var point = self._toBorderPoint(e); + self.startScroll(point); + }); + eventBus.on(['drag.cleanup'], function () { + self.stopScroll(); + }); +} +AutoScroll.$inject = ['config.autoScroll', 'eventBus', 'canvas']; + +/** + * Starts scrolling loop. + * Point is given in global scale in canvas container box plane. + * + * @param {Object} point { x: X, y: Y } + */ +AutoScroll.prototype.startScroll = function (point) { + var canvas = this._canvas; + var opts = this._opts; + var self = this; + var clientRect = canvas.getContainer().getBoundingClientRect(); + var diff = [point.x, point.y, clientRect.width - point.x, clientRect.height - point.y]; + this.stopScroll(); + var dx = 0, + dy = 0; + for (var i = 0; i < 4; i++) { + if (between(diff[i], opts.scrollThresholdOut[i], opts.scrollThresholdIn[i])) { + if (i === 0) { + dx = opts.scrollStep; + } else if (i == 1) { + dy = opts.scrollStep; + } else if (i == 2) { + dx = -opts.scrollStep; + } else if (i == 3) { + dy = -opts.scrollStep; + } + } + } + if (dx !== 0 || dy !== 0) { + canvas.scroll({ + dx: dx, + dy: dy + }); + this._scrolling = setTimeout(function () { + self.startScroll(point); + }, opts.scrollRepeatTimeout); + } +}; +function between(val, start, end) { + if (start < val && val < end) { + return true; + } + return false; +} + +/** + * Stops scrolling loop. + */ +AutoScroll.prototype.stopScroll = function () { + clearTimeout(this._scrolling); +}; + +/** + * Overrides defaults options. + * + * @param {Object} options + */ +AutoScroll.prototype.setOptions = function (options) { + this._opts = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, this._opts, options); +}; + +/** + * Converts event to a point in canvas container plane in global scale. + * + * @param {Event} event + * @return {Point} + */ +AutoScroll.prototype._toBorderPoint = function (event) { + var clientRect = this._canvas._container.getBoundingClientRect(); + var globalPosition = (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.toPoint)(event.originalEvent); + return { + x: globalPosition.x - clientRect.left, + y: globalPosition.y - clientRect.top + }; +}; + +/***/ }), + +/***/ 69231: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/auto-scroll/index.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dragging */ 11917); +/* harmony import */ var _AutoScroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AutoScroll */ 14477); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_dragging__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['autoScroll'], + autoScroll: ['type', _AutoScroll__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 71102: +/*!**************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/bendpoints/BendpointMove.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BendpointMove), +/* harmony export */ isReverse: () => (/* binding */ isReverse) +/* harmony export */ }); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); + +var round = Math.round; +var RECONNECT_START = 'reconnectStart', + RECONNECT_END = 'reconnectEnd', + UPDATE_WAYPOINTS = 'updateWaypoints'; + +/** + * Move bendpoints through drag and drop to add/remove bendpoints or reconnect connection. + */ +function BendpointMove(injector, eventBus, canvas, dragging, rules, modeling) { + this._injector = injector; + this.start = function (event, connection, bendpointIndex, insert) { + var gfx = canvas.getGraphics(connection), + source = connection.source, + target = connection.target, + waypoints = connection.waypoints, + type; + if (!insert && bendpointIndex === 0) { + type = RECONNECT_START; + } else if (!insert && bendpointIndex === waypoints.length - 1) { + type = RECONNECT_END; + } else { + type = UPDATE_WAYPOINTS; + } + var command = type === UPDATE_WAYPOINTS ? 'connection.updateWaypoints' : 'connection.reconnect'; + var allowed = rules.allowed(command, { + connection: connection, + source: source, + target: target + }); + if (allowed === false) { + allowed = rules.allowed(command, { + connection: connection, + source: target, + target: source + }); + } + if (allowed === false) { + return; + } + dragging.init(event, 'bendpoint.move', { + data: { + connection: connection, + connectionGfx: gfx, + context: { + allowed: allowed, + bendpointIndex: bendpointIndex, + connection: connection, + source: source, + target: target, + insert: insert, + type: type + } + } + }); + }; + eventBus.on('bendpoint.move.hover', function (event) { + var context = event.context, + connection = context.connection, + source = connection.source, + target = connection.target, + hover = event.hover, + type = context.type; + + // cache hover state + context.hover = hover; + var allowed; + if (!hover) { + return; + } + var command = type === UPDATE_WAYPOINTS ? 'connection.updateWaypoints' : 'connection.reconnect'; + allowed = context.allowed = rules.allowed(command, { + connection: connection, + source: type === RECONNECT_START ? hover : source, + target: type === RECONNECT_END ? hover : target + }); + if (allowed) { + context.source = type === RECONNECT_START ? hover : source; + context.target = type === RECONNECT_END ? hover : target; + return; + } + if (allowed === false) { + allowed = context.allowed = rules.allowed(command, { + connection: connection, + source: type === RECONNECT_END ? hover : target, + target: type === RECONNECT_START ? hover : source + }); + } + if (allowed) { + context.source = type === RECONNECT_END ? hover : target; + context.target = type === RECONNECT_START ? hover : source; + } + }); + eventBus.on(['bendpoint.move.out', 'bendpoint.move.cleanup'], function (event) { + var context = event.context, + type = context.type; + context.hover = null; + context.source = null; + context.target = null; + if (type !== UPDATE_WAYPOINTS) { + context.allowed = false; + } + }); + eventBus.on('bendpoint.move.end', function (event) { + var context = event.context, + allowed = context.allowed, + bendpointIndex = context.bendpointIndex, + connection = context.connection, + insert = context.insert, + newWaypoints = connection.waypoints.slice(), + source = context.source, + target = context.target, + type = context.type, + hints = context.hints || {}; + + // ensure integer values (important if zoom level was > 1 during move) + var docking = { + x: round(event.x), + y: round(event.y) + }; + if (!allowed) { + return false; + } + if (type === UPDATE_WAYPOINTS) { + if (insert) { + // insert new bendpoint + newWaypoints.splice(bendpointIndex, 0, docking); + } else { + // swap previous waypoint with moved one + newWaypoints[bendpointIndex] = docking; + } + + // pass hints about actual moved bendpoint + // useful for connection/label layout + hints.bendpointMove = { + insert: insert, + bendpointIndex: bendpointIndex + }; + newWaypoints = this.cropWaypoints(connection, newWaypoints); + modeling.updateWaypoints(connection, (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.filterRedundantWaypoints)(newWaypoints), hints); + } else { + if (type === RECONNECT_START) { + hints.docking = 'source'; + if (isReverse(context)) { + hints.docking = 'target'; + hints.newWaypoints = newWaypoints.reverse(); + } + } else if (type === RECONNECT_END) { + hints.docking = 'target'; + if (isReverse(context)) { + hints.docking = 'source'; + hints.newWaypoints = newWaypoints.reverse(); + } + } + modeling.reconnect(connection, source, target, docking, hints); + } + }, this); +} +BendpointMove.$inject = ['injector', 'eventBus', 'canvas', 'dragging', 'rules', 'modeling']; +BendpointMove.prototype.cropWaypoints = function (connection, newWaypoints) { + var connectionDocking = this._injector.get('connectionDocking', false); + if (!connectionDocking) { + return newWaypoints; + } + var waypoints = connection.waypoints; + connection.waypoints = newWaypoints; + connection.waypoints = connectionDocking.getCroppedWaypoints(connection); + newWaypoints = connection.waypoints; + connection.waypoints = waypoints; + return newWaypoints; +}; + +// helpers ////////// + +function isReverse(context) { + var hover = context.hover, + source = context.source, + target = context.target, + type = context.type; + if (type === RECONNECT_START) { + return hover && target && hover === target && source !== target; + } + if (type === RECONNECT_END) { + return hover && source && hover === source && source !== target; + } +} + +/***/ }), + +/***/ 99348: +/*!*********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/bendpoints/BendpointMovePreview.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BendpointMovePreview) +/* harmony export */ }); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var _BendpointUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BendpointUtil */ 2379); +/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ 81384); +/* harmony import */ var _BendpointMove__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BendpointMove */ 71102); + + + + +var RECONNECT_START = 'reconnectStart', + RECONNECT_END = 'reconnectEnd', + UPDATE_WAYPOINTS = 'updateWaypoints'; +var MARKER_OK = 'connect-ok', + MARKER_NOT_OK = 'connect-not-ok', + MARKER_CONNECT_HOVER = 'connect-hover', + MARKER_CONNECT_UPDATING = 'djs-updating', + MARKER_ELEMENT_HIDDEN = 'djs-element-hidden'; +var HIGH_PRIORITY = 1100; + +/** + * Preview connection while moving bendpoints. + */ +function BendpointMovePreview(bendpointMove, injector, eventBus, canvas) { + this._injector = injector; + var connectionPreview = injector.get('connectionPreview', false); + eventBus.on('bendpoint.move.start', function (event) { + var context = event.context, + bendpointIndex = context.bendpointIndex, + connection = context.connection, + insert = context.insert, + waypoints = connection.waypoints, + newWaypoints = waypoints.slice(); + context.waypoints = waypoints; + if (insert) { + // insert placeholder for new bendpoint + newWaypoints.splice(bendpointIndex, 0, { + x: event.x, + y: event.y + }); + } + connection.waypoints = newWaypoints; + + // add dragger gfx + var draggerGfx = context.draggerGfx = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_0__.addBendpoint)(canvas.getLayer('overlays')); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(draggerGfx).add('djs-dragging'); + canvas.addMarker(connection, MARKER_ELEMENT_HIDDEN); + canvas.addMarker(connection, MARKER_CONNECT_UPDATING); + }); + eventBus.on('bendpoint.move.hover', function (event) { + var context = event.context, + allowed = context.allowed, + hover = context.hover, + type = context.type; + if (hover) { + canvas.addMarker(hover, MARKER_CONNECT_HOVER); + if (type === UPDATE_WAYPOINTS) { + return; + } + if (allowed) { + canvas.removeMarker(hover, MARKER_NOT_OK); + canvas.addMarker(hover, MARKER_OK); + } else if (allowed === false) { + canvas.removeMarker(hover, MARKER_OK); + canvas.addMarker(hover, MARKER_NOT_OK); + } + } + }); + eventBus.on(['bendpoint.move.out', 'bendpoint.move.cleanup'], HIGH_PRIORITY, function (event) { + var context = event.context, + hover = context.hover, + target = context.target; + if (hover) { + canvas.removeMarker(hover, MARKER_CONNECT_HOVER); + canvas.removeMarker(hover, target ? MARKER_OK : MARKER_NOT_OK); + } + }); + eventBus.on('bendpoint.move.move', function (event) { + var context = event.context, + allowed = context.allowed, + bendpointIndex = context.bendpointIndex, + draggerGfx = context.draggerGfx, + hover = context.hover, + type = context.type, + connection = context.connection, + source = connection.source, + target = connection.target, + newWaypoints = connection.waypoints.slice(), + bendpoint = { + x: event.x, + y: event.y + }, + hints = context.hints || {}, + drawPreviewHints = {}; + if (connectionPreview) { + if (hints.connectionStart) { + drawPreviewHints.connectionStart = hints.connectionStart; + } + if (hints.connectionEnd) { + drawPreviewHints.connectionEnd = hints.connectionEnd; + } + if (type === RECONNECT_START) { + if ((0,_BendpointMove__WEBPACK_IMPORTED_MODULE_2__.isReverse)(context)) { + drawPreviewHints.connectionEnd = drawPreviewHints.connectionEnd || bendpoint; + drawPreviewHints.source = target; + drawPreviewHints.target = hover || source; + newWaypoints = newWaypoints.reverse(); + } else { + drawPreviewHints.connectionStart = drawPreviewHints.connectionStart || bendpoint; + drawPreviewHints.source = hover || source; + drawPreviewHints.target = target; + } + } else if (type === RECONNECT_END) { + if ((0,_BendpointMove__WEBPACK_IMPORTED_MODULE_2__.isReverse)(context)) { + drawPreviewHints.connectionStart = drawPreviewHints.connectionStart || bendpoint; + drawPreviewHints.source = hover || target; + drawPreviewHints.target = source; + newWaypoints = newWaypoints.reverse(); + } else { + drawPreviewHints.connectionEnd = drawPreviewHints.connectionEnd || bendpoint; + drawPreviewHints.source = source; + drawPreviewHints.target = hover || target; + } + } else { + drawPreviewHints.noCropping = true; + drawPreviewHints.noLayout = true; + newWaypoints[bendpointIndex] = bendpoint; + } + if (type === UPDATE_WAYPOINTS) { + newWaypoints = bendpointMove.cropWaypoints(connection, newWaypoints); + } + drawPreviewHints.waypoints = newWaypoints; + connectionPreview.drawPreview(context, allowed, drawPreviewHints); + } + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(draggerGfx, event.x, event.y); + }, this); + eventBus.on(['bendpoint.move.end', 'bendpoint.move.cancel'], HIGH_PRIORITY, function (event) { + var context = event.context, + connection = context.connection, + draggerGfx = context.draggerGfx, + hover = context.hover, + target = context.target, + waypoints = context.waypoints; + connection.waypoints = waypoints; + + // remove dragger gfx + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(draggerGfx); + canvas.removeMarker(connection, MARKER_CONNECT_UPDATING); + canvas.removeMarker(connection, MARKER_ELEMENT_HIDDEN); + if (hover) { + canvas.removeMarker(hover, MARKER_OK); + canvas.removeMarker(hover, target ? MARKER_OK : MARKER_NOT_OK); + } + if (connectionPreview) { + connectionPreview.cleanUp(context); + } + }); +} +BendpointMovePreview.$inject = ['bendpointMove', 'injector', 'eventBus', 'canvas']; + +/***/ }), + +/***/ 27099: +/*!******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/bendpoints/BendpointSnapping.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BendpointSnapping) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../snapping/SnapUtil */ 99298); + + +var abs = Math.abs, + round = Math.round; +var TOLERANCE = 10; +function BendpointSnapping(eventBus) { + function snapTo(values, value) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(values)) { + var i = values.length; + while (i--) if (abs(values[i] - value) <= TOLERANCE) { + return values[i]; + } + } else { + values = +values; + var rem = value % values; + if (rem < TOLERANCE) { + return value - rem; + } + if (rem > values - TOLERANCE) { + return value - rem + values; + } + } + return value; + } + function mid(element) { + if (element.width) { + return { + x: round(element.width / 2 + element.x), + y: round(element.height / 2 + element.y) + }; + } + } + + // connection segment snapping ////////////////////// + + function getConnectionSegmentSnaps(context) { + var snapPoints = context.snapPoints, + connection = context.connection, + waypoints = connection.waypoints, + segmentStart = context.segmentStart, + segmentStartIndex = context.segmentStartIndex, + segmentEnd = context.segmentEnd, + segmentEndIndex = context.segmentEndIndex, + axis = context.axis; + if (snapPoints) { + return snapPoints; + } + var referenceWaypoints = [waypoints[segmentStartIndex - 1], segmentStart, segmentEnd, waypoints[segmentEndIndex + 1]]; + if (segmentStartIndex < 2) { + referenceWaypoints.unshift(mid(connection.source)); + } + if (segmentEndIndex > waypoints.length - 3) { + referenceWaypoints.unshift(mid(connection.target)); + } + context.snapPoints = snapPoints = { + horizontal: [], + vertical: [] + }; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(referenceWaypoints, function (p) { + // we snap on existing bendpoints only, + // not placeholders that are inserted during add + if (p) { + p = p.original || p; + if (axis === 'y') { + snapPoints.horizontal.push(p.y); + } + if (axis === 'x') { + snapPoints.vertical.push(p.x); + } + } + }); + return snapPoints; + } + eventBus.on('connectionSegment.move.move', 1500, function (event) { + var context = event.context, + snapPoints = getConnectionSegmentSnaps(context), + x = event.x, + y = event.y, + sx, + sy; + if (!snapPoints) { + return; + } + + // snap + sx = snapTo(snapPoints.vertical, x); + sy = snapTo(snapPoints.horizontal, y); + + // correction x/y + var cx = x - sx, + cy = y - sy; + + // update delta + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(event, { + dx: event.dx - cx, + dy: event.dy - cy, + x: sx, + y: sy + }); + + // only set snapped if actually snapped + if (cx || snapPoints.vertical.indexOf(x) !== -1) { + (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'x', sx); + } + if (cy || snapPoints.horizontal.indexOf(y) !== -1) { + (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'y', sy); + } + }); + + // bendpoint snapping ////////////////////// + + function getBendpointSnaps(context) { + var snapPoints = context.snapPoints, + waypoints = context.connection.waypoints, + bendpointIndex = context.bendpointIndex; + if (snapPoints) { + return snapPoints; + } + var referenceWaypoints = [waypoints[bendpointIndex - 1], waypoints[bendpointIndex + 1]]; + context.snapPoints = snapPoints = { + horizontal: [], + vertical: [] + }; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(referenceWaypoints, function (p) { + // we snap on existing bendpoints only, + // not placeholders that are inserted during add + if (p) { + p = p.original || p; + snapPoints.horizontal.push(p.y); + snapPoints.vertical.push(p.x); + } + }); + return snapPoints; + } + eventBus.on(['bendpoint.move.move', 'bendpoint.move.end'], 1500, function (event) { + var context = event.context, + snapPoints = getBendpointSnaps(context), + hover = context.hover, + hoverMid = hover && mid(hover), + x = event.x, + y = event.y, + sx, + sy; + if (!snapPoints) { + return; + } + + // snap to hover mid + sx = snapTo(hoverMid ? snapPoints.vertical.concat([hoverMid.x]) : snapPoints.vertical, x); + sy = snapTo(hoverMid ? snapPoints.horizontal.concat([hoverMid.y]) : snapPoints.horizontal, y); + + // correction x/y + var cx = x - sx, + cy = y - sy; + + // update delta + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(event, { + dx: event.dx - cx, + dy: event.dy - cy, + x: event.x - cx, + y: event.y - cy + }); + + // only set snapped if actually snapped + if (cx || snapPoints.vertical.indexOf(x) !== -1) { + (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'x', sx); + } + if (cy || snapPoints.horizontal.indexOf(y) !== -1) { + (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'y', sy); + } + }); +} +BendpointSnapping.$inject = ['eventBus']; + +/***/ }), + +/***/ 2379: +/*!**************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/bendpoints/BendpointUtil.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ BENDPOINT_CLS: () => (/* binding */ BENDPOINT_CLS), +/* harmony export */ SEGMENT_DRAGGER_CLS: () => (/* binding */ SEGMENT_DRAGGER_CLS), +/* harmony export */ addBendpoint: () => (/* binding */ addBendpoint), +/* harmony export */ addSegmentDragger: () => (/* binding */ addSegmentDragger), +/* harmony export */ calculateSegmentMoveRegion: () => (/* binding */ calculateSegmentMoveRegion), +/* harmony export */ getConnectionIntersection: () => (/* binding */ getConnectionIntersection), +/* harmony export */ toCanvasCoordinates: () => (/* binding */ toCanvasCoordinates) +/* harmony export */ }); +/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Event */ 74716); +/* harmony import */ var _util_Geometry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/Geometry */ 3242); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ 81384); +/* harmony import */ var _util_LineIntersection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/LineIntersection */ 91373); + + + + + +var BENDPOINT_CLS = 'djs-bendpoint'; +var SEGMENT_DRAGGER_CLS = 'djs-segment-dragger'; +function toCanvasCoordinates(canvas, event) { + var position = (0,_util_Event__WEBPACK_IMPORTED_MODULE_0__.toPoint)(event), + clientRect = canvas._container.getBoundingClientRect(), + offset; + + // canvas relative position + + offset = { + x: clientRect.left, + y: clientRect.top + }; + + // update actual event payload with canvas relative measures + + var viewbox = canvas.viewbox(); + return { + x: viewbox.x + (position.x - offset.x) / viewbox.scale, + y: viewbox.y + (position.y - offset.y) / viewbox.scale + }; +} +function getConnectionIntersection(canvas, waypoints, event) { + var localPosition = toCanvasCoordinates(canvas, event), + intersection = (0,_util_LineIntersection__WEBPACK_IMPORTED_MODULE_1__.getApproxIntersection)(waypoints, localPosition); + return intersection; +} +function addBendpoint(parentGfx, cls) { + var groupGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(groupGfx).add(BENDPOINT_CLS); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(parentGfx, groupGfx); + var visual = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('circle'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(visual, { + cx: 0, + cy: 0, + r: 4 + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(visual).add('djs-visual'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(groupGfx, visual); + var hit = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('circle'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(hit, { + cx: 0, + cy: 0, + r: 10 + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(hit).add('djs-hit'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(groupGfx, hit); + if (cls) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(groupGfx).add(cls); + } + return groupGfx; +} +function createParallelDragger(parentGfx, segmentStart, segmentEnd, alignment) { + var draggerGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(parentGfx, draggerGfx); + var width = 14, + height = 3, + padding = 11, + hitWidth = calculateHitWidth(segmentStart, segmentEnd, alignment), + hitHeight = height + padding; + var visual = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('rect'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(visual, { + x: -width / 2, + y: -height / 2, + width: width, + height: height + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(visual).add('djs-visual'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(draggerGfx, visual); + var hit = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('rect'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(hit, { + x: -hitWidth / 2, + y: -hitHeight / 2, + width: hitWidth, + height: hitHeight + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(hit).add('djs-hit'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(draggerGfx, hit); + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.rotate)(draggerGfx, alignment === 'v' ? 90 : 0, 0, 0); + return draggerGfx; +} +function addSegmentDragger(parentGfx, segmentStart, segmentEnd) { + var groupGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('g'), + mid = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_4__.getMidPoint)(segmentStart, segmentEnd), + alignment = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_4__.pointsAligned)(segmentStart, segmentEnd); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(parentGfx, groupGfx); + createParallelDragger(groupGfx, segmentStart, segmentEnd, alignment); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(groupGfx).add(SEGMENT_DRAGGER_CLS); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(groupGfx).add(alignment === 'h' ? 'horizontal' : 'vertical'); + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(groupGfx, mid.x, mid.y); + return groupGfx; +} + +/** + * Calculates region for segment move which is 2/3 of the full segment length + * @param {number} segmentLength + * + * @return {number} + */ +function calculateSegmentMoveRegion(segmentLength) { + return Math.abs(Math.round(segmentLength * 2 / 3)); +} + +// helper ////////// + +function calculateHitWidth(segmentStart, segmentEnd, alignment) { + var segmentLengthXAxis = segmentEnd.x - segmentStart.x, + segmentLengthYAxis = segmentEnd.y - segmentStart.y; + return alignment === 'h' ? calculateSegmentMoveRegion(segmentLengthXAxis) : calculateSegmentMoveRegion(segmentLengthYAxis); +} + +/***/ }), + +/***/ 54810: +/*!***********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/bendpoints/Bendpoints.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Bendpoints) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _BendpointUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BendpointUtil */ 2379); +/* harmony import */ var _util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/EscapeUtil */ 96169); +/* harmony import */ var _util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _util_Geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Geometry */ 3242); +/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../util/Mouse */ 53171); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ 81384); + + + + + + + + + +/** + * A service that adds editable bendpoints to connections. + */ +function Bendpoints(eventBus, canvas, interactionEvents, bendpointMove, connectionSegmentMove) { + /** + * Returns true if intersection point is inside middle region of segment, adjusted by + * optional threshold + */ + function isIntersectionMiddle(intersection, waypoints, treshold) { + var idx = intersection.index, + p = intersection.point, + p0, + p1, + mid, + aligned, + xDelta, + yDelta; + if (idx <= 0 || intersection.bendpoint) { + return false; + } + p0 = waypoints[idx - 1]; + p1 = waypoints[idx]; + mid = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.getMidPoint)(p0, p1), aligned = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.pointsAligned)(p0, p1); + xDelta = Math.abs(p.x - mid.x); + yDelta = Math.abs(p.y - mid.y); + return aligned && xDelta <= treshold && yDelta <= treshold; + } + + /** + * Calculates the threshold from a connection's middle which fits the two-third-region + */ + function calculateIntersectionThreshold(connection, intersection) { + var waypoints = connection.waypoints, + relevantSegment, + alignment, + segmentLength, + threshold; + if (intersection.index <= 0 || intersection.bendpoint) { + return null; + } + + // segment relative to connection intersection + relevantSegment = { + start: waypoints[intersection.index - 1], + end: waypoints[intersection.index] + }; + alignment = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.pointsAligned)(relevantSegment.start, relevantSegment.end); + if (!alignment) { + return null; + } + if (alignment === 'h') { + segmentLength = relevantSegment.end.x - relevantSegment.start.x; + } else { + segmentLength = relevantSegment.end.y - relevantSegment.start.y; + } + + // calculate threshold relative to 2/3 of segment length + threshold = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.calculateSegmentMoveRegion)(segmentLength) / 2; + return threshold; + } + function activateBendpointMove(event, connection) { + var waypoints = connection.waypoints, + intersection = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.getConnectionIntersection)(canvas, waypoints, event), + threshold; + if (!intersection) { + return; + } + threshold = calculateIntersectionThreshold(connection, intersection); + if (isIntersectionMiddle(intersection, waypoints, threshold)) { + connectionSegmentMove.start(event, connection, intersection.index); + } else { + bendpointMove.start(event, connection, intersection.index, !intersection.bendpoint); + } + + // we've handled the event + return true; + } + function bindInteractionEvents(node, eventName, element) { + min_dom__WEBPACK_IMPORTED_MODULE_2__.event.bind(node, eventName, function (event) { + interactionEvents.triggerMouseEvent(eventName, event, element); + event.stopPropagation(); + }); + } + function getBendpointsContainer(element, create) { + var layer = canvas.getLayer('overlays'), + gfx = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('.djs-bendpoints[data-element-id="' + _util_EscapeUtil__WEBPACK_IMPORTED_MODULE_3___default()(element.id) + '"]', layer); + if (!gfx && create) { + gfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(gfx, { + 'data-element-id': element.id + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.classes)(gfx).add('djs-bendpoints'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(layer, gfx); + bindInteractionEvents(gfx, 'mousedown', element); + bindInteractionEvents(gfx, 'click', element); + bindInteractionEvents(gfx, 'dblclick', element); + } + return gfx; + } + function getSegmentDragger(idx, parentGfx) { + return (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('.djs-segment-dragger[data-segment-idx="' + idx + '"]', parentGfx); + } + function createBendpoints(gfx, connection) { + connection.waypoints.forEach(function (p, idx) { + var bendpoint = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.addBendpoint)(gfx); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.append)(gfx, bendpoint); + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__.translate)(bendpoint, p.x, p.y); + }); + + // add floating bendpoint + (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.addBendpoint)(gfx, 'floating'); + } + function createSegmentDraggers(gfx, connection) { + var waypoints = connection.waypoints; + var segmentStart, segmentEnd, segmentDraggerGfx; + for (var i = 1; i < waypoints.length; i++) { + segmentStart = waypoints[i - 1]; + segmentEnd = waypoints[i]; + if ((0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.pointsAligned)(segmentStart, segmentEnd)) { + segmentDraggerGfx = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.addSegmentDragger)(gfx, segmentStart, segmentEnd); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(segmentDraggerGfx, { + 'data-segment-idx': i + }); + bindInteractionEvents(segmentDraggerGfx, 'mousemove', connection); + } + } + } + function clearBendpoints(gfx) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_6__.forEach)((0,min_dom__WEBPACK_IMPORTED_MODULE_2__.queryAll)('.' + _BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.BENDPOINT_CLS, gfx), function (node) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.remove)(node); + }); + } + function clearSegmentDraggers(gfx) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_6__.forEach)((0,min_dom__WEBPACK_IMPORTED_MODULE_2__.queryAll)('.' + _BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.SEGMENT_DRAGGER_CLS, gfx), function (node) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.remove)(node); + }); + } + function addHandles(connection) { + var gfx = getBendpointsContainer(connection); + if (!gfx) { + gfx = getBendpointsContainer(connection, true); + createBendpoints(gfx, connection); + createSegmentDraggers(gfx, connection); + } + return gfx; + } + function updateHandles(connection) { + var gfx = getBendpointsContainer(connection); + if (gfx) { + clearSegmentDraggers(gfx); + clearBendpoints(gfx); + createSegmentDraggers(gfx, connection); + createBendpoints(gfx, connection); + } + } + function updateFloatingBendpointPosition(parentGfx, intersection) { + var floating = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('.floating', parentGfx), + point = intersection.point; + if (!floating) { + return; + } + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__.translate)(floating, point.x, point.y); + } + function updateSegmentDraggerPosition(parentGfx, intersection, waypoints) { + var draggerGfx = getSegmentDragger(intersection.index, parentGfx), + segmentStart = waypoints[intersection.index - 1], + segmentEnd = waypoints[intersection.index], + point = intersection.point, + mid = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.getMidPoint)(segmentStart, segmentEnd), + alignment = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_0__.pointsAligned)(segmentStart, segmentEnd), + draggerVisual, + relativePosition; + if (!draggerGfx) { + return; + } + draggerVisual = getDraggerVisual(draggerGfx); + relativePosition = { + x: point.x - mid.x, + y: point.y - mid.y + }; + if (alignment === 'v') { + // rotate position + relativePosition = { + x: relativePosition.y, + y: relativePosition.x + }; + } + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_5__.translate)(draggerVisual, relativePosition.x, relativePosition.y); + } + eventBus.on('connection.changed', function (event) { + updateHandles(event.element); + }); + eventBus.on('connection.remove', function (event) { + var gfx = getBendpointsContainer(event.element); + if (gfx) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.remove)(gfx); + } + }); + eventBus.on('element.marker.update', function (event) { + var element = event.element, + bendpointsGfx; + if (!element.waypoints) { + return; + } + bendpointsGfx = addHandles(element); + if (event.add) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.classes)(bendpointsGfx).add(event.marker); + } else { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.classes)(bendpointsGfx).remove(event.marker); + } + }); + eventBus.on('element.mousemove', function (event) { + var element = event.element, + waypoints = element.waypoints, + bendpointsGfx, + intersection; + if (waypoints) { + bendpointsGfx = getBendpointsContainer(element, true); + intersection = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.getConnectionIntersection)(canvas, waypoints, event.originalEvent); + if (!intersection) { + return; + } + updateFloatingBendpointPosition(bendpointsGfx, intersection); + if (!intersection.bendpoint) { + updateSegmentDraggerPosition(bendpointsGfx, intersection, waypoints); + } + } + }); + eventBus.on('element.mousedown', function (event) { + if (!(0,_util_Mouse__WEBPACK_IMPORTED_MODULE_7__.isPrimaryButton)(event)) { + return; + } + var originalEvent = event.originalEvent, + element = event.element; + if (!element.waypoints) { + return; + } + return activateBendpointMove(originalEvent, element); + }); + eventBus.on('selection.changed', function (event) { + var newSelection = event.newSelection, + primary = newSelection[0]; + if (primary && primary.waypoints) { + addHandles(primary); + } + }); + eventBus.on('element.hover', function (event) { + var element = event.element; + if (element.waypoints) { + addHandles(element); + interactionEvents.registerEvent(event.gfx, 'mousemove', 'element.mousemove'); + } + }); + eventBus.on('element.out', function (event) { + interactionEvents.unregisterEvent(event.gfx, 'mousemove', 'element.mousemove'); + }); + + // update bendpoint container data attribute on element ID change + eventBus.on('element.updateId', function (context) { + var element = context.element, + newId = context.newId; + if (element.waypoints) { + var bendpointContainer = getBendpointsContainer(element); + if (bendpointContainer) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.attr)(bendpointContainer, { + 'data-element-id': newId + }); + } + } + }); + + // API + + this.addHandles = addHandles; + this.updateHandles = updateHandles; + this.getBendpointsContainer = getBendpointsContainer; + this.getSegmentDragger = getSegmentDragger; +} +Bendpoints.$inject = ['eventBus', 'canvas', 'interactionEvents', 'bendpointMove', 'connectionSegmentMove']; + +// helper ///////////// + +function getDraggerVisual(draggerGfx) { + return (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('.djs-visual', draggerGfx); +} + +/***/ }), + +/***/ 15576: +/*!**********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/bendpoints/ConnectionSegmentMove.js ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ConnectionSegmentMove) +/* harmony export */ }); +/* harmony import */ var _util_Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/Geometry */ 3242); +/* harmony import */ var _BendpointUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BendpointUtil */ 2379); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ 81384); + + + +var MARKER_CONNECT_HOVER = 'connect-hover', + MARKER_CONNECT_UPDATING = 'djs-updating'; + + +function axisAdd(point, axis, delta) { + return axisSet(point, axis, point[axis] + delta); +} +function axisSet(point, axis, value) { + return { + x: axis === 'x' ? value : point.x, + y: axis === 'y' ? value : point.y + }; +} +function axisFenced(position, segmentStart, segmentEnd, axis) { + var maxValue = Math.max(segmentStart[axis], segmentEnd[axis]), + minValue = Math.min(segmentStart[axis], segmentEnd[axis]); + var padding = 20; + var fencedValue = Math.min(Math.max(minValue + padding, position[axis]), maxValue - padding); + return axisSet(segmentStart, axis, fencedValue); +} +function flipAxis(axis) { + return axis === 'x' ? 'y' : 'x'; +} + +/** + * Get the docking point on the given element. + * + * Compute a reasonable docking, if non exists. + * + * @param {Point} point + * @param {djs.model.Shape} referenceElement + * @param {string} moveAxis (x|y) + * + * @return {Point} + */ +function getDocking(point, referenceElement, moveAxis) { + var referenceMid, inverseAxis; + if (point.original) { + return point.original; + } else { + referenceMid = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getMid)(referenceElement); + inverseAxis = flipAxis(moveAxis); + return axisSet(point, inverseAxis, referenceMid[inverseAxis]); + } +} + +/** + * A component that implements moving of bendpoints + */ +function ConnectionSegmentMove(injector, eventBus, canvas, dragging, graphicsFactory, modeling) { + // optional connection docking integration + var connectionDocking = injector.get('connectionDocking', false); + + // API + + this.start = function (event, connection, idx) { + var context, + gfx = canvas.getGraphics(connection), + segmentStartIndex = idx - 1, + segmentEndIndex = idx, + waypoints = connection.waypoints, + segmentStart = waypoints[segmentStartIndex], + segmentEnd = waypoints[segmentEndIndex], + intersection = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.getConnectionIntersection)(canvas, waypoints, event), + direction, + axis, + dragPosition; + direction = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointsAligned)(segmentStart, segmentEnd); + + // do not move diagonal connection + if (!direction) { + return; + } + + // the axis where we are going to move things + axis = direction === 'v' ? 'x' : 'y'; + if (segmentStartIndex === 0) { + segmentStart = getDocking(segmentStart, connection.source, axis); + } + if (segmentEndIndex === waypoints.length - 1) { + segmentEnd = getDocking(segmentEnd, connection.target, axis); + } + if (intersection) { + dragPosition = intersection.point; + } else { + // set to segment center as default + dragPosition = { + x: (segmentStart.x + segmentEnd.x) / 2, + y: (segmentStart.y + segmentEnd.y) / 2 + }; + } + context = { + connection: connection, + segmentStartIndex: segmentStartIndex, + segmentEndIndex: segmentEndIndex, + segmentStart: segmentStart, + segmentEnd: segmentEnd, + axis: axis, + dragPosition: dragPosition + }; + dragging.init(event, dragPosition, 'connectionSegment.move', { + cursor: axis === 'x' ? 'resize-ew' : 'resize-ns', + data: { + connection: connection, + connectionGfx: gfx, + context: context + } + }); + }; + + /** + * Crop connection if connection cropping is provided. + * + * @param {Connection} connection + * @param {Array} newWaypoints + * + * @return {Array} cropped connection waypoints + */ + function cropConnection(connection, newWaypoints) { + // crop connection, if docking service is provided only + if (!connectionDocking) { + return newWaypoints; + } + var oldWaypoints = connection.waypoints, + croppedWaypoints; + + // temporary set new waypoints + connection.waypoints = newWaypoints; + croppedWaypoints = connectionDocking.getCroppedWaypoints(connection); + + // restore old waypoints + connection.waypoints = oldWaypoints; + return croppedWaypoints; + } + + // DRAGGING IMPLEMENTATION + + function redrawConnection(data) { + graphicsFactory.update('connection', data.connection, data.connectionGfx); + } + function updateDragger(context, segmentOffset, event) { + var newWaypoints = context.newWaypoints, + segmentStartIndex = context.segmentStartIndex + segmentOffset, + segmentStart = newWaypoints[segmentStartIndex], + segmentEndIndex = context.segmentEndIndex + segmentOffset, + segmentEnd = newWaypoints[segmentEndIndex], + axis = flipAxis(context.axis); + + // make sure the dragger does not move + // outside the connection + var draggerPosition = axisFenced(event, segmentStart, segmentEnd, axis); + + // update dragger + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(context.draggerGfx, draggerPosition.x, draggerPosition.y); + } + + /** + * Filter waypoints for redundant ones (i.e. on the same axis). + * Returns the filtered waypoints and the offset related to the segment move. + * + * @param {Array} waypoints + * @param {Integer} segmentStartIndex of moved segment start + * + * @return {Object} { filteredWaypoints, segmentOffset } + */ + function filterRedundantWaypoints(waypoints, segmentStartIndex) { + var segmentOffset = 0; + var filteredWaypoints = waypoints.filter(function (r, idx) { + if ((0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointsOnLine)(waypoints[idx - 1], waypoints[idx + 1], r)) { + // remove point and increment offset + segmentOffset = idx <= segmentStartIndex ? segmentOffset - 1 : segmentOffset; + return false; + } + + // dont remove point + return true; + }); + return { + waypoints: filteredWaypoints, + segmentOffset: segmentOffset + }; + } + eventBus.on('connectionSegment.move.start', function (event) { + var context = event.context, + connection = event.connection, + layer = canvas.getLayer('overlays'); + context.originalWaypoints = connection.waypoints.slice(); + + // add dragger gfx + context.draggerGfx = (0,_BendpointUtil__WEBPACK_IMPORTED_MODULE_1__.addSegmentDragger)(layer, context.segmentStart, context.segmentEnd); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.classes)(context.draggerGfx).add('djs-dragging'); + canvas.addMarker(connection, MARKER_CONNECT_UPDATING); + }); + eventBus.on('connectionSegment.move.move', function (event) { + var context = event.context, + connection = context.connection, + segmentStartIndex = context.segmentStartIndex, + segmentEndIndex = context.segmentEndIndex, + segmentStart = context.segmentStart, + segmentEnd = context.segmentEnd, + axis = context.axis; + var newWaypoints = context.originalWaypoints.slice(), + newSegmentStart = axisAdd(segmentStart, axis, event['d' + axis]), + newSegmentEnd = axisAdd(segmentEnd, axis, event['d' + axis]); + + // original waypoint count and added / removed + // from start waypoint delta. We use the later + // to retrieve the updated segmentStartIndex / segmentEndIndex + var waypointCount = newWaypoints.length, + segmentOffset = 0; + + // move segment start / end by axis delta + newWaypoints[segmentStartIndex] = newSegmentStart; + newWaypoints[segmentEndIndex] = newSegmentEnd; + var sourceToSegmentOrientation, targetToSegmentOrientation; + + // handle first segment + if (segmentStartIndex < 2) { + sourceToSegmentOrientation = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getOrientation)(connection.source, newSegmentStart); + + // first bendpoint, remove first segment if intersecting + if (segmentStartIndex === 1) { + if (sourceToSegmentOrientation === 'intersect') { + newWaypoints.shift(); + newWaypoints[0] = newSegmentStart; + segmentOffset--; + } + } + + // docking point, add segment if not intersecting anymore + else { + if (sourceToSegmentOrientation !== 'intersect') { + newWaypoints.unshift(segmentStart); + segmentOffset++; + } + } + } + + // handle last segment + if (segmentEndIndex > waypointCount - 3) { + targetToSegmentOrientation = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getOrientation)(connection.target, newSegmentEnd); + + // last bendpoint, remove last segment if intersecting + if (segmentEndIndex === waypointCount - 2) { + if (targetToSegmentOrientation === 'intersect') { + newWaypoints.pop(); + newWaypoints[newWaypoints.length - 1] = newSegmentEnd; + } + } + + // last bendpoint, remove last segment if intersecting + else { + if (targetToSegmentOrientation !== 'intersect') { + newWaypoints.push(segmentEnd); + } + } + } + + // update connection waypoints + context.newWaypoints = connection.waypoints = cropConnection(connection, newWaypoints); + + // update dragger position + updateDragger(context, segmentOffset, event); + + // save segmentOffset in context + context.newSegmentStartIndex = segmentStartIndex + segmentOffset; + + // redraw connection + redrawConnection(event); + }); + eventBus.on('connectionSegment.move.hover', function (event) { + event.context.hover = event.hover; + canvas.addMarker(event.hover, MARKER_CONNECT_HOVER); + }); + eventBus.on(['connectionSegment.move.out', 'connectionSegment.move.cleanup'], function (event) { + // remove connect marker + // if it was added + var hover = event.context.hover; + if (hover) { + canvas.removeMarker(hover, MARKER_CONNECT_HOVER); + } + }); + eventBus.on('connectionSegment.move.cleanup', function (event) { + var context = event.context, + connection = context.connection; + + // remove dragger gfx + if (context.draggerGfx) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_4__.remove)(context.draggerGfx); + } + canvas.removeMarker(connection, MARKER_CONNECT_UPDATING); + }); + eventBus.on(['connectionSegment.move.cancel', 'connectionSegment.move.end'], function (event) { + var context = event.context, + connection = context.connection; + connection.waypoints = context.originalWaypoints; + redrawConnection(event); + }); + eventBus.on('connectionSegment.move.end', function (event) { + var context = event.context, + connection = context.connection, + newWaypoints = context.newWaypoints, + newSegmentStartIndex = context.newSegmentStartIndex; + + // ensure we have actual pixel values bendpoint + // coordinates (important when zoom level was > 1 during move) + newWaypoints = newWaypoints.map(function (p) { + return { + original: p.original, + x: Math.round(p.x), + y: Math.round(p.y) + }; + }); + + // apply filter redunant waypoints + var filtered = filterRedundantWaypoints(newWaypoints, newSegmentStartIndex); + + // get filtered waypoints + var filteredWaypoints = filtered.waypoints, + croppedWaypoints = cropConnection(connection, filteredWaypoints), + segmentOffset = filtered.segmentOffset; + var hints = { + segmentMove: { + segmentStartIndex: context.segmentStartIndex, + newSegmentStartIndex: newSegmentStartIndex + segmentOffset + } + }; + modeling.updateWaypoints(connection, croppedWaypoints, hints); + }); +} +ConnectionSegmentMove.$inject = ['injector', 'eventBus', 'canvas', 'dragging', 'graphicsFactory', 'modeling']; + +/***/ }), + +/***/ 31068: +/*!******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/bendpoints/index.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dragging */ 11917); +/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rules */ 8807); +/* harmony import */ var _Bendpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Bendpoints */ 54810); +/* harmony import */ var _BendpointMove__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BendpointMove */ 71102); +/* harmony import */ var _BendpointMovePreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BendpointMovePreview */ 99348); +/* harmony import */ var _ConnectionSegmentMove__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ConnectionSegmentMove */ 15576); +/* harmony import */ var _BendpointSnapping__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BendpointSnapping */ 27099); + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_dragging__WEBPACK_IMPORTED_MODULE_0__["default"], _rules__WEBPACK_IMPORTED_MODULE_1__["default"]], + __init__: ['bendpoints', 'bendpointSnapping', 'bendpointMovePreview'], + bendpoints: ['type', _Bendpoints__WEBPACK_IMPORTED_MODULE_2__["default"]], + bendpointMove: ['type', _BendpointMove__WEBPACK_IMPORTED_MODULE_3__["default"]], + bendpointMovePreview: ['type', _BendpointMovePreview__WEBPACK_IMPORTED_MODULE_4__["default"]], + connectionSegmentMove: ['type', _ConnectionSegmentMove__WEBPACK_IMPORTED_MODULE_5__["default"]], + bendpointSnapping: ['type', _BendpointSnapping__WEBPACK_IMPORTED_MODULE_6__["default"]] +}); + +/***/ }), + +/***/ 84845: +/*!******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/change-support/ChangeSupport.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ChangeSupport) +/* harmony export */ }); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Elements */ 35723); + + +/** + * Adds change support to the diagram, including + * + *
    + *
  • redrawing shapes and connections on change
  • + *
+ * + * @param {EventBus} eventBus + * @param {Canvas} canvas + * @param {ElementRegistry} elementRegistry + * @param {GraphicsFactory} graphicsFactory + */ +function ChangeSupport(eventBus, canvas, elementRegistry, graphicsFactory) { + // redraw shapes / connections on change + + eventBus.on('element.changed', function (event) { + var element = event.element; + + // element might have been deleted and replaced by new element with same ID + // thus check for parent of element except for root element + if (element.parent || element === canvas.getRootElement()) { + event.gfx = elementRegistry.getGraphics(element); + } + + // shape + gfx may have been deleted + if (!event.gfx) { + return; + } + eventBus.fire((0,_util_Elements__WEBPACK_IMPORTED_MODULE_0__.getType)(element) + '.changed', event); + }); + eventBus.on('elements.changed', function (event) { + var elements = event.elements; + elements.forEach(function (e) { + eventBus.fire('element.changed', { + element: e + }); + }); + graphicsFactory.updateContainments(elements); + }); + eventBus.on('shape.changed', function (event) { + graphicsFactory.update('shape', event.element, event.gfx); + }); + eventBus.on('connection.changed', function (event) { + graphicsFactory.update('connection', event.element, event.gfx); + }); +} +ChangeSupport.$inject = ['eventBus', 'canvas', 'elementRegistry', 'graphicsFactory']; + +/***/ }), + +/***/ 46242: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/change-support/index.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _ChangeSupport__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ChangeSupport */ 84845); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['changeSupport'], + changeSupport: ['type', _ChangeSupport__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 62172: +/*!*********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/clipboard/Clipboard.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Clipboard) +/* harmony export */ }); +/** + * A clip board stub + */ +function Clipboard() {} +Clipboard.prototype.get = function () { + return this._data; +}; +Clipboard.prototype.set = function (data) { + this._data = data; +}; +Clipboard.prototype.clear = function () { + var data = this._data; + delete this._data; + return data; +}; +Clipboard.prototype.isEmpty = function () { + return !this._data; +}; + +/***/ }), + +/***/ 56142: +/*!*****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/clipboard/index.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _Clipboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Clipboard */ 62172); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + clipboard: ['type', _Clipboard__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 90056: +/*!*****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/connect/Connect.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Connect), +/* harmony export */ isReverse: () => (/* binding */ isReverse) +/* harmony export */ }); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +function Connect(eventBus, dragging, modeling, rules) { + // rules + + function canConnect(source, target) { + return rules.allowed('connection.create', { + source: source, + target: target + }); + } + function canConnectReverse(source, target) { + return canConnect(target, source); + } + + // event handlers + + eventBus.on('connect.hover', function (event) { + var context = event.context, + start = context.start, + hover = event.hover, + canExecute; + + // cache hover state + context.hover = hover; + canExecute = context.canExecute = canConnect(start, hover); + + // ignore hover + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNil)(canExecute)) { + return; + } + if (canExecute !== false) { + context.source = start; + context.target = hover; + return; + } + canExecute = context.canExecute = canConnectReverse(start, hover); + + // ignore hover + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNil)(canExecute)) { + return; + } + if (canExecute !== false) { + context.source = hover; + context.target = start; + } + }); + eventBus.on(['connect.out', 'connect.cleanup'], function (event) { + var context = event.context; + context.hover = null; + context.source = null; + context.target = null; + context.canExecute = false; + }); + eventBus.on('connect.end', function (event) { + var context = event.context, + canExecute = context.canExecute, + connectionStart = context.connectionStart, + connectionEnd = { + x: event.x, + y: event.y + }, + source = context.source, + target = context.target; + if (!canExecute) { + return false; + } + var attrs = null, + hints = { + connectionStart: isReverse(context) ? connectionEnd : connectionStart, + connectionEnd: isReverse(context) ? connectionStart : connectionEnd + }; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(canExecute)) { + attrs = canExecute; + } + modeling.connect(source, target, attrs, hints); + }); + + // API + + /** + * Start connect operation. + * + * @param {DOMEvent} event + * @param {djs.model.Base} start + * @param {Point} [connectionStart] + * @param {boolean} [autoActivate=false] + */ + this.start = function (event, start, connectionStart, autoActivate) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(connectionStart)) { + autoActivate = connectionStart; + connectionStart = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(start); + } + dragging.init(event, 'connect', { + autoActivate: autoActivate, + data: { + shape: start, + context: { + start: start, + connectionStart: connectionStart + } + } + }); + }; +} +Connect.$inject = ['eventBus', 'dragging', 'modeling', 'rules']; + +// helpers ////////// + +function isReverse(context) { + var hover = context.hover, + source = context.source, + target = context.target; + return hover && source && hover === source && source !== target; +} + +/***/ }), + +/***/ 53166: +/*!************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/connect/ConnectPreview.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ConnectPreview) +/* harmony export */ }); +/* harmony import */ var _Connect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Connect */ 90056); + +var HIGH_PRIORITY = 1100, + LOW_PRIORITY = 900; +var MARKER_OK = 'connect-ok', + MARKER_NOT_OK = 'connect-not-ok'; + +/** + * Shows connection preview during connect. + * + * @param {didi.Injector} injector + * @param {EventBus} eventBus + * @param {Canvas} canvas + */ +function ConnectPreview(injector, eventBus, canvas) { + var connectionPreview = injector.get('connectionPreview', false); + connectionPreview && eventBus.on('connect.move', function (event) { + var context = event.context, + canConnect = context.canExecute, + hover = context.hover, + source = context.source, + start = context.start, + startPosition = context.startPosition, + target = context.target, + connectionStart = context.connectionStart || startPosition, + connectionEnd = context.connectionEnd || { + x: event.x, + y: event.y + }, + previewStart = connectionStart, + previewEnd = connectionEnd; + if ((0,_Connect__WEBPACK_IMPORTED_MODULE_0__.isReverse)(context)) { + previewStart = connectionEnd; + previewEnd = connectionStart; + } + connectionPreview.drawPreview(context, canConnect, { + source: source || start, + target: target || hover, + connectionStart: previewStart, + connectionEnd: previewEnd + }); + }); + eventBus.on('connect.hover', LOW_PRIORITY, function (event) { + var context = event.context, + hover = event.hover, + canExecute = context.canExecute; + + // ignore hover + if (canExecute === null) { + return; + } + canvas.addMarker(hover, canExecute ? MARKER_OK : MARKER_NOT_OK); + }); + eventBus.on(['connect.out', 'connect.cleanup'], HIGH_PRIORITY, function (event) { + var hover = event.hover; + if (hover) { + canvas.removeMarker(hover, MARKER_OK); + canvas.removeMarker(hover, MARKER_NOT_OK); + } + }); + connectionPreview && eventBus.on('connect.cleanup', function (event) { + connectionPreview.cleanUp(event.context); + }); +} +ConnectPreview.$inject = ['injector', 'eventBus', 'canvas']; + +/***/ }), + +/***/ 60262: +/*!***************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/connect/index.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../selection */ 26334); +/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rules */ 8807); +/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dragging */ 11917); +/* harmony import */ var _Connect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Connect */ 90056); +/* harmony import */ var _ConnectPreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConnectPreview */ 53166); + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_selection__WEBPACK_IMPORTED_MODULE_0__["default"], _rules__WEBPACK_IMPORTED_MODULE_1__["default"], _dragging__WEBPACK_IMPORTED_MODULE_2__["default"]], + __init__: ['connectPreview'], + connect: ['type', _Connect__WEBPACK_IMPORTED_MODULE_3__["default"]], + connectPreview: ['type', _ConnectPreview__WEBPACK_IMPORTED_MODULE_4__["default"]] +}); + +/***/ }), + +/***/ 44121: +/*!**************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/connection-preview/ConnectionPreview.js ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ConnectionPreview) +/* harmony export */ }); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); + + + +var MARKER_CONNECTION_PREVIEW = 'djs-connection-preview'; + +/** + * Draws connection preview. Optionally, this can use layouter and connection docking to draw + * better looking previews. + * + * @param {didi.Injector} injector + * @param {Canvas} canvas + * @param {GraphicsFactory} graphicsFactory + * @param {ElementFactory} elementFactory + */ +function ConnectionPreview(injector, canvas, graphicsFactory, elementFactory) { + this._canvas = canvas; + this._graphicsFactory = graphicsFactory; + this._elementFactory = elementFactory; + + // optional components + this._connectionDocking = injector.get('connectionDocking', false); + this._layouter = injector.get('layouter', false); +} +ConnectionPreview.$inject = ['injector', 'canvas', 'graphicsFactory', 'elementFactory']; + +/** + * Draw connection preview. + * + * Provide at least one of and to create a preview. + * In the clean up stage, call `connectionPreview#cleanUp` with the context to remove preview. + * + * @param {Object} context + * @param {Object|boolean} canConnect + * @param {Object} hints + * @param {djs.model.shape} [hints.source] source element + * @param {djs.model.shape} [hints.target] target element + * @param {Point} [hints.connectionStart] connection preview start + * @param {Point} [hints.connectionEnd] connection preview end + * @param {Array} [hints.waypoints] provided waypoints for preview + * @param {boolean} [hints.noLayout] true if preview should not be laid out + * @param {boolean} [hints.noCropping] true if preview should not be cropped + * @param {boolean} [hints.noNoop] true if simple connection should not be drawn + */ +ConnectionPreview.prototype.drawPreview = function (context, canConnect, hints) { + hints = hints || {}; + var connectionPreviewGfx = context.connectionPreviewGfx, + getConnection = context.getConnection, + source = hints.source, + target = hints.target, + waypoints = hints.waypoints, + connectionStart = hints.connectionStart, + connectionEnd = hints.connectionEnd, + noLayout = hints.noLayout, + noCropping = hints.noCropping, + noNoop = hints.noNoop, + connection; + var self = this; + if (!connectionPreviewGfx) { + connectionPreviewGfx = context.connectionPreviewGfx = this.createConnectionPreviewGfx(); + } + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.clear)(connectionPreviewGfx); + if (!getConnection) { + getConnection = context.getConnection = cacheReturnValues(function (canConnect, source, target) { + return self.getConnection(canConnect, source, target); + }); + } + if (canConnect) { + connection = getConnection(canConnect, source, target); + } + if (!connection) { + !noNoop && this.drawNoopPreview(connectionPreviewGfx, hints); + return; + } + connection.waypoints = waypoints || []; + + // optional layout + if (this._layouter && !noLayout) { + connection.waypoints = this._layouter.layoutConnection(connection, { + source: source, + target: target, + connectionStart: connectionStart, + connectionEnd: connectionEnd, + waypoints: hints.waypoints || connection.waypoints + }); + } + + // fallback if no waypoints were provided nor created with layouter + if (!connection.waypoints || !connection.waypoints.length) { + connection.waypoints = [source ? (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source) : connectionStart, target ? (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(target) : connectionEnd]; + } + + // optional cropping + if (this._connectionDocking && (source || target) && !noCropping) { + connection.waypoints = this._connectionDocking.getCroppedWaypoints(connection, source, target); + } + this._graphicsFactory.drawConnection(connectionPreviewGfx, connection); +}; + +/** + * Draw simple connection between source and target or provided points. + * + * @param {SVGElement} connectionPreviewGfx container for the connection + * @param {Object} hints + * @param {djs.model.shape} [hints.source] source element + * @param {djs.model.shape} [hints.target] target element + * @param {Point} [hints.connectionStart] required if source is not provided + * @param {Point} [hints.connectionEnd] required if target is not provided + */ +ConnectionPreview.prototype.drawNoopPreview = function (connectionPreviewGfx, hints) { + var source = hints.source, + target = hints.target, + start = hints.connectionStart || (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(source), + end = hints.connectionEnd || (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(target); + var waypoints = this.cropWaypoints(start, end, source, target); + var connection = this.createNoopConnection(waypoints[0], waypoints[1]); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.append)(connectionPreviewGfx, connection); +}; + +/** + * Return cropped waypoints. + * + * @param {Point} start + * @param {Point} end + * @param {djs.model.shape} source + * @param {djs.model.shape} target + * + * @returns {Array} + */ +ConnectionPreview.prototype.cropWaypoints = function (start, end, source, target) { + var graphicsFactory = this._graphicsFactory, + sourcePath = source && graphicsFactory.getShapePath(source), + targetPath = target && graphicsFactory.getShapePath(target), + connectionPath = graphicsFactory.getConnectionPath({ + waypoints: [start, end] + }); + start = source && (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getElementLineIntersection)(sourcePath, connectionPath, true) || start; + end = target && (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getElementLineIntersection)(targetPath, connectionPath, false) || end; + return [start, end]; +}; + +/** + * Remove connection preview container if it exists. + * + * @param {Object} [context] + * @param {SVGElement} [context.connectionPreviewGfx] preview container + */ +ConnectionPreview.prototype.cleanUp = function (context) { + if (context && context.connectionPreviewGfx) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.remove)(context.connectionPreviewGfx); + } +}; + +/** + * Get connection that connects source and target. + * + * @param {Object|boolean} canConnect + * + * @returns {djs.model.connection} + */ +ConnectionPreview.prototype.getConnection = function (canConnect) { + var attrs = ensureConnectionAttrs(canConnect); + return this._elementFactory.createConnection(attrs); +}; + +/** + * Add and return preview graphics. + * + * @returns {SVGElement} + */ +ConnectionPreview.prototype.createConnectionPreviewGfx = function () { + var gfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(gfx, { + pointerEvents: 'none' + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.classes)(gfx).add(MARKER_CONNECTION_PREVIEW); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.append)(this._canvas.getActiveLayer(), gfx); + return gfx; +}; + +/** + * Create and return simple connection. + * + * @param {Point} start + * @param {Point} end + * + * @returns {SVGElement} + */ +ConnectionPreview.prototype.createNoopConnection = function (start, end) { + var connection = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('polyline'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(connection, { + 'stroke': '#333', + 'strokeDasharray': [1], + 'strokeWidth': 2, + 'pointer-events': 'none' + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(connection, { + 'points': [start.x, start.y, end.x, end.y] + }); + return connection; +}; + +// helpers ////////// + +/** + * Returns function that returns cached return values referenced by stringified first argument. + * + * @param {Function} fn + * + * @return {Function} + */ +function cacheReturnValues(fn) { + var returnValues = {}; + + /** + * Return cached return value referenced by stringified first argument. + * + * @returns {*} + */ + return function (firstArgument) { + var key = JSON.stringify(firstArgument); + var returnValue = returnValues[key]; + if (!returnValue) { + returnValue = returnValues[key] = fn.apply(null, arguments); + } + return returnValue; + }; +} + +/** + * Ensure connection attributes is object. + * + * @param {Object|boolean} canConnect + * + * @returns {Object} + */ +function ensureConnectionAttrs(canConnect) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isObject)(canConnect)) { + return canConnect; + } else { + return {}; + } +} + +/***/ }), + +/***/ 54205: +/*!**************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/connection-preview/index.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _ConnectionPreview__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ConnectionPreview */ 44121); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['connectionPreview'], + connectionPreview: ['type', _ConnectionPreview__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 73355: +/*!************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/context-pad/ContextPad.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ContextPad) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ 73599); + + +var entrySelector = '.entry'; +var DEFAULT_PRIORITY = 1000; + +/** + * A context pad that displays element specific, contextual actions next + * to a diagram element. + * + * @param {Object} config + * @param {boolean|Object} [config.scale={ min: 1.0, max: 1.5 }] + * @param {number} [config.scale.min] + * @param {number} [config.scale.max] + * @param {EventBus} eventBus + * @param {Overlays} overlays + */ +function ContextPad(config, eventBus, overlays) { + this._eventBus = eventBus; + this._overlays = overlays; + var scale = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isDefined)(config && config.scale) ? config.scale : { + min: 1, + max: 1.5 + }; + this._overlaysConfig = { + position: { + right: -9, + top: -6 + }, + scale: scale + }; + this._current = null; + this._init(); +} +ContextPad.$inject = ['config.contextPad', 'eventBus', 'overlays']; + +/** + * Registers events needed for interaction with other components + */ +ContextPad.prototype._init = function () { + var eventBus = this._eventBus; + var self = this; + eventBus.on('selection.changed', function (e) { + var selection = e.newSelection; + if (selection.length === 1) { + self.open(selection[0]); + } else { + self.close(); + } + }); + eventBus.on('elements.delete', function (event) { + var elements = event.elements; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (e) { + if (self.isOpen(e)) { + self.close(); + } + }); + }); + eventBus.on('element.changed', function (event) { + var element = event.element, + current = self._current; + + // force reopen if element for which we are currently opened changed + if (current && current.element === element) { + self.open(element, true); + } + }); +}; + +/** + * Register a provider with the context pad + * + * @param {number} [priority=1000] + * @param {ContextPadProvider} provider + * + * @example + * const contextPadProvider = { + * getContextPadEntries: function(element) { + * return function(entries) { + * return { + * ...entries, + * 'entry-1': { + * label: 'My Entry', + * action: function() { alert("I have been clicked!"); } + * } + * }; + * } + * } + * }; + * + * contextPad.registerProvider(800, contextPadProvider); + */ +ContextPad.prototype.registerProvider = function (priority, provider) { + if (!provider) { + provider = priority; + priority = DEFAULT_PRIORITY; + } + this._eventBus.on('contextPad.getProviders', priority, function (event) { + event.providers.push(provider); + }); +}; + +/** + * Returns the context pad entries for a given element + * + * @param {djs.element.Base} element + * + * @return {Array} list of entries + */ +ContextPad.prototype.getEntries = function (element) { + var providers = this._getProviders(); + var entries = {}; + + // loop through all providers and their entries. + // group entries by id so that overriding an entry is possible + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(providers, function (provider) { + var entriesOrUpdater = provider.getContextPadEntries(element); + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(entriesOrUpdater)) { + entries = entriesOrUpdater(entries); + } else { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(entriesOrUpdater, function (entry, id) { + entries[id] = entry; + }); + } + }); + return entries; +}; + +/** + * Trigger an action available on the opened context pad + * + * @param {string} action + * @param {Event} event + * @param {boolean} [autoActivate=false] + */ +ContextPad.prototype.trigger = function (action, event, autoActivate) { + var element = this._current.element, + entries = this._current.entries, + entry, + handler, + originalEvent, + button = event.delegateTarget || event.target; + if (!button) { + return event.preventDefault(); + } + entry = entries[(0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(button, 'data-action')]; + handler = entry.action; + originalEvent = event.originalEvent || event; + + // simple action (via callback function) + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handler)) { + if (action === 'click') { + return handler(originalEvent, element, autoActivate); + } + } else { + if (handler[action]) { + return handler[action](originalEvent, element, autoActivate); + } + } + + // silence other actions + event.preventDefault(); +}; + +/** + * Open the context pad for the given element + * + * @param {djs.model.Base} element + * @param {boolean} force if true, force reopening the context pad + */ +ContextPad.prototype.open = function (element, force) { + if (!force && this.isOpen(element)) { + return; + } + this.close(); + this._updateAndOpen(element); +}; +ContextPad.prototype._getProviders = function () { + var event = this._eventBus.createEvent({ + type: 'contextPad.getProviders', + providers: [] + }); + this._eventBus.fire(event); + return event.providers; +}; +ContextPad.prototype._updateAndOpen = function (element) { + var entries = this.getEntries(element), + pad = this.getPad(element), + html = pad.html; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(entries, function (entry, id) { + var grouping = entry.group || 'default', + control = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)(entry.html || '
'), + container; + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(control, 'data-action', id); + container = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.query)('[data-group=' + grouping + ']', html); + if (!container) { + container = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('
'); + html.appendChild(container); + } + container.appendChild(control); + if (entry.className) { + addClasses(control, entry.className); + } + if (entry.title) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(control, 'title', entry.title); + } + if (entry.imageUrl) { + control.appendChild((0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('')); + } + }); + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.classes)(html).add('open'); + this._current = { + element: element, + pad: pad, + entries: entries + }; + this._eventBus.fire('contextPad.open', { + current: this._current + }); +}; +ContextPad.prototype.getPad = function (element) { + if (this.isOpen()) { + return this._current.pad; + } + var self = this; + var overlays = this._overlays; + var html = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('
'); + var overlaysConfig = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ + html: html + }, this._overlaysConfig); + min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(html, entrySelector, 'click', function (event) { + self.trigger('click', event); + }); + min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(html, entrySelector, 'dragstart', function (event) { + self.trigger('dragstart', event); + }); + + // stop propagation of mouse events + min_dom__WEBPACK_IMPORTED_MODULE_1__.event.bind(html, 'mousedown', function (event) { + event.stopPropagation(); + }); + this._overlayId = overlays.add(element, 'context-pad', overlaysConfig); + var pad = overlays.get(this._overlayId); + this._eventBus.fire('contextPad.create', { + element: element, + pad: pad + }); + return pad; +}; + +/** + * Close the context pad + */ +ContextPad.prototype.close = function () { + if (!this.isOpen()) { + return; + } + this._overlays.remove(this._overlayId); + this._overlayId = null; + this._eventBus.fire('contextPad.close', { + current: this._current + }); + this._current = null; +}; + +/** + * Check if pad is open. If element is given, will check + * if pad is opened with given element. + * + * @param {Element} element + * @return {boolean} + */ +ContextPad.prototype.isOpen = function (element) { + return !!this._current && (!element ? true : this._current.element === element); +}; + +// helpers ////////////////////// + +function addClasses(element, classNames) { + var classes = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.classes)(element); + var actualClassNames = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(classNames) ? classNames : classNames.split(/\s+/g); + actualClassNames.forEach(function (cls) { + classes.add(cls); + }); +} + +/***/ }), + +/***/ 93331: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/context-pad/index.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _interaction_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interaction-events */ 57250); +/* harmony import */ var _overlays__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../overlays */ 4541); +/* harmony import */ var _ContextPad__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ContextPad */ 73355); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_interaction_events__WEBPACK_IMPORTED_MODULE_0__["default"], _overlays__WEBPACK_IMPORTED_MODULE_1__["default"]], + contextPad: ['type', _ContextPad__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 97423: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/copy-paste/CopyPaste.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CopyPaste) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Elements */ 35723); + + + + +/** + * @typedef {Function} listener + * + * @param {Object} context + * @param {Array} context.elements + * + * @returns {Array|boolean} - Return elements to be copied or false to disallow + * copying. + */ + +/** + * @typedef {Function} listener + * + * @param {Object} context + * @param {Object} context.descriptor + * @param {djs.model.Base} context.element + * @param {Array} context.elements + */ + +/** + * @typedef {Function} listener + * + * @param {Object} context + * @param {Object} context.elements + * @param {Object} context.tree + */ + +/** + * @typedef {Function} listener + * + * @param {Object} context + * @param {Object} context.cache - Already created elements. + * @param {Object} context.descriptor + */ + +/** + * @typedef {Function} listener + * + * @param {Object} context + * @param {Object} context.hints - Add hints before pasting. + */ + +/** + * Copy and paste elements. + * + * @param {Canvas} canvas + * @param {Create} create + * @param {Clipboard} clipboard + * @param {ElementFactory} elementFactory + * @param {EventBus} eventBus + * @param {Modeling} modeling + * @param {Mouse} mouse + * @param {Rules} rules + */ +function CopyPaste(canvas, create, clipboard, elementFactory, eventBus, modeling, mouse, rules) { + this._canvas = canvas; + this._create = create; + this._clipboard = clipboard; + this._elementFactory = elementFactory; + this._eventBus = eventBus; + this._modeling = modeling; + this._mouse = mouse; + this._rules = rules; + eventBus.on('copyPaste.copyElement', function (context) { + var descriptor = context.descriptor, + element = context.element, + elements = context.elements; + + // default priority (priority = 1) + descriptor.priority = 1; + descriptor.id = element.id; + var parentCopied = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, function (e) { + return e === element.parent; + }); + + // do NOT reference parent if parent wasn't copied + if (parentCopied) { + descriptor.parent = element.parent.id; + } + + // attachers (priority = 2) + if (isAttacher(element)) { + descriptor.priority = 2; + descriptor.host = element.host.id; + } + + // connections (priority = 3) + if (isConnection(element)) { + descriptor.priority = 3; + descriptor.source = element.source.id; + descriptor.target = element.target.id; + descriptor.waypoints = copyWaypoints(element); + } + + // labels (priority = 4) + if (isLabel(element)) { + descriptor.priority = 4; + descriptor.labelTarget = element.labelTarget.id; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(['x', 'y', 'width', 'height'], function (property) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element[property])) { + descriptor[property] = element[property]; + } + }); + descriptor.hidden = element.hidden; + descriptor.collapsed = element.collapsed; + }); + eventBus.on('copyPaste.pasteElements', function (context) { + var hints = context.hints; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(hints, { + createElementsBehavior: false + }); + }); +} +CopyPaste.$inject = ['canvas', 'create', 'clipboard', 'elementFactory', 'eventBus', 'modeling', 'mouse', 'rules']; + +/** + * Copy elements. + * + * @param {Array} elements + * + * @returns {Object} + */ +CopyPaste.prototype.copy = function (elements) { + var allowed, tree; + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(elements)) { + elements = elements ? [elements] : []; + } + allowed = this._eventBus.fire('copyPaste.canCopyElements', { + elements: elements + }); + if (allowed === false) { + tree = {}; + } else { + tree = this.createTree((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(allowed) ? allowed : elements); + } + + // we set an empty tree, selection of elements + // to copy was empty. + this._clipboard.set(tree); + this._eventBus.fire('copyPaste.elementsCopied', { + elements: elements, + tree: tree + }); + return tree; +}; + +/** + * Paste elements. + * + * @param {Object} [context] + * @param {djs.model.base} [context.element] - Parent. + * @param {Point} [context.point] - Position. + * @param {Object} [context.hints] - Hints. + */ +CopyPaste.prototype.paste = function (context) { + var tree = this._clipboard.get(); + if (this._clipboard.isEmpty()) { + return; + } + var hints = context && context.hints || {}; + this._eventBus.fire('copyPaste.pasteElements', { + hints: hints + }); + var elements = this._createElements(tree); + + // paste directly + if (context && context.element && context.point) { + return this._paste(elements, context.element, context.point, hints); + } + this._create.start(this._mouse.getLastMoveEvent(), elements, { + hints: hints || {} + }); +}; + +/** + * Paste elements directly. + * + * @param {Array} elements + * @param {djs.model.base} target + * @param {Point} position + * @param {Object} [hints] + */ +CopyPaste.prototype._paste = function (elements, target, position, hints) { + // make sure each element has x and y + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element.x)) { + element.x = 0; + } + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element.y)) { + element.y = 0; + } + }); + var bbox = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_1__.getBBox)(elements); + + // center elements around cursor + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + if (isConnection(element)) { + element.waypoints = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(element.waypoints, function (waypoint) { + return { + x: waypoint.x - bbox.x - bbox.width / 2, + y: waypoint.y - bbox.y - bbox.height / 2 + }; + }); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(element, { + x: element.x - bbox.x - bbox.width / 2, + y: element.y - bbox.y - bbox.height / 2 + }); + }); + return this._modeling.createElements(elements, position, target, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, hints)); +}; + +/** + * Create elements from tree. + */ +CopyPaste.prototype._createElements = function (tree) { + var self = this; + var eventBus = this._eventBus; + var cache = {}; + var elements = []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(tree, function (branch, depth) { + depth = parseInt(depth, 10); + + // sort by priority + branch = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(branch, 'priority'); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(branch, function (descriptor) { + // remove priority + var attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(descriptor, ['priority'])); + if (cache[descriptor.parent]) { + attrs.parent = cache[descriptor.parent]; + } else { + delete attrs.parent; + } + eventBus.fire('copyPaste.pasteElement', { + cache: cache, + descriptor: attrs + }); + var element; + if (isConnection(attrs)) { + attrs.source = cache[descriptor.source]; + attrs.target = cache[descriptor.target]; + element = cache[descriptor.id] = self.createConnection(attrs); + elements.push(element); + return; + } + if (isLabel(attrs)) { + attrs.labelTarget = cache[attrs.labelTarget]; + element = cache[descriptor.id] = self.createLabel(attrs); + elements.push(element); + return; + } + if (attrs.host) { + attrs.host = cache[attrs.host]; + } + element = cache[descriptor.id] = self.createShape(attrs); + elements.push(element); + }); + }); + return elements; +}; +CopyPaste.prototype.createConnection = function (attrs) { + var connection = this._elementFactory.createConnection((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(attrs, ['id'])); + return connection; +}; +CopyPaste.prototype.createLabel = function (attrs) { + var label = this._elementFactory.createLabel((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(attrs, ['id'])); + return label; +}; +CopyPaste.prototype.createShape = function (attrs) { + var shape = this._elementFactory.createShape((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(attrs, ['id'])); + return shape; +}; + +/** + * Check wether element has relations to other elements e.g. attachers, labels and connections. + * + * @param {Object} element + * @param {Array} elements + * + * @returns {boolean} + */ +CopyPaste.prototype.hasRelations = function (element, elements) { + var labelTarget, source, target; + if (isConnection(element)) { + source = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.matchPattern)({ + id: element.source.id + })); + target = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.matchPattern)({ + id: element.target.id + })); + if (!source || !target) { + return false; + } + } + if (isLabel(element)) { + labelTarget = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.matchPattern)({ + id: element.labelTarget.id + })); + if (!labelTarget) { + return false; + } + } + return true; +}; + +/** + * Create a tree-like structure from elements. + * + * @example + * tree: { + * 0: [ + * { id: 'Shape_1', priority: 1, ... }, + * { id: 'Shape_2', priority: 1, ... }, + * { id: 'Connection_1', source: 'Shape_1', target: 'Shape_2', priority: 3, ... }, + * ... + * ], + * 1: [ + * { id: 'Shape_3', parent: 'Shape1', priority: 1, ... }, + * ... + * ] + * }; + * + * @param {Array} elements + * + * @return {Object} + */ +CopyPaste.prototype.createTree = function (elements) { + var rules = this._rules, + self = this; + var tree = {}, + elementsData = []; + var parents = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_1__.getParents)(elements); + function canCopy(element, elements) { + return rules.allowed('element.copy', { + element: element, + elements: elements + }); + } + function addElementData(element, depth) { + // (1) check wether element has already been added + var foundElementData = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elementsData, function (elementsData) { + return element === elementsData.element; + }); + + // (2) add element if not already added + if (!foundElementData) { + elementsData.push({ + element: element, + depth: depth + }); + return; + } + + // (3) update depth + if (foundElementData.depth < depth) { + elementsData = removeElementData(foundElementData, elementsData); + elementsData.push({ + element: foundElementData.element, + depth: depth + }); + } + } + function removeElementData(elementData, elementsData) { + var index = elementsData.indexOf(elementData); + if (index !== -1) { + elementsData.splice(index, 1); + } + return elementsData; + } + + // (1) add elements + (0,_util_Elements__WEBPACK_IMPORTED_MODULE_1__.eachElement)(parents, function (element, _index, depth) { + // do NOT add external labels directly + if (isLabel(element)) { + return; + } + + // always copy external labels + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(element.labels, function (label) { + addElementData(label, depth); + }); + function addRelatedElements(elements) { + elements && elements.length && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + // add external labels + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(element.labels, function (label) { + addElementData(label, depth); + }); + addElementData(element, depth); + }); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)([element.attachers, element.incoming, element.outgoing], addRelatedElements); + addElementData(element, depth); + return element.children; + }); + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(elementsData, function (elementData) { + return elementData.element; + }); + + // (2) copy elements + elementsData = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(elementsData, function (elementData) { + elementData.descriptor = {}; + self._eventBus.fire('copyPaste.copyElement', { + descriptor: elementData.descriptor, + element: elementData.element, + elements: elements + }); + return elementData; + }); + + // (3) sort elements by priority + elementsData = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(elementsData, function (elementData) { + return elementData.descriptor.priority; + }); + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(elementsData, function (elementData) { + return elementData.element; + }); + + // (4) create tree + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elementsData, function (elementData) { + var depth = elementData.depth; + if (!self.hasRelations(elementData.element, elements)) { + removeElement(elementData.element, elements); + return; + } + if (!canCopy(elementData.element, elements)) { + removeElement(elementData.element, elements); + return; + } + if (!tree[depth]) { + tree[depth] = []; + } + tree[depth].push(elementData.descriptor); + }); + return tree; +}; + +// helpers ////////// + +function isAttacher(element) { + return !!element.host; +} +function isConnection(element) { + return !!element.waypoints; +} +function isLabel(element) { + return !!element.labelTarget; +} +function copyWaypoints(element) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(element.waypoints, function (waypoint) { + waypoint = copyWaypoint(waypoint); + if (waypoint.original) { + waypoint.original = copyWaypoint(waypoint.original); + } + return waypoint; + }); +} +function copyWaypoint(waypoint) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, waypoint); +} +function removeElement(element, elements) { + var index = elements.indexOf(element); + if (index === -1) { + return elements; + } + return elements.splice(index, 1); +} + +/***/ }), + +/***/ 54307: +/*!******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/copy-paste/index.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _clipboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clipboard */ 56142); +/* harmony import */ var _create__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../create */ 48256); +/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../mouse */ 26947); +/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rules */ 8807); +/* harmony import */ var _CopyPaste__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CopyPaste */ 97423); + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_clipboard__WEBPACK_IMPORTED_MODULE_0__["default"], _create__WEBPACK_IMPORTED_MODULE_1__["default"], _mouse__WEBPACK_IMPORTED_MODULE_2__["default"], _rules__WEBPACK_IMPORTED_MODULE_3__["default"]], + __init__: ['copyPaste'], + copyPaste: ['type', _CopyPaste__WEBPACK_IMPORTED_MODULE_4__["default"]] +}); + +/***/ }), + +/***/ 90070: +/*!***************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/create/Create.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Create) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Elements */ 35723); +var MARKER_OK = 'drop-ok', + MARKER_NOT_OK = 'drop-not-ok', + MARKER_ATTACH = 'attach-ok', + MARKER_NEW_PARENT = 'new-parent'; + + +var PREFIX = 'create'; +var HIGH_PRIORITY = 2000; + +/** + * Create new elements through drag and drop. + * + * @param {Canvas} canvas + * @param {Dragging} dragging + * @param {EventBus} eventBus + * @param {Modeling} modeling + * @param {Rules} rules + */ +function Create(canvas, dragging, eventBus, modeling, rules) { + // rules ////////// + + /** + * Check wether elements can be created. + * + * @param {Array} elements + * @param {djs.model.Base} target + * @param {Point} position + * @param {djs.model.Base} [source] + * + * @returns {boolean|null|Object} + */ + function canCreate(elements, target, position, source, hints) { + if (!target) { + return false; + } + + // ignore child elements and external labels + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function (element) { + var labelTarget = element.labelTarget; + return !element.parent && !(isLabel(element) && elements.indexOf(labelTarget) !== -1); + }); + var shape = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, function (element) { + return !isConnection(element); + }); + var attach = false, + connect = false, + create = false; + + // (1) attaching single shapes + if (isSingleShape(elements)) { + attach = rules.allowed('shape.attach', { + position: position, + shape: shape, + target: target + }); + } + if (!attach) { + // (2) creating elements + if (isSingleShape(elements)) { + create = rules.allowed('shape.create', { + position: position, + shape: shape, + source: source, + target: target + }); + } else { + create = rules.allowed('elements.create', { + elements: elements, + position: position, + target: target + }); + } + } + var connectionTarget = hints.connectionTarget; + + // (3) appending single shapes + if (create || attach) { + if (shape && source) { + connect = rules.allowed('connection.create', { + source: connectionTarget === source ? shape : source, + target: connectionTarget === source ? source : shape, + hints: { + targetParent: target, + targetAttach: attach + } + }); + } + return { + attach: attach, + connect: connect + }; + } + + // ignore wether or not elements can be created + if (create === null || attach === null) { + return null; + } + return false; + } + function setMarker(element, marker) { + [MARKER_ATTACH, MARKER_OK, MARKER_NOT_OK, MARKER_NEW_PARENT].forEach(function (m) { + if (m === marker) { + canvas.addMarker(element, m); + } else { + canvas.removeMarker(element, m); + } + }); + } + + // event handling ////////// + + eventBus.on(['create.move', 'create.hover'], function (event) { + var context = event.context, + elements = context.elements, + hover = event.hover, + source = context.source, + hints = context.hints || {}; + if (!hover) { + context.canExecute = false; + context.target = null; + return; + } + ensureConstraints(event); + var position = { + x: event.x, + y: event.y + }; + var canExecute = context.canExecute = hover && canCreate(elements, hover, position, source, hints); + if (hover && canExecute !== null) { + context.target = hover; + if (canExecute && canExecute.attach) { + setMarker(hover, MARKER_ATTACH); + } else { + setMarker(hover, canExecute ? MARKER_NEW_PARENT : MARKER_NOT_OK); + } + } + }); + eventBus.on(['create.end', 'create.out', 'create.cleanup'], function (event) { + var hover = event.hover; + if (hover) { + setMarker(hover, null); + } + }); + eventBus.on('create.end', function (event) { + var context = event.context, + source = context.source, + shape = context.shape, + elements = context.elements, + target = context.target, + canExecute = context.canExecute, + attach = canExecute && canExecute.attach, + connect = canExecute && canExecute.connect, + hints = context.hints || {}; + if (canExecute === false || !target) { + return false; + } + ensureConstraints(event); + var position = { + x: event.x, + y: event.y + }; + if (connect) { + shape = modeling.appendShape(source, shape, position, target, { + attach: attach, + connection: connect === true ? {} : connect, + connectionTarget: hints.connectionTarget + }); + } else { + elements = modeling.createElements(elements, position, target, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, hints, { + attach: attach + })); + + // update shape + shape = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, function (element) { + return !isConnection(element); + }); + } + + // update elements and shape + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(context, { + elements: elements, + shape: shape + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(event, { + elements: elements, + shape: shape + }); + }); + function cancel() { + var context = dragging.context(); + if (context && context.prefix === PREFIX) { + dragging.cancel(); + } + } + + // cancel on that is not result of + eventBus.on('create.init', function () { + eventBus.on('elements.changed', cancel); + eventBus.once(['create.cancel', 'create.end'], HIGH_PRIORITY, function () { + eventBus.off('elements.changed', cancel); + }); + }); + + // API ////////// + + this.start = function (event, elements, context) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(elements)) { + elements = [elements]; + } + var shape = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, function (element) { + return !isConnection(element); + }); + if (!shape) { + // at least one shape is required + return; + } + context = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ + elements: elements, + hints: {}, + shape: shape + }, context || {}); + + // make sure each element has x and y + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element.x)) { + element.x = 0; + } + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element.y)) { + element.y = 0; + } + }); + var bbox = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_1__.getBBox)(elements); + + // center elements around cursor + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + if (isConnection(element)) { + element.waypoints = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(element.waypoints, function (waypoint) { + return { + x: waypoint.x - bbox.x - bbox.width / 2, + y: waypoint.y - bbox.y - bbox.height / 2 + }; + }); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(element, { + x: element.x - bbox.x - bbox.width / 2, + y: element.y - bbox.y - bbox.height / 2 + }); + }); + dragging.init(event, PREFIX, { + cursor: 'grabbing', + autoActivate: true, + data: { + shape: shape, + elements: elements, + context: context + } + }); + }; +} +Create.$inject = ['canvas', 'dragging', 'eventBus', 'modeling', 'rules']; + +// helpers ////////// + +function ensureConstraints(event) { + var context = event.context, + createConstraints = context.createConstraints; + if (!createConstraints) { + return; + } + if (createConstraints.left) { + event.x = Math.max(event.x, createConstraints.left); + } + if (createConstraints.right) { + event.x = Math.min(event.x, createConstraints.right); + } + if (createConstraints.top) { + event.y = Math.max(event.y, createConstraints.top); + } + if (createConstraints.bottom) { + event.y = Math.min(event.y, createConstraints.bottom); + } +} +function isConnection(element) { + return !!element.waypoints; +} +function isSingleShape(elements) { + return elements && elements.length === 1 && !isConnection(elements[0]); +} +function isLabel(element) { + return !!element.labelTarget; +} + +/***/ }), + +/***/ 23820: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/create/CreatePreview.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CreatePreview) +/* harmony export */ }); +/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ 81384); +/* harmony import */ var _util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/GraphicsUtil */ 35451); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ 57491); + + + +var LOW_PRIORITY = 750; +function CreatePreview(canvas, eventBus, graphicsFactory, previewSupport, styles) { + function createDragGroup(elements) { + var dragGroup = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(dragGroup, styles.cls('djs-drag-group', ['no-events'])); + var childrenGfx = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('g'); + elements.forEach(function (element) { + // create graphics + var gfx; + if (element.hidden) { + return; + } + if (element.waypoints) { + gfx = graphicsFactory._createContainer('connection', childrenGfx); + graphicsFactory.drawConnection((0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_1__.getVisual)(gfx), element); + } else { + gfx = graphicsFactory._createContainer('shape', childrenGfx); + graphicsFactory.drawShape((0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_1__.getVisual)(gfx), element); + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__.translate)(gfx, element.x, element.y); + } + + // add preview + previewSupport.addDragger(element, dragGroup, gfx); + }); + return dragGroup; + } + eventBus.on('create.move', LOW_PRIORITY, function (event) { + var hover = event.hover, + context = event.context, + elements = context.elements, + dragGroup = context.dragGroup; + + // lazily create previews + if (!dragGroup) { + dragGroup = context.dragGroup = createDragGroup(elements); + } + var activeLayer; + if (hover) { + if (!dragGroup.parentNode) { + activeLayer = canvas.getActiveLayer(); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.append)(activeLayer, dragGroup); + } + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__.translate)(dragGroup, event.x, event.y); + } else { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.remove)(dragGroup); + } + }); + eventBus.on('create.cleanup', function (event) { + var context = event.context, + dragGroup = context.dragGroup; + if (dragGroup) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.remove)(dragGroup); + } + }); +} +CreatePreview.$inject = ['canvas', 'eventBus', 'graphicsFactory', 'previewSupport', 'styles']; + +/***/ }), + +/***/ 48256: +/*!**************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/create/index.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dragging */ 11917); +/* harmony import */ var _preview_support__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../preview-support */ 86726); +/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../rules */ 8807); +/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../selection */ 26334); +/* harmony import */ var _Create__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Create */ 90070); +/* harmony import */ var _CreatePreview__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CreatePreview */ 23820); + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_dragging__WEBPACK_IMPORTED_MODULE_0__["default"], _preview_support__WEBPACK_IMPORTED_MODULE_1__["default"], _rules__WEBPACK_IMPORTED_MODULE_2__["default"], _selection__WEBPACK_IMPORTED_MODULE_3__["default"]], + __init__: ['create', 'createPreview'], + create: ['type', _Create__WEBPACK_IMPORTED_MODULE_4__["default"]], + createPreview: ['type', _CreatePreview__WEBPACK_IMPORTED_MODULE_5__["default"]] +}); + +/***/ }), + +/***/ 52557: +/*!****************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/distribute-elements/DistributeElements.js ***! + \****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DistributeElements) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +var AXIS_DIMENSIONS = { + horizontal: ['x', 'width'], + vertical: ['y', 'height'] +}; +var THRESHOLD = 5; + +/** + * Groups and filters elements and then trigger even distribution. + */ +function DistributeElements(modeling) { + this._modeling = modeling; + this._filters = []; + + // register filter for filtering big elements + this.registerFilter(function (elements, axis, dimension) { + var elementsSize = 0, + numOfShapes = 0, + avgDimension; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + if (element.waypoints || element.labelTarget) { + return; + } + elementsSize += element[dimension]; + numOfShapes += 1; + }); + avgDimension = Math.round(elementsSize / numOfShapes); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function (element) { + return element[dimension] < avgDimension + 50; + }); + }); +} +DistributeElements.$inject = ['modeling']; + +/** + * Registers filter functions that allow external parties to filter + * out certain elements. + * + * @param {Function} filterFn + */ +DistributeElements.prototype.registerFilter = function (filterFn) { + if (typeof filterFn !== 'function') { + throw new Error('the filter has to be a function'); + } + this._filters.push(filterFn); +}; + +/** + * Distributes the elements with a given orientation + * + * @param {Array} elements + * @param {string} orientation + */ +DistributeElements.prototype.trigger = function (elements, orientation) { + var modeling = this._modeling; + var groups, distributableElements; + if (elements.length < 3) { + return; + } + this._setOrientation(orientation); + distributableElements = this._filterElements(elements); + groups = this._createGroups(distributableElements); + + // nothing to distribute + if (groups.length <= 2) { + return; + } + modeling.distributeElements(groups, this._axis, this._dimension); + return groups; +}; + +/** + * Filters the elements with provided filters by external parties + * + * @param {Array[Elements]} elements + * + * @return {Array[Elements]} + */ +DistributeElements.prototype._filterElements = function (elements) { + var filters = this._filters, + axis = this._axis, + dimension = this._dimension, + distributableElements = [].concat(elements); + if (!filters.length) { + return elements; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(filters, function (filterFn) { + distributableElements = filterFn(distributableElements, axis, dimension); + }); + return distributableElements; +}; + +/** + * Create range (min, max) groups. Also tries to group elements + * together that share the same range. + * + * @example + * var distributableElements = [ + * { + * range: { + * min: 100, + * max: 200 + * }, + * elements: [ { id: 'shape1', .. }] + * } + * ] + * + * @param {Array} elements + * + * @return {Array[Objects]} + */ +DistributeElements.prototype._createGroups = function (elements) { + var rangeGroups = [], + self = this, + axis = this._axis, + dimension = this._dimension; + if (!axis) { + throw new Error('must have a defined "axis" and "dimension"'); + } + + // sort by 'left->right' or 'top->bottom' + var sortedElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(elements, axis); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(sortedElements, function (element, idx) { + var elementRange = self._findRange(element, axis, dimension), + range; + var previous = rangeGroups[rangeGroups.length - 1]; + if (previous && self._hasIntersection(previous.range, elementRange)) { + rangeGroups[rangeGroups.length - 1].elements.push(element); + } else { + range = { + range: elementRange, + elements: [element] + }; + rangeGroups.push(range); + } + }); + return rangeGroups; +}; + +/** + * Maps a direction to the according axis and dimension + * + * @param {string} direction 'horizontal' or 'vertical' + */ +DistributeElements.prototype._setOrientation = function (direction) { + var orientation = AXIS_DIMENSIONS[direction]; + this._axis = orientation[0]; + this._dimension = orientation[1]; +}; + +/** + * Checks if the two ranges intercept each other + * + * @param {Object} rangeA {min, max} + * @param {Object} rangeB {min, max} + * + * @return {boolean} + */ +DistributeElements.prototype._hasIntersection = function (rangeA, rangeB) { + return Math.max(rangeA.min, rangeA.max) >= Math.min(rangeB.min, rangeB.max) && Math.min(rangeA.min, rangeA.max) <= Math.max(rangeB.min, rangeB.max); +}; + +/** + * Returns the min and max values for an element + * + * @param {Bounds} element + * @param {string} axis + * @param {string} dimension + * + * @return {{ min: number, max: number }} + */ +DistributeElements.prototype._findRange = function (element) { + var axis = element[this._axis], + dimension = element[this._dimension]; + return { + min: axis + THRESHOLD, + max: axis + dimension - THRESHOLD + }; +}; + +/***/ }), + +/***/ 10635: +/*!***************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/distribute-elements/index.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _DistributeElements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DistributeElements */ 52557); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['distributeElements'], + distributeElements: ['type', _DistributeElements__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 45896: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/dragging/Dragging.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Dragging) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Event */ 74716); +/* harmony import */ var _util_Cursor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/Cursor */ 89388); +/* harmony import */ var _util_ClickTrap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/ClickTrap */ 58767); +/* harmony import */ var _util_PositionUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/PositionUtil */ 28929); +var round = Math.round; + + + + + + +var DRAG_ACTIVE_CLS = 'djs-drag-active'; +function preventDefault(event) { + event.preventDefault(); +} +function isTouchEvent(event) { + // check for TouchEvent being available first + // (i.e. not available on desktop Firefox) + return typeof TouchEvent !== 'undefined' && event instanceof TouchEvent; +} +function getLength(point) { + return Math.sqrt(Math.pow(point.x, 2) + Math.pow(point.y, 2)); +} + +/** + * A helper that fires canvas localized drag events and realizes + * the general "drag-and-drop" look and feel. + * + * Calling {@link Dragging#activate} activates dragging on a canvas. + * + * It provides the following: + * + * * emits life cycle events, namespaced with a prefix assigned + * during dragging activation + * * sets and restores the cursor + * * sets and restores the selection if elements still exist + * * ensures there can be only one drag operation active at a time + * + * Dragging may be canceled manually by calling {@link Dragging#cancel} + * or by pressing ESC. + * + * + * ## Life-cycle events + * + * Dragging can be in three different states, off, initialized + * and active. + * + * (1) off: no dragging operation is in progress + * (2) initialized: a new drag operation got initialized but not yet + * started (i.e. because of no initial move) + * (3) started: dragging is in progress + * + * Eventually dragging will be off again after a drag operation has + * been ended or canceled via user click or ESC key press. + * + * To indicate transitions between these states dragging emits generic + * life-cycle events with the `drag.` prefix _and_ events namespaced + * to a prefix choosen by a user during drag initialization. + * + * The following events are emitted (appropriately prefixed) via + * the {@link EventBus}. + * + * * `init` + * * `start` + * * `move` + * * `end` + * * `ended` (dragging already in off state) + * * `cancel` (only if previously started) + * * `canceled` (dragging already in off state, only if previously started) + * * `cleanup` + * + * + * @example + * + * function MyDragComponent(eventBus, dragging) { + * + * eventBus.on('mydrag.start', function(event) { + * console.log('yes, we start dragging'); + * }); + * + * eventBus.on('mydrag.move', function(event) { + * console.log('canvas local coordinates', event.x, event.y, event.dx, event.dy); + * + * // local drag data is passed with the event + * event.context.foo; // "BAR" + * + * // the original mouse event, too + * event.originalEvent; // MouseEvent(...) + * }); + * + * eventBus.on('element.click', function(event) { + * dragging.init(event, 'mydrag', { + * cursor: 'grabbing', + * data: { + * context: { + * foo: "BAR" + * } + * } + * }); + * }); + * } + */ +function Dragging(eventBus, canvas, selection, elementRegistry) { + var defaultOptions = { + threshold: 5, + trapClick: true + }; + + // the currently active drag operation + // dragging is active as soon as this context exists. + // + // it is visually _active_ only when a context.active flag is set to true. + var context; + + /* convert a global event into local coordinates */ + function toLocalPoint(globalPosition) { + var viewbox = canvas.viewbox(); + var clientRect = canvas._container.getBoundingClientRect(); + return { + x: viewbox.x + (globalPosition.x - clientRect.left) / viewbox.scale, + y: viewbox.y + (globalPosition.y - clientRect.top) / viewbox.scale + }; + } + + // helpers + + function fire(type, dragContext) { + dragContext = dragContext || context; + var event = eventBus.createEvent((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, dragContext.payload, dragContext.data, { + isTouch: dragContext.isTouch + })); + + // default integration + if (eventBus.fire('drag.' + type, event) === false) { + return false; + } + return eventBus.fire(dragContext.prefix + '.' + type, event); + } + function restoreSelection(previousSelection) { + var existingSelection = previousSelection.filter(function (element) { + return elementRegistry.get(element.id); + }); + existingSelection.length && selection.select(existingSelection); + } + + // event listeners + + function move(event, activate) { + var payload = context.payload, + displacement = context.displacement; + var globalStart = context.globalStart, + globalCurrent = (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.toPoint)(event), + globalDelta = (0,_util_PositionUtil__WEBPACK_IMPORTED_MODULE_2__.delta)(globalCurrent, globalStart); + var localStart = context.localStart, + localCurrent = toLocalPoint(globalCurrent), + localDelta = (0,_util_PositionUtil__WEBPACK_IMPORTED_MODULE_2__.delta)(localCurrent, localStart); + + // activate context explicitly or once threshold is reached + if (!context.active && (activate || getLength(globalDelta) > context.threshold)) { + // fire start event with original + // starting coordinates + + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(payload, { + x: round(localStart.x + displacement.x), + y: round(localStart.y + displacement.y), + dx: 0, + dy: 0 + }, { + originalEvent: event + }); + if (false === fire('start')) { + return cancel(); + } + context.active = true; + + // unset selection and remember old selection + // the previous (old) selection will always passed + // with the event via the event.previousSelection property + if (!context.keepSelection) { + payload.previousSelection = selection.get(); + selection.select(null); + } + + // allow custom cursor + if (context.cursor) { + (0,_util_Cursor__WEBPACK_IMPORTED_MODULE_3__.set)(context.cursor); + } + + // indicate dragging via marker on root element + canvas.addMarker(canvas.getRootElement(), DRAG_ACTIVE_CLS); + } + (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.stopPropagation)(event); + if (context.active) { + // update payload with actual coordinates + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(payload, { + x: round(localCurrent.x + displacement.x), + y: round(localCurrent.y + displacement.y), + dx: round(localDelta.x), + dy: round(localDelta.y) + }, { + originalEvent: event + }); + + // emit move event + fire('move'); + } + } + function end(event) { + var previousContext, + returnValue = true; + if (context.active) { + if (event) { + context.payload.originalEvent = event; + + // suppress original event (click, ...) + // because we just ended a drag operation + (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.stopPropagation)(event); + } + + // implementations may stop restoring the + // original state (selections, ...) by preventing the + // end events default action + returnValue = fire('end'); + } + if (returnValue === false) { + fire('rejected'); + } + previousContext = cleanup(returnValue !== true); + + // last event to be fired when all drag operations are done + // at this point in time no drag operation is in progress anymore + fire('ended', previousContext); + } + + // cancel active drag operation if the user presses + // the ESC key on the keyboard + + function checkCancel(event) { + if (event.which === 27) { + preventDefault(event); + cancel(); + } + } + + // prevent ghost click that might occur after a finished + // drag and drop session + + function trapClickAndEnd(event) { + var untrap; + + // trap the click in case we are part of an active + // drag operation. This will effectively prevent + // the ghost click that cannot be canceled otherwise. + if (context.active) { + untrap = (0,_util_ClickTrap__WEBPACK_IMPORTED_MODULE_4__.install)(eventBus); + + // remove trap after minimal delay + setTimeout(untrap, 400); + + // prevent default action (click) + preventDefault(event); + } + end(event); + } + function trapTouch(event) { + move(event); + } + + // update the drag events hover (djs.model.Base) and hoverGfx (Snap) + // properties during hover and out and fire {prefix}.hover and {prefix}.out properties + // respectively + + function hover(event) { + var payload = context.payload; + payload.hoverGfx = event.gfx; + payload.hover = event.element; + fire('hover'); + } + function out(event) { + fire('out'); + var payload = context.payload; + payload.hoverGfx = null; + payload.hover = null; + } + + // life-cycle methods + + function cancel(restore) { + var previousContext; + if (!context) { + return; + } + var wasActive = context.active; + if (wasActive) { + fire('cancel'); + } + previousContext = cleanup(restore); + if (wasActive) { + // last event to be fired when all drag operations are done + // at this point in time no drag operation is in progress anymore + fire('canceled', previousContext); + } + } + function cleanup(restore) { + var previousContext, endDrag; + fire('cleanup'); + + // reset cursor + (0,_util_Cursor__WEBPACK_IMPORTED_MODULE_3__.unset)(); + if (context.trapClick) { + endDrag = trapClickAndEnd; + } else { + endDrag = end; + } + + // reset dom listeners + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.unbind(document, 'mousemove', move); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.unbind(document, 'dragstart', preventDefault); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.unbind(document, 'selectstart', preventDefault); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.unbind(document, 'mousedown', endDrag, true); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.unbind(document, 'mouseup', endDrag, true); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.unbind(document, 'keyup', checkCancel); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.unbind(document, 'touchstart', trapTouch, true); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.unbind(document, 'touchcancel', cancel, true); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.unbind(document, 'touchmove', move, true); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.unbind(document, 'touchend', end, true); + eventBus.off('element.hover', hover); + eventBus.off('element.out', out); + + // remove drag marker on root element + canvas.removeMarker(canvas.getRootElement(), DRAG_ACTIVE_CLS); + + // restore selection, unless it has changed + var previousSelection = context.payload.previousSelection; + if (restore !== false && previousSelection && !selection.get().length) { + restoreSelection(previousSelection); + } + previousContext = context; + context = null; + return previousContext; + } + + /** + * Initialize a drag operation. + * + * If `localPosition` is given, drag events will be emitted + * relative to it. + * + * @param {MouseEvent|TouchEvent} [event] + * @param {Point} [localPosition] actual diagram local position this drag operation should start at + * @param {string} prefix + * @param {Object} [options] + */ + function init(event, relativeTo, prefix, options) { + // only one drag operation may be active, at a time + if (context) { + cancel(false); + } + if (typeof relativeTo === 'string') { + options = prefix; + prefix = relativeTo; + relativeTo = null; + } + options = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, defaultOptions, options || {}); + var data = options.data || {}, + originalEvent, + globalStart, + localStart, + endDrag, + isTouch; + if (options.trapClick) { + endDrag = trapClickAndEnd; + } else { + endDrag = end; + } + if (event) { + originalEvent = (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.getOriginal)(event) || event; + globalStart = (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.toPoint)(event); + (0,_util_Event__WEBPACK_IMPORTED_MODULE_1__.stopPropagation)(event); + + // prevent default browser dragging behavior + if (originalEvent.type === 'dragstart') { + preventDefault(originalEvent); + } + } else { + originalEvent = null; + globalStart = { + x: 0, + y: 0 + }; + } + localStart = toLocalPoint(globalStart); + if (!relativeTo) { + relativeTo = localStart; + } + isTouch = isTouchEvent(originalEvent); + context = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ + prefix: prefix, + data: data, + payload: {}, + globalStart: globalStart, + displacement: (0,_util_PositionUtil__WEBPACK_IMPORTED_MODULE_2__.delta)(relativeTo, localStart), + localStart: localStart, + isTouch: isTouch + }, options); + + // skip dom registration if trigger + // is set to manual (during testing) + if (!options.manual) { + // add dom listeners + + if (isTouch) { + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(document, 'touchstart', trapTouch, true); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(document, 'touchcancel', cancel, true); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(document, 'touchmove', move, true); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(document, 'touchend', end, true); + } else { + // assume we use the mouse to interact per default + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(document, 'mousemove', move); + + // prevent default browser drag and text selection behavior + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(document, 'dragstart', preventDefault); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(document, 'selectstart', preventDefault); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(document, 'mousedown', endDrag, true); + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(document, 'mouseup', endDrag, true); + } + min_dom__WEBPACK_IMPORTED_MODULE_5__.event.bind(document, 'keyup', checkCancel); + eventBus.on('element.hover', hover); + eventBus.on('element.out', out); + } + fire('init'); + if (options.autoActivate) { + move(event, true); + } + } + + // cancel on diagram destruction + eventBus.on('diagram.destroy', cancel); + + // API + + this.init = init; + this.move = move; + this.hover = hover; + this.out = out; + this.end = end; + this.cancel = cancel; + + // for introspection + + this.context = function () { + return context; + }; + this.setOptions = function (options) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(defaultOptions, options); + }; +} +Dragging.$inject = ['eventBus', 'canvas', 'selection', 'elementRegistry']; + +/***/ }), + +/***/ 11917: +/*!****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/dragging/index.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _hover_fix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../hover-fix */ 9060); +/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selection */ 26334); +/* harmony import */ var _Dragging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Dragging */ 45896); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_hover_fix__WEBPACK_IMPORTED_MODULE_0__["default"], _selection__WEBPACK_IMPORTED_MODULE_1__["default"]], + dragging: ['type', _Dragging__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 56891: +/*!******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/editor-actions/EditorActions.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ EditorActions) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +var NOT_REGISTERED_ERROR = 'is not a registered action', + IS_REGISTERED_ERROR = 'is already registered'; + +/** + * An interface that provides access to modeling actions by decoupling + * the one who requests the action to be triggered and the trigger itself. + * + * It's possible to add new actions by registering them with ´registerAction´ + * and likewise unregister existing ones with ´unregisterAction´. + * + * + * ## Life-Cycle and configuration + * + * The editor actions will wait for diagram initialization before + * registering default actions _and_ firing an `editorActions.init` event. + * + * Interested parties may listen to the `editorActions.init` event with + * low priority to check, which actions got registered. Other components + * may use the event to register their own actions via `registerAction`. + * + * @param {EventBus} eventBus + * @param {Injector} injector + */ +function EditorActions(eventBus, injector) { + // initialize actions + this._actions = {}; + var self = this; + eventBus.on('diagram.init', function () { + // all diagram modules got loaded; check which ones + // are available and register the respective default actions + self._registerDefaultActions(injector); + + // ask interested parties to register available editor + // actions on diagram initialization + eventBus.fire('editorActions.init', { + editorActions: self + }); + }); +} +EditorActions.$inject = ['eventBus', 'injector']; + +/** + * Register default actions. + * + * @param {Injector} injector + */ +EditorActions.prototype._registerDefaultActions = function (injector) { + // (1) retrieve optional components to integrate with + + var commandStack = injector.get('commandStack', false); + var modeling = injector.get('modeling', false); + var selection = injector.get('selection', false); + var zoomScroll = injector.get('zoomScroll', false); + var copyPaste = injector.get('copyPaste', false); + var canvas = injector.get('canvas', false); + var rules = injector.get('rules', false); + var keyboardMove = injector.get('keyboardMove', false); + var keyboardMoveSelection = injector.get('keyboardMoveSelection', false); + + // (2) check components and register actions + + if (commandStack) { + this.register('undo', function () { + commandStack.undo(); + }); + this.register('redo', function () { + commandStack.redo(); + }); + } + if (copyPaste && selection) { + this.register('copy', function () { + var selectedElements = selection.get(); + copyPaste.copy(selectedElements); + }); + } + if (copyPaste) { + this.register('paste', function () { + copyPaste.paste(); + }); + } + if (zoomScroll) { + this.register('stepZoom', function (opts) { + zoomScroll.stepZoom(opts.value); + }); + } + if (canvas) { + this.register('zoom', function (opts) { + canvas.zoom(opts.value); + }); + } + if (modeling && selection && rules) { + this.register('removeSelection', function () { + var selectedElements = selection.get(); + if (!selectedElements.length) { + return; + } + var allowed = rules.allowed('elements.delete', { + elements: selectedElements + }), + removableElements; + if (allowed === false) { + return; + } else if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(allowed)) { + removableElements = allowed; + } else { + removableElements = selectedElements; + } + if (removableElements.length) { + modeling.removeElements(removableElements.slice()); + } + }); + } + if (keyboardMove) { + this.register('moveCanvas', function (opts) { + keyboardMove.moveCanvas(opts); + }); + } + if (keyboardMoveSelection) { + this.register('moveSelection', function (opts) { + keyboardMoveSelection.moveSelection(opts.direction, opts.accelerated); + }); + } +}; + +/** + * Triggers a registered action + * + * @param {string} action + * @param {Object} opts + * + * @return {Unknown} Returns what the registered listener returns + */ +EditorActions.prototype.trigger = function (action, opts) { + if (!this._actions[action]) { + throw error(action, NOT_REGISTERED_ERROR); + } + return this._actions[action](opts); +}; + +/** + * Registers a collections of actions. + * The key of the object will be the name of the action. + * + * @example + * ´´´ + * var actions = { + * spaceTool: function() { + * spaceTool.activateSelection(); + * }, + * lassoTool: function() { + * lassoTool.activateSelection(); + * } + * ]; + * + * editorActions.register(actions); + * + * editorActions.isRegistered('spaceTool'); // true + * ´´´ + * + * @param {Object} actions + */ +EditorActions.prototype.register = function (actions, listener) { + var self = this; + if (typeof actions === 'string') { + return this._registerAction(actions, listener); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(actions, function (listener, action) { + self._registerAction(action, listener); + }); +}; + +/** + * Registers a listener to an action key + * + * @param {string} action + * @param {Function} listener + */ +EditorActions.prototype._registerAction = function (action, listener) { + if (this.isRegistered(action)) { + throw error(action, IS_REGISTERED_ERROR); + } + this._actions[action] = listener; +}; + +/** + * Unregister an existing action + * + * @param {string} action + */ +EditorActions.prototype.unregister = function (action) { + if (!this.isRegistered(action)) { + throw error(action, NOT_REGISTERED_ERROR); + } + this._actions[action] = undefined; +}; + +/** + * Returns the number of actions that are currently registered + * + * @return {number} + */ +EditorActions.prototype.getActions = function () { + return Object.keys(this._actions); +}; + +/** + * Checks wether the given action is registered + * + * @param {string} action + * + * @return {boolean} + */ +EditorActions.prototype.isRegistered = function (action) { + return !!this._actions[action]; +}; +function error(action, message) { + return new Error(action + ' ' + message); +} + +/***/ }), + +/***/ 56919: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/editor-actions/index.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _EditorActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EditorActions */ 56891); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['editorActions'], + editorActions: ['type', _EditorActions__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 39483: +/*!******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/global-connect/GlobalConnect.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ GlobalConnect) +/* harmony export */ }); +var MARKER_OK = 'connect-ok', + MARKER_NOT_OK = 'connect-not-ok'; + +/** + * @class + * @constructor + * + * @param {EventBus} eventBus + * @param {Dragging} dragging + * @param {Connect} connect + * @param {Canvas} canvas + * @param {ToolManager} toolManager + * @param {Rules} rules + * @param {Mouse} mouse + */ +function GlobalConnect(eventBus, dragging, connect, canvas, toolManager, rules, mouse) { + var self = this; + this._dragging = dragging; + this._rules = rules; + this._mouse = mouse; + toolManager.registerTool('global-connect', { + tool: 'global-connect', + dragging: 'global-connect.drag' + }); + eventBus.on('global-connect.hover', function (event) { + var context = event.context, + startTarget = event.hover; + var canStartConnect = context.canStartConnect = self.canStartConnect(startTarget); + + // simply ignore hover + if (canStartConnect === null) { + return; + } + context.startTarget = startTarget; + canvas.addMarker(startTarget, canStartConnect ? MARKER_OK : MARKER_NOT_OK); + }); + eventBus.on(['global-connect.out', 'global-connect.cleanup'], function (event) { + var startTarget = event.context.startTarget, + canStartConnect = event.context.canStartConnect; + if (startTarget) { + canvas.removeMarker(startTarget, canStartConnect ? MARKER_OK : MARKER_NOT_OK); + } + }); + eventBus.on(['global-connect.ended'], function (event) { + var context = event.context, + startTarget = context.startTarget, + startPosition = { + x: event.x, + y: event.y + }; + var canStartConnect = self.canStartConnect(startTarget); + if (!canStartConnect) { + return; + } + eventBus.once('element.out', function () { + eventBus.once(['connect.ended', 'connect.canceled'], function () { + eventBus.fire('global-connect.drag.ended'); + }); + connect.start(null, startTarget, startPosition); + }); + return false; + }); +} +GlobalConnect.$inject = ['eventBus', 'dragging', 'connect', 'canvas', 'toolManager', 'rules', 'mouse']; + +/** + * Initiates tool activity. + */ +GlobalConnect.prototype.start = function (event, autoActivate) { + this._dragging.init(event, 'global-connect', { + autoActivate: autoActivate, + trapClick: false, + data: { + context: {} + } + }); +}; +GlobalConnect.prototype.toggle = function () { + if (this.isActive()) { + return this._dragging.cancel(); + } + var mouseEvent = this._mouse.getLastMoveEvent(); + return this.start(mouseEvent, !!mouseEvent); +}; +GlobalConnect.prototype.isActive = function () { + var context = this._dragging.context(); + return context && /^global-connect/.test(context.prefix); +}; + +/** + * Check if source shape can initiate connection. + * + * @param {Shape} startTarget + * @return {boolean} + */ +GlobalConnect.prototype.canStartConnect = function (startTarget) { + return this._rules.allowed('connection.start', { + source: startTarget + }); +}; + +/***/ }), + +/***/ 27432: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/global-connect/index.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _connect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../connect */ 60262); +/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rules */ 8807); +/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dragging */ 11917); +/* harmony import */ var _tool_manager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tool-manager */ 22136); +/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mouse */ 26947); +/* harmony import */ var _GlobalConnect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./GlobalConnect */ 39483); + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_connect__WEBPACK_IMPORTED_MODULE_0__["default"], _rules__WEBPACK_IMPORTED_MODULE_1__["default"], _dragging__WEBPACK_IMPORTED_MODULE_2__["default"], _tool_manager__WEBPACK_IMPORTED_MODULE_3__["default"], _mouse__WEBPACK_IMPORTED_MODULE_4__["default"]], + globalConnect: ['type', _GlobalConnect__WEBPACK_IMPORTED_MODULE_5__["default"]] +}); + +/***/ }), + +/***/ 53683: +/*!****************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/grid-snapping/GridSnapping.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ GridSnapping) +/* harmony export */ }); +/* harmony import */ var _snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../snapping/SnapUtil */ 99298); +/* harmony import */ var _keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../keyboard/KeyboardUtil */ 13488); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _GridUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GridUtil */ 67059); + + + + +var LOWER_PRIORITY = 1200; +var LOW_PRIORITY = 800; + +/** + * Basic grid snapping that covers connecting, creating, moving, resizing shapes, moving bendpoints + * and connection segments. + */ +function GridSnapping(elementRegistry, eventBus, config) { + var active = !config || config.active !== false; + this._eventBus = eventBus; + var self = this; + eventBus.on('diagram.init', LOW_PRIORITY, function () { + self.setActive(active); + }); + eventBus.on(['create.move', 'create.end', 'bendpoint.move.move', 'bendpoint.move.end', 'connect.move', 'connect.end', 'connectionSegment.move.move', 'connectionSegment.move.end', 'resize.move', 'resize.end', 'shape.move.move', 'shape.move.end'], LOWER_PRIORITY, function (event) { + var originalEvent = event.originalEvent; + if (!self.active || originalEvent && (0,_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd)(originalEvent)) { + return; + } + var context = event.context, + gridSnappingContext = context.gridSnappingContext; + if (!gridSnappingContext) { + gridSnappingContext = context.gridSnappingContext = {}; + } + ['x', 'y'].forEach(function (axis) { + var options = {}; + + // allow snapping with offset + var snapOffset = getSnapOffset(event, axis, elementRegistry); + if (snapOffset) { + options.offset = snapOffset; + } + + // allow snapping with min and max + var snapConstraints = getSnapConstraints(event, axis); + if (snapConstraints) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(options, snapConstraints); + } + if (!(0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.isSnapped)(event, axis)) { + self.snapEvent(event, axis, options); + } + }); + }); +} + +/** + * Snap an events x or y with optional min, max and offset. + * + * @param {Object} event + * @param {string} axis + * @param {number} [options.min] + * @param {number} [options.max] + * @param {number} [options.offset] + */ +GridSnapping.prototype.snapEvent = function (event, axis, options) { + var snappedValue = this.snapValue(event[axis], options); + (0,_snapping_SnapUtil__WEBPACK_IMPORTED_MODULE_2__.setSnapped)(event, axis, snappedValue); +}; + +/** + * Expose grid spacing for third parties (i.e. extensions). + * + * @return {number} spacing of grid dots + */ +GridSnapping.prototype.getGridSpacing = function () { + return _GridUtil__WEBPACK_IMPORTED_MODULE_3__.SPACING; +}; + +/** + * Snap value with optional min, max and offset. + * + * @param {number} value + * @param {Object} options + * @param {number} [options.min] + * @param {number} [options.max] + * @param {number} [options.offset] + */ +GridSnapping.prototype.snapValue = function (value, options) { + var offset = 0; + if (options && options.offset) { + offset = options.offset; + } + value += offset; + value = (0,_GridUtil__WEBPACK_IMPORTED_MODULE_3__.quantize)(value, _GridUtil__WEBPACK_IMPORTED_MODULE_3__.SPACING); + var min, max; + if (options && options.min) { + min = options.min; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isNumber)(min)) { + min = (0,_GridUtil__WEBPACK_IMPORTED_MODULE_3__.quantize)(min + offset, _GridUtil__WEBPACK_IMPORTED_MODULE_3__.SPACING, 'ceil'); + value = Math.max(value, min); + } + } + if (options && options.max) { + max = options.max; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isNumber)(max)) { + max = (0,_GridUtil__WEBPACK_IMPORTED_MODULE_3__.quantize)(max + offset, _GridUtil__WEBPACK_IMPORTED_MODULE_3__.SPACING, 'floor'); + value = Math.min(value, max); + } + } + value -= offset; + return value; +}; +GridSnapping.prototype.isActive = function () { + return this.active; +}; +GridSnapping.prototype.setActive = function (active) { + this.active = active; + this._eventBus.fire('gridSnapping.toggle', { + active: active + }); +}; +GridSnapping.prototype.toggleActive = function () { + this.setActive(!this.active); +}; +GridSnapping.$inject = ['elementRegistry', 'eventBus', 'config.gridSnapping']; + +// helpers ////////// + +/** + * Get minimum and maximum snap constraints. + * Constraints are cached. + * + * @param {Object} event + * @param {Object} event.context + * @param {string} axis + * + * @returns {boolean|Object} + */ +function getSnapConstraints(event, axis) { + var context = event.context, + createConstraints = context.createConstraints, + resizeConstraints = context.resizeConstraints || {}, + gridSnappingContext = context.gridSnappingContext, + snapConstraints = gridSnappingContext.snapConstraints; + + // cache snap constraints + if (snapConstraints && snapConstraints[axis]) { + return snapConstraints[axis]; + } + if (!snapConstraints) { + snapConstraints = gridSnappingContext.snapConstraints = {}; + } + if (!snapConstraints[axis]) { + snapConstraints[axis] = {}; + } + var direction = context.direction; + + // create + if (createConstraints) { + if (isHorizontal(axis)) { + snapConstraints.x.min = createConstraints.left; + snapConstraints.x.max = createConstraints.right; + } else { + snapConstraints.y.min = createConstraints.top; + snapConstraints.y.max = createConstraints.bottom; + } + } + + // resize + var minResizeConstraints = resizeConstraints.min, + maxResizeConstraints = resizeConstraints.max; + if (minResizeConstraints) { + if (isHorizontal(axis)) { + if (isWest(direction)) { + snapConstraints.x.max = minResizeConstraints.left; + } else { + snapConstraints.x.min = minResizeConstraints.right; + } + } else { + if (isNorth(direction)) { + snapConstraints.y.max = minResizeConstraints.top; + } else { + snapConstraints.y.min = minResizeConstraints.bottom; + } + } + } + if (maxResizeConstraints) { + if (isHorizontal(axis)) { + if (isWest(direction)) { + snapConstraints.x.min = maxResizeConstraints.left; + } else { + snapConstraints.x.max = maxResizeConstraints.right; + } + } else { + if (isNorth(direction)) { + snapConstraints.y.min = maxResizeConstraints.top; + } else { + snapConstraints.y.max = maxResizeConstraints.bottom; + } + } + } + return snapConstraints[axis]; +} + +/** + * Get snap offset. + * Offset is cached. + * + * @param {Object} event + * @param {string} axis + * @param {ElementRegistry} elementRegistry + * + * @returns {number} + */ +function getSnapOffset(event, axis, elementRegistry) { + var context = event.context, + shape = event.shape, + gridSnappingContext = context.gridSnappingContext, + snapLocation = gridSnappingContext.snapLocation, + snapOffset = gridSnappingContext.snapOffset; + + // cache snap offset + if (snapOffset && (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isNumber)(snapOffset[axis])) { + return snapOffset[axis]; + } + if (!snapOffset) { + snapOffset = gridSnappingContext.snapOffset = {}; + } + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isNumber)(snapOffset[axis])) { + snapOffset[axis] = 0; + } + if (!shape) { + return snapOffset[axis]; + } + if (!elementRegistry.get(shape.id)) { + if (isHorizontal(axis)) { + snapOffset[axis] += shape[axis] + shape.width / 2; + } else { + snapOffset[axis] += shape[axis] + shape.height / 2; + } + } + if (!snapLocation) { + return snapOffset[axis]; + } + if (axis === 'x') { + if (/left/.test(snapLocation)) { + snapOffset[axis] -= shape.width / 2; + } else if (/right/.test(snapLocation)) { + snapOffset[axis] += shape.width / 2; + } + } else { + if (/top/.test(snapLocation)) { + snapOffset[axis] -= shape.height / 2; + } else if (/bottom/.test(snapLocation)) { + snapOffset[axis] += shape.height / 2; + } + } + return snapOffset[axis]; +} +function isHorizontal(axis) { + return axis === 'x'; +} +function isNorth(direction) { + return direction.indexOf('n') !== -1; +} +function isWest(direction) { + return direction.indexOf('w') !== -1; +} + +/***/ }), + +/***/ 67059: +/*!************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/grid-snapping/GridUtil.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SPACING: () => (/* binding */ SPACING), +/* harmony export */ quantize: () => (/* binding */ quantize) +/* harmony export */ }); +var SPACING = 10; +function quantize(value, quantum, fn) { + if (!fn) { + fn = 'round'; + } + return Math[fn](value / quantum) * quantum; +} + +/***/ }), + +/***/ 83490: +/*!***************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/grid-snapping/behavior/ResizeBehavior.js ***! + \***************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ResizeBehavior) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../command/CommandInterceptor */ 35353); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 47504); + + + + +/** + * Integrates resizing with grid snapping. + */ +function ResizeBehavior(eventBus, gridSnapping) { + _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this._gridSnapping = gridSnapping; + var self = this; + this.preExecute('shape.resize', function (event) { + var context = event.context, + hints = context.hints || {}, + autoResize = hints.autoResize; + if (!autoResize) { + return; + } + var shape = context.shape, + newBounds = context.newBounds; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isString)(autoResize)) { + context.newBounds = self.snapComplex(newBounds, autoResize); + } else { + context.newBounds = self.snapSimple(shape, newBounds); + } + }); +} +ResizeBehavior.$inject = ['eventBus', 'gridSnapping', 'modeling']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(ResizeBehavior, _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/** + * Snap width and height in relation to center. + * + * @param {djs.model.shape} shape + * @param {Bounds} newBounds + * + * @returns {Bounds} Snapped bounds. + */ +ResizeBehavior.prototype.snapSimple = function (shape, newBounds) { + var gridSnapping = this._gridSnapping; + newBounds.width = gridSnapping.snapValue(newBounds.width, { + min: newBounds.width + }); + newBounds.height = gridSnapping.snapValue(newBounds.height, { + min: newBounds.height + }); + newBounds.x = shape.x + shape.width / 2 - newBounds.width / 2; + newBounds.y = shape.y + shape.height / 2 - newBounds.height / 2; + return newBounds; +}; + +/** + * Snap x, y, width and height according to given directions. + * + * @param {Bounds} newBounds + * @param {string} directions - Directions as {n|w|s|e}. + * + * @returns {Bounds} Snapped bounds. + */ +ResizeBehavior.prototype.snapComplex = function (newBounds, directions) { + if (/w|e/.test(directions)) { + newBounds = this.snapHorizontally(newBounds, directions); + } + if (/n|s/.test(directions)) { + newBounds = this.snapVertically(newBounds, directions); + } + return newBounds; +}; + +/** + * Snap in one or both directions horizontally. + * + * @param {Bounds} newBounds + * @param {string} directions - Directions as {n|w|s|e}. + * + * @returns {Bounds} Snapped bounds. + */ +ResizeBehavior.prototype.snapHorizontally = function (newBounds, directions) { + var gridSnapping = this._gridSnapping, + west = /w/.test(directions), + east = /e/.test(directions); + var snappedNewBounds = {}; + snappedNewBounds.width = gridSnapping.snapValue(newBounds.width, { + min: newBounds.width + }); + if (east) { + // handle + if (west) { + snappedNewBounds.x = gridSnapping.snapValue(newBounds.x, { + max: newBounds.x + }); + snappedNewBounds.width += gridSnapping.snapValue(newBounds.x - snappedNewBounds.x, { + min: newBounds.x - snappedNewBounds.x + }); + } + + // handle + else { + newBounds.x = newBounds.x + newBounds.width - snappedNewBounds.width; + } + } + + // assign snapped x and width + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(newBounds, snappedNewBounds); + return newBounds; +}; + +/** + * Snap in one or both directions vertically. + * + * @param {Bounds} newBounds + * @param {string} directions - Directions as {n|w|s|e}. + * + * @returns {Bounds} Snapped bounds. + */ +ResizeBehavior.prototype.snapVertically = function (newBounds, directions) { + var gridSnapping = this._gridSnapping, + north = /n/.test(directions), + south = /s/.test(directions); + var snappedNewBounds = {}; + snappedNewBounds.height = gridSnapping.snapValue(newBounds.height, { + min: newBounds.height + }); + if (north) { + // handle + if (south) { + snappedNewBounds.y = gridSnapping.snapValue(newBounds.y, { + max: newBounds.y + }); + snappedNewBounds.height += gridSnapping.snapValue(newBounds.y - snappedNewBounds.y, { + min: newBounds.y - snappedNewBounds.y + }); + } + + // handle + else { + newBounds.y = newBounds.y + newBounds.height - snappedNewBounds.height; + } + } + + // assign snapped y and height + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(newBounds, snappedNewBounds); + return newBounds; +}; + +/***/ }), + +/***/ 86732: +/*!******************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/grid-snapping/behavior/SpaceToolBehavior.js ***! + \******************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SpaceToolBehavior) +/* harmony export */ }); +var HIGH_PRIORITY = 2000; + +/** + * Integrates space tool with grid snapping. + */ +function SpaceToolBehavior(eventBus, gridSnapping) { + eventBus.on(['spaceTool.move', 'spaceTool.end'], HIGH_PRIORITY, function (event) { + var context = event.context; + if (!context.initialized) { + return; + } + var axis = context.axis; + var snapped; + if (axis === 'x') { + // snap delta x to multiple of 10 + snapped = gridSnapping.snapValue(event.dx); + event.x = event.x + snapped - event.dx; + event.dx = snapped; + } else { + // snap delta y to multiple of 10 + snapped = gridSnapping.snapValue(event.dy); + event.y = event.y + snapped - event.dy; + event.dy = snapped; + } + }); +} +SpaceToolBehavior.$inject = ['eventBus', 'gridSnapping']; + +/***/ }), + +/***/ 7126: +/*!******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/grid-snapping/behavior/index.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _ResizeBehavior__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ResizeBehavior */ 83490); +/* harmony import */ var _SpaceToolBehavior__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpaceToolBehavior */ 86732); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['gridSnappingResizeBehavior', 'gridSnappingSpaceToolBehavior'], + gridSnappingResizeBehavior: ['type', _ResizeBehavior__WEBPACK_IMPORTED_MODULE_0__["default"]], + gridSnappingSpaceToolBehavior: ['type', _SpaceToolBehavior__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 82795: +/*!*********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/grid-snapping/index.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _GridSnapping__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GridSnapping */ 53683); +/* harmony import */ var _behavior__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./behavior */ 7126); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_behavior__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['gridSnapping'], + gridSnapping: ['type', _GridSnapping__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 69607: +/*!********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/hand-tool/HandTool.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ HandTool) +/* harmony export */ }); +/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Mouse */ 53171); +/* harmony import */ var _features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../features/keyboard/KeyboardUtil */ 13488); + + +var HIGH_PRIORITY = 1500; +var HAND_CURSOR = 'grab'; +function HandTool(eventBus, canvas, dragging, injector, toolManager, mouse) { + this._dragging = dragging; + this._mouse = mouse; + var self = this, + keyboard = injector.get('keyboard', false); + toolManager.registerTool('hand', { + tool: 'hand', + dragging: 'hand.move' + }); + eventBus.on('element.mousedown', HIGH_PRIORITY, function (event) { + if (!(0,_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.hasPrimaryModifier)(event)) { + return; + } + self.activateMove(event.originalEvent, true); + return false; + }); + keyboard && keyboard.addListener(HIGH_PRIORITY, function (e) { + if (!isSpace(e.keyEvent) || self.isActive()) { + return; + } + var mouseEvent = self._mouse.getLastMoveEvent(); + self.activateMove(mouseEvent, !!mouseEvent); + }, 'keyboard.keydown'); + keyboard && keyboard.addListener(HIGH_PRIORITY, function (e) { + if (!isSpace(e.keyEvent) || !self.isActive()) { + return; + } + self.toggle(); + }, 'keyboard.keyup'); + eventBus.on('hand.end', function (event) { + var target = event.originalEvent.target; + + // only reactive on diagram click + // on some occasions, event.hover is not set and we have to check if the target is an svg + if (!event.hover && !(target instanceof SVGElement)) { + return false; + } + eventBus.once('hand.ended', function () { + self.activateMove(event.originalEvent, { + reactivate: true + }); + }); + }); + eventBus.on('hand.move.move', function (event) { + var scale = canvas.viewbox().scale; + canvas.scroll({ + dx: event.dx * scale, + dy: event.dy * scale + }); + }); + eventBus.on('hand.move.end', function (event) { + var context = event.context, + reactivate = context.reactivate; + + // Don't reactivate if the user is using the keyboard keybinding + if (!(0,_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.hasPrimaryModifier)(event) && reactivate) { + eventBus.once('hand.move.ended', function (event) { + self.activateHand(event.originalEvent, true, true); + }); + } + return false; + }); +} +HandTool.$inject = ['eventBus', 'canvas', 'dragging', 'injector', 'toolManager', 'mouse']; +HandTool.prototype.activateMove = function (event, autoActivate, context) { + if (typeof autoActivate === 'object') { + context = autoActivate; + autoActivate = false; + } + this._dragging.init(event, 'hand.move', { + autoActivate: autoActivate, + cursor: HAND_CURSOR, + data: { + context: context || {} + } + }); +}; +HandTool.prototype.activateHand = function (event, autoActivate, reactivate) { + this._dragging.init(event, 'hand', { + trapClick: false, + autoActivate: autoActivate, + cursor: HAND_CURSOR, + data: { + context: { + reactivate: reactivate + } + } + }); +}; +HandTool.prototype.toggle = function () { + if (this.isActive()) { + return this._dragging.cancel(); + } + var mouseEvent = this._mouse.getLastMoveEvent(); + this.activateHand(mouseEvent, !!mouseEvent); +}; +HandTool.prototype.isActive = function () { + var context = this._dragging.context(); + if (context) { + return /^(hand|hand\.move)$/.test(context.prefix); + } + return false; +}; + +// helpers ////////// + +function isSpace(keyEvent) { + return (0,_features_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_1__.isKey)(' ', keyEvent); +} + +/***/ }), + +/***/ 14590: +/*!*****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/hand-tool/index.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _tool_manager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tool-manager */ 22136); +/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mouse */ 26947); +/* harmony import */ var _HandTool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HandTool */ 69607); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_tool_manager__WEBPACK_IMPORTED_MODULE_0__["default"], _mouse__WEBPACK_IMPORTED_MODULE_1__["default"]], + __init__: ['handTool'], + handTool: ['type', _HandTool__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 94339: +/*!********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/hover-fix/HoverFix.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ HoverFix) +/* harmony export */ }); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Event */ 74716); + + +var HIGH_PRIORITY = 1500; + +/** + * Browsers may swallow certain events (hover, out ...) if users are to + * fast with the mouse. + * + * @see http://stackoverflow.com/questions/7448468/why-cant-i-reliably-capture-a-mouseout-event + * + * The fix implemented in this component ensure that we + * + * 1) have a hover state after a successful drag.move event + * 2) have an out event when dragging leaves an element + * + * @param {ElementRegistry} elementRegistry + * @param {EventBus} eventBus + * @param {Injector} injector + */ +function HoverFix(elementRegistry, eventBus, injector) { + var self = this; + var dragging = injector.get('dragging', false); + + /** + * Make sure we are god damn hovering! + * + * @param {Event} dragging event + */ + function ensureHover(event) { + if (event.hover) { + return; + } + var originalEvent = event.originalEvent; + var gfx = self._findTargetGfx(originalEvent); + var element = gfx && elementRegistry.get(gfx); + if (gfx && element) { + // 1) cancel current mousemove + event.stopPropagation(); + + // 2) emit fake hover for new target + dragging.hover({ + element: element, + gfx: gfx + }); + + // 3) re-trigger move event + dragging.move(originalEvent); + } + } + if (dragging) { + /** + * We wait for a specific sequence of events before + * emitting a fake drag.hover event. + * + * Event Sequence: + * + * drag.start + * drag.move >> ensure we are hovering + */ + eventBus.on('drag.start', function (event) { + eventBus.once('drag.move', HIGH_PRIORITY, function (event) { + ensureHover(event); + }); + }); + } + + /** + * We make sure that element.out is always fired, even if the + * browser swallows an element.out event. + * + * Event sequence: + * + * element.hover + * (element.out >> sometimes swallowed) + * element.hover >> ensure we fired element.out + */ + (function () { + var hoverGfx; + var hover; + eventBus.on('element.hover', function (event) { + // (1) remember current hover element + hoverGfx = event.gfx; + hover = event.element; + }); + eventBus.on('element.hover', HIGH_PRIORITY, function (event) { + // (3) am I on an element still? + if (hover) { + // (4) that is a problem, gotta "simulate the out" + eventBus.fire('element.out', { + element: hover, + gfx: hoverGfx + }); + } + }); + eventBus.on('element.out', function () { + // (2) unset hover state if we correctly outed us *GG* + hoverGfx = null; + hover = null; + }); + })(); + this._findTargetGfx = function (event) { + var position, target; + if (!(event instanceof MouseEvent)) { + return; + } + position = (0,_util_Event__WEBPACK_IMPORTED_MODULE_0__.toPoint)(event); + + // damn expensive operation, ouch! + target = document.elementFromPoint(position.x, position.y); + return getGfx(target); + }; +} +HoverFix.$inject = ['elementRegistry', 'eventBus', 'injector']; + +// helpers ///////////////////// + +function getGfx(target) { + return (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.closest)(target, 'svg, .djs-element', true); +} + +/***/ }), + +/***/ 9060: +/*!*****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/hover-fix/index.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _HoverFix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HoverFix */ 94339); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['hoverFix'], + hoverFix: ['type', _HoverFix__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 53519: +/*!**************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/interaction-events/InteractionEvents.js ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ InteractionEvents) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Mouse */ 53171); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var _util_RenderUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/RenderUtil */ 96546); + + + + + +function allowAll(event) { + return true; +} +function allowPrimaryAndAuxiliary(event) { + return (0,_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.isPrimaryButton)(event) || (0,_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.isAuxiliaryButton)(event); +} +var LOW_PRIORITY = 500; + +/** + * A plugin that provides interaction events for diagram elements. + * + * It emits the following events: + * + * * element.click + * * element.contextmenu + * * element.dblclick + * * element.hover + * * element.mousedown + * * element.mousemove + * * element.mouseup + * * element.out + * + * Each event is a tuple { element, gfx, originalEvent }. + * + * Canceling the event via Event#preventDefault() + * prevents the original DOM operation. + * + * @param {EventBus} eventBus + */ +function InteractionEvents(eventBus, elementRegistry, styles) { + var self = this; + + /** + * Fire an interaction event. + * + * @param {string} type local event name, e.g. element.click. + * @param {DOMEvent} event native event + * @param {djs.model.Base} [element] the diagram element to emit the event on; + * defaults to the event target + */ + function fire(type, event, element) { + if (isIgnored(type, event)) { + return; + } + var target, gfx, returnValue; + if (!element) { + target = event.delegateTarget || event.target; + if (target) { + gfx = target; + element = elementRegistry.get(gfx); + } + } else { + gfx = elementRegistry.getGraphics(element); + } + if (!gfx || !element) { + return; + } + returnValue = eventBus.fire(type, { + element: element, + gfx: gfx, + originalEvent: event + }); + if (returnValue === false) { + event.stopPropagation(); + event.preventDefault(); + } + } + + // TODO(nikku): document this + var handlers = {}; + function mouseHandler(localEventName) { + return handlers[localEventName]; + } + function isIgnored(localEventName, event) { + var filter = ignoredFilters[localEventName] || _util_Mouse__WEBPACK_IMPORTED_MODULE_0__.isPrimaryButton; + + // only react on left mouse button interactions + // except for interaction events that are enabled + // for secundary mouse button + return !filter(event); + } + var bindings = { + click: 'element.click', + contextmenu: 'element.contextmenu', + dblclick: 'element.dblclick', + mousedown: 'element.mousedown', + mousemove: 'element.mousemove', + mouseover: 'element.hover', + mouseout: 'element.out', + mouseup: 'element.mouseup' + }; + var ignoredFilters = { + 'element.contextmenu': allowAll, + 'element.mousedown': allowPrimaryAndAuxiliary, + 'element.mouseup': allowPrimaryAndAuxiliary, + 'element.click': allowPrimaryAndAuxiliary, + 'element.dblclick': allowPrimaryAndAuxiliary + }; + + // manual event trigger ////////// + + /** + * Trigger an interaction event (based on a native dom event) + * on the target shape or connection. + * + * @param {string} eventName the name of the triggered DOM event + * @param {MouseEvent} event + * @param {djs.model.Base} targetElement + */ + function triggerMouseEvent(eventName, event, targetElement) { + // i.e. element.mousedown... + var localEventName = bindings[eventName]; + if (!localEventName) { + throw new Error('unmapped DOM event name <' + eventName + '>'); + } + return fire(localEventName, event, targetElement); + } + var ELEMENT_SELECTOR = 'svg, .djs-element'; + + // event handling /////// + + function registerEvent(node, event, localEvent, ignoredFilter) { + var handler = handlers[localEvent] = function (event) { + fire(localEvent, event); + }; + if (ignoredFilter) { + ignoredFilters[localEvent] = ignoredFilter; + } + handler.$delegate = min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(node, ELEMENT_SELECTOR, event, handler); + } + function unregisterEvent(node, event, localEvent) { + var handler = mouseHandler(localEvent); + if (!handler) { + return; + } + min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.unbind(node, event, handler.$delegate); + } + function registerEvents(svg) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(bindings, function (val, key) { + registerEvent(svg, key, val); + }); + } + function unregisterEvents(svg) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(bindings, function (val, key) { + unregisterEvent(svg, key, val); + }); + } + eventBus.on('canvas.destroy', function (event) { + unregisterEvents(event.svg); + }); + eventBus.on('canvas.init', function (event) { + registerEvents(event.svg); + }); + + // hit box updating //////////////// + + eventBus.on(['shape.added', 'connection.added'], function (event) { + var element = event.element, + gfx = event.gfx; + eventBus.fire('interactionEvents.createHit', { + element: element, + gfx: gfx + }); + }); + + // Update djs-hit on change. + // A low priortity is necessary, because djs-hit of labels has to be updated + // after the label bounds have been updated in the renderer. + eventBus.on(['shape.changed', 'connection.changed'], LOW_PRIORITY, function (event) { + var element = event.element, + gfx = event.gfx; + eventBus.fire('interactionEvents.updateHit', { + element: element, + gfx: gfx + }); + }); + eventBus.on('interactionEvents.createHit', LOW_PRIORITY, function (event) { + var element = event.element, + gfx = event.gfx; + self.createDefaultHit(element, gfx); + }); + eventBus.on('interactionEvents.updateHit', function (event) { + var element = event.element, + gfx = event.gfx; + self.updateDefaultHit(element, gfx); + }); + + // hit styles //////////// + + var STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-stroke'); + var CLICK_STROKE_HIT_STYLE = createHitStyle('djs-hit djs-hit-click-stroke'); + var ALL_HIT_STYLE = createHitStyle('djs-hit djs-hit-all'); + var HIT_TYPES = { + 'all': ALL_HIT_STYLE, + 'click-stroke': CLICK_STROKE_HIT_STYLE, + 'stroke': STROKE_HIT_STYLE + }; + function createHitStyle(classNames, attrs) { + attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + stroke: 'white', + strokeWidth: 15 + }, attrs || {}); + return styles.cls(classNames, ['no-fill', 'no-border'], attrs); + } + + // style helpers /////////////// + + function applyStyle(hit, type) { + var attrs = HIT_TYPES[type]; + if (!attrs) { + throw new Error('invalid hit type <' + type + '>'); + } + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(hit, attrs); + return hit; + } + function appendHit(gfx, hit) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(gfx, hit); + } + + // API + + /** + * Remove hints on the given graphics. + * + * @param {SVGElement} gfx + */ + this.removeHits = function (gfx) { + var hits = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.queryAll)('.djs-hit', gfx); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(hits, tiny_svg__WEBPACK_IMPORTED_MODULE_3__.remove); + }; + + /** + * Create default hit for the given element. + * + * @param {djs.model.Base} element + * @param {SVGElement} gfx + * + * @return {SVGElement} created hit + */ + this.createDefaultHit = function (element, gfx) { + var waypoints = element.waypoints, + isFrame = element.isFrame, + boxType; + if (waypoints) { + return this.createWaypointsHit(gfx, waypoints); + } else { + boxType = isFrame ? 'stroke' : 'all'; + return this.createBoxHit(gfx, boxType, { + width: element.width, + height: element.height + }); + } + }; + + /** + * Create hits for the given waypoints. + * + * @param {SVGElement} gfx + * @param {Array} waypoints + * + * @return {SVGElement} + */ + this.createWaypointsHit = function (gfx, waypoints) { + var hit = (0,_util_RenderUtil__WEBPACK_IMPORTED_MODULE_4__.createLine)(waypoints); + applyStyle(hit, 'stroke'); + appendHit(gfx, hit); + return hit; + }; + + /** + * Create hits for a box. + * + * @param {SVGElement} gfx + * @param {string} hitType + * @param {Object} attrs + * + * @return {SVGElement} + */ + this.createBoxHit = function (gfx, type, attrs) { + attrs = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + x: 0, + y: 0 + }, attrs); + var hit = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('rect'); + applyStyle(hit, type); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(hit, attrs); + appendHit(gfx, hit); + return hit; + }; + + /** + * Update default hit of the element. + * + * @param {djs.model.Base} element + * @param {SVGElement} gfx + * + * @return {SVGElement} updated hit + */ + this.updateDefaultHit = function (element, gfx) { + var hit = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.query)('.djs-hit', gfx); + if (!hit) { + return; + } + if (element.waypoints) { + (0,_util_RenderUtil__WEBPACK_IMPORTED_MODULE_4__.updateLine)(hit, element.waypoints); + } else { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(hit, { + width: element.width, + height: element.height + }); + } + return hit; + }; + this.fire = fire; + this.triggerMouseEvent = triggerMouseEvent; + this.mouseHandler = mouseHandler; + this.registerEvent = registerEvent; + this.unregisterEvent = unregisterEvent; +} +InteractionEvents.$inject = ['eventBus', 'elementRegistry', 'styles']; + +/** + * An event indicating that the mouse hovered over an element + * + * @event element.hover + * + * @type {Object} + * @property {djs.model.Base} element + * @property {SVGElement} gfx + * @property {Event} originalEvent + */ + +/** + * An event indicating that the mouse has left an element + * + * @event element.out + * + * @type {Object} + * @property {djs.model.Base} element + * @property {SVGElement} gfx + * @property {Event} originalEvent + */ + +/** + * An event indicating that the mouse has clicked an element + * + * @event element.click + * + * @type {Object} + * @property {djs.model.Base} element + * @property {SVGElement} gfx + * @property {Event} originalEvent + */ + +/** + * An event indicating that the mouse has double clicked an element + * + * @event element.dblclick + * + * @type {Object} + * @property {djs.model.Base} element + * @property {SVGElement} gfx + * @property {Event} originalEvent + */ + +/** + * An event indicating that the mouse has gone down on an element. + * + * @event element.mousedown + * + * @type {Object} + * @property {djs.model.Base} element + * @property {SVGElement} gfx + * @property {Event} originalEvent + */ + +/** + * An event indicating that the mouse has gone up on an element. + * + * @event element.mouseup + * + * @type {Object} + * @property {djs.model.Base} element + * @property {SVGElement} gfx + * @property {Event} originalEvent + */ + +/** + * An event indicating that the context menu action is triggered + * via mouse or touch controls. + * + * @event element.contextmenu + * + * @type {Object} + * @property {djs.model.Base} element + * @property {SVGElement} gfx + * @property {Event} originalEvent + */ + +/***/ }), + +/***/ 57250: +/*!**************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/interaction-events/index.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _InteractionEvents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./InteractionEvents */ 53519); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['interactionEvents'], + interactionEvents: ['type', _InteractionEvents__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 46564: +/*!***********************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/keyboard-move-selection/KeyboardMoveSelection.js ***! + \***********************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ KeyboardMoveSelection) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +var DEFAULT_CONFIG = { + moveSpeed: 1, + moveSpeedAccelerated: 10 +}; +var HIGHER_PRIORITY = 1500; +var LEFT = 'left'; +var UP = 'up'; +var RIGHT = 'right'; +var DOWN = 'down'; +var KEY_TO_DIRECTION = { + ArrowLeft: LEFT, + Left: LEFT, + ArrowUp: UP, + Up: UP, + ArrowRight: RIGHT, + Right: RIGHT, + ArrowDown: DOWN, + Down: DOWN +}; +var DIRECTIONS_DELTA = { + left: function (speed) { + return { + x: -speed, + y: 0 + }; + }, + up: function (speed) { + return { + x: 0, + y: -speed + }; + }, + right: function (speed) { + return { + x: speed, + y: 0 + }; + }, + down: function (speed) { + return { + x: 0, + y: speed + }; + } +}; + +/** + * Enables to move selection with keyboard arrows. + * Use with Shift for modified speed (default=1, with Shift=10). + * Pressed Cmd/Ctrl turns the feature off. + * + * @param {Object} config + * @param {number} [config.moveSpeed=1] + * @param {number} [config.moveSpeedAccelerated=10] + * @param {Keyboard} keyboard + * @param {Modeling} modeling + * @param {Selection} selection + */ +function KeyboardMoveSelection(config, keyboard, modeling, rules, selection) { + var self = this; + this._config = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, DEFAULT_CONFIG, config || {}); + keyboard.addListener(HIGHER_PRIORITY, function (event) { + var keyEvent = event.keyEvent; + var direction = KEY_TO_DIRECTION[keyEvent.key]; + if (!direction) { + return; + } + if (keyboard.isCmd(keyEvent)) { + return; + } + var accelerated = keyboard.isShift(keyEvent); + self.moveSelection(direction, accelerated); + return true; + }); + + /** + * Move selected elements in the given direction, + * optionally specifying accelerated movement. + * + * @param {string} direction + * @param {boolean} [accelerated=false] + */ + this.moveSelection = function (direction, accelerated) { + var selectedElements = selection.get(); + if (!selectedElements.length) { + return; + } + var speed = this._config[accelerated ? 'moveSpeedAccelerated' : 'moveSpeed']; + var delta = DIRECTIONS_DELTA[direction](speed); + var canMove = rules.allowed('elements.move', { + shapes: selectedElements + }); + if (canMove) { + modeling.moveElements(selectedElements, delta); + } + }; +} +KeyboardMoveSelection.$inject = ['config.keyboardMoveSelection', 'keyboard', 'modeling', 'rules', 'selection']; + +/***/ }), + +/***/ 22030: +/*!*******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/keyboard-move-selection/index.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _keyboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../keyboard */ 6329); +/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selection */ 26334); +/* harmony import */ var _KeyboardMoveSelection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyboardMoveSelection */ 46564); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_keyboard__WEBPACK_IMPORTED_MODULE_0__["default"], _selection__WEBPACK_IMPORTED_MODULE_1__["default"]], + __init__: ['keyboardMoveSelection'], + keyboardMoveSelection: ['type', _KeyboardMoveSelection__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 23844: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/keyboard/Keyboard.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Keyboard) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./KeyboardUtil */ 13488); + + + +var KEYDOWN_EVENT = 'keyboard.keydown', + KEYUP_EVENT = 'keyboard.keyup'; +var HANDLE_MODIFIER_ATTRIBUTE = 'input-handle-modified-keys'; +var DEFAULT_PRIORITY = 1000; + +/** + * A keyboard abstraction that may be activated and + * deactivated by users at will, consuming key events + * and triggering diagram actions. + * + * For keys pressed down, keyboard fires `keyboard.keydown` event. + * The event context contains one field which is `KeyboardEvent` event. + * + * The implementation fires the following key events that allow + * other components to hook into key handling: + * + * - keyboard.bind + * - keyboard.unbind + * - keyboard.init + * - keyboard.destroy + * + * All events contain one field which is node. + * + * A default binding for the keyboard may be specified via the + * `keyboard.bindTo` configuration option. + * + * @param {Config} config + * @param {EventBus} eventBus + */ +function Keyboard(config, eventBus) { + var self = this; + this._config = config || {}; + this._eventBus = eventBus; + this._keydownHandler = this._keydownHandler.bind(this); + this._keyupHandler = this._keyupHandler.bind(this); + + // properly clean dom registrations + eventBus.on('diagram.destroy', function () { + self._fire('destroy'); + self.unbind(); + }); + eventBus.on('diagram.init', function () { + self._fire('init'); + }); + eventBus.on('attach', function () { + if (config && config.bindTo) { + self.bind(config.bindTo); + } + }); + eventBus.on('detach', function () { + self.unbind(); + }); +} +Keyboard.$inject = ['config.keyboard', 'eventBus']; +Keyboard.prototype._keydownHandler = function (event) { + this._keyHandler(event, KEYDOWN_EVENT); +}; +Keyboard.prototype._keyupHandler = function (event) { + this._keyHandler(event, KEYUP_EVENT); +}; +Keyboard.prototype._keyHandler = function (event, type) { + var eventBusResult; + if (this._isEventIgnored(event)) { + return; + } + var context = { + keyEvent: event + }; + eventBusResult = this._eventBus.fire(type || KEYDOWN_EVENT, context); + if (eventBusResult) { + event.preventDefault(); + } +}; +Keyboard.prototype._isEventIgnored = function (event) { + return isInput(event.target) && this._isModifiedKeyIgnored(event); +}; +Keyboard.prototype._isModifiedKeyIgnored = function (event) { + if (!(0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd)(event)) { + return true; + } + var allowedModifiers = this._getAllowedModifiers(event.target); + return !allowedModifiers.includes(event.key); +}; +Keyboard.prototype._getAllowedModifiers = function (element) { + var modifierContainer = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.closest)(element, '[' + HANDLE_MODIFIER_ATTRIBUTE + ']', true); + if (!modifierContainer || this._node && !this._node.contains(modifierContainer)) { + return []; + } + return modifierContainer.getAttribute(HANDLE_MODIFIER_ATTRIBUTE).split(','); +}; +Keyboard.prototype.bind = function (node) { + // make sure that the keyboard is only bound once to the DOM + this.unbind(); + this._node = node; + + // bind key events + min_dom__WEBPACK_IMPORTED_MODULE_1__.event.bind(node, 'keydown', this._keydownHandler, true); + min_dom__WEBPACK_IMPORTED_MODULE_1__.event.bind(node, 'keyup', this._keyupHandler, true); + this._fire('bind'); +}; +Keyboard.prototype.getBinding = function () { + return this._node; +}; +Keyboard.prototype.unbind = function () { + var node = this._node; + if (node) { + this._fire('unbind'); + + // unbind key events + min_dom__WEBPACK_IMPORTED_MODULE_1__.event.unbind(node, 'keydown', this._keydownHandler, true); + min_dom__WEBPACK_IMPORTED_MODULE_1__.event.unbind(node, 'keyup', this._keyupHandler, true); + } + this._node = null; +}; +Keyboard.prototype._fire = function (event) { + this._eventBus.fire('keyboard.' + event, { + node: this._node + }); +}; + +/** + * Add a listener function that is notified with `KeyboardEvent` whenever + * the keyboard is bound and the user presses a key. If no priority is + * provided, the default value of 1000 is used. + * + * @param {number} [priority] + * @param {Function} listener + * @param {string} type + */ +Keyboard.prototype.addListener = function (priority, listener, type) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isFunction)(priority)) { + type = listener; + listener = priority; + priority = DEFAULT_PRIORITY; + } + this._eventBus.on(type || KEYDOWN_EVENT, priority, listener); +}; +Keyboard.prototype.removeListener = function (listener, type) { + this._eventBus.off(type || KEYDOWN_EVENT, listener); +}; +Keyboard.prototype.hasModifier = _KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.hasModifier; +Keyboard.prototype.isCmd = _KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd; +Keyboard.prototype.isShift = _KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isShift; +Keyboard.prototype.isKey = _KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isKey; + +// helpers /////// + +function isInput(target) { + return target && ((0,min_dom__WEBPACK_IMPORTED_MODULE_1__.matches)(target, 'input, textarea') || target.contentEditable === 'true'); +} + +/***/ }), + +/***/ 17946: +/*!***************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/keyboard/KeyboardBindings.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ KEYCODE_C: () => (/* binding */ KEYCODE_C), +/* harmony export */ KEYCODE_V: () => (/* binding */ KEYCODE_V), +/* harmony export */ KEYCODE_Y: () => (/* binding */ KEYCODE_Y), +/* harmony export */ KEYCODE_Z: () => (/* binding */ KEYCODE_Z), +/* harmony export */ KEYS_COPY: () => (/* binding */ KEYS_COPY), +/* harmony export */ KEYS_PASTE: () => (/* binding */ KEYS_PASTE), +/* harmony export */ KEYS_REDO: () => (/* binding */ KEYS_REDO), +/* harmony export */ KEYS_UNDO: () => (/* binding */ KEYS_UNDO), +/* harmony export */ "default": () => (/* binding */ KeyboardBindings) +/* harmony export */ }); +/* harmony import */ var _KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./KeyboardUtil */ 13488); + +var LOW_PRIORITY = 500; +var KEYCODE_C = 67; +var KEYCODE_V = 86; +var KEYCODE_Y = 89; +var KEYCODE_Z = 90; +var KEYS_COPY = ['c', 'C', KEYCODE_C]; +var KEYS_PASTE = ['v', 'V', KEYCODE_V]; +var KEYS_REDO = ['y', 'Y', KEYCODE_Y]; +var KEYS_UNDO = ['z', 'Z', KEYCODE_Z]; + +/** + * Adds default keyboard bindings. + * + * This does not pull in any features will bind only actions that + * have previously been registered against the editorActions component. + * + * @param {EventBus} eventBus + * @param {Keyboard} keyboard + */ +function KeyboardBindings(eventBus, keyboard) { + var self = this; + eventBus.on('editorActions.init', LOW_PRIORITY, function (event) { + var editorActions = event.editorActions; + self.registerBindings(keyboard, editorActions); + }); +} +KeyboardBindings.$inject = ['eventBus', 'keyboard']; + +/** + * Register available keyboard bindings. + * + * @param {Keyboard} keyboard + * @param {EditorActions} editorActions + */ +KeyboardBindings.prototype.registerBindings = function (keyboard, editorActions) { + /** + * Add keyboard binding if respective editor action + * is registered. + * + * @param {string} action name + * @param {Function} fn that implements the key binding + */ + function addListener(action, fn) { + if (editorActions.isRegistered(action)) { + keyboard.addListener(fn); + } + } + + // undo + // (CTRL|CMD) + Z + addListener('undo', function (context) { + var event = context.keyEvent; + if ((0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isUndo)(event)) { + editorActions.trigger('undo'); + return true; + } + }); + + // redo + // CTRL + Y + // CMD + SHIFT + Z + addListener('redo', function (context) { + var event = context.keyEvent; + if ((0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isRedo)(event)) { + editorActions.trigger('redo'); + return true; + } + }); + + // copy + // CTRL/CMD + C + addListener('copy', function (context) { + var event = context.keyEvent; + if ((0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCopy)(event)) { + editorActions.trigger('copy'); + return true; + } + }); + + // paste + // CTRL/CMD + V + addListener('paste', function (context) { + var event = context.keyEvent; + if ((0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isPaste)(event)) { + editorActions.trigger('paste'); + return true; + } + }); + + // zoom in one step + // CTRL/CMD + + + addListener('stepZoom', function (context) { + var event = context.keyEvent; + + // quirk: it has to be triggered by `=` as well to work on international keyboard layout + // cf: https://github.com/bpmn-io/bpmn-js/issues/1362#issuecomment-722989754 + if ((0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isKey)(['+', 'Add', '='], event) && (0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd)(event)) { + editorActions.trigger('stepZoom', { + value: 1 + }); + return true; + } + }); + + // zoom out one step + // CTRL + - + addListener('stepZoom', function (context) { + var event = context.keyEvent; + if ((0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isKey)(['-', 'Subtract'], event) && (0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd)(event)) { + editorActions.trigger('stepZoom', { + value: -1 + }); + return true; + } + }); + + // zoom to the default level + // CTRL + 0 + addListener('zoom', function (context) { + var event = context.keyEvent; + if ((0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isKey)('0', event) && (0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd)(event)) { + editorActions.trigger('zoom', { + value: 1 + }); + return true; + } + }); + + // delete selected element + // DEL + addListener('removeSelection', function (context) { + var event = context.keyEvent; + if ((0,_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isKey)(['Backspace', 'Delete', 'Del'], event)) { + editorActions.trigger('removeSelection'); + return true; + } + }); +}; + +/***/ }), + +/***/ 13488: +/*!***********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/keyboard/KeyboardUtil.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ hasModifier: () => (/* binding */ hasModifier), +/* harmony export */ isCmd: () => (/* binding */ isCmd), +/* harmony export */ isCopy: () => (/* binding */ isCopy), +/* harmony export */ isKey: () => (/* binding */ isKey), +/* harmony export */ isPaste: () => (/* binding */ isPaste), +/* harmony export */ isRedo: () => (/* binding */ isRedo), +/* harmony export */ isShift: () => (/* binding */ isShift), +/* harmony export */ isUndo: () => (/* binding */ isUndo) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +var KEYCODE_C = 67; +var KEYCODE_V = 86; +var KEYCODE_Y = 89; +var KEYCODE_Z = 90; +var KEYS_COPY = ['c', 'C', KEYCODE_C]; +var KEYS_PASTE = ['v', 'V', KEYCODE_V]; +var KEYS_REDO = ['y', 'Y', KEYCODE_Y]; +var KEYS_UNDO = ['z', 'Z', KEYCODE_Z]; + +/** + * Returns true if event was triggered with any modifier + * @param {KeyboardEvent} event + */ +function hasModifier(event) { + return event.ctrlKey || event.metaKey || event.shiftKey || event.altKey; +} + +/** + * @param {KeyboardEvent} event + */ +function isCmd(event) { + // ensure we don't react to AltGr + // (mapped to CTRL + ALT) + if (event.altKey) { + return false; + } + return event.ctrlKey || event.metaKey; +} + +/** + * Checks if key pressed is one of provided keys. + * + * @param {string|Array} keys + * @param {KeyboardEvent} event + */ +function isKey(keys, event) { + keys = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(keys) ? keys : [keys]; + return keys.indexOf(event.key) !== -1 || keys.indexOf(event.keyCode) !== -1; +} + +/** + * @param {KeyboardEvent} event + */ +function isShift(event) { + return event.shiftKey; +} +function isCopy(event) { + return isCmd(event) && isKey(KEYS_COPY, event); +} +function isPaste(event) { + return isCmd(event) && isKey(KEYS_PASTE, event); +} +function isUndo(event) { + return isCmd(event) && !isShift(event) && isKey(KEYS_UNDO, event); +} +function isRedo(event) { + return isCmd(event) && (isKey(KEYS_REDO, event) || isKey(KEYS_UNDO, event) && isShift(event)); +} + +/***/ }), + +/***/ 6329: +/*!****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/keyboard/index.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _Keyboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Keyboard */ 23844); +/* harmony import */ var _KeyboardBindings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./KeyboardBindings */ 17946); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['keyboard', 'keyboardBindings'], + keyboard: ['type', _Keyboard__WEBPACK_IMPORTED_MODULE_0__["default"]], + keyboardBindings: ['type', _KeyboardBindings__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 64279: +/*!****************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/label-support/LabelSupport.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ LabelSupport) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_Collections__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/Collections */ 39233); +/* harmony import */ var _util_Removal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/Removal */ 80324); +/* harmony import */ var _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../command/CommandInterceptor */ 35353); + + +var LOW_PRIORITY = 250, + HIGH_PRIORITY = 1400; + + + + +/** + * A handler that makes sure labels are properly moved with + * their label targets. + * + * @param {didi.Injector} injector + * @param {EventBus} eventBus + * @param {Modeling} modeling + */ +function LabelSupport(injector, eventBus, modeling) { + _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + var movePreview = injector.get('movePreview', false); + + // remove labels from the collection that are being + // moved with other elements anyway + eventBus.on('shape.move.start', HIGH_PRIORITY, function (e) { + var context = e.context, + shapes = context.shapes, + validatedShapes = context.validatedShapes; + context.shapes = removeLabels(shapes); + context.validatedShapes = removeLabels(validatedShapes); + }); + + // add labels to visual's group + movePreview && eventBus.on('shape.move.start', LOW_PRIORITY, function (e) { + var context = e.context, + shapes = context.shapes; + var labels = []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(shapes, function (element) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(element.labels, function (label) { + if (!label.hidden && context.shapes.indexOf(label) === -1) { + labels.push(label); + } + if (element.labelTarget) { + labels.push(element); + } + }); + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(labels, function (label) { + movePreview.makeDraggable(context, label, true); + }); + }); + + // add all labels to move closure + this.preExecuted('elements.move', HIGH_PRIORITY, function (e) { + var context = e.context, + closure = context.closure, + enclosedElements = closure.enclosedElements; + var enclosedLabels = []; + + // find labels that are not part of + // move closure yet and add them + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(enclosedElements, function (element) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(element.labels, function (label) { + if (!enclosedElements[label.id]) { + enclosedLabels.push(label); + } + }); + }); + closure.addAll(enclosedLabels); + }); + this.preExecute(['connection.delete', 'shape.delete'], function (e) { + var context = e.context, + element = context.connection || context.shape; + (0,_util_Removal__WEBPACK_IMPORTED_MODULE_3__.saveClear)(element.labels, function (label) { + modeling.removeShape(label, { + nested: true + }); + }); + }); + this.execute('shape.delete', function (e) { + var context = e.context, + shape = context.shape, + labelTarget = shape.labelTarget; + + // unset labelTarget + if (labelTarget) { + context.labelTargetIndex = (0,_util_Collections__WEBPACK_IMPORTED_MODULE_4__.indexOf)(labelTarget.labels, shape); + context.labelTarget = labelTarget; + shape.labelTarget = null; + } + }); + this.revert('shape.delete', function (e) { + var context = e.context, + shape = context.shape, + labelTarget = context.labelTarget, + labelTargetIndex = context.labelTargetIndex; + + // restore labelTarget + if (labelTarget) { + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_4__.add)(labelTarget.labels, shape, labelTargetIndex); + shape.labelTarget = labelTarget; + } + }); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(LabelSupport, _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); +LabelSupport.$inject = ['injector', 'eventBus', 'modeling']; + +/** + * Return a filtered list of elements that do not + * contain attached elements with hosts being part + * of the selection. + * + * @param {Array} elements + * + * @return {Array} filtered + */ +function removeLabels(elements) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(elements, function (element) { + // filter out labels that are move together + // with their label targets + return elements.indexOf(element.labelTarget) === -1; + }); +} + +/***/ }), + +/***/ 54392: +/*!*********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/label-support/index.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _LabelSupport__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LabelSupport */ 64279); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['labelSupport'], + labelSupport: ['type', _LabelSupport__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 86943: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/lasso-tool/LassoTool.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ LassoTool) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/Elements */ 35723); +/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Mouse */ 53171); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ 57491); + + + + +var LASSO_TOOL_CURSOR = 'crosshair'; +function LassoTool(eventBus, canvas, dragging, elementRegistry, selection, toolManager, mouse) { + this._selection = selection; + this._dragging = dragging; + this._mouse = mouse; + var self = this; + + // lasso visuals implementation + + /** + * A helper that realizes the selection box visual + */ + var visuals = { + create: function (context) { + var container = canvas.getActiveLayer(), + frame; + frame = context.frame = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('rect'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(frame, { + class: 'djs-lasso-overlay', + width: 1, + height: 1, + x: 0, + y: 0 + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.append)(container, frame); + }, + update: function (context) { + var frame = context.frame, + bbox = context.bbox; + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(frame, { + x: bbox.x, + y: bbox.y, + width: bbox.width, + height: bbox.height + }); + }, + remove: function (context) { + if (context.frame) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.remove)(context.frame); + } + } + }; + toolManager.registerTool('lasso', { + tool: 'lasso.selection', + dragging: 'lasso' + }); + eventBus.on('lasso.selection.end', function (event) { + var target = event.originalEvent.target; + + // only reactive on diagram click + // on some occasions, event.hover is not set and we have to check if the target is an svg + if (!event.hover && !(target instanceof SVGElement)) { + return; + } + eventBus.once('lasso.selection.ended', function () { + self.activateLasso(event.originalEvent, true); + }); + }); + + // lasso interaction implementation + + eventBus.on('lasso.end', function (event) { + var bbox = toBBox(event); + var elements = elementRegistry.filter(function (element) { + return element; + }); + self.select(elements, bbox); + }); + eventBus.on('lasso.start', function (event) { + var context = event.context; + context.bbox = toBBox(event); + visuals.create(context); + }); + eventBus.on('lasso.move', function (event) { + var context = event.context; + context.bbox = toBBox(event); + visuals.update(context); + }); + eventBus.on('lasso.cleanup', function (event) { + var context = event.context; + visuals.remove(context); + }); + + // event integration + + eventBus.on('element.mousedown', 1500, function (event) { + if (!(0,_util_Mouse__WEBPACK_IMPORTED_MODULE_1__.hasSecondaryModifier)(event)) { + return; + } + self.activateLasso(event.originalEvent); + + // we've handled the event + return true; + }); +} +LassoTool.$inject = ['eventBus', 'canvas', 'dragging', 'elementRegistry', 'selection', 'toolManager', 'mouse']; +LassoTool.prototype.activateLasso = function (event, autoActivate) { + this._dragging.init(event, 'lasso', { + autoActivate: autoActivate, + cursor: LASSO_TOOL_CURSOR, + data: { + context: {} + } + }); +}; +LassoTool.prototype.activateSelection = function (event, autoActivate) { + this._dragging.init(event, 'lasso.selection', { + trapClick: false, + autoActivate: autoActivate, + cursor: LASSO_TOOL_CURSOR, + data: { + context: {} + } + }); +}; +LassoTool.prototype.select = function (elements, bbox) { + var selectedElements = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.getEnclosedElements)(elements, bbox); + this._selection.select((0,min_dash__WEBPACK_IMPORTED_MODULE_3__.values)(selectedElements)); +}; +LassoTool.prototype.toggle = function () { + if (this.isActive()) { + return this._dragging.cancel(); + } + var mouseEvent = this._mouse.getLastMoveEvent(); + this.activateSelection(mouseEvent, !!mouseEvent); +}; +LassoTool.prototype.isActive = function () { + var context = this._dragging.context(); + return context && /^lasso/.test(context.prefix); +}; +function toBBox(event) { + var start = { + x: event.x - event.dx, + y: event.y - event.dy + }; + var end = { + x: event.x, + y: event.y + }; + var bbox; + if (start.x <= end.x && start.y < end.y || start.x < end.x && start.y <= end.y) { + bbox = { + x: start.x, + y: start.y, + width: end.x - start.x, + height: end.y - start.y + }; + } else if (start.x >= end.x && start.y < end.y || start.x > end.x && start.y <= end.y) { + bbox = { + x: end.x, + y: start.y, + width: start.x - end.x, + height: end.y - start.y + }; + } else if (start.x <= end.x && start.y > end.y || start.x < end.x && start.y >= end.y) { + bbox = { + x: start.x, + y: end.y, + width: end.x - start.x, + height: start.y - end.y + }; + } else if (start.x >= end.x && start.y > end.y || start.x > end.x && start.y >= end.y) { + bbox = { + x: end.x, + y: end.y, + width: start.x - end.x, + height: start.y - end.y + }; + } else { + bbox = { + x: end.x, + y: end.y, + width: 0, + height: 0 + }; + } + return bbox; +} + +/***/ }), + +/***/ 10707: +/*!******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/lasso-tool/index.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _tool_manager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../tool-manager */ 22136); +/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mouse */ 26947); +/* harmony import */ var _LassoTool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./LassoTool */ 86943); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_tool_manager__WEBPACK_IMPORTED_MODULE_0__["default"], _mouse__WEBPACK_IMPORTED_MODULE_1__["default"]], + __init__: ['lassoTool'], + lassoTool: ['type', _LassoTool__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 98680: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/Modeling.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Modeling) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../model */ 83377); +/* harmony import */ var _cmd_AlignElementsHandler__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./cmd/AlignElementsHandler */ 80914); +/* harmony import */ var _cmd_AppendShapeHandler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cmd/AppendShapeHandler */ 237); +/* harmony import */ var _cmd_CreateConnectionHandler__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./cmd/CreateConnectionHandler */ 58492); +/* harmony import */ var _cmd_CreateElementsHandler__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./cmd/CreateElementsHandler */ 35631); +/* harmony import */ var _cmd_CreateLabelHandler__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./cmd/CreateLabelHandler */ 17320); +/* harmony import */ var _cmd_CreateShapeHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cmd/CreateShapeHandler */ 76569); +/* harmony import */ var _cmd_DeleteConnectionHandler__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./cmd/DeleteConnectionHandler */ 47561); +/* harmony import */ var _cmd_DeleteElementsHandler__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./cmd/DeleteElementsHandler */ 50150); +/* harmony import */ var _cmd_DeleteShapeHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cmd/DeleteShapeHandler */ 17714); +/* harmony import */ var _cmd_DistributeElementsHandler__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cmd/DistributeElementsHandler */ 67546); +/* harmony import */ var _cmd_LayoutConnectionHandler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./cmd/LayoutConnectionHandler */ 13706); +/* harmony import */ var _cmd_MoveConnectionHandler__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./cmd/MoveConnectionHandler */ 36775); +/* harmony import */ var _cmd_MoveElementsHandler__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./cmd/MoveElementsHandler */ 73168); +/* harmony import */ var _cmd_MoveShapeHandler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cmd/MoveShapeHandler */ 14820); +/* harmony import */ var _cmd_ReconnectConnectionHandler__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./cmd/ReconnectConnectionHandler */ 73189); +/* harmony import */ var _cmd_ReplaceShapeHandler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cmd/ReplaceShapeHandler */ 14999); +/* harmony import */ var _cmd_ResizeShapeHandler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cmd/ResizeShapeHandler */ 96709); +/* harmony import */ var _cmd_SpaceToolHandler__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cmd/SpaceToolHandler */ 58914); +/* harmony import */ var _cmd_ToggleShapeCollapseHandler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cmd/ToggleShapeCollapseHandler */ 84932); +/* harmony import */ var _cmd_UpdateAttachmentHandler__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./cmd/UpdateAttachmentHandler */ 88012); +/* harmony import */ var _cmd_UpdateWaypointsHandler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./cmd/UpdateWaypointsHandler */ 60747); + + + + + + + + + + + + + + + + + + + + + + + + +/** + * The basic modeling entry point. + * + * @param {EventBus} eventBus + * @param {ElementFactory} elementFactory + * @param {CommandStack} commandStack + */ +function Modeling(eventBus, elementFactory, commandStack) { + this._eventBus = eventBus; + this._elementFactory = elementFactory; + this._commandStack = commandStack; + var self = this; + eventBus.on('diagram.init', function () { + // register modeling handlers + self.registerHandlers(commandStack); + }); +} +Modeling.$inject = ['eventBus', 'elementFactory', 'commandStack']; +Modeling.prototype.getHandlers = function () { + return { + 'shape.append': _cmd_AppendShapeHandler__WEBPACK_IMPORTED_MODULE_0__["default"], + 'shape.create': _cmd_CreateShapeHandler__WEBPACK_IMPORTED_MODULE_1__["default"], + 'shape.delete': _cmd_DeleteShapeHandler__WEBPACK_IMPORTED_MODULE_2__["default"], + 'shape.move': _cmd_MoveShapeHandler__WEBPACK_IMPORTED_MODULE_3__["default"], + 'shape.resize': _cmd_ResizeShapeHandler__WEBPACK_IMPORTED_MODULE_4__["default"], + 'shape.replace': _cmd_ReplaceShapeHandler__WEBPACK_IMPORTED_MODULE_5__["default"], + 'shape.toggleCollapse': _cmd_ToggleShapeCollapseHandler__WEBPACK_IMPORTED_MODULE_6__["default"], + 'spaceTool': _cmd_SpaceToolHandler__WEBPACK_IMPORTED_MODULE_7__["default"], + 'label.create': _cmd_CreateLabelHandler__WEBPACK_IMPORTED_MODULE_8__["default"], + 'connection.create': _cmd_CreateConnectionHandler__WEBPACK_IMPORTED_MODULE_9__["default"], + 'connection.delete': _cmd_DeleteConnectionHandler__WEBPACK_IMPORTED_MODULE_10__["default"], + 'connection.move': _cmd_MoveConnectionHandler__WEBPACK_IMPORTED_MODULE_11__["default"], + 'connection.layout': _cmd_LayoutConnectionHandler__WEBPACK_IMPORTED_MODULE_12__["default"], + 'connection.updateWaypoints': _cmd_UpdateWaypointsHandler__WEBPACK_IMPORTED_MODULE_13__["default"], + 'connection.reconnect': _cmd_ReconnectConnectionHandler__WEBPACK_IMPORTED_MODULE_14__["default"], + 'elements.create': _cmd_CreateElementsHandler__WEBPACK_IMPORTED_MODULE_15__["default"], + 'elements.move': _cmd_MoveElementsHandler__WEBPACK_IMPORTED_MODULE_16__["default"], + 'elements.delete': _cmd_DeleteElementsHandler__WEBPACK_IMPORTED_MODULE_17__["default"], + 'elements.distribute': _cmd_DistributeElementsHandler__WEBPACK_IMPORTED_MODULE_18__["default"], + 'elements.align': _cmd_AlignElementsHandler__WEBPACK_IMPORTED_MODULE_19__["default"], + 'element.updateAttachment': _cmd_UpdateAttachmentHandler__WEBPACK_IMPORTED_MODULE_20__["default"] + }; +}; + +/** + * Register handlers with the command stack + * + * @param {CommandStack} commandStack + */ +Modeling.prototype.registerHandlers = function (commandStack) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_21__.forEach)(this.getHandlers(), function (handler, id) { + commandStack.registerHandler(id, handler); + }); +}; + +// modeling helpers ////////////////////// + +Modeling.prototype.moveShape = function (shape, delta, newParent, newParentIndex, hints) { + if (typeof newParentIndex === 'object') { + hints = newParentIndex; + newParentIndex = null; + } + var context = { + shape: shape, + delta: delta, + newParent: newParent, + newParentIndex: newParentIndex, + hints: hints || {} + }; + this._commandStack.execute('shape.move', context); +}; + +/** + * Update the attachment of the given shape. + * + * @param {djs.mode.Base} shape + * @param {djs.model.Base} [newHost] + */ +Modeling.prototype.updateAttachment = function (shape, newHost) { + var context = { + shape: shape, + newHost: newHost + }; + this._commandStack.execute('element.updateAttachment', context); +}; + +/** + * Move a number of shapes to a new target, either setting it as + * the new parent or attaching it. + * + * @param {Array} shapes + * @param {Point} delta + * @param {djs.model.Base} [target] + * @param {Object} [hints] + * @param {boolean} [hints.attach=false] + */ +Modeling.prototype.moveElements = function (shapes, delta, target, hints) { + hints = hints || {}; + var attach = hints.attach; + var newParent = target, + newHost; + if (attach === true) { + newHost = target; + newParent = target.parent; + } else if (attach === false) { + newHost = null; + } + var context = { + shapes: shapes, + delta: delta, + newParent: newParent, + newHost: newHost, + hints: hints + }; + this._commandStack.execute('elements.move', context); +}; +Modeling.prototype.moveConnection = function (connection, delta, newParent, newParentIndex, hints) { + if (typeof newParentIndex === 'object') { + hints = newParentIndex; + newParentIndex = undefined; + } + var context = { + connection: connection, + delta: delta, + newParent: newParent, + newParentIndex: newParentIndex, + hints: hints || {} + }; + this._commandStack.execute('connection.move', context); +}; +Modeling.prototype.layoutConnection = function (connection, hints) { + var context = { + connection: connection, + hints: hints || {} + }; + this._commandStack.execute('connection.layout', context); +}; + +/** + * Create connection. + * + * @param {djs.model.Base} source + * @param {djs.model.Base} target + * @param {number} [parentIndex] + * @param {Object|djs.model.Connection} connection + * @param {djs.model.Base} parent + * @param {Object} hints + * + * @return {djs.model.Connection} the created connection. + */ +Modeling.prototype.createConnection = function (source, target, parentIndex, connection, parent, hints) { + if (typeof parentIndex === 'object') { + hints = parent; + parent = connection; + connection = parentIndex; + parentIndex = undefined; + } + connection = this._create('connection', connection); + var context = { + source: source, + target: target, + parent: parent, + parentIndex: parentIndex, + connection: connection, + hints: hints + }; + this._commandStack.execute('connection.create', context); + return context.connection; +}; + +/** + * Create a shape at the specified position. + * + * @param {djs.model.Shape|Object} shape + * @param {Point} position + * @param {djs.model.Shape|djs.model.Root} target + * @param {number} [parentIndex] position in parents children list + * @param {Object} [hints] + * @param {boolean} [hints.attach] whether to attach to target or become a child + * + * @return {djs.model.Shape} the created shape + */ +Modeling.prototype.createShape = function (shape, position, target, parentIndex, hints) { + if (typeof parentIndex !== 'number') { + hints = parentIndex; + parentIndex = undefined; + } + hints = hints || {}; + var attach = hints.attach, + parent, + host; + shape = this._create('shape', shape); + if (attach) { + parent = target.parent; + host = target; + } else { + parent = target; + } + var context = { + position: position, + shape: shape, + parent: parent, + parentIndex: parentIndex, + host: host, + hints: hints + }; + this._commandStack.execute('shape.create', context); + return context.shape; +}; +Modeling.prototype.createElements = function (elements, position, parent, parentIndex, hints) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_21__.isArray)(elements)) { + elements = [elements]; + } + if (typeof parentIndex !== 'number') { + hints = parentIndex; + parentIndex = undefined; + } + hints = hints || {}; + var context = { + position: position, + elements: elements, + parent: parent, + parentIndex: parentIndex, + hints: hints + }; + this._commandStack.execute('elements.create', context); + return context.elements; +}; +Modeling.prototype.createLabel = function (labelTarget, position, label, parent) { + label = this._create('label', label); + var context = { + labelTarget: labelTarget, + position: position, + parent: parent || labelTarget.parent, + shape: label + }; + this._commandStack.execute('label.create', context); + return context.shape; +}; + +/** + * Append shape to given source, drawing a connection + * between source and the newly created shape. + * + * @param {djs.model.Shape} source + * @param {djs.model.Shape|Object} shape + * @param {Point} position + * @param {djs.model.Shape} target + * @param {Object} [hints] + * @param {boolean} [hints.attach] + * @param {djs.model.Connection|Object} [hints.connection] + * @param {djs.model.Base} [hints.connectionParent] + * + * @return {djs.model.Shape} the newly created shape + */ +Modeling.prototype.appendShape = function (source, shape, position, target, hints) { + hints = hints || {}; + shape = this._create('shape', shape); + var context = { + source: source, + position: position, + target: target, + shape: shape, + connection: hints.connection, + connectionParent: hints.connectionParent, + hints: hints + }; + this._commandStack.execute('shape.append', context); + return context.shape; +}; +Modeling.prototype.removeElements = function (elements) { + var context = { + elements: elements + }; + this._commandStack.execute('elements.delete', context); +}; +Modeling.prototype.distributeElements = function (groups, axis, dimension) { + var context = { + groups: groups, + axis: axis, + dimension: dimension + }; + this._commandStack.execute('elements.distribute', context); +}; +Modeling.prototype.removeShape = function (shape, hints) { + var context = { + shape: shape, + hints: hints || {} + }; + this._commandStack.execute('shape.delete', context); +}; +Modeling.prototype.removeConnection = function (connection, hints) { + var context = { + connection: connection, + hints: hints || {} + }; + this._commandStack.execute('connection.delete', context); +}; +Modeling.prototype.replaceShape = function (oldShape, newShape, hints) { + var context = { + oldShape: oldShape, + newData: newShape, + hints: hints || {} + }; + this._commandStack.execute('shape.replace', context); + return context.newShape; +}; +Modeling.prototype.alignElements = function (elements, alignment) { + var context = { + elements: elements, + alignment: alignment + }; + this._commandStack.execute('elements.align', context); +}; +Modeling.prototype.resizeShape = function (shape, newBounds, minBounds, hints) { + var context = { + shape: shape, + newBounds: newBounds, + minBounds: minBounds, + hints: hints + }; + this._commandStack.execute('shape.resize', context); +}; +Modeling.prototype.createSpace = function (movingShapes, resizingShapes, delta, direction, start) { + var context = { + delta: delta, + direction: direction, + movingShapes: movingShapes, + resizingShapes: resizingShapes, + start: start + }; + this._commandStack.execute('spaceTool', context); +}; +Modeling.prototype.updateWaypoints = function (connection, newWaypoints, hints) { + var context = { + connection: connection, + newWaypoints: newWaypoints, + hints: hints || {} + }; + this._commandStack.execute('connection.updateWaypoints', context); +}; +Modeling.prototype.reconnect = function (connection, source, target, dockingOrPoints, hints) { + var context = { + connection: connection, + newSource: source, + newTarget: target, + dockingOrPoints: dockingOrPoints, + hints: hints || {} + }; + this._commandStack.execute('connection.reconnect', context); +}; +Modeling.prototype.reconnectStart = function (connection, newSource, dockingOrPoints, hints) { + if (!hints) { + hints = {}; + } + this.reconnect(connection, newSource, connection.target, dockingOrPoints, (0,min_dash__WEBPACK_IMPORTED_MODULE_21__.assign)(hints, { + docking: 'source' + })); +}; +Modeling.prototype.reconnectEnd = function (connection, newTarget, dockingOrPoints, hints) { + if (!hints) { + hints = {}; + } + this.reconnect(connection, connection.source, newTarget, dockingOrPoints, (0,min_dash__WEBPACK_IMPORTED_MODULE_21__.assign)(hints, { + docking: 'target' + })); +}; +Modeling.prototype.connect = function (source, target, attrs, hints) { + return this.createConnection(source, target, attrs || {}, source.parent, hints); +}; +Modeling.prototype._create = function (type, attrs) { + if (attrs instanceof _model__WEBPACK_IMPORTED_MODULE_22__.Base) { + return attrs; + } else { + return this._elementFactory.create(type, attrs); + } +}; +Modeling.prototype.toggleCollapse = function (shape, hints) { + var context = { + shape: shape, + hints: hints || {} + }; + this._commandStack.execute('shape.toggleCollapse', context); +}; + +/***/ }), + +/***/ 80914: +/*!***********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/AlignElementsHandler.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AlignElements) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * A handler that align elements in a certain way. + * + */ +function AlignElements(modeling, canvas) { + this._modeling = modeling; + this._canvas = canvas; +} +AlignElements.$inject = ['modeling', 'canvas']; +AlignElements.prototype.preExecute = function (context) { + var modeling = this._modeling; + var elements = context.elements, + alignment = context.alignment; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + var delta = { + x: 0, + y: 0 + }; + if (alignment.left) { + delta.x = alignment.left - element.x; + } else if (alignment.right) { + delta.x = alignment.right - element.width - element.x; + } else if (alignment.center) { + delta.x = alignment.center - Math.round(element.width / 2) - element.x; + } else if (alignment.top) { + delta.y = alignment.top - element.y; + } else if (alignment.bottom) { + delta.y = alignment.bottom - element.height - element.y; + } else if (alignment.middle) { + delta.y = alignment.middle - Math.round(element.height / 2) - element.y; + } + modeling.moveElements([element], delta, element.parent); + }); +}; +AlignElements.prototype.postExecute = function (context) {}; + +/***/ }), + +/***/ 237: +/*!*********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/AppendShapeHandler.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ AppendShapeHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * A handler that implements reversible appending of shapes + * to a source shape. + * + * @param {canvas} Canvas + * @param {elementFactory} ElementFactory + * @param {modeling} Modeling + */ +function AppendShapeHandler(modeling) { + this._modeling = modeling; +} +AppendShapeHandler.$inject = ['modeling']; + +// api ////////////////////// + +/** + * Creates a new shape + * + * @param {Object} context + * @param {ElementDescriptor} context.shape the new shape + * @param {ElementDescriptor} context.source the source object + * @param {ElementDescriptor} context.parent the parent object + * @param {Point} context.position position of the new element + */ +AppendShapeHandler.prototype.preExecute = function (context) { + var source = context.source; + if (!source) { + throw new Error('source required'); + } + var target = context.target || source.parent, + shape = context.shape, + hints = context.hints || {}; + shape = context.shape = this._modeling.createShape(shape, context.position, target, { + attach: hints.attach + }); + context.shape = shape; +}; +AppendShapeHandler.prototype.postExecute = function (context) { + var hints = context.hints || {}; + if (!existsConnection(context.source, context.shape)) { + // create connection + if (hints.connectionTarget === context.source) { + this._modeling.connect(context.shape, context.source, context.connection); + } else { + this._modeling.connect(context.source, context.shape, context.connection); + } + } +}; +function existsConnection(source, target) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.some)(source.outgoing, function (c) { + return c.target === target; + }); +} + +/***/ }), + +/***/ 58492: +/*!**************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/CreateConnectionHandler.js ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CreateConnectionHandler) +/* harmony export */ }); +function CreateConnectionHandler(canvas, layouter) { + this._canvas = canvas; + this._layouter = layouter; +} +CreateConnectionHandler.$inject = ['canvas', 'layouter']; + +// api ////////////////////// + +/** + * Appends a shape to a target shape + * + * @param {Object} context + * @param {djs.element.Base} context.source the source object + * @param {djs.element.Base} context.target the parent object + * @param {Point} context.position position of the new element + */ +CreateConnectionHandler.prototype.execute = function (context) { + var connection = context.connection, + source = context.source, + target = context.target, + parent = context.parent, + parentIndex = context.parentIndex, + hints = context.hints; + if (!source || !target) { + throw new Error('source and target required'); + } + if (!parent) { + throw new Error('parent required'); + } + connection.source = source; + connection.target = target; + if (!connection.waypoints) { + connection.waypoints = this._layouter.layoutConnection(connection, hints); + } + + // add connection + this._canvas.addConnection(connection, parent, parentIndex); + return connection; +}; +CreateConnectionHandler.prototype.revert = function (context) { + var connection = context.connection; + this._canvas.removeConnection(connection); + connection.source = null; + connection.target = null; + return connection; +}; + +/***/ }), + +/***/ 35631: +/*!************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/CreateElementsHandler.js ***! + \************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CreateElementsHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/Elements */ 35723); + + +var round = Math.round; +function CreateElementsHandler(modeling) { + this._modeling = modeling; +} +CreateElementsHandler.$inject = ['modeling']; +CreateElementsHandler.prototype.preExecute = function (context) { + var elements = context.elements, + parent = context.parent, + parentIndex = context.parentIndex, + position = context.position, + hints = context.hints; + var modeling = this._modeling; + + // make sure each element has x and y + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element.x)) { + element.x = 0; + } + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(element.y)) { + element.y = 0; + } + }); + var bbox = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_1__.getBBox)(elements); + + // center elements around position + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + if (isConnection(element)) { + element.waypoints = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(element.waypoints, function (waypoint) { + return { + x: round(waypoint.x - bbox.x - bbox.width / 2 + position.x), + y: round(waypoint.y - bbox.y - bbox.height / 2 + position.y) + }; + }); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(element, { + x: round(element.x - bbox.x - bbox.width / 2 + position.x), + y: round(element.y - bbox.y - bbox.height / 2 + position.y) + }); + }); + var parents = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_1__.getParents)(elements); + var cache = {}; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + if (isConnection(element)) { + cache[element.id] = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(parentIndex) ? modeling.createConnection(cache[element.source.id], cache[element.target.id], parentIndex, element, element.parent || parent, hints) : modeling.createConnection(cache[element.source.id], cache[element.target.id], element, element.parent || parent, hints); + return; + } + var createShapeHints = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, hints); + if (parents.indexOf(element) === -1) { + createShapeHints.autoResize = false; + } + cache[element.id] = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(parentIndex) ? modeling.createShape(element, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.pick)(element, ['x', 'y', 'width', 'height']), element.parent || parent, parentIndex, createShapeHints) : modeling.createShape(element, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.pick)(element, ['x', 'y', 'width', 'height']), element.parent || parent, createShapeHints); + }); + context.elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.values)(cache); +}; + +// helpers ////////// + +function isConnection(element) { + return !!element.waypoints; +} + +/***/ }), + +/***/ 17320: +/*!*********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/CreateLabelHandler.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CreateLabelHandler) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _CreateShapeHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CreateShapeHandler */ 76569); + + + +/** + * A handler that attaches a label to a given target shape. + * + * @param {Canvas} canvas + */ +function CreateLabelHandler(canvas) { + _CreateShapeHandler__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, canvas); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(CreateLabelHandler, _CreateShapeHandler__WEBPACK_IMPORTED_MODULE_1__["default"]); +CreateLabelHandler.$inject = ['canvas']; + +// api ////////////////////// + +var originalExecute = _CreateShapeHandler__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.execute; + +/** + * Appends a label to a target shape. + * + * @method CreateLabelHandler#execute + * + * @param {Object} context + * @param {ElementDescriptor} context.target the element the label is attached to + * @param {ElementDescriptor} context.parent the parent object + * @param {Point} context.position position of the new element + */ +CreateLabelHandler.prototype.execute = function (context) { + var label = context.shape; + ensureValidDimensions(label); + label.labelTarget = context.labelTarget; + return originalExecute.call(this, context); +}; +var originalRevert = _CreateShapeHandler__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.revert; + +/** + * Undo append by removing the shape + */ +CreateLabelHandler.prototype.revert = function (context) { + context.shape.labelTarget = null; + return originalRevert.call(this, context); +}; + +// helpers ////////////////////// + +function ensureValidDimensions(label) { + // make sure a label has valid { width, height } dimensions + ['width', 'height'].forEach(function (prop) { + if (typeof label[prop] === 'undefined') { + label[prop] = 0; + } + }); +} + +/***/ }), + +/***/ 76569: +/*!*********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/CreateShapeHandler.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CreateShapeHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +var round = Math.round; + +/** + * A handler that implements reversible addition of shapes. + * + * @param {canvas} Canvas + */ +function CreateShapeHandler(canvas) { + this._canvas = canvas; +} +CreateShapeHandler.$inject = ['canvas']; + +// api ////////////////////// + +/** + * Appends a shape to a target shape + * + * @param {Object} context + * @param {djs.model.Base} context.parent the parent object + * @param {Point} context.position position of the new element + */ +CreateShapeHandler.prototype.execute = function (context) { + var shape = context.shape, + positionOrBounds = context.position, + parent = context.parent, + parentIndex = context.parentIndex; + if (!parent) { + throw new Error('parent required'); + } + if (!positionOrBounds) { + throw new Error('position required'); + } + + // (1) add at event center position _or_ at given bounds + if (positionOrBounds.width !== undefined) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(shape, positionOrBounds); + } else { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(shape, { + x: positionOrBounds.x - round(shape.width / 2), + y: positionOrBounds.y - round(shape.height / 2) + }); + } + + // (2) add to canvas + this._canvas.addShape(shape, parent, parentIndex); + return shape; +}; + +/** + * Undo append by removing the shape + */ +CreateShapeHandler.prototype.revert = function (context) { + var shape = context.shape; + + // (3) remove form canvas + this._canvas.removeShape(shape); + return shape; +}; + +/***/ }), + +/***/ 47561: +/*!**************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/DeleteConnectionHandler.js ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DeleteConnectionHandler) +/* harmony export */ }); +/* harmony import */ var _util_Collections__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/Collections */ 39233); + + +/** + * A handler that implements reversible deletion of Connections. + */ +function DeleteConnectionHandler(canvas, modeling) { + this._canvas = canvas; + this._modeling = modeling; +} +DeleteConnectionHandler.$inject = ['canvas', 'modeling']; +DeleteConnectionHandler.prototype.execute = function (context) { + var connection = context.connection, + parent = connection.parent; + context.parent = parent; + + // remember containment + context.parentIndex = (0,_util_Collections__WEBPACK_IMPORTED_MODULE_0__.indexOf)(parent.children, connection); + context.source = connection.source; + context.target = connection.target; + this._canvas.removeConnection(connection); + connection.source = null; + connection.target = null; + return connection; +}; + +/** + * Command revert implementation. + */ +DeleteConnectionHandler.prototype.revert = function (context) { + var connection = context.connection, + parent = context.parent, + parentIndex = context.parentIndex; + connection.source = context.source; + connection.target = context.target; + + // restore containment + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_0__.add)(parent.children, connection, parentIndex); + this._canvas.addConnection(connection, parent); + return connection; +}; + +/***/ }), + +/***/ 50150: +/*!************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/DeleteElementsHandler.js ***! + \************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DeleteElementsHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +function DeleteElementsHandler(modeling, elementRegistry) { + this._modeling = modeling; + this._elementRegistry = elementRegistry; +} +DeleteElementsHandler.$inject = ['modeling', 'elementRegistry']; +DeleteElementsHandler.prototype.postExecute = function (context) { + var modeling = this._modeling, + elementRegistry = this._elementRegistry, + elements = context.elements; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + // element may have been removed with previous + // remove operations already (e.g. in case of nesting) + if (!elementRegistry.get(element.id)) { + return; + } + if (element.waypoints) { + modeling.removeConnection(element); + } else { + modeling.removeShape(element); + } + }); +}; + +/***/ }), + +/***/ 17714: +/*!*********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/DeleteShapeHandler.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DeleteShapeHandler) +/* harmony export */ }); +/* harmony import */ var _util_Collections__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../util/Collections */ 39233); +/* harmony import */ var _util_Removal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/Removal */ 80324); + + + +/** + * A handler that implements reversible deletion of shapes. + * + */ +function DeleteShapeHandler(canvas, modeling) { + this._canvas = canvas; + this._modeling = modeling; +} +DeleteShapeHandler.$inject = ['canvas', 'modeling']; + +/** + * - Remove connections + * - Remove all direct children + */ +DeleteShapeHandler.prototype.preExecute = function (context) { + var modeling = this._modeling; + var shape = context.shape; + + // remove connections + (0,_util_Removal__WEBPACK_IMPORTED_MODULE_0__.saveClear)(shape.incoming, function (connection) { + // To make sure that the connection isn't removed twice + // For example if a container is removed + modeling.removeConnection(connection, { + nested: true + }); + }); + (0,_util_Removal__WEBPACK_IMPORTED_MODULE_0__.saveClear)(shape.outgoing, function (connection) { + modeling.removeConnection(connection, { + nested: true + }); + }); + + // remove child shapes and connections + (0,_util_Removal__WEBPACK_IMPORTED_MODULE_0__.saveClear)(shape.children, function (child) { + if (isConnection(child)) { + modeling.removeConnection(child, { + nested: true + }); + } else { + modeling.removeShape(child, { + nested: true + }); + } + }); +}; + +/** + * Remove shape and remember the parent + */ +DeleteShapeHandler.prototype.execute = function (context) { + var canvas = this._canvas; + var shape = context.shape, + oldParent = shape.parent; + context.oldParent = oldParent; + + // remove containment + context.oldParentIndex = (0,_util_Collections__WEBPACK_IMPORTED_MODULE_1__.indexOf)(oldParent.children, shape); + + // remove shape + canvas.removeShape(shape); + return shape; +}; + +/** + * Command revert implementation + */ +DeleteShapeHandler.prototype.revert = function (context) { + var canvas = this._canvas; + var shape = context.shape, + oldParent = context.oldParent, + oldParentIndex = context.oldParentIndex; + + // restore containment + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_1__.add)(oldParent.children, shape, oldParentIndex); + canvas.addShape(shape, oldParent); + return shape; +}; +function isConnection(element) { + return element.waypoints; +} + +/***/ }), + +/***/ 67546: +/*!****************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/DistributeElementsHandler.js ***! + \****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ DistributeElements) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * A handler that distributes elements evenly. + */ +function DistributeElements(modeling) { + this._modeling = modeling; +} +DistributeElements.$inject = ['modeling']; +var OFF_AXIS = { + x: 'y', + y: 'x' +}; +DistributeElements.prototype.preExecute = function (context) { + var modeling = this._modeling; + var groups = context.groups, + axis = context.axis, + dimension = context.dimension; + function updateRange(group, element) { + group.range.min = Math.min(element[axis], group.range.min); + group.range.max = Math.max(element[axis] + element[dimension], group.range.max); + } + function center(element) { + return element[axis] + element[dimension] / 2; + } + function lastIdx(arr) { + return arr.length - 1; + } + function rangeDiff(range) { + return range.max - range.min; + } + function centerElement(refCenter, element) { + var delta = { + y: 0 + }; + delta[axis] = refCenter - center(element); + if (delta[axis]) { + delta[OFF_AXIS[axis]] = 0; + modeling.moveElements([element], delta, element.parent); + } + } + var firstGroup = groups[0], + lastGroupIdx = lastIdx(groups), + lastGroup = groups[lastGroupIdx]; + var margin, + spaceInBetween, + groupsSize = 0; // the size of each range + + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(groups, function (group, idx) { + var sortedElements, refElem, refCenter; + if (group.elements.length < 2) { + if (idx && idx !== groups.length - 1) { + updateRange(group, group.elements[0]); + groupsSize += rangeDiff(group.range); + } + return; + } + sortedElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.sortBy)(group.elements, axis); + refElem = sortedElements[0]; + if (idx === lastGroupIdx) { + refElem = sortedElements[lastIdx(sortedElements)]; + } + refCenter = center(refElem); + + // wanna update the ranges after the shapes have been centered + group.range = null; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(sortedElements, function (element) { + centerElement(refCenter, element); + if (group.range === null) { + group.range = { + min: element[axis], + max: element[axis] + element[dimension] + }; + return; + } + + // update group's range after centering the range elements + updateRange(group, element); + }); + if (idx && idx !== groups.length - 1) { + groupsSize += rangeDiff(group.range); + } + }); + spaceInBetween = Math.abs(lastGroup.range.min - firstGroup.range.max); + margin = Math.round((spaceInBetween - groupsSize) / (groups.length - 1)); + if (margin < groups.length - 1) { + return; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(groups, function (group, groupIdx) { + var delta = {}, + prevGroup; + if (group === firstGroup || group === lastGroup) { + return; + } + prevGroup = groups[groupIdx - 1]; + group.range.max = 0; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(group.elements, function (element, idx) { + delta[OFF_AXIS[axis]] = 0; + delta[axis] = prevGroup.range.max - element[axis] + margin; + if (group.range.min !== element[axis]) { + delta[axis] += element[axis] - group.range.min; + } + if (delta[axis]) { + modeling.moveElements([element], delta, element.parent); + } + group.range.max = Math.max(element[axis] + element[dimension], idx ? group.range.max : 0); + }); + }); +}; +DistributeElements.prototype.postExecute = function (context) {}; + +/***/ }), + +/***/ 13706: +/*!**************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/LayoutConnectionHandler.js ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ LayoutConnectionHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * A handler that implements reversible moving of shapes. + */ +function LayoutConnectionHandler(layouter, canvas) { + this._layouter = layouter; + this._canvas = canvas; +} +LayoutConnectionHandler.$inject = ['layouter', 'canvas']; +LayoutConnectionHandler.prototype.execute = function (context) { + var connection = context.connection; + var oldWaypoints = connection.waypoints; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(context, { + oldWaypoints: oldWaypoints + }); + connection.waypoints = this._layouter.layoutConnection(connection, context.hints); + return connection; +}; +LayoutConnectionHandler.prototype.revert = function (context) { + var connection = context.connection; + connection.waypoints = context.oldWaypoints; + return connection; +}; + +/***/ }), + +/***/ 36775: +/*!************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/MoveConnectionHandler.js ***! + \************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MoveConnectionHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Collections__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/Collections */ 39233); + + + +/** + * A handler that implements reversible moving of connections. + * + * The handler differs from the layout connection handler in a sense + * that it preserves the connection layout. + */ +function MoveConnectionHandler() {} +MoveConnectionHandler.prototype.execute = function (context) { + var connection = context.connection, + delta = context.delta; + var newParent = context.newParent || connection.parent, + newParentIndex = context.newParentIndex, + oldParent = connection.parent; + + // save old parent in context + context.oldParent = oldParent; + context.oldParentIndex = (0,_util_Collections__WEBPACK_IMPORTED_MODULE_0__.remove)(oldParent.children, connection); + + // add to new parent at position + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_0__.add)(newParent.children, connection, newParentIndex); + + // update parent + connection.parent = newParent; + + // update waypoint positions + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(connection.waypoints, function (p) { + p.x += delta.x; + p.y += delta.y; + if (p.original) { + p.original.x += delta.x; + p.original.y += delta.y; + } + }); + return connection; +}; +MoveConnectionHandler.prototype.revert = function (context) { + var connection = context.connection, + newParent = connection.parent, + oldParent = context.oldParent, + oldParentIndex = context.oldParentIndex, + delta = context.delta; + + // remove from newParent + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_0__.remove)(newParent.children, connection); + + // restore previous location in old parent + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_0__.add)(oldParent.children, connection, oldParentIndex); + + // restore parent + connection.parent = oldParent; + + // revert to old waypoint positions + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(connection.waypoints, function (p) { + p.x -= delta.x; + p.y -= delta.y; + if (p.original) { + p.original.x -= delta.x; + p.original.y -= delta.y; + } + }); + return connection; +}; + +/***/ }), + +/***/ 73168: +/*!**********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/MoveElementsHandler.js ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MoveElementsHandler) +/* harmony export */ }); +/* harmony import */ var _helper_MoveHelper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helper/MoveHelper */ 47732); + + +/** + * A handler that implements reversible moving of shapes. + */ +function MoveElementsHandler(modeling) { + this._helper = new _helper_MoveHelper__WEBPACK_IMPORTED_MODULE_0__["default"](modeling); +} +MoveElementsHandler.$inject = ['modeling']; +MoveElementsHandler.prototype.preExecute = function (context) { + context.closure = this._helper.getClosure(context.shapes); +}; +MoveElementsHandler.prototype.postExecute = function (context) { + var hints = context.hints, + primaryShape; + if (hints && hints.primaryShape) { + primaryShape = hints.primaryShape; + hints.oldParent = primaryShape.parent; + } + this._helper.moveClosure(context.closure, context.delta, context.newParent, context.newHost, primaryShape); +}; + +/***/ }), + +/***/ 14820: +/*!*******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/MoveShapeHandler.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MoveShapeHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _helper_MoveHelper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helper/MoveHelper */ 47732); +/* harmony import */ var _util_Collections__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../util/Collections */ 39233); +/* harmony import */ var _helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helper/AnchorsHelper */ 25395); + + + + + +/** + * A handler that implements reversible moving of shapes. + */ +function MoveShapeHandler(modeling) { + this._modeling = modeling; + this._helper = new _helper_MoveHelper__WEBPACK_IMPORTED_MODULE_0__["default"](modeling); +} +MoveShapeHandler.$inject = ['modeling']; +MoveShapeHandler.prototype.execute = function (context) { + var shape = context.shape, + delta = context.delta, + newParent = context.newParent || shape.parent, + newParentIndex = context.newParentIndex, + oldParent = shape.parent; + context.oldBounds = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.pick)(shape, ['x', 'y', 'width', 'height']); + + // save old parent in context + context.oldParent = oldParent; + context.oldParentIndex = (0,_util_Collections__WEBPACK_IMPORTED_MODULE_2__.remove)(oldParent.children, shape); + + // add to new parent at position + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_2__.add)(newParent.children, shape, newParentIndex); + + // update shape parent + position + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(shape, { + parent: newParent, + x: shape.x + delta.x, + y: shape.y + delta.y + }); + return shape; +}; +MoveShapeHandler.prototype.postExecute = function (context) { + var shape = context.shape, + delta = context.delta, + hints = context.hints; + var modeling = this._modeling; + if (hints.layout !== false) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(shape.incoming, function (c) { + modeling.layoutConnection(c, { + connectionEnd: (0,_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_3__.getMovedTargetAnchor)(c, shape, delta) + }); + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(shape.outgoing, function (c) { + modeling.layoutConnection(c, { + connectionStart: (0,_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_3__.getMovedSourceAnchor)(c, shape, delta) + }); + }); + } + if (hints.recurse !== false) { + this.moveChildren(context); + } +}; +MoveShapeHandler.prototype.revert = function (context) { + var shape = context.shape, + oldParent = context.oldParent, + oldParentIndex = context.oldParentIndex, + delta = context.delta; + + // restore previous location in old parent + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_2__.add)(oldParent.children, shape, oldParentIndex); + + // revert to old position and parent + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(shape, { + parent: oldParent, + x: shape.x - delta.x, + y: shape.y - delta.y + }); + return shape; +}; +MoveShapeHandler.prototype.moveChildren = function (context) { + var delta = context.delta, + shape = context.shape; + this._helper.moveRecursive(shape.children, delta, null); +}; +MoveShapeHandler.prototype.getNewParent = function (context) { + return context.newParent || context.shape.parent; +}; + +/***/ }), + +/***/ 73189: +/*!*****************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/ReconnectConnectionHandler.js ***! + \*****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ReconnectConnectionHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * Reconnect connection handler + */ +function ReconnectConnectionHandler(modeling) { + this._modeling = modeling; +} +ReconnectConnectionHandler.$inject = ['modeling']; +ReconnectConnectionHandler.prototype.execute = function (context) { + var newSource = context.newSource, + newTarget = context.newTarget, + connection = context.connection, + dockingOrPoints = context.dockingOrPoints; + if (!newSource && !newTarget) { + throw new Error('newSource or newTarget required'); + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(dockingOrPoints)) { + context.oldWaypoints = connection.waypoints; + connection.waypoints = dockingOrPoints; + } + if (newSource) { + context.oldSource = connection.source; + connection.source = newSource; + } + if (newTarget) { + context.oldTarget = connection.target; + connection.target = newTarget; + } + return connection; +}; +ReconnectConnectionHandler.prototype.postExecute = function (context) { + var connection = context.connection, + newSource = context.newSource, + newTarget = context.newTarget, + dockingOrPoints = context.dockingOrPoints, + hints = context.hints || {}; + var layoutConnectionHints = {}; + if (hints.connectionStart) { + layoutConnectionHints.connectionStart = hints.connectionStart; + } + if (hints.connectionEnd) { + layoutConnectionHints.connectionEnd = hints.connectionEnd; + } + if (hints.layoutConnection === false) { + return; + } + if (newSource && (!newTarget || hints.docking === 'source')) { + layoutConnectionHints.connectionStart = layoutConnectionHints.connectionStart || getDocking((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(dockingOrPoints) ? dockingOrPoints[0] : dockingOrPoints); + } + if (newTarget && (!newSource || hints.docking === 'target')) { + layoutConnectionHints.connectionEnd = layoutConnectionHints.connectionEnd || getDocking((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(dockingOrPoints) ? dockingOrPoints[dockingOrPoints.length - 1] : dockingOrPoints); + } + if (hints.newWaypoints) { + layoutConnectionHints.waypoints = hints.newWaypoints; + } + this._modeling.layoutConnection(connection, layoutConnectionHints); +}; +ReconnectConnectionHandler.prototype.revert = function (context) { + var oldSource = context.oldSource, + oldTarget = context.oldTarget, + oldWaypoints = context.oldWaypoints, + connection = context.connection; + if (oldSource) { + connection.source = oldSource; + } + if (oldTarget) { + connection.target = oldTarget; + } + if (oldWaypoints) { + connection.waypoints = oldWaypoints; + } + return connection; +}; + +// helpers ////////// + +function getDocking(point) { + return point.original || point; +} + +/***/ }), + +/***/ 14999: +/*!**********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/ReplaceShapeHandler.js ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ReplaceShapeHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helper/AnchorsHelper */ 25395); + + + +/** + * Replace shape by adding new shape and removing old shape. Incoming and outgoing connections will + * be kept if possible. + * + * @class + * @constructor + * + * @param {Modeling} modeling + * @param {Rules} rules + */ +function ReplaceShapeHandler(modeling, rules) { + this._modeling = modeling; + this._rules = rules; +} +ReplaceShapeHandler.$inject = ['modeling', 'rules']; + +/** + * Add new shape. + * + * @param {Object} context + * @param {djs.model.Shape} context.oldShape + * @param {Object} context.newData + * @param {string} context.newData.type + * @param {number} context.newData.x + * @param {number} context.newData.y + * @param {Object} [hints] + */ +ReplaceShapeHandler.prototype.preExecute = function (context) { + var self = this, + modeling = this._modeling, + rules = this._rules; + var oldShape = context.oldShape, + newData = context.newData, + hints = context.hints || {}, + newShape; + function canReconnect(source, target, connection) { + return rules.allowed('connection.reconnect', { + connection: connection, + source: source, + target: target + }); + } + + // (1) add new shape at given position + var position = { + x: newData.x, + y: newData.y + }; + var oldBounds = { + x: oldShape.x, + y: oldShape.y, + width: oldShape.width, + height: oldShape.height + }; + newShape = context.newShape = context.newShape || self.createShape(newData, position, oldShape.parent, hints); + + // (2) update host + if (oldShape.host) { + modeling.updateAttachment(newShape, oldShape.host); + } + + // (3) adopt all children from old shape + var children; + if (hints.moveChildren !== false) { + children = oldShape.children.slice(); + modeling.moveElements(children, { + x: 0, + y: 0 + }, newShape, hints); + } + + // (4) reconnect connections to new shape if possible + var incoming = oldShape.incoming.slice(), + outgoing = oldShape.outgoing.slice(); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(incoming, function (connection) { + var source = connection.source, + allowed = canReconnect(source, newShape, connection); + if (allowed) { + self.reconnectEnd(connection, newShape, (0,_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__.getResizedTargetAnchor)(connection, newShape, oldBounds), hints); + } + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(outgoing, function (connection) { + var target = connection.target, + allowed = canReconnect(newShape, target, connection); + if (allowed) { + self.reconnectStart(connection, newShape, (0,_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__.getResizedSourceAnchor)(connection, newShape, oldBounds), hints); + } + }); +}; + +/** + * Remove old shape. + */ +ReplaceShapeHandler.prototype.postExecute = function (context) { + var oldShape = context.oldShape; + this._modeling.removeShape(oldShape); +}; +ReplaceShapeHandler.prototype.execute = function (context) {}; +ReplaceShapeHandler.prototype.revert = function (context) {}; +ReplaceShapeHandler.prototype.createShape = function (shape, position, target, hints) { + return this._modeling.createShape(shape, position, target, hints); +}; +ReplaceShapeHandler.prototype.reconnectStart = function (connection, newSource, dockingPoint, hints) { + this._modeling.reconnectStart(connection, newSource, dockingPoint, hints); +}; +ReplaceShapeHandler.prototype.reconnectEnd = function (connection, newTarget, dockingPoint, hints) { + this._modeling.reconnectEnd(connection, newTarget, dockingPoint, hints); +}; + +/***/ }), + +/***/ 96709: +/*!*********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/ResizeShapeHandler.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ResizeShapeHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helper/AnchorsHelper */ 25395); + + + +/** + * A handler that implements reversible resizing of shapes. + * + * @param {Modeling} modeling + */ +function ResizeShapeHandler(modeling) { + this._modeling = modeling; +} +ResizeShapeHandler.$inject = ['modeling']; + +/** + * { + * shape: {....} + * newBounds: { + * width: 20, + * height: 40, + * x: 5, + * y: 10 + * } + * + * } + */ +ResizeShapeHandler.prototype.execute = function (context) { + var shape = context.shape, + newBounds = context.newBounds, + minBounds = context.minBounds; + if (newBounds.x === undefined || newBounds.y === undefined || newBounds.width === undefined || newBounds.height === undefined) { + throw new Error('newBounds must have {x, y, width, height} properties'); + } + if (minBounds && (newBounds.width < minBounds.width || newBounds.height < minBounds.height)) { + throw new Error('width and height cannot be less than minimum height and width'); + } else if (!minBounds && newBounds.width < 10 || newBounds.height < 10) { + throw new Error('width and height cannot be less than 10px'); + } + + // save old bbox in context + context.oldBounds = { + width: shape.width, + height: shape.height, + x: shape.x, + y: shape.y + }; + + // update shape + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(shape, { + width: newBounds.width, + height: newBounds.height, + x: newBounds.x, + y: newBounds.y + }); + return shape; +}; +ResizeShapeHandler.prototype.postExecute = function (context) { + var modeling = this._modeling; + var shape = context.shape, + oldBounds = context.oldBounds, + hints = context.hints || {}; + if (hints.layout === false) { + return; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(shape.incoming, function (c) { + modeling.layoutConnection(c, { + connectionEnd: (0,_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__.getResizedTargetAnchor)(c, shape, oldBounds) + }); + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(shape.outgoing, function (c) { + modeling.layoutConnection(c, { + connectionStart: (0,_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__.getResizedSourceAnchor)(c, shape, oldBounds) + }); + }); +}; +ResizeShapeHandler.prototype.revert = function (context) { + var shape = context.shape, + oldBounds = context.oldBounds; + + // restore previous bbox + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(shape, { + width: oldBounds.width, + height: oldBounds.height, + x: oldBounds.x, + y: oldBounds.y + }); + return shape; +}; + +/***/ }), + +/***/ 58914: +/*!*******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/SpaceToolHandler.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SpaceToolHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _space_tool_SpaceUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../space-tool/SpaceUtil */ 97093); +/* harmony import */ var _helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helper/AnchorsHelper */ 25395); + + + + +/** + * Add or remove space by moving and resizing shapes and updating connection waypoints. + */ +function SpaceToolHandler(modeling) { + this._modeling = modeling; +} +SpaceToolHandler.$inject = ['modeling']; +SpaceToolHandler.prototype.preExecute = function (context) { + var delta = context.delta, + direction = context.direction, + movingShapes = context.movingShapes, + resizingShapes = context.resizingShapes, + start = context.start, + oldBounds = {}; + + // (1) move shapes + this.moveShapes(movingShapes, delta); + + // (2a) save old bounds of resized shapes + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(resizingShapes, function (shape) { + oldBounds[shape.id] = getBounds(shape); + }); + + // (2b) resize shapes + this.resizeShapes(resizingShapes, delta, direction); + + // (3) update connection waypoints + this.updateConnectionWaypoints((0,_space_tool_SpaceUtil__WEBPACK_IMPORTED_MODULE_1__.getWaypointsUpdatingConnections)(movingShapes, resizingShapes), delta, direction, start, movingShapes, resizingShapes, oldBounds); +}; +SpaceToolHandler.prototype.execute = function () {}; +SpaceToolHandler.prototype.revert = function () {}; +SpaceToolHandler.prototype.moveShapes = function (shapes, delta) { + var self = this; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(shapes, function (element) { + self._modeling.moveShape(element, delta, null, { + autoResize: false, + layout: false, + recurse: false + }); + }); +}; +SpaceToolHandler.prototype.resizeShapes = function (shapes, delta, direction) { + var self = this; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(shapes, function (shape) { + var newBounds = (0,_space_tool_SpaceUtil__WEBPACK_IMPORTED_MODULE_1__.resizeBounds)(shape, direction, delta); + self._modeling.resizeShape(shape, newBounds, null, { + attachSupport: false, + autoResize: false, + layout: false + }); + }); +}; + +/** + * Update connections waypoints according to the rules: + * 1. Both source and target are moved/resized => move waypoints by the delta + * 2. Only one of source and target is moved/resized => re-layout connection with moved start/end + */ +SpaceToolHandler.prototype.updateConnectionWaypoints = function (connections, delta, direction, start, movingShapes, resizingShapes, oldBounds) { + var self = this, + affectedShapes = movingShapes.concat(resizingShapes); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(connections, function (connection) { + var source = connection.source, + target = connection.target, + waypoints = copyWaypoints(connection), + axis = getAxisFromDirection(direction), + layoutHints = { + labelBehavior: false + }; + if (includes(affectedShapes, source) && includes(affectedShapes, target)) { + // move waypoints + waypoints = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(waypoints, function (waypoint) { + if (shouldMoveWaypoint(waypoint, start, direction)) { + // move waypoint + waypoint[axis] = waypoint[axis] + delta[axis]; + } + if (waypoint.original && shouldMoveWaypoint(waypoint.original, start, direction)) { + // move waypoint original + waypoint.original[axis] = waypoint.original[axis] + delta[axis]; + } + return waypoint; + }); + self._modeling.updateWaypoints(connection, waypoints, { + labelBehavior: false + }); + } else if (includes(affectedShapes, source) || includes(affectedShapes, target)) { + // re-layout connection with moved start/end + if (includes(movingShapes, source)) { + layoutHints.connectionStart = (0,_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_2__.getMovedSourceAnchor)(connection, source, delta); + } else if (includes(movingShapes, target)) { + layoutHints.connectionEnd = (0,_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_2__.getMovedTargetAnchor)(connection, target, delta); + } else if (includes(resizingShapes, source)) { + layoutHints.connectionStart = (0,_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_2__.getResizedSourceAnchor)(connection, source, oldBounds[source.id]); + } else if (includes(resizingShapes, target)) { + layoutHints.connectionEnd = (0,_helper_AnchorsHelper__WEBPACK_IMPORTED_MODULE_2__.getResizedTargetAnchor)(connection, target, oldBounds[target.id]); + } + self._modeling.layoutConnection(connection, layoutHints); + } + }); +}; + +// helpers ////////// + +function copyWaypoint(waypoint) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, waypoint); +} +function copyWaypoints(connection) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.map)(connection.waypoints, function (waypoint) { + waypoint = copyWaypoint(waypoint); + if (waypoint.original) { + waypoint.original = copyWaypoint(waypoint.original); + } + return waypoint; + }); +} +function getAxisFromDirection(direction) { + switch (direction) { + case 'n': + return 'y'; + case 'w': + return 'x'; + case 's': + return 'y'; + case 'e': + return 'x'; + } +} +function shouldMoveWaypoint(waypoint, start, direction) { + var relevantAxis = getAxisFromDirection(direction); + if (/e|s/.test(direction)) { + return waypoint[relevantAxis] > start; + } else if (/n|w/.test(direction)) { + return waypoint[relevantAxis] < start; + } +} +function includes(array, item) { + return array.indexOf(item) !== -1; +} +function getBounds(shape) { + return { + x: shape.x, + y: shape.y, + height: shape.height, + width: shape.width + }; +} + +/***/ }), + +/***/ 84932: +/*!*****************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/ToggleShapeCollapseHandler.js ***! + \*****************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ToggleShapeCollapseHandler) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * A handler that toggles the collapsed state of an element + * and the visibility of all its children. + * + * @param {Modeling} modeling + */ +function ToggleShapeCollapseHandler(modeling) { + this._modeling = modeling; +} +ToggleShapeCollapseHandler.$inject = ['modeling']; +ToggleShapeCollapseHandler.prototype.execute = function (context) { + var shape = context.shape, + children = shape.children; + + // recursively remember previous visibility of children + context.oldChildrenVisibility = getElementsVisibilityRecursive(children); + + // toggle state + shape.collapsed = !shape.collapsed; + + // recursively hide/show children + var result = setHiddenRecursive(children, shape.collapsed); + return [shape].concat(result); +}; +ToggleShapeCollapseHandler.prototype.revert = function (context) { + var shape = context.shape, + oldChildrenVisibility = context.oldChildrenVisibility; + var children = shape.children; + + // recursively set old visability of children + var result = restoreVisibilityRecursive(children, oldChildrenVisibility); + + // retoggle state + shape.collapsed = !shape.collapsed; + return [shape].concat(result); +}; + +// helpers ////////////////////// + +/** + * Return a map { elementId -> hiddenState}. + * + * @param {Array} elements + * + * @return {Object} + */ +function getElementsVisibilityRecursive(elements) { + var result = {}; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + result[element.id] = element.hidden; + if (element.children) { + result = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, result, getElementsVisibilityRecursive(element.children)); + } + }); + return result; +} +function setHiddenRecursive(elements, newHidden) { + var result = []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + element.hidden = newHidden; + result = result.concat(element); + if (element.children) { + result = result.concat(setHiddenRecursive(element.children, element.collapsed || newHidden)); + } + }); + return result; +} +function restoreVisibilityRecursive(elements, lastState) { + var result = []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + element.hidden = lastState[element.id]; + result = result.concat(element); + if (element.children) { + result = result.concat(restoreVisibilityRecursive(element.children, lastState)); + } + }); + return result; +} + +/***/ }), + +/***/ 88012: +/*!**************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/UpdateAttachmentHandler.js ***! + \**************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UpdateAttachmentHandler) +/* harmony export */ }); +/* harmony import */ var _util_Collections__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../util/Collections */ 39233); + + +/** + * A handler that implements reversible attaching/detaching of shapes. + */ +function UpdateAttachmentHandler(modeling) { + this._modeling = modeling; +} +UpdateAttachmentHandler.$inject = ['modeling']; +UpdateAttachmentHandler.prototype.execute = function (context) { + var shape = context.shape, + newHost = context.newHost, + oldHost = shape.host; + + // (0) detach from old host + context.oldHost = oldHost; + context.attacherIdx = removeAttacher(oldHost, shape); + + // (1) attach to new host + addAttacher(newHost, shape); + + // (2) update host + shape.host = newHost; + return shape; +}; +UpdateAttachmentHandler.prototype.revert = function (context) { + var shape = context.shape, + newHost = context.newHost, + oldHost = context.oldHost, + attacherIdx = context.attacherIdx; + + // (2) update host + shape.host = oldHost; + + // (1) attach to new host + removeAttacher(newHost, shape); + + // (0) detach from old host + addAttacher(oldHost, shape, attacherIdx); + return shape; +}; +function removeAttacher(host, attacher) { + // remove attacher from host + return (0,_util_Collections__WEBPACK_IMPORTED_MODULE_0__.remove)(host && host.attachers, attacher); +} +function addAttacher(host, attacher, idx) { + if (!host) { + return; + } + var attachers = host.attachers; + if (!attachers) { + host.attachers = attachers = []; + } + (0,_util_Collections__WEBPACK_IMPORTED_MODULE_0__.add)(attachers, attacher, idx); +} + +/***/ }), + +/***/ 60747: +/*!*************************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/UpdateWaypointsHandler.js ***! + \*************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ UpdateWaypointsHandler) +/* harmony export */ }); +function UpdateWaypointsHandler() {} +UpdateWaypointsHandler.prototype.execute = function (context) { + var connection = context.connection, + newWaypoints = context.newWaypoints; + context.oldWaypoints = connection.waypoints; + connection.waypoints = newWaypoints; + return connection; +}; +UpdateWaypointsHandler.prototype.revert = function (context) { + var connection = context.connection, + oldWaypoints = context.oldWaypoints; + connection.waypoints = oldWaypoints; + return connection; +}; + +/***/ }), + +/***/ 25395: +/*!***********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/helper/AnchorsHelper.js ***! + \***********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getMovedSourceAnchor: () => (/* binding */ getMovedSourceAnchor), +/* harmony export */ getMovedTargetAnchor: () => (/* binding */ getMovedTargetAnchor), +/* harmony export */ getResizedSourceAnchor: () => (/* binding */ getResizedSourceAnchor), +/* harmony export */ getResizedTargetAnchor: () => (/* binding */ getResizedTargetAnchor) +/* harmony export */ }); +/* harmony import */ var _util_AttachUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../util/AttachUtil */ 93999); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../layout/LayoutUtil */ 8610); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); + + + +function getResizedSourceAnchor(connection, shape, oldBounds) { + var waypoints = safeGetWaypoints(connection), + waypointsInsideNewBounds = getWaypointsInsideBounds(waypoints, shape), + oldAnchor = waypoints[0]; + + // new anchor is the last waypoint enclosed be resized source + if (waypointsInsideNewBounds.length) { + return waypointsInsideNewBounds[waypointsInsideNewBounds.length - 1]; + } + return (0,_util_AttachUtil__WEBPACK_IMPORTED_MODULE_0__.getNewAttachPoint)(oldAnchor.original || oldAnchor, oldBounds, shape); +} +function getResizedTargetAnchor(connection, shape, oldBounds) { + var waypoints = safeGetWaypoints(connection), + waypointsInsideNewBounds = getWaypointsInsideBounds(waypoints, shape), + oldAnchor = waypoints[waypoints.length - 1]; + + // new anchor is the first waypoint enclosed be resized target + if (waypointsInsideNewBounds.length) { + return waypointsInsideNewBounds[0]; + } + return (0,_util_AttachUtil__WEBPACK_IMPORTED_MODULE_0__.getNewAttachPoint)(oldAnchor.original || oldAnchor, oldBounds, shape); +} +function getMovedSourceAnchor(connection, source, moveDelta) { + var waypoints = safeGetWaypoints(connection), + oldBounds = subtract(source, moveDelta), + oldAnchor = waypoints[0]; + return (0,_util_AttachUtil__WEBPACK_IMPORTED_MODULE_0__.getNewAttachPoint)(oldAnchor.original || oldAnchor, oldBounds, source); +} +function getMovedTargetAnchor(connection, target, moveDelta) { + var waypoints = safeGetWaypoints(connection), + oldBounds = subtract(target, moveDelta), + oldAnchor = waypoints[waypoints.length - 1]; + return (0,_util_AttachUtil__WEBPACK_IMPORTED_MODULE_0__.getNewAttachPoint)(oldAnchor.original || oldAnchor, oldBounds, target); +} + +// helpers ////////////////////// + +function subtract(bounds, delta) { + return { + x: bounds.x - delta.x, + y: bounds.y - delta.y, + width: bounds.width, + height: bounds.height + }; +} + +/** + * Return waypoints of given connection; throw if non exists (should not happen!!). + * + * @param {Connection} connection + * + * @return {Array} + */ +function safeGetWaypoints(connection) { + var waypoints = connection.waypoints; + if (!waypoints.length) { + throw new Error('connection#' + connection.id + ': no waypoints'); + } + return waypoints; +} +function getWaypointsInsideBounds(waypoints, bounds) { + var originalWaypoints = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.map)(waypoints, getOriginal); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(originalWaypoints, function (waypoint) { + return isInsideBounds(waypoint, bounds); + }); +} + +/** + * Checks if point is inside bounds, incl. edges. + * + * @param {Point} point + * @param {Bounds} bounds + */ +function isInsideBounds(point, bounds) { + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_2__.getOrientation)(bounds, point, 1) === 'intersect'; +} +function getOriginal(point) { + return point.original || point; +} + +/***/ }), + +/***/ 88355: +/*!*********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/helper/MoveClosure.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MoveClosure) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../util/Elements */ 35723); + + +function MoveClosure() { + this.allShapes = {}; + this.allConnections = {}; + this.enclosedElements = {}; + this.enclosedConnections = {}; + this.topLevel = {}; +} +MoveClosure.prototype.add = function (element, isTopLevel) { + return this.addAll([element], isTopLevel); +}; +MoveClosure.prototype.addAll = function (elements, isTopLevel) { + var newClosure = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_0__.getClosure)(elements, !!isTopLevel, this); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(this, newClosure); + return this; +}; + +/***/ }), + +/***/ 47732: +/*!********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/modeling/cmd/helper/MoveHelper.js ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MoveHelper) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AnchorsHelper */ 25395); +/* harmony import */ var _MoveClosure__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MoveClosure */ 88355); + + + + +/** + * A helper that is able to carry out serialized move + * operations on multiple elements. + * + * @param {Modeling} modeling + */ +function MoveHelper(modeling) { + this._modeling = modeling; +} + +/** + * Move the specified elements and all children by the given delta. + * + * This moves all enclosed connections, too and layouts all affected + * external connections. + * + * @param {Array} elements + * @param {Point} delta + * @param {djs.model.Base} newParent applied to the first level of shapes + * + * @return {Array} list of touched elements + */ +MoveHelper.prototype.moveRecursive = function (elements, delta, newParent) { + if (!elements) { + return []; + } else { + return this.moveClosure(this.getClosure(elements), delta, newParent); + } +}; + +/** + * Move the given closure of elmements. + * + * @param {Object} closure + * @param {Point} delta + * @param {djs.model.Base} [newParent] + * @param {djs.model.Base} [newHost] + */ +MoveHelper.prototype.moveClosure = function (closure, delta, newParent, newHost, primaryShape) { + var modeling = this._modeling; + var allShapes = closure.allShapes, + allConnections = closure.allConnections, + enclosedConnections = closure.enclosedConnections, + topLevel = closure.topLevel, + keepParent = false; + if (primaryShape && primaryShape.parent === newParent) { + keepParent = true; + } + + // move all shapes + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(allShapes, function (shape) { + // move the element according to the given delta + modeling.moveShape(shape, delta, topLevel[shape.id] && !keepParent && newParent, { + recurse: false, + layout: false + }); + }); + + // move all child connections / layout external connections + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(allConnections, function (c) { + var sourceMoved = !!allShapes[c.source.id], + targetMoved = !!allShapes[c.target.id]; + if (enclosedConnections[c.id] && sourceMoved && targetMoved) { + modeling.moveConnection(c, delta, topLevel[c.id] && !keepParent && newParent); + } else { + modeling.layoutConnection(c, { + connectionStart: sourceMoved && (0,_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__.getMovedSourceAnchor)(c, c.source, delta), + connectionEnd: targetMoved && (0,_AnchorsHelper__WEBPACK_IMPORTED_MODULE_1__.getMovedTargetAnchor)(c, c.target, delta) + }); + } + }); +}; + +/** + * Returns the closure for the selected elements + * + * @param {Array} elements + * @return {MoveClosure} closure + */ +MoveHelper.prototype.getClosure = function (elements) { + return new _MoveClosure__WEBPACK_IMPORTED_MODULE_2__["default"]().addAll(elements, true); +}; + +/***/ }), + +/***/ 74472: +/*!*************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/mouse/Mouse.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ createMoveEvent: () => (/* binding */ createMoveEvent), +/* harmony export */ "default": () => (/* binding */ Mouse) +/* harmony export */ }); +function Mouse(eventBus) { + var self = this; + this._lastMoveEvent = null; + function setLastMoveEvent(mousemoveEvent) { + self._lastMoveEvent = mousemoveEvent; + } + eventBus.on('canvas.init', function (context) { + var svg = self._svg = context.svg; + svg.addEventListener('mousemove', setLastMoveEvent); + }); + eventBus.on('canvas.destroy', function () { + self._lastMouseEvent = null; + self._svg.removeEventListener('mousemove', setLastMoveEvent); + }); +} +Mouse.$inject = ['eventBus']; +Mouse.prototype.getLastMoveEvent = function () { + return this._lastMoveEvent || createMoveEvent(0, 0); +}; + +// helpers ////////// + +function createMoveEvent(x, y) { + var event = document.createEvent('MouseEvent'); + var screenX = x, + screenY = y, + clientX = x, + clientY = y; + if (event.initMouseEvent) { + event.initMouseEvent('mousemove', true, true, window, 0, screenX, screenY, clientX, clientY, false, false, false, false, 0, null); + } + return event; +} + +/***/ }), + +/***/ 26947: +/*!*************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/mouse/index.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _Mouse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Mouse */ 74472); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['mouse'], + mouse: ['type', _Mouse__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 62788: +/*!***********************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/move/Move.js ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MoveEvents) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/Event */ 74716); +/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Mouse */ 53171); + +var LOW_PRIORITY = 500, + MEDIUM_PRIORITY = 1250, + HIGH_PRIORITY = 1500; + + +var round = Math.round; +function mid(element) { + return { + x: element.x + round(element.width / 2), + y: element.y + round(element.height / 2) + }; +} + +/** + * A plugin that makes shapes draggable / droppable. + * + * @param {EventBus} eventBus + * @param {Dragging} dragging + * @param {Modeling} modeling + * @param {Selection} selection + * @param {Rules} rules + */ +function MoveEvents(eventBus, dragging, modeling, selection, rules) { + // rules + + function canMove(shapes, delta, position, target) { + return rules.allowed('elements.move', { + shapes: shapes, + delta: delta, + position: position, + target: target + }); + } + + // move events + + // assign a high priority to this handler to setup the environment + // others may hook up later, e.g. at default priority and modify + // the move environment. + // + // This sets up the context with + // + // * shape: the primary shape being moved + // * shapes: a list of shapes to be moved + // * validatedShapes: a list of shapes that are being checked + // against the rules before and during move + // + eventBus.on('shape.move.start', HIGH_PRIORITY, function (event) { + var context = event.context, + shape = event.shape, + shapes = selection.get().slice(); + + // move only single shape if the dragged element + // is not part of the current selection + if (shapes.indexOf(shape) === -1) { + shapes = [shape]; + } + + // ensure we remove nested elements in the collection + // and add attachers for a proper dragger + shapes = removeNested(shapes); + + // attach shapes to drag context + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(context, { + shapes: shapes, + validatedShapes: shapes, + shape: shape + }); + }); + + // assign a high priority to this handler to setup the environment + // others may hook up later, e.g. at default priority and modify + // the move environment + // + eventBus.on('shape.move.start', MEDIUM_PRIORITY, function (event) { + var context = event.context, + validatedShapes = context.validatedShapes, + canExecute; + canExecute = context.canExecute = canMove(validatedShapes); + + // check if we can move the elements + if (!canExecute) { + return false; + } + }); + + // assign a low priority to this handler + // to let others modify the move event before we update + // the context + // + eventBus.on('shape.move.move', LOW_PRIORITY, function (event) { + var context = event.context, + validatedShapes = context.validatedShapes, + hover = event.hover, + delta = { + x: event.dx, + y: event.dy + }, + position = { + x: event.x, + y: event.y + }, + canExecute; + + // check if we can move the elements + canExecute = canMove(validatedShapes, delta, position, hover); + context.delta = delta; + context.canExecute = canExecute; + + // simply ignore move over + if (canExecute === null) { + context.target = null; + return; + } + context.target = hover; + }); + eventBus.on('shape.move.end', function (event) { + var context = event.context; + var delta = context.delta, + canExecute = context.canExecute, + isAttach = canExecute === 'attach', + shapes = context.shapes; + if (canExecute === false) { + return false; + } + + // ensure we have actual pixel values deltas + // (important when zoom level was > 1 during move) + delta.x = round(delta.x); + delta.y = round(delta.y); + if (delta.x === 0 && delta.y === 0) { + // didn't move + return; + } + modeling.moveElements(shapes, delta, context.target, { + primaryShape: context.shape, + attach: isAttach + }); + }); + + // move activation + + eventBus.on('element.mousedown', function (event) { + if (!(0,_util_Mouse__WEBPACK_IMPORTED_MODULE_1__.isPrimaryButton)(event)) { + return; + } + var originalEvent = (0,_util_Event__WEBPACK_IMPORTED_MODULE_2__.getOriginal)(event); + if (!originalEvent) { + throw new Error('must supply DOM mousedown event'); + } + return start(originalEvent, event.element); + }); + + /** + * Start move. + * + * @param {MouseEvent} event + * @param {djs.model.Shape} shape + * @param {boolean} [activate] + * @param {Object} [context] + */ + function start(event, element, activate, context) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(activate)) { + context = activate; + activate = false; + } + + // do not move connections or the root element + if (element.waypoints || !element.parent) { + return; + } + var referencePoint = mid(element); + dragging.init(event, referencePoint, 'shape.move', { + cursor: 'grabbing', + autoActivate: activate, + data: { + shape: element, + context: context || {} + } + }); + + // we've handled the event + return true; + } + + // API + + this.start = start; +} +MoveEvents.$inject = ['eventBus', 'dragging', 'modeling', 'selection', 'rules']; + +/** + * Return a filtered list of elements that do not contain + * those nested into others. + * + * @param {Array} elements + * + * @return {Array} filtered + */ +function removeNested(elements) { + var ids = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.groupBy)(elements, 'id'); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function (element) { + while (element = element.parent) { + // parent in selection + if (ids[element.id]) { + return false; + } + } + return true; + }); +} + +/***/ }), + +/***/ 97282: +/*!******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/move/MovePreview.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MovePreview) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Elements */ 35723); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ 81384); + + + + +var LOW_PRIORITY = 499; +var MARKER_DRAGGING = 'djs-dragging', + MARKER_OK = 'drop-ok', + MARKER_NOT_OK = 'drop-not-ok', + MARKER_NEW_PARENT = 'new-parent', + MARKER_ATTACH = 'attach-ok'; + +/** + * Provides previews for moving shapes when moving. + * + * @param {EventBus} eventBus + * @param {ElementRegistry} elementRegistry + * @param {Canvas} canvas + * @param {Styles} styles + */ +function MovePreview(eventBus, canvas, styles, previewSupport) { + function getVisualDragShapes(shapes) { + var elements = getAllDraggedElements(shapes); + var filteredElements = removeEdges(elements); + return filteredElements; + } + function getAllDraggedElements(shapes) { + var allShapes = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_0__.selfAndAllChildren)(shapes, true); + var allConnections = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.map)(allShapes, function (shape) { + return (shape.incoming || []).concat(shape.outgoing || []); + }); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.flatten)(allShapes.concat(allConnections)); + } + + /** + * Sets drop marker on an element. + */ + function setMarker(element, marker) { + [MARKER_ATTACH, MARKER_OK, MARKER_NOT_OK, MARKER_NEW_PARENT].forEach(function (m) { + if (m === marker) { + canvas.addMarker(element, m); + } else { + canvas.removeMarker(element, m); + } + }); + } + + /** + * Make an element draggable. + * + * @param {Object} context + * @param {djs.model.Base} element + * @param {boolean} addMarker + */ + function makeDraggable(context, element, addMarker) { + previewSupport.addDragger(element, context.dragGroup); + if (addMarker) { + canvas.addMarker(element, MARKER_DRAGGING); + } + if (context.allDraggedElements) { + context.allDraggedElements.push(element); + } else { + context.allDraggedElements = [element]; + } + } + + // assign a low priority to this handler + // to let others modify the move context before + // we draw things + eventBus.on('shape.move.start', LOW_PRIORITY, function (event) { + var context = event.context, + dragShapes = context.shapes, + allDraggedElements = context.allDraggedElements; + var visuallyDraggedShapes = getVisualDragShapes(dragShapes); + if (!context.dragGroup) { + var dragGroup = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(dragGroup, styles.cls('djs-drag-group', ['no-events'])); + var activeLayer = canvas.getActiveLayer(); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(activeLayer, dragGroup); + context.dragGroup = dragGroup; + } + + // add previews + visuallyDraggedShapes.forEach(function (shape) { + previewSupport.addDragger(shape, context.dragGroup); + }); + + // cache all dragged elements / gfx + // so that we can quickly undo their state changes later + if (!allDraggedElements) { + allDraggedElements = getAllDraggedElements(dragShapes); + } else { + allDraggedElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.flatten)([allDraggedElements, getAllDraggedElements(dragShapes)]); + } + + // add dragging marker + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(allDraggedElements, function (e) { + canvas.addMarker(e, MARKER_DRAGGING); + }); + context.allDraggedElements = allDraggedElements; + + // determine, if any of the dragged elements have different parents + context.differentParents = haveDifferentParents(dragShapes); + }); + + // update previews + eventBus.on('shape.move.move', LOW_PRIORITY, function (event) { + var context = event.context, + dragGroup = context.dragGroup, + target = context.target, + parent = context.shape.parent, + canExecute = context.canExecute; + if (target) { + if (canExecute === 'attach') { + setMarker(target, MARKER_ATTACH); + } else if (context.canExecute && target && target.id !== parent.id) { + setMarker(target, MARKER_NEW_PARENT); + } else { + setMarker(target, context.canExecute ? MARKER_OK : MARKER_NOT_OK); + } + } + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_3__.translate)(dragGroup, event.dx, event.dy); + }); + eventBus.on(['shape.move.out', 'shape.move.cleanup'], function (event) { + var context = event.context, + target = context.target; + if (target) { + setMarker(target, null); + } + }); + + // remove previews + eventBus.on('shape.move.cleanup', function (event) { + var context = event.context, + allDraggedElements = context.allDraggedElements, + dragGroup = context.dragGroup; + + // remove dragging marker + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(allDraggedElements, function (e) { + canvas.removeMarker(e, MARKER_DRAGGING); + }); + if (dragGroup) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.remove)(dragGroup); + } + }); + + // API ////////////////////// + + /** + * Make an element draggable. + * + * @param {Object} context + * @param {djs.model.Base} element + * @param {boolean} addMarker + */ + this.makeDraggable = makeDraggable; +} +MovePreview.$inject = ['eventBus', 'canvas', 'styles', 'previewSupport']; + +// helpers ////////////////////// + +/** + * returns elements minus all connections + * where source or target is not elements + */ +function removeEdges(elements) { + var filteredElements = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(elements, function (element) { + if (!isConnection(element)) { + return true; + } else { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(elements, (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.matchPattern)({ + id: element.source.id + })) && (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(elements, (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.matchPattern)({ + id: element.target.id + })); + } + }); + return filteredElements; +} +function haveDifferentParents(elements) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.size)((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.groupBy)(elements, function (e) { + return e.parent && e.parent.id; + })) !== 1; +} + +/** + * Checks if an element is a connection. + */ +function isConnection(element) { + return element.waypoints; +} + +/***/ }), + +/***/ 74569: +/*!************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/move/index.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _interaction_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interaction-events */ 57250); +/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selection */ 26334); +/* harmony import */ var _outline__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../outline */ 98918); +/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../rules */ 8807); +/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../dragging */ 11917); +/* harmony import */ var _preview_support__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../preview-support */ 86726); +/* harmony import */ var _Move__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Move */ 62788); +/* harmony import */ var _MovePreview__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./MovePreview */ 97282); + + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_interaction_events__WEBPACK_IMPORTED_MODULE_0__["default"], _selection__WEBPACK_IMPORTED_MODULE_1__["default"], _outline__WEBPACK_IMPORTED_MODULE_2__["default"], _rules__WEBPACK_IMPORTED_MODULE_3__["default"], _dragging__WEBPACK_IMPORTED_MODULE_4__["default"], _preview_support__WEBPACK_IMPORTED_MODULE_5__["default"]], + __init__: ['move', 'movePreview'], + move: ['type', _Move__WEBPACK_IMPORTED_MODULE_6__["default"]], + movePreview: ['type', _MovePreview__WEBPACK_IMPORTED_MODULE_7__["default"]] +}); + +/***/ }), + +/***/ 10347: +/*!***************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/ordering/OrderingProvider.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ OrderingProvider) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../command/CommandInterceptor */ 35353); + + + +/** + * An abstract provider that allows modelers to implement a custom + * ordering of diagram elements on the canvas. + * + * It makes sure that the order is always preserved during element + * creation and move operations. + * + * In order to use this behavior, inherit from it and override + * the method {@link OrderingProvider#getOrdering}. + * + * @example + * + * ```javascript + * function CustomOrderingProvider(eventBus) { + * OrderingProvider.call(this, eventBus); + * + * this.getOrdering = function(element, newParent) { + * // always insert elements at the front + * // when moving + * return { + * index: 0, + * parent: newParent + * }; + * }; + * } + * ``` + * + * @param {EventBus} eventBus + */ +function OrderingProvider(eventBus) { + _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + var self = this; + this.preExecute(['shape.create', 'connection.create'], function (event) { + var context = event.context, + element = context.shape || context.connection, + parent = context.parent; + var ordering = self.getOrdering(element, parent); + if (ordering) { + if (ordering.parent !== undefined) { + context.parent = ordering.parent; + } + context.parentIndex = ordering.index; + } + }); + this.preExecute(['shape.move', 'connection.move'], function (event) { + var context = event.context, + element = context.shape || context.connection, + parent = context.newParent || element.parent; + var ordering = self.getOrdering(element, parent); + if (ordering) { + if (ordering.parent !== undefined) { + context.newParent = ordering.parent; + } + context.newParentIndex = ordering.index; + } + }); +} + +/** + * Return a custom ordering of the element, both in terms + * of parent element and index in the new parent. + * + * Implementors of this method must return an object with + * `parent` _and_ `index` in it. + * + * @param {djs.model.Base} element + * @param {djs.model.Shape} newParent + * + * @return {Object} ordering descriptor + */ +OrderingProvider.prototype.getOrdering = function (element, newParent) { + return null; +}; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(OrderingProvider, _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/***/ }), + +/***/ 97592: +/*!*****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/outline/Outline.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Outline) +/* harmony export */ }); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/Elements */ 35723); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); + +var LOW_PRIORITY = 500; + + + + +/** + * @class + * + * A plugin that adds an outline to shapes and connections that may be activated and styled + * via CSS classes. + * + * @param {EventBus} eventBus + * @param {Styles} styles + * @param {ElementRegistry} elementRegistry + */ +function Outline(eventBus, styles, elementRegistry) { + this.offset = 6; + var OUTLINE_STYLE = styles.cls('djs-outline', ['no-fill']); + var self = this; + function createOutline(gfx, bounds) { + var outline = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('rect'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(outline, (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ + x: 10, + y: 10, + width: 100, + height: 100 + }, OUTLINE_STYLE)); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.append)(gfx, outline); + return outline; + } + + // A low priortity is necessary, because outlines of labels have to be updated + // after the label bounds have been updated in the renderer. + eventBus.on(['shape.added', 'shape.changed'], LOW_PRIORITY, function (event) { + var element = event.element, + gfx = event.gfx; + var outline = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('.djs-outline', gfx); + if (!outline) { + outline = createOutline(gfx, element); + } + self.updateShapeOutline(outline, element); + }); + eventBus.on(['connection.added', 'connection.changed'], function (event) { + var element = event.element, + gfx = event.gfx; + var outline = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.query)('.djs-outline', gfx); + if (!outline) { + outline = createOutline(gfx, element); + } + self.updateConnectionOutline(outline, element); + }); +} + +/** + * Updates the outline of a shape respecting the dimension of the + * element and an outline offset. + * + * @param {SVGElement} outline + * @param {djs.model.Base} element + */ +Outline.prototype.updateShapeOutline = function (outline, element) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(outline, { + x: -this.offset, + y: -this.offset, + width: element.width + this.offset * 2, + height: element.height + this.offset * 2 + }); +}; + +/** + * Updates the outline of a connection respecting the bounding box of + * the connection and an outline offset. + * + * @param {SVGElement} outline + * @param {djs.model.Base} element + */ +Outline.prototype.updateConnectionOutline = function (outline, connection) { + var bbox = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_3__.getBBox)(connection); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(outline, { + x: bbox.x - this.offset, + y: bbox.y - this.offset, + width: bbox.width + this.offset * 2, + height: bbox.height + this.offset * 2 + }); +}; +Outline.$inject = ['eventBus', 'styles', 'elementRegistry']; + +/***/ }), + +/***/ 98918: +/*!***************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/outline/index.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _Outline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Outline */ 97592); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['outline'], + outline: ['type', _Outline__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 88660: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/overlays/Overlays.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Overlays) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/Elements */ 35723); +/* harmony import */ var _util_IdGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/IdGenerator */ 39902); + + + + + +// document wide unique overlay ids +var ids = new _util_IdGenerator__WEBPACK_IMPORTED_MODULE_0__["default"]('ov'); +var LOW_PRIORITY = 500; + +/** + * A service that allows users to attach overlays to diagram elements. + * + * The overlay service will take care of overlay positioning during updates. + * + * @example + * + * // add a pink badge on the top left of the shape + * overlays.add(someShape, { + * position: { + * top: -5, + * left: -5 + * }, + * html: '
0
' + * }); + * + * // or add via shape id + * + * overlays.add('some-element-id', { + * position: { + * top: -5, + * left: -5 + * } + * html: '
0
' + * }); + * + * // or add with optional type + * + * overlays.add(someShape, 'badge', { + * position: { + * top: -5, + * left: -5 + * } + * html: '
0
' + * }); + * + * + * // remove an overlay + * + * var id = overlays.add(...); + * overlays.remove(id); + * + * + * You may configure overlay defaults during tool by providing a `config` module + * with `overlays.defaults` as an entry: + * + * { + * overlays: { + * defaults: { + * show: { + * minZoom: 0.7, + * maxZoom: 5.0 + * }, + * scale: { + * min: 1 + * } + * } + * } + * + * @param {Object} config + * @param {EventBus} eventBus + * @param {Canvas} canvas + * @param {ElementRegistry} elementRegistry + */ +function Overlays(config, eventBus, canvas, elementRegistry) { + this._eventBus = eventBus; + this._canvas = canvas; + this._elementRegistry = elementRegistry; + this._ids = ids; + this._overlayDefaults = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ + // no show constraints + show: null, + // always scale + scale: true + }, config && config.defaults); + + /** + * Mapping overlayId -> overlay + */ + this._overlays = {}; + + /** + * Mapping elementId -> overlay container + */ + this._overlayContainers = []; + + // root html element for all overlays + this._overlayRoot = createRoot(canvas.getContainer()); + this._init(); +} +Overlays.$inject = ['config.overlays', 'eventBus', 'canvas', 'elementRegistry']; + +/** + * Returns the overlay with the specified id or a list of overlays + * for an element with a given type. + * + * @example + * + * // return the single overlay with the given id + * overlays.get('some-id'); + * + * // return all overlays for the shape + * overlays.get({ element: someShape }); + * + * // return all overlays on shape with type 'badge' + * overlays.get({ element: someShape, type: 'badge' }); + * + * // shape can also be specified as id + * overlays.get({ element: 'element-id', type: 'badge' }); + * + * + * @param {Object} search + * @param {string} [search.id] + * @param {string|djs.model.Base} [search.element] + * @param {string} [search.type] + * + * @return {Object|Array} the overlay(s) + */ +Overlays.prototype.get = function (search) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isString)(search)) { + search = { + id: search + }; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isString)(search.element)) { + search.element = this._elementRegistry.get(search.element); + } + if (search.element) { + var container = this._getOverlayContainer(search.element, true); + + // return a list of overlays when searching by element (+type) + if (container) { + return search.type ? (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(container.overlays, (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.matchPattern)({ + type: search.type + })) : container.overlays.slice(); + } else { + return []; + } + } else if (search.type) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.filter)(this._overlays, (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.matchPattern)({ + type: search.type + })); + } else { + // return single element when searching by id + return search.id ? this._overlays[search.id] : null; + } +}; + +/** + * Adds a HTML overlay to an element. + * + * @param {string|djs.model.Base} element attach overlay to this shape + * @param {string} [type] optional type to assign to the overlay + * @param {Object} overlay the overlay configuration + * + * @param {string|DOMElement} overlay.html html element to use as an overlay + * @param {Object} [overlay.show] show configuration + * @param {number} [overlay.show.minZoom] minimal zoom level to show the overlay + * @param {number} [overlay.show.maxZoom] maximum zoom level to show the overlay + * @param {Object} overlay.position where to attach the overlay + * @param {number} [overlay.position.left] relative to element bbox left attachment + * @param {number} [overlay.position.top] relative to element bbox top attachment + * @param {number} [overlay.position.bottom] relative to element bbox bottom attachment + * @param {number} [overlay.position.right] relative to element bbox right attachment + * @param {boolean|Object} [overlay.scale=true] false to preserve the same size regardless of + * diagram zoom + * @param {number} [overlay.scale.min] + * @param {number} [overlay.scale.max] + * + * @return {string} id that may be used to reference the overlay for update or removal + */ +Overlays.prototype.add = function (element, type, overlay) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isObject)(type)) { + overlay = type; + type = null; + } + if (!element.id) { + element = this._elementRegistry.get(element); + } + if (!overlay.position) { + throw new Error('must specifiy overlay position'); + } + if (!overlay.html) { + throw new Error('must specifiy overlay html'); + } + if (!element) { + throw new Error('invalid element specified'); + } + var id = this._ids.next(); + overlay = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({}, this._overlayDefaults, overlay, { + id: id, + type: type, + element: element, + html: overlay.html + }); + this._addOverlay(overlay); + return id; +}; + +/** + * Remove an overlay with the given id or all overlays matching the given filter. + * + * @see Overlays#get for filter options. + * + * @param {string} [id] + * @param {Object} [filter] + */ +Overlays.prototype.remove = function (filter) { + var overlays = this.get(filter) || []; + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isArray)(overlays)) { + overlays = [overlays]; + } + var self = this; + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(overlays, function (overlay) { + var container = self._getOverlayContainer(overlay.element, true); + if (overlay) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.remove)(overlay.html); + (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.remove)(overlay.htmlContainer); + delete overlay.htmlContainer; + delete overlay.element; + delete self._overlays[overlay.id]; + } + if (container) { + var idx = container.overlays.indexOf(overlay); + if (idx !== -1) { + container.overlays.splice(idx, 1); + } + } + }); +}; +Overlays.prototype.show = function () { + setVisible(this._overlayRoot); +}; +Overlays.prototype.hide = function () { + setVisible(this._overlayRoot, false); +}; +Overlays.prototype.clear = function () { + this._overlays = {}; + this._overlayContainers = []; + (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.clear)(this._overlayRoot); +}; +Overlays.prototype._updateOverlayContainer = function (container) { + var element = container.element, + html = container.html; + + // update container left,top according to the elements x,y coordinates + // this ensures we can attach child elements relative to this container + + var x = element.x, + y = element.y; + if (element.waypoints) { + var bbox = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_3__.getBBox)(element); + x = bbox.x; + y = bbox.y; + } + setPosition(html, x, y); + (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.attr)(container.html, 'data-container-id', element.id); +}; +Overlays.prototype._updateOverlay = function (overlay) { + var position = overlay.position, + htmlContainer = overlay.htmlContainer, + element = overlay.element; + + // update overlay html relative to shape because + // it is already positioned on the element + + // update relative + var left = position.left, + top = position.top; + if (position.right !== undefined) { + var width; + if (element.waypoints) { + width = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_3__.getBBox)(element).width; + } else { + width = element.width; + } + left = position.right * -1 + width; + } + if (position.bottom !== undefined) { + var height; + if (element.waypoints) { + height = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_3__.getBBox)(element).height; + } else { + height = element.height; + } + top = position.bottom * -1 + height; + } + setPosition(htmlContainer, left || 0, top || 0); +}; +Overlays.prototype._createOverlayContainer = function (element) { + var html = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.domify)('
'); + this._overlayRoot.appendChild(html); + var container = { + html: html, + element: element, + overlays: [] + }; + this._updateOverlayContainer(container); + this._overlayContainers.push(container); + return container; +}; +Overlays.prototype._updateRoot = function (viewbox) { + var scale = viewbox.scale || 1; + var matrix = 'matrix(' + [scale, 0, 0, scale, -1 * viewbox.x * scale, -1 * viewbox.y * scale].join(',') + ')'; + setTransform(this._overlayRoot, matrix); +}; +Overlays.prototype._getOverlayContainer = function (element, raw) { + var container = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(this._overlayContainers, function (c) { + return c.element === element; + }); + if (!container && !raw) { + return this._createOverlayContainer(element); + } + return container; +}; +Overlays.prototype._addOverlay = function (overlay) { + var id = overlay.id, + element = overlay.element, + html = overlay.html, + htmlContainer, + overlayContainer; + + // unwrap jquery (for those who need it) + if (html.get && html.constructor.prototype.jquery) { + html = html.get(0); + } + + // create proper html elements from + // overlay HTML strings + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isString)(html)) { + html = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.domify)(html); + } + overlayContainer = this._getOverlayContainer(element); + htmlContainer = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.domify)('
'); + htmlContainer.appendChild(html); + if (overlay.type) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.classes)(htmlContainer).add('djs-overlay-' + overlay.type); + } + var plane = this._canvas.findPlane(element); + var activePlane = this._canvas.getActivePlane(); + overlay.plane = plane; + if (plane !== activePlane) { + setVisible(htmlContainer, false); + } + overlay.htmlContainer = htmlContainer; + overlayContainer.overlays.push(overlay); + overlayContainer.html.appendChild(htmlContainer); + this._overlays[id] = overlay; + this._updateOverlay(overlay); + this._updateOverlayVisibilty(overlay, this._canvas.viewbox()); +}; +Overlays.prototype._updateOverlayVisibilty = function (overlay, viewbox) { + var show = overlay.show, + plane = overlay.plane, + minZoom = show && show.minZoom, + maxZoom = show && show.maxZoom, + htmlContainer = overlay.htmlContainer, + activePlane = this._canvas.getActivePlane(), + visible = true; + if (plane !== activePlane) { + visible = false; + } else if (show) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isDefined)(minZoom) && minZoom > viewbox.scale || (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isDefined)(maxZoom) && maxZoom < viewbox.scale) { + visible = false; + } + } + setVisible(htmlContainer, visible); + this._updateOverlayScale(overlay, viewbox); +}; +Overlays.prototype._updateOverlayScale = function (overlay, viewbox) { + var shouldScale = overlay.scale, + minScale, + maxScale, + htmlContainer = overlay.htmlContainer; + var scale, + transform = ''; + if (shouldScale !== true) { + if (shouldScale === false) { + minScale = 1; + maxScale = 1; + } else { + minScale = shouldScale.min; + maxScale = shouldScale.max; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isDefined)(minScale) && viewbox.scale < minScale) { + scale = (1 / viewbox.scale || 1) * minScale; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isDefined)(maxScale) && viewbox.scale > maxScale) { + scale = (1 / viewbox.scale || 1) * maxScale; + } + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isDefined)(scale)) { + transform = 'scale(' + scale + ',' + scale + ')'; + } + setTransform(htmlContainer, transform); +}; +Overlays.prototype._updateOverlaysVisibilty = function (viewbox) { + var self = this; + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(this._overlays, function (overlay) { + self._updateOverlayVisibilty(overlay, viewbox); + }); +}; +Overlays.prototype._init = function () { + var eventBus = this._eventBus; + var self = this; + + // scroll/zoom integration + + function updateViewbox(viewbox) { + self._updateRoot(viewbox); + self._updateOverlaysVisibilty(viewbox); + self.show(); + } + eventBus.on('canvas.viewbox.changing', function (event) { + self.hide(); + }); + eventBus.on('canvas.viewbox.changed', function (event) { + updateViewbox(event.viewbox); + }); + + // remove integration + + eventBus.on(['shape.remove', 'connection.remove'], function (e) { + var element = e.element; + var overlays = self.get({ + element: element + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(overlays, function (o) { + self.remove(o.id); + }); + var container = self._getOverlayContainer(element); + if (container) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.remove)(container.html); + var i = self._overlayContainers.indexOf(container); + if (i !== -1) { + self._overlayContainers.splice(i, 1); + } + } + }); + + // move integration + + eventBus.on('element.changed', LOW_PRIORITY, function (e) { + var element = e.element; + var container = self._getOverlayContainer(element, true); + if (container) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(container.overlays, function (overlay) { + self._updateOverlay(overlay); + }); + self._updateOverlayContainer(container); + } + }); + + // marker integration, simply add them on the overlays as classes, too. + + eventBus.on('element.marker.update', function (e) { + var container = self._getOverlayContainer(e.element, true); + if (container) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.classes)(container.html)[e.add ? 'add' : 'remove'](e.marker); + } + }); + eventBus.on('plane.set', function (e) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(self._overlays, function (el) { + setVisible(el.htmlContainer, el.plane === e.plane); + }); + }); + + // clear overlays with diagram + + eventBus.on('diagram.clear', this.clear, this); +}; + +// helpers ///////////////////////////// + +function createRoot(parentNode) { + var root = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.domify)('
'); + parentNode.insertBefore(root, parentNode.firstChild); + return root; +} +function setPosition(el, x, y) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)(el.style, { + left: x + 'px', + top: y + 'px' + }); +} +function setVisible(el, visible) { + el.style.display = visible === false ? 'none' : ''; +} +function setTransform(el, transform) { + el.style['transform-origin'] = 'top left'; + ['', '-ms-', '-webkit-'].forEach(function (prefix) { + el.style[prefix + 'transform'] = transform; + }); +} + +/***/ }), + +/***/ 4541: +/*!****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/overlays/index.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _Overlays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Overlays */ 88660); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['overlays'], + overlays: ['type', _Overlays__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 43688: +/*!*****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/palette/Palette.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Palette) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dom */ 73599); + + +var TOGGLE_SELECTOR = '.djs-palette-toggle', + ENTRY_SELECTOR = '.entry', + ELEMENT_SELECTOR = TOGGLE_SELECTOR + ', ' + ENTRY_SELECTOR; +var PALETTE_PREFIX = 'djs-palette-', + PALETTE_SHOWN_CLS = 'shown', + PALETTE_OPEN_CLS = 'open', + PALETTE_TWO_COLUMN_CLS = 'two-column'; +var DEFAULT_PRIORITY = 1000; + +/** + * A palette containing modeling elements. + */ +function Palette(eventBus, canvas) { + this._eventBus = eventBus; + this._canvas = canvas; + var self = this; + eventBus.on('tool-manager.update', function (event) { + var tool = event.tool; + self.updateToolHighlight(tool); + }); + eventBus.on('i18n.changed', function () { + self._update(); + }); + eventBus.on('diagram.init', function () { + self._diagramInitialized = true; + self._rebuild(); + }); +} +Palette.$inject = ['eventBus', 'canvas']; + +/** + * Register a provider with the palette + * + * @param {number} [priority=1000] + * @param {PaletteProvider} provider + * + * @example + * const paletteProvider = { + * getPaletteEntries: function() { + * return function(entries) { + * return { + * ...entries, + * 'entry-1': { + * label: 'My Entry', + * action: function() { alert("I have been clicked!"); } + * } + * }; + * } + * } + * }; + * + * palette.registerProvider(800, paletteProvider); + */ +Palette.prototype.registerProvider = function (priority, provider) { + if (!provider) { + provider = priority; + priority = DEFAULT_PRIORITY; + } + this._eventBus.on('palette.getProviders', priority, function (event) { + event.providers.push(provider); + }); + this._rebuild(); +}; + +/** + * Returns the palette entries + * + * @return {Object} map of entries + */ +Palette.prototype.getEntries = function () { + var providers = this._getProviders(); + return providers.reduce(addPaletteEntries, {}); +}; +Palette.prototype._rebuild = function () { + if (!this._diagramInitialized) { + return; + } + var providers = this._getProviders(); + if (!providers.length) { + return; + } + if (!this._container) { + this._init(); + } + this._update(); +}; + +/** + * Initialize + */ +Palette.prototype._init = function () { + var self = this; + var eventBus = this._eventBus; + var parentContainer = this._getParentContainer(); + var container = this._container = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)(Palette.HTML_MARKUP); + parentContainer.appendChild(container); + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(parentContainer).add(PALETTE_PREFIX + PALETTE_SHOWN_CLS); + min_dom__WEBPACK_IMPORTED_MODULE_0__.delegate.bind(container, ELEMENT_SELECTOR, 'click', function (event) { + var target = event.delegateTarget; + if ((0,min_dom__WEBPACK_IMPORTED_MODULE_0__.matches)(target, TOGGLE_SELECTOR)) { + return self.toggle(); + } + self.trigger('click', event); + }); + + // prevent drag propagation + min_dom__WEBPACK_IMPORTED_MODULE_0__.event.bind(container, 'mousedown', function (event) { + event.stopPropagation(); + }); + + // prevent drag propagation + min_dom__WEBPACK_IMPORTED_MODULE_0__.delegate.bind(container, ENTRY_SELECTOR, 'dragstart', function (event) { + self.trigger('dragstart', event); + }); + eventBus.on('canvas.resized', this._layoutChanged, this); + eventBus.fire('palette.create', { + container: container + }); +}; +Palette.prototype._getProviders = function (id) { + var event = this._eventBus.createEvent({ + type: 'palette.getProviders', + providers: [] + }); + this._eventBus.fire(event); + return event.providers; +}; + +/** + * Update palette state. + * + * @param {Object} [state] { open, twoColumn } + */ +Palette.prototype._toggleState = function (state) { + state = state || {}; + var parent = this._getParentContainer(), + container = this._container; + var eventBus = this._eventBus; + var twoColumn; + var cls = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(container), + parentCls = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(parent); + if ('twoColumn' in state) { + twoColumn = state.twoColumn; + } else { + twoColumn = this._needsCollapse(parent.clientHeight, this._entries || {}); + } + + // always update two column + cls.toggle(PALETTE_TWO_COLUMN_CLS, twoColumn); + parentCls.toggle(PALETTE_PREFIX + PALETTE_TWO_COLUMN_CLS, twoColumn); + if ('open' in state) { + cls.toggle(PALETTE_OPEN_CLS, state.open); + parentCls.toggle(PALETTE_PREFIX + PALETTE_OPEN_CLS, state.open); + } + eventBus.fire('palette.changed', { + twoColumn: twoColumn, + open: this.isOpen() + }); +}; +Palette.prototype._update = function () { + var entriesContainer = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)('.djs-palette-entries', this._container), + entries = this._entries = this.getEntries(); + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.clear)(entriesContainer); + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(entries, function (entry, id) { + var grouping = entry.group || 'default'; + var container = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)('[data-group=' + grouping + ']', entriesContainer); + if (!container) { + container = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)('
'); + entriesContainer.appendChild(container); + } + var html = entry.html || (entry.separator ? '
' : '
'); + var control = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)(html); + container.appendChild(control); + if (!entry.separator) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.attr)(control, 'data-action', id); + if (entry.title) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.attr)(control, 'title', entry.title); + } + if (entry.className) { + addClasses(control, entry.className); + } + if (entry.imageUrl) { + control.appendChild((0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)('')); + } + } + }); + + // open after update + this.open(); +}; + +/** + * Trigger an action available on the palette + * + * @param {string} action + * @param {Event} event + */ +Palette.prototype.trigger = function (action, event, autoActivate) { + var entries = this._entries, + entry, + handler, + originalEvent, + button = event.delegateTarget || event.target; + if (!button) { + return event.preventDefault(); + } + entry = entries[(0,min_dom__WEBPACK_IMPORTED_MODULE_0__.attr)(button, 'data-action')]; + + // when user clicks on the palette and not on an action + if (!entry) { + return; + } + handler = entry.action; + originalEvent = event.originalEvent || event; + + // simple action (via callback function) + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) { + if (action === 'click') { + handler(originalEvent, autoActivate); + } + } else { + if (handler[action]) { + handler[action](originalEvent, autoActivate); + } + } + + // silence other actions + event.preventDefault(); +}; +Palette.prototype._layoutChanged = function () { + this._toggleState({}); +}; + +/** + * Do we need to collapse to two columns? + * + * @param {number} availableHeight + * @param {Object} entries + * + * @return {boolean} + */ +Palette.prototype._needsCollapse = function (availableHeight, entries) { + // top margin + bottom toggle + bottom margin + // implementors must override this method if they + // change the palette styles + var margin = 20 + 10 + 20; + var entriesHeight = Object.keys(entries).length * 46; + return availableHeight < entriesHeight + margin; +}; + +/** + * Close the palette + */ +Palette.prototype.close = function () { + this._toggleState({ + open: false, + twoColumn: false + }); +}; + +/** + * Open the palette + */ +Palette.prototype.open = function () { + this._toggleState({ + open: true + }); +}; +Palette.prototype.toggle = function (open) { + if (this.isOpen()) { + this.close(); + } else { + this.open(); + } +}; +Palette.prototype.isActiveTool = function (tool) { + return tool && this._activeTool === tool; +}; +Palette.prototype.updateToolHighlight = function (name) { + var entriesContainer, toolsContainer; + if (!this._toolsContainer) { + entriesContainer = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)('.djs-palette-entries', this._container); + this._toolsContainer = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)('[data-group=tools]', entriesContainer); + } + toolsContainer = this._toolsContainer; + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(toolsContainer.children, function (tool) { + var actionName = tool.getAttribute('data-action'); + if (!actionName) { + return; + } + var toolClasses = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(tool); + actionName = actionName.replace('-tool', ''); + if (toolClasses.contains('entry') && actionName === name) { + toolClasses.add('highlighted-entry'); + } else { + toolClasses.remove('highlighted-entry'); + } + }); +}; + +/** + * Return true if the palette is opened. + * + * @example + * + * palette.open(); + * + * if (palette.isOpen()) { + * // yes, we are open + * } + * + * @return {boolean} true if palette is opened + */ +Palette.prototype.isOpen = function () { + return (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(this._container).has(PALETTE_OPEN_CLS); +}; + +/** + * Get container the palette lives in. + * + * @return {Element} + */ +Palette.prototype._getParentContainer = function () { + return this._canvas.getContainer(); +}; + +/* markup definition */ + +Palette.HTML_MARKUP = '
' + '
' + '
' + '
'; + +// helpers ////////////////////// + +function addClasses(element, classNames) { + var classes = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(element); + var actualClassNames = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isArray)(classNames) ? classNames : classNames.split(/\s+/g); + actualClassNames.forEach(function (cls) { + classes.add(cls); + }); +} +function addPaletteEntries(entries, provider) { + var entriesOrUpdater = provider.getPaletteEntries(); + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isFunction)(entriesOrUpdater)) { + return entriesOrUpdater(entries); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(entriesOrUpdater, function (entry, id) { + entries[id] = entry; + }); + return entries; +} + +/***/ }), + +/***/ 42383: +/*!***************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/palette/index.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _Palette__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Palette */ 43688); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['palette'], + palette: ['type', _Palette__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 66947: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/popup-menu/PopupMenu.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ PopupMenu) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ 73599); + + +var DATA_REF = 'data-id'; +var CLOSE_EVENTS = ['contextPad.close', 'canvas.viewbox.changing', 'commandStack.changed']; +var DEFAULT_PRIORITY = 1000; + +/** + * A popup menu that can be used to display a list of actions anywhere in the canvas. + * + * @param {Object} config + * @param {boolean|Object} [config.scale={ min: 1.0, max: 1.5 }] + * @param {number} [config.scale.min] + * @param {number} [config.scale.max] + * @param {EventBus} eventBus + * @param {Canvas} canvas + * + * @class + * @constructor + */ +function PopupMenu(config, eventBus, canvas) { + var scale = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isDefined)(config && config.scale) ? config.scale : { + min: 1, + max: 1.5 + }; + this._config = { + scale: scale + }; + this._eventBus = eventBus; + this._canvas = canvas; + this._providers = {}; + this._current = {}; +} +PopupMenu.$inject = ['config.popupMenu', 'eventBus', 'canvas']; + +/** + * Registers a popup menu provider + * + * @param {string} id + * @param {number} [priority=1000] + * @param {Object} provider + * + * @example + * const popupMenuProvider = { + * getPopupMenuEntries: function(element) { + * return { + * 'entry-1': { + * label: 'My Entry', + * action: function() { alert("I have been clicked!"); } + * } + * } + * } + * }; + * + * popupMenu.registerProvider('myMenuID', popupMenuProvider); + */ +PopupMenu.prototype.registerProvider = function (id, priority, provider) { + if (!provider) { + provider = priority; + priority = DEFAULT_PRIORITY; + } + this._eventBus.on('popupMenu.getProviders.' + id, priority, function (event) { + event.providers.push(provider); + }); +}; + +/** + * Determine if the popup menu has entries. + * + * @return {boolean} true if empty + */ +PopupMenu.prototype.isEmpty = function (element, providerId) { + if (!element) { + throw new Error('element parameter is missing'); + } + if (!providerId) { + throw new Error('providerId parameter is missing'); + } + var providers = this._getProviders(providerId); + if (!providers) { + return true; + } + var entries = this._getEntries(element, providers), + headerEntries = this._getHeaderEntries(element, providers); + var hasEntries = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.size)(entries) > 0, + hasHeaderEntries = headerEntries && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.size)(headerEntries) > 0; + return !hasEntries && !hasHeaderEntries; +}; + +/** + * Create entries and open popup menu at given position + * + * @param {Object} element + * @param {string} id provider id + * @param {Object} position + * + * @return {Object} popup menu instance + */ +PopupMenu.prototype.open = function (element, id, position) { + var providers = this._getProviders(id); + if (!element) { + throw new Error('Element is missing'); + } + if (!providers || !providers.length) { + throw new Error('No registered providers for: ' + id); + } + if (!position) { + throw new Error('the position argument is missing'); + } + if (this.isOpen()) { + this.close(); + } + this._emit('open'); + var current = this._current = { + className: id, + element: element, + position: position + }; + var entries = this._getEntries(element, providers), + headerEntries = this._getHeaderEntries(element, providers); + current.entries = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, entries, headerEntries); + current.container = this._createContainer(); + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.size)(headerEntries)) { + current.container.appendChild(this._createEntries(headerEntries, 'djs-popup-header')); + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.size)(entries)) { + current.container.appendChild(this._createEntries(entries, 'djs-popup-body')); + } + var canvas = this._canvas, + parent = canvas.getContainer(); + this._attachContainer(current.container, parent, position.cursor); + this._bindAutoClose(); +}; + +/** + * Removes the popup menu and unbinds the event handlers. + */ +PopupMenu.prototype.close = function () { + if (!this.isOpen()) { + return; + } + this._emit('close'); + this._unbindAutoClose(); + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.remove)(this._current.container); + this._current.container = null; +}; + +/** + * Determine if an open popup menu exist. + * + * @return {boolean} true if open + */ +PopupMenu.prototype.isOpen = function () { + return !!this._current.container; +}; + +/** + * Trigger an action associated with an entry. + * + * @param {Object} event + * + * @return the result of the action callback, if any + */ +PopupMenu.prototype.trigger = function (event) { + // silence other actions + event.preventDefault(); + var element = event.delegateTarget || event.target, + entryId = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(element, DATA_REF); + var entry = this._getEntry(entryId); + if (entry.action) { + return entry.action.call(null, event, entry); + } +}; +PopupMenu.prototype._getProviders = function (id) { + var event = this._eventBus.createEvent({ + type: 'popupMenu.getProviders.' + id, + providers: [] + }); + this._eventBus.fire(event); + return event.providers; +}; +PopupMenu.prototype._getEntries = function (element, providers) { + var entries = {}; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(providers, function (provider) { + // handle legacy method + if (!provider.getPopupMenuEntries) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(provider.getEntries(element), function (entry) { + var id = entry.id; + if (!id) { + throw new Error('every entry must have the id property set'); + } + entries[id] = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(entry, ['id']); + }); + return; + } + var entriesOrUpdater = provider.getPopupMenuEntries(element); + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(entriesOrUpdater)) { + entries = entriesOrUpdater(entries); + } else { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(entriesOrUpdater, function (entry, id) { + entries[id] = entry; + }); + } + }); + return entries; +}; +PopupMenu.prototype._getHeaderEntries = function (element, providers) { + var entries = {}; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(providers, function (provider) { + // handle legacy method + if (!provider.getPopupMenuHeaderEntries) { + if (!provider.getHeaderEntries) { + return; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(provider.getHeaderEntries(element), function (entry) { + var id = entry.id; + if (!id) { + throw new Error('every entry must have the id property set'); + } + entries[id] = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.omit)(entry, ['id']); + }); + return; + } + var entriesOrUpdater = provider.getPopupMenuHeaderEntries(element); + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isFunction)(entriesOrUpdater)) { + entries = entriesOrUpdater(entries); + } else { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(entriesOrUpdater, function (entry, id) { + entries[id] = entry; + }); + } + }); + return entries; +}; + +/** + * Gets an entry instance (either entry or headerEntry) by id. + * + * @param {string} entryId + * + * @return {Object} entry instance + */ +PopupMenu.prototype._getEntry = function (entryId) { + var entry = this._current.entries[entryId]; + if (!entry) { + throw new Error('entry not found'); + } + return entry; +}; +PopupMenu.prototype._emit = function (eventName) { + this._eventBus.fire('popupMenu.' + eventName); +}; + +/** + * Creates the popup menu container. + * + * @return {Object} a DOM container + */ +PopupMenu.prototype._createContainer = function () { + var container = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('
'), + position = this._current.position, + className = this._current.className; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(container.style, { + position: 'absolute', + left: position.x + 'px', + top: position.y + 'px', + visibility: 'hidden' + }); + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.classes)(container).add(className); + return container; +}; + +/** + * Attaches the container to the DOM. + * + * @param {Object} container + * @param {Object} parent + */ +PopupMenu.prototype._attachContainer = function (container, parent, cursor) { + var self = this; + + // Event handler + min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(container, '.entry', 'click', function (event) { + self.trigger(event); + }); + this._updateScale(container); + + // Attach to DOM + parent.appendChild(container); + if (cursor) { + this._assureIsInbounds(container, cursor); + } +}; + +/** + * Updates popup style.transform with respect to the config and zoom level. + * + * @method _updateScale + * + * @param {Object} container + */ +PopupMenu.prototype._updateScale = function (container) { + var zoom = this._canvas.zoom(); + var scaleConfig = this._config.scale, + minScale, + maxScale, + scale = zoom; + if (scaleConfig !== true) { + if (scaleConfig === false) { + minScale = 1; + maxScale = 1; + } else { + minScale = scaleConfig.min; + maxScale = scaleConfig.max; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isDefined)(minScale) && zoom < minScale) { + scale = minScale; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isDefined)(maxScale) && zoom > maxScale) { + scale = maxScale; + } + } + setTransform(container, 'scale(' + scale + ')'); +}; + +/** + * Make sure that the menu is always fully shown + * + * @method function + * + * @param {Object} container + * @param {Position} cursor {x, y} + */ +PopupMenu.prototype._assureIsInbounds = function (container, cursor) { + var canvas = this._canvas, + clientRect = canvas._container.getBoundingClientRect(); + var containerX = container.offsetLeft, + containerY = container.offsetTop, + containerWidth = container.scrollWidth, + containerHeight = container.scrollHeight, + overAxis = {}, + left, + top; + var cursorPosition = { + x: cursor.x - clientRect.left, + y: cursor.y - clientRect.top + }; + if (containerX + containerWidth > clientRect.width) { + overAxis.x = true; + } + if (containerY + containerHeight > clientRect.height) { + overAxis.y = true; + } + if (overAxis.x && overAxis.y) { + left = cursorPosition.x - containerWidth + 'px'; + top = cursorPosition.y - containerHeight + 'px'; + } else if (overAxis.x) { + left = cursorPosition.x - containerWidth + 'px'; + top = cursorPosition.y + 'px'; + } else if (overAxis.y && cursorPosition.y < containerHeight) { + left = cursorPosition.x + 'px'; + top = 10 + 'px'; + } else if (overAxis.y) { + left = cursorPosition.x + 'px'; + top = cursorPosition.y - containerHeight + 'px'; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(container.style, { + left: left, + top: top + }, { + visibility: 'visible', + 'z-index': 1000 + }); +}; + +/** + * Creates a list of entries and returns them as a DOM container. + * + * @param {Array} entries an array of entry objects + * @param {string} className the class name of the entry container + * + * @return {Object} a DOM container + */ +PopupMenu.prototype._createEntries = function (entries, className) { + var entriesContainer = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('
'), + self = this; + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.classes)(entriesContainer).add(className); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(entries, function (entry, id) { + var entryContainer = self._createEntry(entry, id); + entriesContainer.appendChild(entryContainer); + }); + return entriesContainer; +}; + +/** + * Creates a single entry and returns it as a DOM container. + * + * @param {Object} entry + * + * @return {Object} a DOM container + */ +PopupMenu.prototype._createEntry = function (entry, id) { + var entryContainer = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('
'), + entryClasses = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.classes)(entryContainer); + entryClasses.add('entry'); + if (entry.className) { + entry.className.split(' ').forEach(function (className) { + entryClasses.add(className); + }); + } + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(entryContainer, DATA_REF, id); + if (entry.label) { + var label = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)(''); + label.textContent = entry.label; + entryContainer.appendChild(label); + } + if (entry.imageUrl) { + entryContainer.appendChild((0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('')); + } + if (entry.active === true) { + entryClasses.add('active'); + } + if (entry.disabled === true) { + entryClasses.add('disabled'); + } + if (entry.title) { + entryContainer.title = entry.title; + } + return entryContainer; +}; + +/** + * Set up listener to close popup automatically on certain events. + */ +PopupMenu.prototype._bindAutoClose = function () { + this._eventBus.once(CLOSE_EVENTS, this.close, this); +}; + +/** + * Remove the auto-closing listener. + */ +PopupMenu.prototype._unbindAutoClose = function () { + this._eventBus.off(CLOSE_EVENTS, this.close, this); +}; + +// helpers ///////////////////////////// + +function setTransform(element, transform) { + element.style['transform-origin'] = 'top left'; + ['', '-ms-', '-webkit-'].forEach(function (prefix) { + element.style[prefix + 'transform'] = transform; + }); +} + +/***/ }), + +/***/ 63162: +/*!******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/popup-menu/index.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _PopupMenu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PopupMenu */ 66947); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['popupMenu'], + popupMenu: ['type', _PopupMenu__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 33467: +/*!********************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/preview-support/PreviewSupport.js ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ PreviewSupport) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/GraphicsUtil */ 35451); + + + + +var MARKER_TYPES = ['marker-start', 'marker-mid', 'marker-end']; +var NODES_CAN_HAVE_MARKER = ['circle', 'ellipse', 'line', 'path', 'polygon', 'polyline', 'rect']; + +/** + * Adds support for previews of moving/resizing elements. + */ +function PreviewSupport(elementRegistry, eventBus, canvas, styles) { + this._elementRegistry = elementRegistry; + this._canvas = canvas; + this._styles = styles; + this._clonedMarkers = {}; + var self = this; + eventBus.on('drag.cleanup', function () { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(self._clonedMarkers, function (clonedMarker) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(clonedMarker); + }); + self._clonedMarkers = {}; + }); +} +PreviewSupport.$inject = ['elementRegistry', 'eventBus', 'canvas', 'styles']; + +/** + * Returns graphics of an element. + * + * @param {djs.model.Base} element + * + * @return {SVGElement} + */ +PreviewSupport.prototype.getGfx = function (element) { + return this._elementRegistry.getGraphics(element); +}; + +/** + * Adds a move preview of a given shape to a given svg group. + * + * @param {djs.model.Base} element + * @param {SVGElement} group + * @param {SVGElement} [gfx] + * + * @return {SVGElement} dragger + */ +PreviewSupport.prototype.addDragger = function (element, group, gfx) { + gfx = gfx || this.getGfx(element); + var dragger = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.clone)(gfx); + var bbox = gfx.getBoundingClientRect(); + this._cloneMarkers((0,_util_GraphicsUtil__WEBPACK_IMPORTED_MODULE_2__.getVisual)(dragger)); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(dragger, this._styles.cls('djs-dragger', [], { + x: bbox.top, + y: bbox.left + })); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(group, dragger); + return dragger; +}; + +/** + * Adds a resize preview of a given shape to a given svg group. + * + * @param {djs.model.Base} element + * @param {SVGElement} group + * + * @return {SVGElement} frame + */ +PreviewSupport.prototype.addFrame = function (shape, group) { + var frame = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('rect', { + class: 'djs-resize-overlay', + width: shape.width, + height: shape.height, + x: shape.x, + y: shape.y + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(group, frame); + return frame; +}; + +/** + * Clone all markers referenced by a node and its child nodes. + * + * @param {SVGElement} gfx + */ +PreviewSupport.prototype._cloneMarkers = function (gfx) { + var self = this; + if (gfx.childNodes) { + // TODO: use forEach once we drop PhantomJS + for (var i = 0; i < gfx.childNodes.length; i++) { + // recursively clone markers of child nodes + self._cloneMarkers(gfx.childNodes[i]); + } + } + if (!canHaveMarker(gfx)) { + return; + } + MARKER_TYPES.forEach(function (markerType) { + if ((0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(gfx, markerType)) { + var marker = getMarker(gfx, markerType, self._canvas.getContainer()); + self._cloneMarker(gfx, marker, markerType); + } + }); +}; + +/** + * Clone marker referenced by an element. + * + * @param {SVGElement} gfx + * @param {SVGElement} marker + * @param {string} markerType + */ +PreviewSupport.prototype._cloneMarker = function (gfx, marker, markerType) { + var markerId = marker.id; + var clonedMarker = this._clonedMarkers[markerId]; + if (!clonedMarker) { + clonedMarker = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.clone)(marker); + var clonedMarkerId = markerId + '-clone'; + clonedMarker.id = clonedMarkerId; + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(clonedMarker).add('djs-dragger').add('djs-dragger-marker'); + this._clonedMarkers[markerId] = clonedMarker; + var defs = (0,min_dom__WEBPACK_IMPORTED_MODULE_3__.query)('defs', this._canvas._svg); + if (!defs) { + defs = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('defs'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(this._canvas._svg, defs); + } + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(defs, clonedMarker); + } + var reference = idToReference(this._clonedMarkers[markerId].id); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(gfx, markerType, reference); +}; + +// helpers ////////// + +/** + * Get marker of given type referenced by node. + * + * @param {Node} node + * @param {string} markerType + * @param {Node} [parentNode] + * + * @param {Node} + */ +function getMarker(node, markerType, parentNode) { + var id = referenceToId((0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(node, markerType)); + return (0,min_dom__WEBPACK_IMPORTED_MODULE_3__.query)('marker#' + id, parentNode || document); +} + +/** + * Get ID of fragment within current document from its functional IRI reference. + * References may use single or double quotes. + * + * @param {string} reference + * + * @returns {string} + */ +function referenceToId(reference) { + return reference.match(/url\(['"]?#([^'"]*)['"]?\)/)[1]; +} + +/** + * Get functional IRI reference for given ID of fragment within current document. + * + * @param {string} id + * + * @returns {string} + */ +function idToReference(id) { + return 'url(#' + id + ')'; +} + +/** + * Check wether node type can have marker attributes. + * + * @param {Node} node + * + * @returns {boolean} + */ +function canHaveMarker(node) { + return NODES_CAN_HAVE_MARKER.indexOf(node.nodeName) !== -1; +} + +/***/ }), + +/***/ 86726: +/*!***********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/preview-support/index.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _PreviewSupport__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PreviewSupport */ 33467); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['previewSupport'], + previewSupport: ['type', _PreviewSupport__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 79204: +/*!*****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/replace/Replace.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Replace) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +var round = Math.round; + +/** + * Service that allow replacing of elements. + */ +function Replace(modeling) { + this._modeling = modeling; +} +Replace.$inject = ['modeling']; + +/** + * @param {Element} oldElement - Element to be replaced + * @param {Object} newElementData - Containing information about the new element, + * for example the new bounds and type. + * @param {Object} options - Custom options that will be attached to the context. It can be used to inject data + * that is needed in the command chain. For example it could be used in + * eventbus.on('commandStack.shape.replace.postExecute') to change shape attributes after + * shape creation. + */ +Replace.prototype.replaceElement = function (oldElement, newElementData, options) { + if (oldElement.waypoints) { + // TODO(nikku): we do not replace connections, yet + return null; + } + var modeling = this._modeling; + var width = newElementData.width || oldElement.width, + height = newElementData.height || oldElement.height, + x = newElementData.x || oldElement.x, + y = newElementData.y || oldElement.y, + centerX = round(x + width / 2), + centerY = round(y + height / 2); + + // modeling API requires center coordinates, + // account for that when handling shape bounds + + return modeling.replaceShape(oldElement, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, newElementData, { + x: centerX, + y: centerY, + width: width, + height: height + }), options); +}; + +/***/ }), + +/***/ 77740: +/*!***************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/replace/index.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _Replace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Replace */ 79204); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['replace'], + replace: ['type', _Replace__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 22022: +/*!***************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/resize/Resize.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Resize), +/* harmony export */ getReferencePoint: () => (/* binding */ getReferencePoint) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _ResizeUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ResizeUtil */ 35434); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); + + + +var DEFAULT_MIN_WIDTH = 10; + +/** + * A component that provides resizing of shapes on the canvas. + * + * The following components are part of shape resize: + * + * * adding resize handles, + * * creating a visual during resize + * * checking resize rules + * * committing a change once finished + * + * + * ## Customizing + * + * It's possible to customize the resizing behaviour by intercepting 'resize.start' + * and providing the following parameters through the 'context': + * + * * minDimensions ({ width, height }): minimum shape dimensions + * + * * childrenBoxPadding ({ left, top, bottom, right } || number): + * gap between the minimum bounding box and the container + * + * f.ex: + * + * ```javascript + * eventBus.on('resize.start', 1500, function(event) { + * var context = event.context, + * + * context.minDimensions = { width: 140, height: 120 }; + * + * // Passing general padding + * context.childrenBoxPadding = 30; + * + * // Passing padding to a specific side + * context.childrenBoxPadding.left = 20; + * }); + * ``` + */ +function Resize(eventBus, rules, modeling, dragging) { + this._dragging = dragging; + this._rules = rules; + var self = this; + + /** + * Handle resize move by specified delta. + * + * @param {Object} context + * @param {Point} delta + */ + function handleMove(context, delta) { + var shape = context.shape, + direction = context.direction, + resizeConstraints = context.resizeConstraints, + newBounds; + context.delta = delta; + newBounds = (0,_ResizeUtil__WEBPACK_IMPORTED_MODULE_0__.resizeBounds)(shape, direction, delta); + + // ensure constraints during resize + context.newBounds = (0,_ResizeUtil__WEBPACK_IMPORTED_MODULE_0__.ensureConstraints)(newBounds, resizeConstraints); + + // update + cache executable state + context.canExecute = self.canResize(context); + } + + /** + * Handle resize start. + * + * @param {Object} context + */ + function handleStart(context) { + var resizeConstraints = context.resizeConstraints, + // evaluate minBounds for backwards compatibility + minBounds = context.minBounds; + if (resizeConstraints !== undefined) { + return; + } + if (minBounds === undefined) { + minBounds = self.computeMinResizeBox(context); + } + context.resizeConstraints = { + min: (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(minBounds) + }; + } + + /** + * Handle resize end. + * + * @param {Object} context + */ + function handleEnd(context) { + var shape = context.shape, + canExecute = context.canExecute, + newBounds = context.newBounds; + if (canExecute) { + // ensure we have actual pixel values for new bounds + // (important when zoom level was > 1 during move) + newBounds = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.roundBounds)(newBounds); + if (!boundsChanged(shape, newBounds)) { + // no resize necessary + return; + } + + // perform the actual resize + modeling.resizeShape(shape, newBounds); + } + } + eventBus.on('resize.start', function (event) { + handleStart(event.context); + }); + eventBus.on('resize.move', function (event) { + var delta = { + x: event.dx, + y: event.dy + }; + handleMove(event.context, delta); + }); + eventBus.on('resize.end', function (event) { + handleEnd(event.context); + }); +} +Resize.prototype.canResize = function (context) { + var rules = this._rules; + var ctx = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.pick)(context, ['newBounds', 'shape', 'delta', 'direction']); + return rules.allowed('shape.resize', ctx); +}; + +/** + * Activate a resize operation. + * + * You may specify additional contextual information and must specify a + * resize direction during activation of the resize event. + * + * @param {MouseEvent} event + * @param {djs.model.Shape} shape + * @param {Object|string} contextOrDirection + */ +Resize.prototype.activate = function (event, shape, contextOrDirection) { + var dragging = this._dragging, + context, + direction; + if (typeof contextOrDirection === 'string') { + contextOrDirection = { + direction: contextOrDirection + }; + } + context = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + shape: shape + }, contextOrDirection); + direction = context.direction; + if (!direction) { + throw new Error('must provide a direction (n|w|s|e|nw|se|ne|sw)'); + } + dragging.init(event, getReferencePoint(shape, direction), 'resize', { + autoActivate: true, + cursor: getCursor(direction), + data: { + shape: shape, + context: context + } + }); +}; +Resize.prototype.computeMinResizeBox = function (context) { + var shape = context.shape, + direction = context.direction, + minDimensions, + childrenBounds; + minDimensions = context.minDimensions || { + width: DEFAULT_MIN_WIDTH, + height: DEFAULT_MIN_WIDTH + }; + + // get children bounds + childrenBounds = (0,_ResizeUtil__WEBPACK_IMPORTED_MODULE_0__.computeChildrenBBox)(shape, context.childrenBoxPadding); + + // get correct minimum bounds from given resize direction + // basically ensures that the minBounds is max(childrenBounds, minDimensions) + return (0,_ResizeUtil__WEBPACK_IMPORTED_MODULE_0__.getMinResizeBounds)(direction, shape, minDimensions, childrenBounds); +}; +Resize.$inject = ['eventBus', 'rules', 'modeling', 'dragging']; + +// helpers ////////// + +function boundsChanged(shape, newBounds) { + return shape.x !== newBounds.x || shape.y !== newBounds.y || shape.width !== newBounds.width || shape.height !== newBounds.height; +} +function getReferencePoint(shape, direction) { + var mid = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getMid)(shape), + trbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(shape); + var referencePoint = { + x: mid.x, + y: mid.y + }; + if (direction.indexOf('n') !== -1) { + referencePoint.y = trbl.top; + } else if (direction.indexOf('s') !== -1) { + referencePoint.y = trbl.bottom; + } + if (direction.indexOf('e') !== -1) { + referencePoint.x = trbl.right; + } else if (direction.indexOf('w') !== -1) { + referencePoint.x = trbl.left; + } + return referencePoint; +} +function getCursor(direction) { + var prefix = 'resize-'; + if (direction === 'n' || direction === 's') { + return prefix + 'ns'; + } else if (direction === 'e' || direction === 'w') { + return prefix + 'ew'; + } else if (direction === 'nw' || direction === 'se') { + return prefix + 'nwse'; + } else { + return prefix + 'nesw'; + } +} + +/***/ }), + +/***/ 30439: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/resize/ResizeHandles.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ResizeHandles) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Mouse */ 53171); +/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ 81384); +/* harmony import */ var _Resize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Resize */ 22022); + + + + + + +var HANDLE_OFFSET = -6, + HANDLE_SIZE = 4, + HANDLE_HIT_SIZE = 20; +var CLS_RESIZER = 'djs-resizer'; +var directions = ['n', 'w', 's', 'e', 'nw', 'ne', 'se', 'sw']; + +/** + * This component is responsible for adding resize handles. + * + * @param {EventBus} eventBus + * @param {Canvas} canvas + * @param {Selection} selection + * @param {Resize} resize + */ +function ResizeHandles(eventBus, canvas, selection, resize) { + this._resize = resize; + this._canvas = canvas; + var self = this; + eventBus.on('selection.changed', function (e) { + var newSelection = e.newSelection; + + // remove old selection markers + self.removeResizers(); + + // add new selection markers ONLY if single selection + if (newSelection.length === 1) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(newSelection, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(self.addResizer, self)); + } + }); + eventBus.on('shape.changed', function (e) { + var shape = e.element; + if (selection.isSelected(shape)) { + self.removeResizers(); + self.addResizer(shape); + } + }); +} +ResizeHandles.prototype.makeDraggable = function (element, gfx, direction) { + var resize = this._resize; + function startResize(event) { + // only trigger on left mouse button + if ((0,_util_Mouse__WEBPACK_IMPORTED_MODULE_1__.isPrimaryButton)(event)) { + resize.activate(event, element, direction); + } + } + min_dom__WEBPACK_IMPORTED_MODULE_2__.event.bind(gfx, 'mousedown', startResize); + min_dom__WEBPACK_IMPORTED_MODULE_2__.event.bind(gfx, 'touchstart', startResize); +}; +ResizeHandles.prototype._createResizer = function (element, x, y, direction) { + var resizersParent = this._getResizersParent(); + var offset = getHandleOffset(direction); + var group = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.classes)(group).add(CLS_RESIZER); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.classes)(group).add(CLS_RESIZER + '-' + element.id); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.classes)(group).add(CLS_RESIZER + '-' + direction); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(resizersParent, group); + var visual = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('rect'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(visual, { + x: -HANDLE_SIZE / 2 + offset.x, + y: -HANDLE_SIZE / 2 + offset.y, + width: HANDLE_SIZE, + height: HANDLE_SIZE + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.classes)(visual).add(CLS_RESIZER + '-visual'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(group, visual); + var hit = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.create)('rect'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.attr)(hit, { + x: -HANDLE_HIT_SIZE / 2 + offset.x, + y: -HANDLE_HIT_SIZE / 2 + offset.y, + width: HANDLE_HIT_SIZE, + height: HANDLE_HIT_SIZE + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.classes)(hit).add(CLS_RESIZER + '-hit'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.append)(group, hit); + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_4__.transform)(group, x, y); + return group; +}; +ResizeHandles.prototype.createResizer = function (element, direction) { + var point = (0,_Resize__WEBPACK_IMPORTED_MODULE_5__.getReferencePoint)(element, direction); + var resizer = this._createResizer(element, point.x, point.y, direction); + this.makeDraggable(element, resizer, direction); +}; + +// resize handles implementation /////////////////////////////// + +/** + * Add resizers for a given element. + * + * @param {djs.model.Shape} shape + */ +ResizeHandles.prototype.addResizer = function (shape) { + var self = this; + var resize = this._resize; + if (!resize.canResize({ + shape: shape + })) { + return; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(directions, function (direction) { + self.createResizer(shape, direction); + }); +}; + +/** + * Remove all resizers + */ +ResizeHandles.prototype.removeResizers = function () { + var resizersParent = this._getResizersParent(); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_3__.clear)(resizersParent); +}; +ResizeHandles.prototype._getResizersParent = function () { + return this._canvas.getLayer('resizers'); +}; +ResizeHandles.$inject = ['eventBus', 'canvas', 'selection', 'resize']; + +// helpers ////////// + +function getHandleOffset(direction) { + var offset = { + x: 0, + y: 0 + }; + if (direction.indexOf('e') !== -1) { + offset.x = -HANDLE_OFFSET; + } else if (direction.indexOf('w') !== -1) { + offset.x = HANDLE_OFFSET; + } + if (direction.indexOf('s') !== -1) { + offset.y = -HANDLE_OFFSET; + } else if (direction.indexOf('n') !== -1) { + offset.y = HANDLE_OFFSET; + } + return offset; +} + +/***/ }), + +/***/ 51932: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/resize/ResizePreview.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ResizePreview) +/* harmony export */ }); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ 57491); +var MARKER_RESIZING = 'djs-resizing', + MARKER_RESIZE_NOT_OK = 'resize-not-ok'; +var LOW_PRIORITY = 500; + + +/** + * Provides previews for resizing shapes when resizing. + * + * @param {EventBus} eventBus + * @param {Canvas} canvas + * @param {PreviewSupport} previewSupport + */ +function ResizePreview(eventBus, canvas, previewSupport) { + /** + * Update resizer frame. + * + * @param {Object} context + */ + function updateFrame(context) { + var shape = context.shape, + bounds = context.newBounds, + frame = context.frame; + if (!frame) { + frame = context.frame = previewSupport.addFrame(shape, canvas.getActiveLayer()); + canvas.addMarker(shape, MARKER_RESIZING); + } + if (bounds.width > 5) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(frame, { + x: bounds.x, + width: bounds.width + }); + } + if (bounds.height > 5) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(frame, { + y: bounds.y, + height: bounds.height + }); + } + if (context.canExecute) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.classes)(frame).remove(MARKER_RESIZE_NOT_OK); + } else { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.classes)(frame).add(MARKER_RESIZE_NOT_OK); + } + } + + /** + * Remove resizer frame. + * + * @param {Object} context + */ + function removeFrame(context) { + var shape = context.shape, + frame = context.frame; + if (frame) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.remove)(context.frame); + } + canvas.removeMarker(shape, MARKER_RESIZING); + } + + // add and update previews + eventBus.on('resize.move', LOW_PRIORITY, function (event) { + updateFrame(event.context); + }); + + // remove previews + eventBus.on('resize.cleanup', function (event) { + removeFrame(event.context); + }); +} +ResizePreview.$inject = ['eventBus', 'canvas', 'previewSupport']; + +/***/ }), + +/***/ 35434: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/resize/ResizeUtil.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ addPadding: () => (/* binding */ addPadding), +/* harmony export */ computeChildrenBBox: () => (/* binding */ computeChildrenBBox), +/* harmony export */ ensureConstraints: () => (/* binding */ ensureConstraints), +/* harmony export */ getMinResizeBounds: () => (/* binding */ getMinResizeBounds), +/* harmony export */ reattachPoint: () => (/* binding */ reattachPoint), +/* harmony export */ resizeBounds: () => (/* binding */ resizeBounds), +/* harmony export */ resizeTRBL: () => (/* binding */ resizeTRBL), +/* harmony export */ substractTRBL: () => (/* binding */ substractTRBL) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/Elements */ 35723); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); + +var max = Math.max, + min = Math.min; +var DEFAULT_CHILD_BOX_PADDING = 20; + + + +/** + * Substract a TRBL from another + * + * @param {TRBL} trblA + * @param {TRBL} trblB + * + * @return {TRBL} + */ +function substractTRBL(trblA, trblB) { + return { + top: trblA.top - trblB.top, + right: trblA.right - trblB.right, + bottom: trblA.bottom - trblB.bottom, + left: trblA.left - trblB.left + }; +} + +/** + * Resize the given bounds by the specified delta from a given anchor point. + * + * @param {Bounds} bounds the bounding box that should be resized + * @param {string} direction in which the element is resized (nw, ne, se, sw) + * @param {Point} delta of the resize operation + * + * @return {Bounds} resized bounding box + */ +function resizeBounds(bounds, direction, delta) { + var dx = delta.x, + dy = delta.y; + var newBounds = { + x: bounds.x, + y: bounds.y, + width: bounds.width, + height: bounds.height + }; + if (direction.indexOf('n') !== -1) { + newBounds.y = bounds.y + dy; + newBounds.height = bounds.height - dy; + } else if (direction.indexOf('s') !== -1) { + newBounds.height = bounds.height + dy; + } + if (direction.indexOf('e') !== -1) { + newBounds.width = bounds.width + dx; + } else if (direction.indexOf('w') !== -1) { + newBounds.x = bounds.x + dx; + newBounds.width = bounds.width - dx; + } + return newBounds; +} + +/** + * Resize the given bounds by applying the passed + * { top, right, bottom, left } delta. + * + * @param {Bounds} bounds + * @param {TRBL} trblResize + * + * @return {Bounds} + */ +function resizeTRBL(bounds, resize) { + return { + x: bounds.x + (resize.left || 0), + y: bounds.y + (resize.top || 0), + width: bounds.width - (resize.left || 0) + (resize.right || 0), + height: bounds.height - (resize.top || 0) + (resize.bottom || 0) + }; +} +function reattachPoint(bounds, newBounds, point) { + var sx = bounds.width / newBounds.width, + sy = bounds.height / newBounds.height; + return { + x: Math.round(newBounds.x + newBounds.width / 2) - Math.floor((bounds.x + bounds.width / 2 - point.x) / sx), + y: Math.round(newBounds.y + newBounds.height / 2) - Math.floor((bounds.y + bounds.height / 2 - point.y) / sy) + }; +} +function applyConstraints(attr, trbl, resizeConstraints) { + var value = trbl[attr], + minValue = resizeConstraints.min && resizeConstraints.min[attr], + maxValue = resizeConstraints.max && resizeConstraints.max[attr]; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(minValue)) { + value = (/top|left/.test(attr) ? min : max)(value, minValue); + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(maxValue)) { + value = (/top|left/.test(attr) ? max : min)(value, maxValue); + } + return value; +} +function ensureConstraints(currentBounds, resizeConstraints) { + if (!resizeConstraints) { + return currentBounds; + } + var currentTrbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(currentBounds); + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asBounds)({ + top: applyConstraints('top', currentTrbl, resizeConstraints), + right: applyConstraints('right', currentTrbl, resizeConstraints), + bottom: applyConstraints('bottom', currentTrbl, resizeConstraints), + left: applyConstraints('left', currentTrbl, resizeConstraints) + }); +} +function getMinResizeBounds(direction, currentBounds, minDimensions, childrenBounds) { + var currentBox = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(currentBounds); + var minBox = { + top: /n/.test(direction) ? currentBox.bottom - minDimensions.height : currentBox.top, + left: /w/.test(direction) ? currentBox.right - minDimensions.width : currentBox.left, + bottom: /s/.test(direction) ? currentBox.top + minDimensions.height : currentBox.bottom, + right: /e/.test(direction) ? currentBox.left + minDimensions.width : currentBox.right + }; + var childrenBox = childrenBounds ? (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(childrenBounds) : minBox; + var combinedBox = { + top: min(minBox.top, childrenBox.top), + left: min(minBox.left, childrenBox.left), + bottom: max(minBox.bottom, childrenBox.bottom), + right: max(minBox.right, childrenBox.right) + }; + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asBounds)(combinedBox); +} +function asPadding(mayBePadding, defaultValue) { + if (typeof mayBePadding !== 'undefined') { + return mayBePadding; + } else { + return DEFAULT_CHILD_BOX_PADDING; + } +} +function addPadding(bbox, padding) { + var left, right, top, bottom; + if (typeof padding === 'object') { + left = asPadding(padding.left); + right = asPadding(padding.right); + top = asPadding(padding.top); + bottom = asPadding(padding.bottom); + } else { + left = right = top = bottom = asPadding(padding); + } + return { + x: bbox.x - left, + y: bbox.y - top, + width: bbox.width + left + right, + height: bbox.height + top + bottom + }; +} + +/** + * Is the given element part of the resize + * targets min boundary box? + * + * This is the default implementation which excludes + * connections and labels. + * + * @param {djs.model.Base} element + */ +function isBBoxChild(element) { + // exclude connections + if (element.waypoints) { + return false; + } + + // exclude labels + if (element.type === 'label') { + return false; + } + return true; +} + +/** + * Return children bounding computed from a shapes children + * or a list of prefiltered children. + * + * @param {djs.model.Shape|Array} shapeOrChildren + * @param {number|Object} padding + * + * @return {Bounds} + */ +function computeChildrenBBox(shapeOrChildren, padding) { + var elements; + + // compute based on shape + if (shapeOrChildren.length === undefined) { + // grab all the children that are part of the + // parents children box + elements = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(shapeOrChildren.children, isBBoxChild); + } else { + elements = shapeOrChildren; + } + if (elements.length) { + return addPadding((0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.getBBox)(elements), padding); + } +} + +/***/ }), + +/***/ 40844: +/*!**************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/resize/index.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../rules */ 8807); +/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dragging */ 11917); +/* harmony import */ var _preview_support__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../preview-support */ 86726); +/* harmony import */ var _Resize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Resize */ 22022); +/* harmony import */ var _ResizePreview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ResizePreview */ 51932); +/* harmony import */ var _ResizeHandles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ResizeHandles */ 30439); + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_rules__WEBPACK_IMPORTED_MODULE_0__["default"], _dragging__WEBPACK_IMPORTED_MODULE_1__["default"], _preview_support__WEBPACK_IMPORTED_MODULE_2__["default"]], + __init__: ['resize', 'resizePreview', 'resizeHandles'], + resize: ['type', _Resize__WEBPACK_IMPORTED_MODULE_3__["default"]], + resizePreview: ['type', _ResizePreview__WEBPACK_IMPORTED_MODULE_4__["default"]], + resizeHandles: ['type', _ResizeHandles__WEBPACK_IMPORTED_MODULE_5__["default"]] +}); + +/***/ }), + +/***/ 19812: +/*!********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/rules/RuleProvider.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ RuleProvider) +/* harmony export */ }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../command/CommandInterceptor */ 35353); + + + +/** + * A basic provider that may be extended to implement modeling rules. + * + * Extensions should implement the init method to actually add their custom + * modeling checks. Checks may be added via the #addRule(action, fn) method. + * + * @param {EventBus} eventBus + */ +function RuleProvider(eventBus) { + _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, eventBus); + this.init(); +} +RuleProvider.$inject = ['eventBus']; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(RuleProvider, _command_CommandInterceptor__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/** + * Adds a modeling rule for the given action, implemented through + * a callback function. + * + * The function will receive the modeling specific action context + * to perform its check. It must return `false` to disallow the + * action from happening or `true` to allow the action. + * + * A rule provider may pass over the evaluation to lower priority + * rules by returning return nothing (or undefined). + * + * @example + * + * ResizableRules.prototype.init = function() { + * + * \/** + * * Return `true`, `false` or nothing to denote + * * _allowed_, _not allowed_ and _continue evaluating_. + * *\/ + * this.addRule('shape.resize', function(context) { + * + * var shape = context.shape; + * + * if (!context.newBounds) { + * // check general resizability + * if (!shape.resizable) { + * return false; + * } + * + * // not returning anything (read: undefined) + * // will continue the evaluation of other rules + * // (with lower priority) + * return; + * } else { + * // element must have minimum size of 10*10 points + * return context.newBounds.width > 10 && context.newBounds.height > 10; + * } + * }); + * }; + * + * @param {string|Array} actions the identifier for the modeling action to check + * @param {number} [priority] the priority at which this rule is being applied + * @param {Function} fn the callback function that performs the actual check + */ +RuleProvider.prototype.addRule = function (actions, priority, fn) { + var self = this; + if (typeof actions === 'string') { + actions = [actions]; + } + actions.forEach(function (action) { + self.canExecute(action, priority, function (context, action, event) { + return fn(context); + }, true); + }); +}; + +/** + * Implement this method to add new rules during provider initialization. + */ +RuleProvider.prototype.init = function () {}; + +/***/ }), + +/***/ 74488: +/*!*************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/rules/Rules.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Rules) +/* harmony export */ }); +/** + * A service that provides rules for certain diagram actions. + * + * The default implementation will hook into the {@link CommandStack} + * to perform the actual rule evaluation. Make sure to provide the + * `commandStack` service with this module if you plan to use it. + * + * Together with this implementation you may use the {@link RuleProvider} + * to implement your own rule checkers. + * + * This module is ment to be easily replaced, thus the tiny foot print. + * + * @param {Injector} injector + */ +function Rules(injector) { + this._commandStack = injector.get('commandStack', false); +} +Rules.$inject = ['injector']; + +/** + * Returns whether or not a given modeling action can be executed + * in the specified context. + * + * This implementation will respond with allow unless anyone + * objects. + * + * @param {string} action the action to be checked + * @param {Object} [context] the context to check the action in + * + * @return {boolean} returns true, false or null depending on whether the + * operation is allowed, not allowed or should be ignored. + */ +Rules.prototype.allowed = function (action, context) { + var allowed = true; + var commandStack = this._commandStack; + if (commandStack) { + allowed = commandStack.canExecute(action, context); + } + + // map undefined to true, i.e. no rules + return allowed === undefined ? true : allowed; +}; + +/***/ }), + +/***/ 8807: +/*!*************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/rules/index.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _Rules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Rules */ 74488); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['rules'], + rules: ['type', _Rules__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 59601: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/search-pad/SearchPad.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SearchPad) +/* harmony export */ }); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Elements */ 35723); +/* harmony import */ var _util_EscapeUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/EscapeUtil */ 43357); + + + + +/** + * Provides searching infrastructure + */ +function SearchPad(canvas, eventBus, overlays, selection) { + this._open = false; + this._results = []; + this._eventMaps = []; + this._canvas = canvas; + this._eventBus = eventBus; + this._overlays = overlays; + this._selection = selection; + + // setup elements + this._container = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)(SearchPad.BOX_HTML); + this._searchInput = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)(SearchPad.INPUT_SELECTOR, this._container); + this._resultsContainer = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)(SearchPad.RESULTS_CONTAINER_SELECTOR, this._container); + + // attach search pad + this._canvas.getContainer().appendChild(this._container); + + // cleanup on destroy + eventBus.on(['canvas.destroy', 'diagram.destroy'], this.close, this); +} +SearchPad.$inject = ['canvas', 'eventBus', 'overlays', 'selection']; + +/** + * Binds and keeps track of all event listereners + */ +SearchPad.prototype._bindEvents = function () { + var self = this; + function listen(el, selector, type, fn) { + self._eventMaps.push({ + el: el, + type: type, + listener: min_dom__WEBPACK_IMPORTED_MODULE_0__.delegate.bind(el, selector, type, fn) + }); + } + + // close search on clicking anywhere outside + listen(document, 'html', 'click', function (e) { + self.close(); + }); + + // stop event from propagating and closing search + // focus on input + listen(this._container, SearchPad.INPUT_SELECTOR, 'click', function (e) { + e.stopPropagation(); + e.delegateTarget.focus(); + }); + + // preselect result on hover + listen(this._container, SearchPad.RESULT_SELECTOR, 'mouseover', function (e) { + e.stopPropagation(); + self._scrollToNode(e.delegateTarget); + self._preselect(e.delegateTarget); + }); + + // selects desired result on mouse click + listen(this._container, SearchPad.RESULT_SELECTOR, 'click', function (e) { + e.stopPropagation(); + self._select(e.delegateTarget); + }); + + // prevent cursor in input from going left and right when using up/down to + // navigate results + listen(this._container, SearchPad.INPUT_SELECTOR, 'keydown', function (e) { + // up + if (e.keyCode === 38) { + e.preventDefault(); + } + + // down + if (e.keyCode === 40) { + e.preventDefault(); + } + }); + + // handle keyboard input + listen(this._container, SearchPad.INPUT_SELECTOR, 'keyup', function (e) { + // escape + if (e.keyCode === 27) { + return self.close(); + } + + // enter + if (e.keyCode === 13) { + var selected = self._getCurrentResult(); + return selected ? self._select(selected) : self.close(); + } + + // up + if (e.keyCode === 38) { + return self._scrollToDirection(true); + } + + // down + if (e.keyCode === 40) { + return self._scrollToDirection(); + } + + // left && right + // do not search while navigating text input + if (e.keyCode === 37 || e.keyCode === 39) { + return; + } + + // anything else + self._search(e.delegateTarget.value); + }); +}; + +/** + * Unbinds all previously established listeners + */ +SearchPad.prototype._unbindEvents = function () { + this._eventMaps.forEach(function (m) { + min_dom__WEBPACK_IMPORTED_MODULE_0__.delegate.unbind(m.el, m.type, m.listener); + }); +}; + +/** + * Performs a search for the given pattern. + * + * @param {string} pattern + */ +SearchPad.prototype._search = function (pattern) { + var self = this; + this._clearResults(); + + // do not search on empty query + if (!pattern || pattern === '') { + return; + } + var searchResults = this._searchProvider.find(pattern); + if (!searchResults.length) { + return; + } + + // append new results + searchResults.forEach(function (result) { + var id = result.element.id; + var node = self._createResultNode(result, id); + self._results[id] = { + element: result.element, + node: node + }; + }); + + // preselect first result + var node = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)(SearchPad.RESULT_SELECTOR, this._resultsContainer); + this._scrollToNode(node); + this._preselect(node); +}; + +/** + * Navigate to the previous/next result. Defaults to next result. + * @param {boolean} previous + */ +SearchPad.prototype._scrollToDirection = function (previous) { + var selected = this._getCurrentResult(); + if (!selected) { + return; + } + var node = previous ? selected.previousElementSibling : selected.nextElementSibling; + if (node) { + this._scrollToNode(node); + this._preselect(node); + } +}; + +/** + * Scroll to the node if it is not visible. + * + * @param {Element} node + */ +SearchPad.prototype._scrollToNode = function (node) { + if (!node || node === this._getCurrentResult()) { + return; + } + var nodeOffset = node.offsetTop; + var containerScroll = this._resultsContainer.scrollTop; + var bottomScroll = nodeOffset - this._resultsContainer.clientHeight + node.clientHeight; + if (nodeOffset < containerScroll) { + this._resultsContainer.scrollTop = nodeOffset; + } else if (containerScroll < bottomScroll) { + this._resultsContainer.scrollTop = bottomScroll; + } +}; + +/** + * Clears all results data. + */ +SearchPad.prototype._clearResults = function () { + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.clear)(this._resultsContainer); + this._results = []; + this._resetOverlay(); + this._eventBus.fire('searchPad.cleared'); +}; + +/** + * Get currently selected result. + * + * @return {Element} + */ +SearchPad.prototype._getCurrentResult = function () { + return (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.query)(SearchPad.RESULT_SELECTED_SELECTOR, this._resultsContainer); +}; + +/** + * Create result DOM element within results container + * that corresponds to a search result. + * + * 'result' : one of the elements returned by SearchProvider + * 'id' : id attribute value to assign to the new DOM node + * return : created DOM element + * + * @param {SearchResult} result + * @param {string} id + * @return {Element} + */ +SearchPad.prototype._createResultNode = function (result, id) { + var node = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)(SearchPad.RESULT_HTML); + + // create only if available + if (result.primaryTokens.length > 0) { + createInnerTextNode(node, result.primaryTokens, SearchPad.RESULT_PRIMARY_HTML); + } + + // secondary tokens (represent element ID) are allways available + createInnerTextNode(node, result.secondaryTokens, SearchPad.RESULT_SECONDARY_HTML); + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.attr)(node, SearchPad.RESULT_ID_ATTRIBUTE, id); + this._resultsContainer.appendChild(node); + return node; +}; + +/** + * Register search element provider. + * + * SearchProvider.find - provides search function over own elements + * (pattern) => [{ text: , element: }, ...] + * + * @param {SearchProvider} provider + */ +SearchPad.prototype.registerProvider = function (provider) { + this._searchProvider = provider; +}; + +/** + * Open search pad. + */ +SearchPad.prototype.open = function () { + if (!this._searchProvider) { + throw new Error('no search provider registered'); + } + if (this.isOpen()) { + return; + } + this._bindEvents(); + this._open = true; + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(this._container).add('open'); + this._searchInput.focus(); + this._eventBus.fire('searchPad.opened'); +}; + +/** + * Close search pad. + */ +SearchPad.prototype.close = function () { + if (!this.isOpen()) { + return; + } + this._unbindEvents(); + this._open = false; + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(this._container).remove('open'); + this._clearResults(); + this._searchInput.value = ''; + this._searchInput.blur(); + this._resetOverlay(); + this._eventBus.fire('searchPad.closed'); +}; + +/** + * Toggles search pad on/off. + */ +SearchPad.prototype.toggle = function () { + this.isOpen() ? this.close() : this.open(); +}; + +/** + * Report state of search pad. + */ +SearchPad.prototype.isOpen = function () { + return this._open; +}; + +/** + * Preselect result entry. + * + * @param {Element} element + */ +SearchPad.prototype._preselect = function (node) { + var selectedNode = this._getCurrentResult(); + + // already selected + if (node === selectedNode) { + return; + } + + // removing preselection from current node + if (selectedNode) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(selectedNode).remove(SearchPad.RESULT_SELECTED_CLASS); + } + var id = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.attr)(node, SearchPad.RESULT_ID_ATTRIBUTE); + var element = this._results[id].element; + (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(node).add(SearchPad.RESULT_SELECTED_CLASS); + this._resetOverlay(element); + this._canvas.scrollToElement(element, { + top: 400 + }); + this._selection.select(element); + this._eventBus.fire('searchPad.preselected', element); +}; + +/** + * Select result node. + * + * @param {Element} element + */ +SearchPad.prototype._select = function (node) { + var id = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.attr)(node, SearchPad.RESULT_ID_ATTRIBUTE); + var element = this._results[id].element; + this.close(); + this._resetOverlay(); + this._canvas.scrollToElement(element, { + top: 400 + }); + this._selection.select(element); + this._eventBus.fire('searchPad.selected', element); +}; + +/** + * Reset overlay removes and, optionally, set + * overlay to a new element. + * + * @param {Element} element + */ +SearchPad.prototype._resetOverlay = function (element) { + if (this._overlayId) { + this._overlays.remove(this._overlayId); + } + if (element) { + var box = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_1__.getBBox)(element); + var overlay = constructOverlay(box); + this._overlayId = this._overlays.add(element, overlay); + } +}; + +/** + * Construct overlay object for the given bounding box. + * + * @param {BoundingBox} box + * @return {Object} + */ +function constructOverlay(box) { + var offset = 6; + var w = box.width + offset * 2; + var h = box.height + offset * 2; + var styles = ['width: ' + w + 'px', 'height: ' + h + 'px'].join('; '); + return { + position: { + bottom: h - offset, + right: w - offset + }, + show: true, + html: '
' + }; +} + +/** + * Creates and appends child node from result tokens and HTML template. + * + * @param {Element} node + * @param {Array} tokens + * @param {string} template + */ +function createInnerTextNode(parentNode, tokens, template) { + var text = createHtmlText(tokens); + var childNode = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.domify)(template); + childNode.innerHTML = text; + parentNode.appendChild(childNode); +} + +/** + * Create internal HTML markup from result tokens. + * Caters for highlighting pattern matched tokens. + * + * @param {Array} tokens + * @return {string} + */ +function createHtmlText(tokens) { + var htmlText = ''; + tokens.forEach(function (t) { + if (t.matched) { + htmlText += '' + (0,_util_EscapeUtil__WEBPACK_IMPORTED_MODULE_2__.escapeHTML)(t.matched) + ''; + } else { + htmlText += (0,_util_EscapeUtil__WEBPACK_IMPORTED_MODULE_2__.escapeHTML)(t.normal); + } + }); + return htmlText !== '' ? htmlText : null; +} + +/** + * CONSTANTS + */ +SearchPad.CONTAINER_SELECTOR = '.djs-search-container'; +SearchPad.INPUT_SELECTOR = '.djs-search-input input'; +SearchPad.RESULTS_CONTAINER_SELECTOR = '.djs-search-results'; +SearchPad.RESULT_SELECTOR = '.djs-search-result'; +SearchPad.RESULT_SELECTED_CLASS = 'djs-search-result-selected'; +SearchPad.RESULT_SELECTED_SELECTOR = '.' + SearchPad.RESULT_SELECTED_CLASS; +SearchPad.RESULT_ID_ATTRIBUTE = 'data-result-id'; +SearchPad.RESULT_HIGHLIGHT_CLASS = 'djs-search-highlight'; +SearchPad.OVERLAY_CLASS = 'djs-search-overlay'; +SearchPad.BOX_HTML = '
' + '
' + '' + '
' + '
' + '
'; +SearchPad.RESULT_HTML = '
'; +SearchPad.RESULT_PRIMARY_HTML = '
'; +SearchPad.RESULT_SECONDARY_HTML = '

'; + +/***/ }), + +/***/ 72784: +/*!******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/search-pad/index.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _overlays__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../overlays */ 4541); +/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selection */ 26334); +/* harmony import */ var _SearchPad__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SearchPad */ 59601); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_overlays__WEBPACK_IMPORTED_MODULE_0__["default"], _selection__WEBPACK_IMPORTED_MODULE_1__["default"]], + searchPad: ['type', _SearchPad__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 43504: +/*!*********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/selection/Selection.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Selection) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * A service that offers the current selection in a diagram. + * Offers the api to control the selection, too. + * + * @class + * + * @param {EventBus} eventBus the event bus + */ +function Selection(eventBus, canvas) { + this._eventBus = eventBus; + this._canvas = canvas; + this._selectedElements = []; + var self = this; + eventBus.on(['shape.remove', 'connection.remove'], function (e) { + var element = e.element; + self.deselect(element); + }); + eventBus.on(['diagram.clear', 'plane.set'], function (e) { + self.select(null); + }); +} +Selection.$inject = ['eventBus', 'canvas']; +Selection.prototype.deselect = function (element) { + var selectedElements = this._selectedElements; + var idx = selectedElements.indexOf(element); + if (idx !== -1) { + var oldSelection = selectedElements.slice(); + selectedElements.splice(idx, 1); + this._eventBus.fire('selection.changed', { + oldSelection: oldSelection, + newSelection: selectedElements + }); + } +}; +Selection.prototype.get = function () { + return this._selectedElements; +}; +Selection.prototype.isSelected = function (element) { + return this._selectedElements.indexOf(element) !== -1; +}; + +/** + * This method selects one or more elements on the diagram. + * + * By passing an additional add parameter you can decide whether or not the element(s) + * should be added to the already existing selection or not. + * + * @method Selection#select + * + * @param {Object|Object[]} elements element or array of elements to be selected + * @param {boolean} [add] whether the element(s) should be appended to the current selection, defaults to false + */ +Selection.prototype.select = function (elements, add) { + var selectedElements = this._selectedElements, + oldSelection = selectedElements.slice(); + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(elements)) { + elements = elements ? [elements] : []; + } + var canvas = this._canvas; + elements = elements.filter(function (element) { + var plane = canvas.findPlane(element); + return plane === canvas.getActivePlane(); + }); + + // selection may be cleared by passing an empty array or null + // to the method + if (add) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + if (selectedElements.indexOf(element) !== -1) { + // already selected + return; + } else { + selectedElements.push(element); + } + }); + } else { + this._selectedElements = selectedElements = elements.slice(); + } + this._eventBus.fire('selection.changed', { + oldSelection: oldSelection, + newSelection: selectedElements + }); +}; + +/***/ }), + +/***/ 46454: +/*!*****************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/selection/SelectionBehavior.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SelectionBehavior) +/* harmony export */ }); +/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/Mouse */ 53171); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +function SelectionBehavior(eventBus, selection, canvas, elementRegistry) { + // Select elements on create + eventBus.on('create.end', 500, function (event) { + var context = event.context, + canExecute = context.canExecute, + elements = context.elements, + hints = context.hints || {}, + autoSelect = hints.autoSelect; + if (canExecute) { + if (autoSelect === false) { + // Select no elements + return; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(autoSelect)) { + selection.select(autoSelect); + } else { + // Select all elements by default + selection.select(elements.filter(isShown)); + } + } + }); + + // Select connection targets on connect + eventBus.on('connect.end', 500, function (event) { + var context = event.context, + canExecute = context.canExecute, + hover = context.hover; + if (canExecute && hover) { + selection.select(hover); + } + }); + + // Select shapes on move + eventBus.on('shape.move.end', 500, function (event) { + var previousSelection = event.previousSelection || []; + var shape = elementRegistry.get(event.context.shape.id); + + // Always select main shape on move + var isSelected = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(previousSelection, function (selectedShape) { + return shape.id === selectedShape.id; + }); + if (!isSelected) { + selection.select(shape); + } + }); + + // Select elements on click + eventBus.on('element.click', function (event) { + if (!(0,_util_Mouse__WEBPACK_IMPORTED_MODULE_1__.isPrimaryButton)(event)) { + return; + } + var element = event.element; + if (element === canvas.getRootElement()) { + element = null; + } + var isSelected = selection.isSelected(element), + isMultiSelect = selection.get().length > 1; + + // Add to selection if CTRL or SHIFT pressed + var add = (0,_util_Mouse__WEBPACK_IMPORTED_MODULE_1__.hasPrimaryModifier)(event) || (0,_util_Mouse__WEBPACK_IMPORTED_MODULE_1__.hasSecondaryModifier)(event); + if (isSelected && isMultiSelect) { + if (add) { + // Deselect element + return selection.deselect(element); + } else { + // Select element only + return selection.select(element); + } + } else if (!isSelected) { + // Select element + selection.select(element, add); + } else { + // Deselect element + selection.deselect(element); + } + }); +} +SelectionBehavior.$inject = ['eventBus', 'selection', 'canvas', 'elementRegistry']; +function isShown(element) { + return !element.hidden; +} + +/***/ }), + +/***/ 45891: +/*!****************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/selection/SelectionVisuals.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SelectionVisuals) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +var MARKER_HOVER = 'hover', + MARKER_SELECTED = 'selected'; + +/** + * A plugin that adds a visible selection UI to shapes and connections + * by appending the hover and selected classes to them. + * + * @class + * + * Makes elements selectable, too. + * + * @param {EventBus} events + * @param {SelectionService} selection + * @param {Canvas} canvas + */ +function SelectionVisuals(events, canvas, selection, styles) { + this._multiSelectionBox = null; + function addMarker(e, cls) { + canvas.addMarker(e, cls); + } + function removeMarker(e, cls) { + canvas.removeMarker(e, cls); + } + events.on('element.hover', function (event) { + addMarker(event.element, MARKER_HOVER); + }); + events.on('element.out', function (event) { + removeMarker(event.element, MARKER_HOVER); + }); + events.on('selection.changed', function (event) { + function deselect(s) { + removeMarker(s, MARKER_SELECTED); + } + function select(s) { + addMarker(s, MARKER_SELECTED); + } + var oldSelection = event.oldSelection, + newSelection = event.newSelection; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(oldSelection, function (e) { + if (newSelection.indexOf(e) === -1) { + deselect(e); + } + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(newSelection, function (e) { + if (oldSelection.indexOf(e) === -1) { + select(e); + } + }); + }); +} +SelectionVisuals.$inject = ['eventBus', 'canvas', 'selection', 'styles']; + +/***/ }), + +/***/ 26334: +/*!*****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/selection/index.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _interaction_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interaction-events */ 57250); +/* harmony import */ var _outline__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../outline */ 98918); +/* harmony import */ var _Selection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Selection */ 43504); +/* harmony import */ var _SelectionVisuals__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SelectionVisuals */ 45891); +/* harmony import */ var _SelectionBehavior__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SelectionBehavior */ 46454); + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['selectionVisuals', 'selectionBehavior'], + __depends__: [_interaction_events__WEBPACK_IMPORTED_MODULE_0__["default"], _outline__WEBPACK_IMPORTED_MODULE_1__["default"]], + selection: ['type', _Selection__WEBPACK_IMPORTED_MODULE_2__["default"]], + selectionVisuals: ['type', _SelectionVisuals__WEBPACK_IMPORTED_MODULE_3__["default"]], + selectionBehavior: ['type', _SelectionBehavior__WEBPACK_IMPORTED_MODULE_4__["default"]] +}); + +/***/ }), + +/***/ 23111: +/*!*****************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/snapping/CreateMoveSnapping.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CreateMoveSnapping) +/* harmony export */ }); +/* harmony import */ var _SnapContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SnapContext */ 67963); +/* harmony import */ var _SnapUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SnapUtil */ 99298); +/* harmony import */ var _keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../keyboard/KeyboardUtil */ 13488); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 47504); + + + + +var HIGHER_PRIORITY = 1250; + +/** + * Snap during create and move. + * + * @param {EventBus} elementRegistry + * @param {EventBus} eventBus + * @param {Snapping} snapping + */ +function CreateMoveSnapping(elementRegistry, eventBus, snapping) { + var self = this; + this._elementRegistry = elementRegistry; + eventBus.on(['create.start', 'shape.move.start'], function (event) { + self.initSnap(event); + }); + eventBus.on(['create.move', 'create.end', 'shape.move.move', 'shape.move.end'], HIGHER_PRIORITY, function (event) { + var context = event.context, + shape = context.shape, + snapContext = context.snapContext, + target = context.target; + if (event.originalEvent && (0,_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd)(event.originalEvent)) { + return; + } + if ((0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.isSnapped)(event) || !target) { + return; + } + var snapPoints = snapContext.pointsForTarget(target); + if (!snapPoints.initialized) { + snapPoints = self.addSnapTargetPoints(snapPoints, shape, target); + snapPoints.initialized = true; + } + snapping.snap(event, snapPoints); + }); + eventBus.on(['create.cleanup', 'shape.move.cleanup'], function () { + snapping.hide(); + }); +} +CreateMoveSnapping.$inject = ['elementRegistry', 'eventBus', 'snapping']; +CreateMoveSnapping.prototype.initSnap = function (event) { + var elementRegistry = this._elementRegistry; + var context = event.context, + shape = context.shape, + snapContext = context.snapContext; + if (!snapContext) { + snapContext = context.snapContext = new _SnapContext__WEBPACK_IMPORTED_MODULE_2__["default"](); + } + var shapeMid; + if (elementRegistry.get(shape.id)) { + // move + shapeMid = (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(shape, event); + } else { + // create + shapeMid = { + x: event.x + (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(shape).x, + y: event.y + (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(shape).y + }; + } + var shapeTopLeft = { + x: shapeMid.x - shape.width / 2, + y: shapeMid.y - shape.height / 2 + }, + shapeBottomRight = { + x: shapeMid.x + shape.width / 2, + y: shapeMid.y + shape.height / 2 + }; + snapContext.setSnapOrigin('mid', { + x: shapeMid.x - event.x, + y: shapeMid.y - event.y + }); + + // snap labels to mid only + if (isLabel(shape)) { + return snapContext; + } + snapContext.setSnapOrigin('top-left', { + x: shapeTopLeft.x - event.x, + y: shapeTopLeft.y - event.y + }); + snapContext.setSnapOrigin('bottom-right', { + x: shapeBottomRight.x - event.x, + y: shapeBottomRight.y - event.y + }); + return snapContext; +}; +CreateMoveSnapping.prototype.addSnapTargetPoints = function (snapPoints, shape, target) { + var snapTargets = this.getSnapTargets(shape, target); + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(snapTargets, function (snapTarget) { + // handle labels + if (isLabel(snapTarget)) { + if (isLabel(shape)) { + snapPoints.add('mid', (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(snapTarget)); + } + return; + } + + // handle connections + if (isConnection(snapTarget)) { + // ignore single segment connections + if (snapTarget.waypoints.length < 3) { + return; + } + + // ignore first and last waypoint + var waypoints = snapTarget.waypoints.slice(1, -1); + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(waypoints, function (waypoint) { + snapPoints.add('mid', waypoint); + }); + return; + } + + // handle shapes + snapPoints.add('mid', (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(snapTarget)); + }); + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(shape.x) || !(0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(shape.y)) { + return snapPoints; + } + + // snap to original position when moving + if (this._elementRegistry.get(shape.id)) { + snapPoints.add('mid', (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.mid)(shape)); + } + return snapPoints; +}; +CreateMoveSnapping.prototype.getSnapTargets = function (shape, target) { + return (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.getChildren)(target).filter(function (child) { + return !isHidden(child); + }); +}; + +// helpers ////////// + +function isConnection(element) { + return !!element.waypoints; +} +function isHidden(element) { + return !!element.hidden; +} +function isLabel(element) { + return !!element.labelTarget; +} + +/***/ }), + +/***/ 68614: +/*!*************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/snapping/ResizeSnapping.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ResizeSnapping) +/* harmony export */ }); +/* harmony import */ var _SnapContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SnapContext */ 67963); +/* harmony import */ var _SnapUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SnapUtil */ 99298); +/* harmony import */ var _keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../keyboard/KeyboardUtil */ 13488); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 47504); + + + + + +var HIGHER_PRIORITY = 1250; + +/** + * Snap during resize. + * + * @param {EventBus} eventBus + * @param {Snapping} snapping + */ +function ResizeSnapping(eventBus, snapping) { + var self = this; + eventBus.on(['resize.start'], function (event) { + self.initSnap(event); + }); + eventBus.on(['resize.move', 'resize.end'], HIGHER_PRIORITY, function (event) { + var context = event.context, + shape = context.shape, + parent = shape.parent, + direction = context.direction, + snapContext = context.snapContext; + if (event.originalEvent && (0,_keyboard_KeyboardUtil__WEBPACK_IMPORTED_MODULE_0__.isCmd)(event.originalEvent)) { + return; + } + if ((0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.isSnapped)(event)) { + return; + } + var snapPoints = snapContext.pointsForTarget(parent); + if (!snapPoints.initialized) { + snapPoints = self.addSnapTargetPoints(snapPoints, shape, parent, direction); + snapPoints.initialized = true; + } + if (isHorizontal(direction)) { + (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'x', event.x); + } + if (isVertical(direction)) { + (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, 'y', event.y); + } + snapping.snap(event, snapPoints); + }); + eventBus.on(['resize.cleanup'], function () { + snapping.hide(); + }); +} +ResizeSnapping.prototype.initSnap = function (event) { + var context = event.context, + shape = context.shape, + direction = context.direction, + snapContext = context.snapContext; + if (!snapContext) { + snapContext = context.snapContext = new _SnapContext__WEBPACK_IMPORTED_MODULE_2__["default"](); + } + var snapOrigin = getSnapOrigin(shape, direction); + snapContext.setSnapOrigin('corner', { + x: snapOrigin.x - event.x, + y: snapOrigin.y - event.y + }); + return snapContext; +}; +ResizeSnapping.prototype.addSnapTargetPoints = function (snapPoints, shape, target, direction) { + var snapTargets = this.getSnapTargets(shape, target); + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(snapTargets, function (snapTarget) { + snapPoints.add('corner', (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.bottomRight)(snapTarget)); + snapPoints.add('corner', (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.topLeft)(snapTarget)); + }); + snapPoints.add('corner', getSnapOrigin(shape, direction)); + return snapPoints; +}; +ResizeSnapping.$inject = ['eventBus', 'snapping']; +ResizeSnapping.prototype.getSnapTargets = function (shape, target) { + return (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.getChildren)(target).filter(function (child) { + return !isAttached(child, shape) && !isConnection(child) && !isHidden(child) && !isLabel(child); + }); +}; + +// helpers ////////// + +function getSnapOrigin(shape, direction) { + var mid = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_4__.getMid)(shape), + trbl = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_4__.asTRBL)(shape); + var snapOrigin = { + x: mid.x, + y: mid.y + }; + if (direction.indexOf('n') !== -1) { + snapOrigin.y = trbl.top; + } else if (direction.indexOf('s') !== -1) { + snapOrigin.y = trbl.bottom; + } + if (direction.indexOf('e') !== -1) { + snapOrigin.x = trbl.right; + } else if (direction.indexOf('w') !== -1) { + snapOrigin.x = trbl.left; + } + return snapOrigin; +} +function isAttached(element, host) { + return element.host === host; +} +function isConnection(element) { + return !!element.waypoints; +} +function isHidden(element) { + return !!element.hidden; +} +function isLabel(element) { + return !!element.labelTarget; +} +function isHorizontal(direction) { + return direction === 'n' || direction === 's'; +} +function isVertical(direction) { + return direction === 'e' || direction === 'w'; +} + +/***/ }), + +/***/ 67963: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/snapping/SnapContext.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SnapPoints: () => (/* binding */ SnapPoints), +/* harmony export */ "default": () => (/* binding */ SnapContext) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _SnapUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SnapUtil */ 99298); + + + +/** + * A snap context, containing the (possibly incomplete) + * mappings of drop targets (to identify the snapping) + * to computed snap points. + */ +function SnapContext() { + /** + * Map mapping drop targets to + * a list of possible snappings. + * + * @type {Object} + */ + this._targets = {}; + + /** + * Map initial positioning of element + * regarding various snap directions. + * + * @type {Object} + */ + this._snapOrigins = {}; + + /** + * List of snap locations + * + * @type {Array} + */ + this._snapLocations = []; + + /** + * Map> of default snapping locations + * + * @type {Object} + */ + this._defaultSnaps = {}; +} +SnapContext.prototype.getSnapOrigin = function (snapLocation) { + return this._snapOrigins[snapLocation]; +}; +SnapContext.prototype.setSnapOrigin = function (snapLocation, initialValue) { + this._snapOrigins[snapLocation] = initialValue; + if (this._snapLocations.indexOf(snapLocation) === -1) { + this._snapLocations.push(snapLocation); + } +}; +SnapContext.prototype.addDefaultSnap = function (type, point) { + var snapValues = this._defaultSnaps[type]; + if (!snapValues) { + snapValues = this._defaultSnaps[type] = []; + } + snapValues.push(point); +}; + +/** + * Return a number of initialized snaps, i.e. snap locations such as + * top-left, mid, bottom-right and so forth. + * + * @return {Array} snapLocations + */ +SnapContext.prototype.getSnapLocations = function () { + return this._snapLocations; +}; + +/** + * Set the snap locations for this context. + * + * The order of locations determines precedence. + * + * @param {Array} snapLocations + */ +SnapContext.prototype.setSnapLocations = function (snapLocations) { + this._snapLocations = snapLocations; +}; + +/** + * Get snap points for a given target + * + * @param {Element|string} target + */ +SnapContext.prototype.pointsForTarget = function (target) { + var targetId = target.id || target; + var snapPoints = this._targets[targetId]; + if (!snapPoints) { + snapPoints = this._targets[targetId] = new SnapPoints(); + snapPoints.initDefaults(this._defaultSnaps); + } + return snapPoints; +}; + +/** + * Creates the snap points and initializes them with the + * given default values. + * + * @param {Object>} [defaultPoints] + */ +function SnapPoints(defaultSnaps) { + /** + * Map>> mapping snap locations, + * i.e. top-left, bottom-right, center to actual snap values. + * + * @type {Object} + */ + this._snapValues = {}; +} +SnapPoints.prototype.add = function (snapLocation, point) { + var snapValues = this._snapValues[snapLocation]; + if (!snapValues) { + snapValues = this._snapValues[snapLocation] = { + x: [], + y: [] + }; + } + if (snapValues.x.indexOf(point.x) === -1) { + snapValues.x.push(point.x); + } + if (snapValues.y.indexOf(point.y) === -1) { + snapValues.y.push(point.y); + } +}; +SnapPoints.prototype.snap = function (point, snapLocation, axis, tolerance) { + var snappingValues = this._snapValues[snapLocation]; + return snappingValues && (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_0__.snapTo)(point[axis], snappingValues[axis], tolerance); +}; + +/** + * Initialize a number of default snapping points. + * + * @param {Object} defaultSnaps + */ +SnapPoints.prototype.initDefaults = function (defaultSnaps) { + var self = this; + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(defaultSnaps || {}, function (snapPoints, snapLocation) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(snapPoints, function (point) { + self.add(snapLocation, point); + }); + }); +}; + +/***/ }), + +/***/ 99298: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/snapping/SnapUtil.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ bottomLeft: () => (/* binding */ bottomLeft), +/* harmony export */ bottomRight: () => (/* binding */ bottomRight), +/* harmony export */ getChildren: () => (/* binding */ getChildren), +/* harmony export */ isSnapped: () => (/* binding */ isSnapped), +/* harmony export */ mid: () => (/* binding */ mid), +/* harmony export */ setSnapped: () => (/* binding */ setSnapped), +/* harmony export */ snapTo: () => (/* binding */ snapTo), +/* harmony export */ topLeft: () => (/* binding */ topLeft), +/* harmony export */ topRight: () => (/* binding */ topRight) +/* harmony export */ }); +var abs = Math.abs, + round = Math.round; + +/** + * Snap value to a collection of reference values. + * + * @param {number} value + * @param {Array} values + * @param {number} [tolerance=10] + * + * @return {number} the value we snapped to or null, if none snapped + */ +function snapTo(value, values, tolerance) { + tolerance = tolerance === undefined ? 10 : tolerance; + var idx, snapValue; + for (idx = 0; idx < values.length; idx++) { + snapValue = values[idx]; + if (abs(snapValue - value) <= tolerance) { + return snapValue; + } + } +} +function topLeft(bounds) { + return { + x: bounds.x, + y: bounds.y + }; +} +function topRight(bounds) { + return { + x: bounds.x + bounds.width, + y: bounds.y + }; +} +function bottomLeft(bounds) { + return { + x: bounds.x, + y: bounds.y + bounds.height + }; +} +function bottomRight(bounds) { + return { + x: bounds.x + bounds.width, + y: bounds.y + bounds.height + }; +} +function mid(bounds, defaultValue) { + if (!bounds || isNaN(bounds.x) || isNaN(bounds.y)) { + return defaultValue; + } + return { + x: round(bounds.x + bounds.width / 2), + y: round(bounds.y + bounds.height / 2) + }; +} + +/** + * Retrieve the snap state of the given event. + * + * @param {Event} event + * @param {string} axis + * + * @return {boolean} the snapped state + * + */ +function isSnapped(event, axis) { + var snapped = event.snapped; + if (!snapped) { + return false; + } + if (typeof axis === 'string') { + return snapped[axis]; + } + return snapped.x && snapped.y; +} + +/** + * Set the given event as snapped. + * + * This method may change the x and/or y position of the shape + * from the given event! + * + * @param {Event} event + * @param {string} axis + * @param {number|boolean} value + * + * @return {number} old value + */ +function setSnapped(event, axis, value) { + if (typeof axis !== 'string') { + throw new Error('axis must be in [x, y]'); + } + if (typeof value !== 'number' && value !== false) { + throw new Error('value must be Number or false'); + } + var delta, + previousValue = event[axis]; + var snapped = event.snapped = event.snapped || {}; + if (value === false) { + snapped[axis] = false; + } else { + snapped[axis] = true; + delta = value - previousValue; + event[axis] += delta; + event['d' + axis] += delta; + } + return previousValue; +} + +/** + * Get children of a shape. + * + * @param {djs.model.Shape} parent + * + * @returns {Array} + */ +function getChildren(parent) { + return parent.children || []; +} + +/***/ }), + +/***/ 47866: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/snapping/Snapping.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SNAP_LINE_HIDE_DELAY: () => (/* binding */ SNAP_LINE_HIDE_DELAY), +/* harmony export */ "default": () => (/* binding */ Snapping) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _SnapUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SnapUtil */ 99298); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-svg */ 57491); + + + +var SNAP_TOLERANCE = 7; +var SNAP_LINE_HIDE_DELAY = 1000; + +/** + * Generic snapping feature. + * + * @param {EventBus} eventBus + * @param {Canvas} canvas + */ +function Snapping(canvas) { + this._canvas = canvas; + + // delay hide by 1000 seconds since last snap + this._asyncHide = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.debounce)((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(this.hide, this), SNAP_LINE_HIDE_DELAY); +} +Snapping.$inject = ['canvas']; + +/** + * Snap an event to given snap points. + * + * @param {Event} event + * @param {SnapPoints} snapPoints + */ +Snapping.prototype.snap = function (event, snapPoints) { + var context = event.context, + snapContext = context.snapContext, + snapLocations = snapContext.getSnapLocations(); + var snapping = { + x: (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.isSnapped)(event, 'x'), + y: (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.isSnapped)(event, 'y') + }; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(snapLocations, function (location) { + var snapOrigin = snapContext.getSnapOrigin(location); + var snapCurrent = { + x: event.x + snapOrigin.x, + y: event.y + snapOrigin.y + }; + + // snap both axis if not snapped already + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(['x', 'y'], function (axis) { + var locationSnapping; + if (!snapping[axis]) { + locationSnapping = snapPoints.snap(snapCurrent, location, axis, SNAP_TOLERANCE); + if (locationSnapping !== undefined) { + snapping[axis] = { + value: locationSnapping, + originValue: locationSnapping - snapOrigin[axis] + }; + } + } + }); + + // no need to continue snapping + if (snapping.x && snapping.y) { + return false; + } + }); + + // show snap lines + this.showSnapLine('vertical', snapping.x && snapping.x.value); + this.showSnapLine('horizontal', snapping.y && snapping.y.value); + + // snap event + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(['x', 'y'], function (axis) { + var axisSnapping = snapping[axis]; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(axisSnapping)) { + (0,_SnapUtil__WEBPACK_IMPORTED_MODULE_1__.setSnapped)(event, axis, axisSnapping.originValue); + } + }); +}; +Snapping.prototype._createLine = function (orientation) { + var root = this._canvas.getLayer('snap'); + var line = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(line, { + d: 'M0,0 L0,0' + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.classes)(line).add('djs-snap-line'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.append)(root, line); + return { + update: function (position) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(position)) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(line, { + display: 'none' + }); + } else { + if (orientation === 'horizontal') { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(line, { + d: 'M-100000,' + position + ' L+100000,' + position, + display: '' + }); + } else { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_2__.attr)(line, { + d: 'M ' + position + ',-100000 L ' + position + ', +100000', + display: '' + }); + } + } + } + }; +}; +Snapping.prototype._createSnapLines = function () { + this._snapLines = { + horizontal: this._createLine('horizontal'), + vertical: this._createLine('vertical') + }; +}; +Snapping.prototype.showSnapLine = function (orientation, position) { + var line = this.getSnapLine(orientation); + if (line) { + line.update(position); + } + this._asyncHide(); +}; +Snapping.prototype.getSnapLine = function (orientation) { + if (!this._snapLines) { + this._createSnapLines(); + } + return this._snapLines[orientation]; +}; +Snapping.prototype.hide = function () { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(this._snapLines, function (snapLine) { + snapLine.update(); + }); +}; + +/***/ }), + +/***/ 22760: +/*!****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/snapping/index.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CreateMoveSnapping */ 23111); +/* harmony import */ var _ResizeSnapping__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ResizeSnapping */ 68614); +/* harmony import */ var _Snapping__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Snapping */ 47866); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['createMoveSnapping', 'resizeSnapping', 'snapping'], + createMoveSnapping: ['type', _CreateMoveSnapping__WEBPACK_IMPORTED_MODULE_0__["default"]], + resizeSnapping: ['type', _ResizeSnapping__WEBPACK_IMPORTED_MODULE_1__["default"]], + snapping: ['type', _Snapping__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 48247: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/space-tool/SpaceTool.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SpaceTool) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../layout/LayoutUtil */ 8610); +/* harmony import */ var _util_Elements__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/Elements */ 35723); +/* harmony import */ var _SpaceUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpaceUtil */ 97093); +/* harmony import */ var _util_Mouse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Mouse */ 53171); +/* harmony import */ var _util_Cursor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../util/Cursor */ 89388); + + + + + + + +var abs = Math.abs, + round = Math.round; +var AXIS_TO_DIMENSION = { + x: 'width', + y: 'height' +}; +var CURSOR_CROSSHAIR = 'crosshair'; +var DIRECTION_TO_TRBL = { + n: 'top', + w: 'left', + s: 'bottom', + e: 'right' +}; +var HIGH_PRIORITY = 1500; +var DIRECTION_TO_OPPOSITE = { + n: 's', + w: 'e', + s: 'n', + e: 'w' +}; +var PADDING = 20; + +/** + * Add or remove space by moving and resizing elements. + * + * @param {Canvas} canvas + * @param {Dragging} dragging + * @param {EventBus} eventBus + * @param {Modeling} modeling + * @param {Rules} rules + * @param {ToolManager} toolManager + * @param {Mouse} mouse + */ +function SpaceTool(canvas, dragging, eventBus, modeling, rules, toolManager, mouse) { + this._canvas = canvas; + this._dragging = dragging; + this._eventBus = eventBus; + this._modeling = modeling; + this._rules = rules; + this._toolManager = toolManager; + this._mouse = mouse; + var self = this; + toolManager.registerTool('space', { + tool: 'spaceTool.selection', + dragging: 'spaceTool' + }); + eventBus.on('spaceTool.selection.end', function (event) { + eventBus.once('spaceTool.selection.ended', function () { + self.activateMakeSpace(event.originalEvent); + }); + }); + eventBus.on('spaceTool.move', HIGH_PRIORITY, function (event) { + var context = event.context, + initialized = context.initialized; + if (!initialized) { + initialized = context.initialized = self.init(event, context); + } + if (initialized) { + ensureConstraints(event); + } + }); + eventBus.on('spaceTool.end', function (event) { + var context = event.context, + axis = context.axis, + direction = context.direction, + movingShapes = context.movingShapes, + resizingShapes = context.resizingShapes, + start = context.start; + if (!context.initialized) { + return; + } + ensureConstraints(event); + var delta = { + x: 0, + y: 0 + }; + delta[axis] = round(event['d' + axis]); + self.makeSpace(movingShapes, resizingShapes, delta, direction, start); + eventBus.once('spaceTool.ended', function (event) { + // activate space tool selection after make space + self.activateSelection(event.originalEvent, true, true); + }); + }); +} +SpaceTool.$inject = ['canvas', 'dragging', 'eventBus', 'modeling', 'rules', 'toolManager', 'mouse']; + +/** + * Activate space tool selection. + * + * @param {Object} event + * @param {boolean} autoActivate + */ +SpaceTool.prototype.activateSelection = function (event, autoActivate, reactivate) { + this._dragging.init(event, 'spaceTool.selection', { + autoActivate: autoActivate, + cursor: CURSOR_CROSSHAIR, + data: { + context: { + reactivate: reactivate + } + }, + trapClick: false + }); +}; + +/** + * Activate space tool make space. + * + * @param {MouseEvent} event + */ +SpaceTool.prototype.activateMakeSpace = function (event) { + this._dragging.init(event, 'spaceTool', { + autoActivate: true, + cursor: CURSOR_CROSSHAIR, + data: { + context: {} + } + }); +}; + +/** + * Make space. + * + * @param {Array} movingShapes + * @param {Array} resizingShapes + * @param {Object} delta + * @param {number} delta.x + * @param {number} delta.y + * @param {string} direction + * @param {number} start + */ +SpaceTool.prototype.makeSpace = function (movingShapes, resizingShapes, delta, direction, start) { + return this._modeling.createSpace(movingShapes, resizingShapes, delta, direction, start); +}; + +/** + * Initialize make space and return true if that was successful. + * + * @param {Object} event + * @param {Object} context + * + * @return {boolean} + */ +SpaceTool.prototype.init = function (event, context) { + var axis = abs(event.dx) > abs(event.dy) ? 'x' : 'y', + delta = event['d' + axis], + start = event[axis] - delta; + if (abs(delta) < 5) { + return false; + } + + // invert delta to remove space when moving left + if (delta < 0) { + delta *= -1; + } + + // invert delta to add/remove space when removing/adding space if modifier key is pressed + if ((0,_util_Mouse__WEBPACK_IMPORTED_MODULE_0__.hasPrimaryModifier)(event)) { + delta *= -1; + } + var direction = (0,_SpaceUtil__WEBPACK_IMPORTED_MODULE_1__.getDirection)(axis, delta); + var root = this._canvas.getRootElement(); + var children = (0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.selfAndAllChildren)(root, true); + var elements = this.calculateAdjustments(children, axis, delta, start); + var minDimensions = this._eventBus.fire('spaceTool.getMinDimensions', { + axis: axis, + direction: direction, + shapes: elements.resizingShapes, + start: start + }); + var spaceToolConstraints = getSpaceToolConstraints(elements, axis, direction, start, minDimensions); + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.assign)(context, elements, { + axis: axis, + direction: direction, + spaceToolConstraints: spaceToolConstraints, + start: start + }); + (0,_util_Cursor__WEBPACK_IMPORTED_MODULE_4__.set)('resize-' + (axis === 'x' ? 'ew' : 'ns')); + return true; +}; + +/** + * Get elements to be moved and resized. + * + * @param {Array} elements + * @param {string} axis + * @param {number} delta + * @param {number} start + * + * @return {Object} + */ +SpaceTool.prototype.calculateAdjustments = function (elements, axis, delta, start) { + var rules = this._rules; + var movingShapes = [], + resizingShapes = []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(elements, function (element) { + if (!element.parent || isConnection(element)) { + return; + } + var shapeStart = element[axis], + shapeEnd = shapeStart + element[AXIS_TO_DIMENSION[axis]]; + + // shape to be moved + if (delta > 0 && shapeStart > start || delta < 0 && shapeEnd < start) { + return movingShapes.push(element); + } + + // shape to be resized + if (shapeStart < start && shapeEnd > start && rules.allowed('shape.resize', { + shape: element + })) { + return resizingShapes.push(element); + } + }); + return { + movingShapes: movingShapes, + resizingShapes: resizingShapes + }; +}; +SpaceTool.prototype.toggle = function () { + if (this.isActive()) { + return this._dragging.cancel(); + } + var mouseEvent = this._mouse.getLastMoveEvent(); + this.activateSelection(mouseEvent, !!mouseEvent); +}; +SpaceTool.prototype.isActive = function () { + var context = this._dragging.context(); + return context && /^spaceTool/.test(context.prefix); +}; + +// helpers ////////// + +function addPadding(trbl) { + return { + top: trbl.top - PADDING, + right: trbl.right + PADDING, + bottom: trbl.bottom + PADDING, + left: trbl.left - PADDING + }; +} +function ensureConstraints(event) { + var context = event.context, + spaceToolConstraints = context.spaceToolConstraints; + if (!spaceToolConstraints) { + return; + } + var x, y; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(spaceToolConstraints.left)) { + x = Math.max(event.x, spaceToolConstraints.left); + event.dx = event.dx + x - event.x; + event.x = x; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(spaceToolConstraints.right)) { + x = Math.min(event.x, spaceToolConstraints.right); + event.dx = event.dx + x - event.x; + event.x = x; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(spaceToolConstraints.top)) { + y = Math.max(event.y, spaceToolConstraints.top); + event.dy = event.dy + y - event.y; + event.y = y; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(spaceToolConstraints.bottom)) { + y = Math.min(event.y, spaceToolConstraints.bottom); + event.dy = event.dy + y - event.y; + event.y = y; + } +} +function getSpaceToolConstraints(elements, axis, direction, start, minDimensions) { + var movingShapes = elements.movingShapes, + resizingShapes = elements.resizingShapes; + if (!resizingShapes.length) { + return; + } + var spaceToolConstraints = {}, + min, + max; + (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.forEach)(resizingShapes, function (resizingShape) { + var resizingShapeBBox = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.asTRBL)(resizingShape); + + // find children that are not moving or resizing + var nonMovingResizingChildren = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(resizingShape.children, function (child) { + return !isConnection(child) && !isLabel(child) && !includes(movingShapes, child) && !includes(resizingShapes, child); + }); + + // find children that are moving + var movingChildren = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.filter)(resizingShape.children, function (child) { + return !isConnection(child) && !isLabel(child) && includes(movingShapes, child); + }); + var minOrMax, nonMovingResizingChildrenBBox, movingChildrenBBox; + if (nonMovingResizingChildren.length) { + nonMovingResizingChildrenBBox = addPadding((0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.asTRBL)((0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.getBBox)(nonMovingResizingChildren))); + minOrMax = start - resizingShapeBBox[DIRECTION_TO_TRBL[direction]] + nonMovingResizingChildrenBBox[DIRECTION_TO_TRBL[direction]]; + if (direction === 'n') { + spaceToolConstraints.bottom = max = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(max) ? Math.min(max, minOrMax) : minOrMax; + } else if (direction === 'w') { + spaceToolConstraints.right = max = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(max) ? Math.min(max, minOrMax) : minOrMax; + } else if (direction === 's') { + spaceToolConstraints.top = min = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(min) ? Math.max(min, minOrMax) : minOrMax; + } else if (direction === 'e') { + spaceToolConstraints.left = min = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(min) ? Math.max(min, minOrMax) : minOrMax; + } + } + if (movingChildren.length) { + movingChildrenBBox = addPadding((0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_5__.asTRBL)((0,_util_Elements__WEBPACK_IMPORTED_MODULE_2__.getBBox)(movingChildren))); + minOrMax = start - movingChildrenBBox[DIRECTION_TO_TRBL[DIRECTION_TO_OPPOSITE[direction]]] + resizingShapeBBox[DIRECTION_TO_TRBL[DIRECTION_TO_OPPOSITE[direction]]]; + if (direction === 'n') { + spaceToolConstraints.bottom = max = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(max) ? Math.min(max, minOrMax) : minOrMax; + } else if (direction === 'w') { + spaceToolConstraints.right = max = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(max) ? Math.min(max, minOrMax) : minOrMax; + } else if (direction === 's') { + spaceToolConstraints.top = min = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(min) ? Math.max(min, minOrMax) : minOrMax; + } else if (direction === 'e') { + spaceToolConstraints.left = min = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(min) ? Math.max(min, minOrMax) : minOrMax; + } + } + var resizingShapeMinDimensions = minDimensions && minDimensions[resizingShape.id]; + if (resizingShapeMinDimensions) { + if (direction === 'n') { + minOrMax = start + resizingShape[AXIS_TO_DIMENSION[axis]] - resizingShapeMinDimensions[AXIS_TO_DIMENSION[axis]]; + spaceToolConstraints.bottom = max = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(max) ? Math.min(max, minOrMax) : minOrMax; + } else if (direction === 'w') { + minOrMax = start + resizingShape[AXIS_TO_DIMENSION[axis]] - resizingShapeMinDimensions[AXIS_TO_DIMENSION[axis]]; + spaceToolConstraints.right = max = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(max) ? Math.min(max, minOrMax) : minOrMax; + } else if (direction === 's') { + minOrMax = start - resizingShape[AXIS_TO_DIMENSION[axis]] + resizingShapeMinDimensions[AXIS_TO_DIMENSION[axis]]; + spaceToolConstraints.top = min = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(min) ? Math.max(min, minOrMax) : minOrMax; + } else if (direction === 'e') { + minOrMax = start - resizingShape[AXIS_TO_DIMENSION[axis]] + resizingShapeMinDimensions[AXIS_TO_DIMENSION[axis]]; + spaceToolConstraints.left = min = (0,min_dash__WEBPACK_IMPORTED_MODULE_3__.isNumber)(min) ? Math.max(min, minOrMax) : minOrMax; + } + } + }); + return spaceToolConstraints; +} +function includes(array, item) { + return array.indexOf(item) !== -1; +} +function isConnection(element) { + return !!element.waypoints; +} +function isLabel(element) { + return !!element.labelTarget; +} + +/***/ }), + +/***/ 73467: +/*!*****************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/space-tool/SpaceToolPreview.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ SpaceToolPreview) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ 57491); +/* harmony import */ var _util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/SvgTransformUtil */ 81384); + +var MARKER_DRAGGING = 'djs-dragging', + MARKER_RESIZING = 'djs-resizing'; +var LOW_PRIORITY = 250; + + +var max = Math.max; + +/** + * Provides previews for selecting/moving/resizing shapes when creating/removing space. + * + * @param {EventBus} eventBus + * @param {ElementRegistry} elementRegistry + * @param {Canvas} canvas + * @param {Styles} styles + */ +function SpaceToolPreview(eventBus, elementRegistry, canvas, styles, previewSupport) { + function addPreviewGfx(collection, dragGroup) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(collection, function (element) { + previewSupport.addDragger(element, dragGroup); + canvas.addMarker(element, MARKER_DRAGGING); + }); + } + + // add crosshair + eventBus.on('spaceTool.selection.start', function (event) { + var space = canvas.getLayer('space'), + context = event.context; + var orientation = { + x: 'M 0,-10000 L 0,10000', + y: 'M -10000,0 L 10000,0' + }; + var crosshairGroup = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(crosshairGroup, styles.cls('djs-crosshair-group', ['no-events'])); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(space, crosshairGroup); + + // horizontal path + var pathX = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(pathX, 'd', orientation.x); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(pathX).add('djs-crosshair'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(crosshairGroup, pathX); + + // vertical path + var pathY = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(pathY, 'd', orientation.y); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(pathY).add('djs-crosshair'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(crosshairGroup, pathY); + context.crosshairGroup = crosshairGroup; + }); + + // update crosshair + eventBus.on('spaceTool.selection.move', function (event) { + var crosshairGroup = event.context.crosshairGroup; + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__.translate)(crosshairGroup, event.x, event.y); + }); + + // remove crosshair + eventBus.on('spaceTool.selection.cleanup', function (event) { + var context = event.context, + crosshairGroup = context.crosshairGroup; + if (crosshairGroup) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(crosshairGroup); + } + }); + + // add and update move/resize previews + eventBus.on('spaceTool.move', LOW_PRIORITY, function (event) { + var context = event.context, + line = context.line, + axis = context.axis, + movingShapes = context.movingShapes, + resizingShapes = context.resizingShapes; + if (!context.initialized) { + return; + } + if (!context.dragGroup) { + var spaceLayer = canvas.getLayer('space'); + line = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('path'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(line, 'd', 'M0,0 L0,0'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.classes)(line).add('djs-crosshair'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(spaceLayer, line); + context.line = line; + var dragGroup = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(dragGroup, styles.cls('djs-drag-group', ['no-events'])); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(canvas.getActiveLayer(), dragGroup); + + // shapes + addPreviewGfx(movingShapes, dragGroup); + + // connections + var movingConnections = context.movingConnections = elementRegistry.filter(function (element) { + var sourceIsMoving = false; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(movingShapes, function (shape) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(shape.outgoing, function (connection) { + if (element === connection) { + sourceIsMoving = true; + } + }); + }); + var targetIsMoving = false; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(movingShapes, function (shape) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(shape.incoming, function (connection) { + if (element === connection) { + targetIsMoving = true; + } + }); + }); + var sourceIsResizing = false; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(resizingShapes, function (shape) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(shape.outgoing, function (connection) { + if (element === connection) { + sourceIsResizing = true; + } + }); + }); + var targetIsResizing = false; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(resizingShapes, function (shape) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(shape.incoming, function (connection) { + if (element === connection) { + targetIsResizing = true; + } + }); + }); + return isConnection(element) && (sourceIsMoving || sourceIsResizing) && (targetIsMoving || targetIsResizing); + }); + addPreviewGfx(movingConnections, dragGroup); + context.dragGroup = dragGroup; + } + if (!context.frameGroup) { + var frameGroup = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('g'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(frameGroup, styles.cls('djs-frame-group', ['no-events'])); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(canvas.getActiveLayer(), frameGroup); + var frames = []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(resizingShapes, function (shape) { + var frame = previewSupport.addFrame(shape, frameGroup); + var initialBounds = frame.getBBox(); + frames.push({ + element: frame, + initialBounds: initialBounds + }); + canvas.addMarker(shape, MARKER_RESIZING); + }); + context.frameGroup = frameGroup; + context.frames = frames; + } + var orientation = { + x: 'M' + event.x + ', -10000 L' + event.x + ', 10000', + y: 'M -10000, ' + event.y + ' L 10000, ' + event.y + }; + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(line, { + d: orientation[axis] + }); + var opposite = { + x: 'y', + y: 'x' + }; + var delta = { + x: event.dx, + y: event.dy + }; + delta[opposite[context.axis]] = 0; + + // update move previews + (0,_util_SvgTransformUtil__WEBPACK_IMPORTED_MODULE_2__.translate)(context.dragGroup, delta.x, delta.y); + + // update resize previews + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(context.frames, function (frame) { + var element = frame.element, + initialBounds = frame.initialBounds, + width, + height; + if (context.direction === 'e') { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(element, { + width: max(initialBounds.width + delta.x, 5) + }); + } else { + width = max(initialBounds.width - delta.x, 5); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(element, { + width: width, + x: initialBounds.x + initialBounds.width - width + }); + } + if (context.direction === 's') { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(element, { + height: max(initialBounds.height + delta.y, 5) + }); + } else { + height = max(initialBounds.height - delta.y, 5); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(element, { + height: height, + y: initialBounds.y + initialBounds.height - height + }); + } + }); + }); + + // remove move/resize previews + eventBus.on('spaceTool.cleanup', function (event) { + var context = event.context, + movingShapes = context.movingShapes, + movingConnections = context.movingConnections, + resizingShapes = context.resizingShapes, + line = context.line, + dragGroup = context.dragGroup, + frameGroup = context.frameGroup; + + // moving shapes + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(movingShapes, function (shape) { + canvas.removeMarker(shape, MARKER_DRAGGING); + }); + + // moving connections + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(movingConnections, function (connection) { + canvas.removeMarker(connection, MARKER_DRAGGING); + }); + if (dragGroup) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(line); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(dragGroup); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(resizingShapes, function (shape) { + canvas.removeMarker(shape, MARKER_RESIZING); + }); + if (frameGroup) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(frameGroup); + } + }); +} +SpaceToolPreview.$inject = ['eventBus', 'elementRegistry', 'canvas', 'styles', 'previewSupport']; + +// helpers ////////////////////// + +/** + * Checks if an element is a connection. + */ +function isConnection(element) { + return element.waypoints; +} + +/***/ }), + +/***/ 97093: +/*!**********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/space-tool/SpaceUtil.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getDirection: () => (/* binding */ getDirection), +/* harmony export */ getWaypointsUpdatingConnections: () => (/* binding */ getWaypointsUpdatingConnections), +/* harmony export */ resizeBounds: () => (/* binding */ resizeBounds) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * Return direction given axis and delta. + * + * @param {string} axis + * @param {number} delta + * + * @return {string} + */ +function getDirection(axis, delta) { + if (axis === 'x') { + if (delta > 0) { + return 'e'; + } + if (delta < 0) { + return 'w'; + } + } + if (axis === 'y') { + if (delta > 0) { + return 's'; + } + if (delta < 0) { + return 'n'; + } + } + return null; +} + +/** + * Returns connections whose waypoints are to be updated. Waypoints are to be updated if start + * or end is to be moved or resized. + * + * @param {Array} + */ +function getWaypointsUpdatingConnections(movingShapes, resizingShapes) { + var waypointsUpdatingConnections = []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(movingShapes.concat(resizingShapes), function (shape) { + var incoming = shape.incoming, + outgoing = shape.outgoing; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(incoming.concat(outgoing), function (connection) { + var source = connection.source, + target = connection.target; + if (includes(movingShapes, source) || includes(movingShapes, target) || includes(resizingShapes, source) || includes(resizingShapes, target)) { + if (!includes(waypointsUpdatingConnections, connection)) { + waypointsUpdatingConnections.push(connection); + } + } + }); + }); + return waypointsUpdatingConnections; +} +function includes(array, item) { + return array.indexOf(item) !== -1; +} + +/** + * Resize bounds. + * + * @param {Object} bounds + * @param {number} bounds.x + * @param {number} bounds.y + * @param {number} bounds.width + * @param {number} bounds.height + * @param {string} direction + * @param {Object} delta + * @param {number} delta.x + * @param {number} delta.y + * + * @return {Object} + */ +function resizeBounds(bounds, direction, delta) { + var x = bounds.x, + y = bounds.y, + width = bounds.width, + height = bounds.height, + dx = delta.x, + dy = delta.y; + switch (direction) { + case 'n': + return { + x: x, + y: y + dy, + width: width, + height: height - dy + }; + case 's': + return { + x: x, + y: y, + width: width, + height: height + dy + }; + case 'w': + return { + x: x + dx, + y: y, + width: width - dx, + height: height + }; + case 'e': + return { + x: x, + y: y, + width: width + dx, + height: height + }; + default: + throw new Error('unknown direction: ' + direction); + } +} + +/***/ }), + +/***/ 88363: +/*!******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/space-tool/index.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dragging */ 11917); +/* harmony import */ var _rules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rules */ 8807); +/* harmony import */ var _tool_manager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tool-manager */ 22136); +/* harmony import */ var _preview_support__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../preview-support */ 86726); +/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mouse */ 26947); +/* harmony import */ var _SpaceTool__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SpaceTool */ 48247); +/* harmony import */ var _SpaceToolPreview__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SpaceToolPreview */ 73467); + + + + + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['spaceToolPreview'], + __depends__: [_dragging__WEBPACK_IMPORTED_MODULE_0__["default"], _rules__WEBPACK_IMPORTED_MODULE_1__["default"], _tool_manager__WEBPACK_IMPORTED_MODULE_2__["default"], _preview_support__WEBPACK_IMPORTED_MODULE_3__["default"], _mouse__WEBPACK_IMPORTED_MODULE_4__["default"]], + spaceTool: ['type', _SpaceTool__WEBPACK_IMPORTED_MODULE_5__["default"]], + spaceToolPreview: ['type', _SpaceToolPreview__WEBPACK_IMPORTED_MODULE_6__["default"]] +}); + +/***/ }), + +/***/ 88089: +/*!**************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/tool-manager/ToolManager.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ToolManager) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ 73599); + + +var LOW_PRIORITY = 250; + +/** + * The tool manager acts as middle-man between the available tool's and the Palette, + * it takes care of making sure that the correct active state is set. + * + * @param {Object} eventBus + * @param {Object} dragging + */ +function ToolManager(eventBus, dragging) { + this._eventBus = eventBus; + this._dragging = dragging; + this._tools = []; + this._active = null; +} +ToolManager.$inject = ['eventBus', 'dragging']; +ToolManager.prototype.registerTool = function (name, events) { + var tools = this._tools; + if (!events) { + throw new Error('A tool has to be registered with it\'s "events"'); + } + tools.push(name); + this.bindEvents(name, events); +}; +ToolManager.prototype.isActive = function (tool) { + return tool && this._active === tool; +}; +ToolManager.prototype.length = function (tool) { + return this._tools.length; +}; +ToolManager.prototype.setActive = function (tool) { + var eventBus = this._eventBus; + if (this._active !== tool) { + this._active = tool; + eventBus.fire('tool-manager.update', { + tool: tool + }); + } +}; +ToolManager.prototype.bindEvents = function (name, events) { + var eventBus = this._eventBus, + dragging = this._dragging; + var eventsToRegister = []; + eventBus.on(events.tool + '.init', function (event) { + var context = event.context; + + // Active tools that want to reactivate themselves must do this explicitly + if (!context.reactivate && this.isActive(name)) { + this.setActive(null); + dragging.cancel(); + return; + } + this.setActive(name); + }, this); + + // Todo[ricardo]: add test cases + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(events, function (event) { + eventsToRegister.push(event + '.ended'); + eventsToRegister.push(event + '.canceled'); + }); + eventBus.on(eventsToRegister, LOW_PRIORITY, function (event) { + // We defer the de-activation of the tool to the .activate phase, + // so we're able to check if we want to toggle off the current + // active tool or switch to a new one + if (!this._active) { + return; + } + if (isPaletteClick(event)) { + return; + } + this.setActive(null); + }, this); +}; + +// helpers /////////////// + +/** + * Check if a given event is a palette click event. + * + * @param {EventBus.Event} event + * + * @return {boolean} + */ +function isPaletteClick(event) { + var target = event.originalEvent && event.originalEvent.target; + return target && (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.closest)(target, '.group[data-group="tools"]'); +} + +/***/ }), + +/***/ 22136: +/*!********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/tool-manager/index.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _dragging__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../dragging */ 11917); +/* harmony import */ var _ToolManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ToolManager */ 88089); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_dragging__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['toolManager'], + toolManager: ['type', _ToolManager__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 24750: +/*!*******************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/tooltips/Tooltips.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Tooltips) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _util_IdGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/IdGenerator */ 39902); + + + + +// document wide unique tooltip ids +var ids = new _util_IdGenerator__WEBPACK_IMPORTED_MODULE_0__["default"]('tt'); +function createRoot(parentNode) { + var root = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('
'); + parentNode.insertBefore(root, parentNode.firstChild); + return root; +} +function setPosition(el, x, y) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(el.style, { + left: x + 'px', + top: y + 'px' + }); +} +function setVisible(el, visible) { + el.style.display = visible === false ? 'none' : ''; +} +var tooltipClass = 'djs-tooltip', + tooltipSelector = '.' + tooltipClass; + +/** + * A service that allows users to render tool tips on the diagram. + * + * The tooltip service will take care of updating the tooltip positioning + * during navigation + zooming. + * + * @example + * + * ```javascript + * + * // add a pink badge on the top left of the shape + * tooltips.add({ + * position: { + * x: 50, + * y: 100 + * }, + * html: '
0
' + * }); + * + * // or with optional life span + * tooltips.add({ + * position: { + * top: -5, + * left: -5 + * }, + * html: '
0
', + * ttl: 2000 + * }); + * + * // remove a tool tip + * var id = tooltips.add(...); + * tooltips.remove(id); + * ``` + * + * @param {EventBus} eventBus + * @param {Canvas} canvas + */ +function Tooltips(eventBus, canvas) { + this._eventBus = eventBus; + this._canvas = canvas; + this._ids = ids; + this._tooltipDefaults = { + show: { + minZoom: 0.7, + maxZoom: 5.0 + } + }; + + /** + * Mapping tooltipId -> tooltip + */ + this._tooltips = {}; + + // root html element for all tooltips + this._tooltipRoot = createRoot(canvas.getContainer()); + var self = this; + min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(this._tooltipRoot, tooltipSelector, 'mousedown', function (event) { + event.stopPropagation(); + }); + min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(this._tooltipRoot, tooltipSelector, 'mouseover', function (event) { + self.trigger('mouseover', event); + }); + min_dom__WEBPACK_IMPORTED_MODULE_1__.delegate.bind(this._tooltipRoot, tooltipSelector, 'mouseout', function (event) { + self.trigger('mouseout', event); + }); + this._init(); +} +Tooltips.$inject = ['eventBus', 'canvas']; + +/** + * Adds a HTML tooltip to the diagram + * + * @param {Object} tooltip the tooltip configuration + * + * @param {string|DOMElement} tooltip.html html element to use as an tooltip + * @param {Object} [tooltip.show] show configuration + * @param {number} [tooltip.show.minZoom] minimal zoom level to show the tooltip + * @param {number} [tooltip.show.maxZoom] maximum zoom level to show the tooltip + * @param {Object} tooltip.position where to attach the tooltip + * @param {number} [tooltip.position.left] relative to element bbox left attachment + * @param {number} [tooltip.position.top] relative to element bbox top attachment + * @param {number} [tooltip.position.bottom] relative to element bbox bottom attachment + * @param {number} [tooltip.position.right] relative to element bbox right attachment + * @param {number} [tooltip.timeout=-1] + * + * @return {string} id that may be used to reference the tooltip for update or removal + */ +Tooltips.prototype.add = function (tooltip) { + if (!tooltip.position) { + throw new Error('must specifiy tooltip position'); + } + if (!tooltip.html) { + throw new Error('must specifiy tooltip html'); + } + var id = this._ids.next(); + tooltip = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({}, this._tooltipDefaults, tooltip, { + id: id + }); + this._addTooltip(tooltip); + if (tooltip.timeout) { + this.setTimeout(tooltip); + } + return id; +}; +Tooltips.prototype.trigger = function (action, event) { + var node = event.delegateTarget || event.target; + var tooltip = this.get((0,min_dom__WEBPACK_IMPORTED_MODULE_1__.attr)(node, 'data-tooltip-id')); + if (!tooltip) { + return; + } + if (action === 'mouseover' && tooltip.timeout) { + this.clearTimeout(tooltip); + } + if (action === 'mouseout' && tooltip.timeout) { + // cut timeout after mouse out + tooltip.timeout = 1000; + this.setTimeout(tooltip); + } +}; + +/** + * Get a tooltip with the given id + * + * @param {string} id + */ +Tooltips.prototype.get = function (id) { + if (typeof id !== 'string') { + id = id.id; + } + return this._tooltips[id]; +}; +Tooltips.prototype.clearTimeout = function (tooltip) { + tooltip = this.get(tooltip); + if (!tooltip) { + return; + } + var removeTimer = tooltip.removeTimer; + if (removeTimer) { + clearTimeout(removeTimer); + tooltip.removeTimer = null; + } +}; +Tooltips.prototype.setTimeout = function (tooltip) { + tooltip = this.get(tooltip); + if (!tooltip) { + return; + } + this.clearTimeout(tooltip); + var self = this; + tooltip.removeTimer = setTimeout(function () { + self.remove(tooltip); + }, tooltip.timeout); +}; + +/** + * Remove an tooltip with the given id + * + * @param {string} id + */ +Tooltips.prototype.remove = function (id) { + var tooltip = this.get(id); + if (tooltip) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.remove)(tooltip.html); + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.remove)(tooltip.htmlContainer); + delete tooltip.htmlContainer; + delete this._tooltips[tooltip.id]; + } +}; +Tooltips.prototype.show = function () { + setVisible(this._tooltipRoot); +}; +Tooltips.prototype.hide = function () { + setVisible(this._tooltipRoot, false); +}; +Tooltips.prototype._updateRoot = function (viewbox) { + var a = viewbox.scale || 1; + var d = viewbox.scale || 1; + var matrix = 'matrix(' + a + ',0,0,' + d + ',' + -1 * viewbox.x * a + ',' + -1 * viewbox.y * d + ')'; + this._tooltipRoot.style.transform = matrix; + this._tooltipRoot.style['-ms-transform'] = matrix; +}; +Tooltips.prototype._addTooltip = function (tooltip) { + var id = tooltip.id, + html = tooltip.html, + htmlContainer, + tooltipRoot = this._tooltipRoot; + + // unwrap jquery (for those who need it) + if (html.get && html.constructor.prototype.jquery) { + html = html.get(0); + } + + // create proper html elements from + // tooltip HTML strings + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isString)(html)) { + html = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)(html); + } + htmlContainer = (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.domify)('
'); + htmlContainer.appendChild(html); + if (tooltip.type) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.classes)(htmlContainer).add('djs-tooltip-' + tooltip.type); + } + if (tooltip.className) { + (0,min_dom__WEBPACK_IMPORTED_MODULE_1__.classes)(htmlContainer).add(tooltip.className); + } + tooltip.htmlContainer = htmlContainer; + tooltipRoot.appendChild(htmlContainer); + this._tooltips[id] = tooltip; + this._updateTooltip(tooltip); +}; +Tooltips.prototype._updateTooltip = function (tooltip) { + var position = tooltip.position, + htmlContainer = tooltip.htmlContainer; + + // update overlay html based on tooltip x, y + + setPosition(htmlContainer, position.x, position.y); +}; +Tooltips.prototype._updateTooltipVisibilty = function (viewbox) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(this._tooltips, function (tooltip) { + var show = tooltip.show, + htmlContainer = tooltip.htmlContainer, + visible = true; + if (show) { + if (show.minZoom > viewbox.scale || show.maxZoom < viewbox.scale) { + visible = false; + } + setVisible(htmlContainer, visible); + } + }); +}; +Tooltips.prototype._init = function () { + var self = this; + + // scroll/zoom integration + + function updateViewbox(viewbox) { + self._updateRoot(viewbox); + self._updateTooltipVisibilty(viewbox); + self.show(); + } + this._eventBus.on('canvas.viewbox.changing', function (event) { + self.hide(); + }); + this._eventBus.on('canvas.viewbox.changed', function (event) { + updateViewbox(event.viewbox); + }); +}; + +/***/ }), + +/***/ 37692: +/*!****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/tooltips/index.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _Tooltips__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tooltips */ 24750); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['tooltips'], + tooltips: ['type', _Tooltips__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 32473: +/*!****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/touch/TouchFix.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ TouchFix) +/* harmony export */ }); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ 57491); + +function TouchFix(canvas, eventBus) { + var self = this; + eventBus.on('canvas.init', function (e) { + self.addBBoxMarker(e.svg); + }); +} +TouchFix.$inject = ['canvas', 'eventBus']; + +/** + * Safari mobile (iOS 7) does not fire touchstart event in element + * if there is no shape between 0,0 and viewport elements origin. + * + * So touchstart event is only fired when the element was hit. + * Putting an element over and below the 'viewport' fixes that behavior. + */ +TouchFix.prototype.addBBoxMarker = function (svg) { + var markerStyle = { + fill: 'none', + class: 'outer-bound-marker' + }; + var rect1 = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('rect'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(rect1, { + x: -10000, + y: 10000, + width: 10, + height: 10 + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(rect1, markerStyle); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.append)(svg, rect1); + var rect2 = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('rect'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(rect2, { + x: 10000, + y: 10000, + width: 10, + height: 10 + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(rect2, markerStyle); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.append)(svg, rect2); +}; + +/***/ }), + +/***/ 72575: +/*!******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/touch/TouchInteractionEvents.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ TouchInteractionEvents) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hammerjs */ 57019); +/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(hammerjs__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/Event */ 74716); + + + + +var MIN_ZOOM = 0.2, + MAX_ZOOM = 4; +var mouseEvents = ['mousedown', 'mouseup', 'mouseover', 'mouseout', 'click', 'dblclick']; +function log() { + + // console.log.apply(console, arguments); +} +function get(service, injector) { + return injector.get(service, false); +} +function stopEvent(event) { + event.preventDefault(); + if (typeof event.stopPropagation === 'function') { + event.stopPropagation(); + } else if (event.srcEvent && typeof event.srcEvent.stopPropagation === 'function') { + // iPhone & iPad + event.srcEvent.stopPropagation(); + } + if (typeof event.stopImmediatePropagation === 'function') { + event.stopImmediatePropagation(); + } +} +function createTouchRecognizer(node) { + function stopMouse(event) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(mouseEvents, function (e) { + min_dom__WEBPACK_IMPORTED_MODULE_2__.event.bind(node, e, stopEvent, true); + }); + } + function allowMouse(event) { + setTimeout(function () { + (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.forEach)(mouseEvents, function (e) { + min_dom__WEBPACK_IMPORTED_MODULE_2__.event.unbind(node, e, stopEvent, true); + }); + }, 500); + } + min_dom__WEBPACK_IMPORTED_MODULE_2__.event.bind(node, 'touchstart', stopMouse, true); + min_dom__WEBPACK_IMPORTED_MODULE_2__.event.bind(node, 'touchend', allowMouse, true); + min_dom__WEBPACK_IMPORTED_MODULE_2__.event.bind(node, 'touchcancel', allowMouse, true); + + // A touch event recognizer that handles + // touch events only (we know, we can already handle + // mouse events out of the box) + + var recognizer = new (hammerjs__WEBPACK_IMPORTED_MODULE_0___default().Manager)(node, { + inputClass: (hammerjs__WEBPACK_IMPORTED_MODULE_0___default().TouchInput), + recognizers: [], + domEvents: true + }); + var tap = new (hammerjs__WEBPACK_IMPORTED_MODULE_0___default().Tap)(); + var pan = new (hammerjs__WEBPACK_IMPORTED_MODULE_0___default().Pan)({ + threshold: 10 + }); + var press = new (hammerjs__WEBPACK_IMPORTED_MODULE_0___default().Press)(); + var pinch = new (hammerjs__WEBPACK_IMPORTED_MODULE_0___default().Pinch)(); + var doubleTap = new (hammerjs__WEBPACK_IMPORTED_MODULE_0___default().Tap)({ + event: 'doubletap', + taps: 2 + }); + pinch.requireFailure(pan); + pinch.requireFailure(press); + recognizer.add([pan, press, pinch, doubleTap, tap]); + recognizer.reset = function (force) { + var recognizers = this.recognizers, + session = this.session; + if (session.stopped) { + return; + } + log('recognizer', 'stop'); + recognizer.stop(force); + setTimeout(function () { + var i, r; + log('recognizer', 'reset'); + for (i = 0; r = recognizers[i]; i++) { + r.reset(); + r.state = 8; // FAILED STATE + } + + session.curRecognizer = null; + }, 0); + }; + recognizer.on('hammer.input', function (event) { + if (event.srcEvent.defaultPrevented) { + recognizer.reset(true); + } + }); + return recognizer; +} + +/** + * A plugin that provides touch events for elements. + * + * @param {EventBus} eventBus + * @param {InteractionEvents} interactionEvents + */ +function TouchInteractionEvents(injector, canvas, eventBus, elementRegistry, interactionEvents) { + // optional integrations + var dragging = get('dragging', injector), + move = get('move', injector), + contextPad = get('contextPad', injector), + palette = get('palette', injector); + + // the touch recognizer + var recognizer; + function handler(type, buttonType) { + return function (event) { + log('element', type, event); + var gfx = getGfx(event.target), + element = gfx && elementRegistry.get(gfx); + + // translate into an actual mouse click event + if (buttonType) { + event.srcEvent.button = buttonType; + } + return interactionEvents.fire(type, event, element); + }; + } + function getGfx(target) { + var node = (0,min_dom__WEBPACK_IMPORTED_MODULE_2__.closest)(target, 'svg, .djs-element', true); + return node; + } + function initEvents(svg) { + // touch recognizer + recognizer = createTouchRecognizer(svg); + function startGrabCanvas(event) { + log('canvas', 'grab start'); + var lx = 0, + ly = 0; + function update(e) { + var dx = e.deltaX - lx, + dy = e.deltaY - ly; + canvas.scroll({ + dx: dx, + dy: dy + }); + lx = e.deltaX; + ly = e.deltaY; + } + function end(e) { + recognizer.off('panmove', update); + recognizer.off('panend', end); + recognizer.off('pancancel', end); + log('canvas', 'grab end'); + } + recognizer.on('panmove', update); + recognizer.on('panend', end); + recognizer.on('pancancel', end); + } + function startGrab(event) { + var gfx = getGfx(event.target), + element = gfx && elementRegistry.get(gfx); + + // recognizer + if (move && canvas.getRootElement() !== element) { + log('element', 'move start', element, event, true); + return move.start(event, element, true); + } else { + startGrabCanvas(event); + } + } + function startZoom(e) { + log('canvas', 'zoom start'); + var zoom = canvas.zoom(), + mid = e.center; + function update(e) { + var ratio = 1 - (1 - e.scale) / 1.50, + newZoom = Math.max(MIN_ZOOM, Math.min(MAX_ZOOM, ratio * zoom)); + canvas.zoom(newZoom, mid); + stopEvent(e); + } + function end(e) { + recognizer.off('pinchmove', update); + recognizer.off('pinchend', end); + recognizer.off('pinchcancel', end); + recognizer.reset(true); + log('canvas', 'zoom end'); + } + recognizer.on('pinchmove', update); + recognizer.on('pinchend', end); + recognizer.on('pinchcancel', end); + } + recognizer.on('tap', handler('element.click')); + recognizer.on('doubletap', handler('element.dblclick', 1)); + recognizer.on('panstart', startGrab); + recognizer.on('press', startGrab); + recognizer.on('pinchstart', startZoom); + } + if (dragging) { + // simulate hover during dragging + eventBus.on('drag.move', function (event) { + var originalEvent = event.originalEvent; + if (!originalEvent || originalEvent instanceof MouseEvent) { + return; + } + var position = (0,_util_Event__WEBPACK_IMPORTED_MODULE_3__.toPoint)(originalEvent); + + // this gets really expensive ... + var node = document.elementFromPoint(position.x, position.y), + gfx = getGfx(node), + element = gfx && elementRegistry.get(gfx); + if (element !== event.hover) { + if (event.hover) { + dragging.out(event); + } + if (element) { + dragging.hover({ + element: element, + gfx: gfx + }); + event.hover = element; + event.hoverGfx = gfx; + } + } + }); + } + if (contextPad) { + eventBus.on('contextPad.create', function (event) { + var node = event.pad.html; + + // touch recognizer + var padRecognizer = createTouchRecognizer(node); + padRecognizer.on('panstart', function (event) { + log('context-pad', 'panstart', event); + contextPad.trigger('dragstart', event, true); + }); + padRecognizer.on('press', function (event) { + log('context-pad', 'press', event); + contextPad.trigger('dragstart', event, true); + }); + padRecognizer.on('tap', function (event) { + log('context-pad', 'tap', event); + contextPad.trigger('click', event); + }); + }); + } + if (palette) { + eventBus.on('palette.create', function (event) { + var node = event.container; + + // touch recognizer + var padRecognizer = createTouchRecognizer(node); + padRecognizer.on('panstart', function (event) { + log('palette', 'panstart', event); + palette.trigger('dragstart', event, true); + }); + padRecognizer.on('press', function (event) { + log('palette', 'press', event); + palette.trigger('dragstart', event, true); + }); + padRecognizer.on('tap', function (event) { + log('palette', 'tap', event); + palette.trigger('click', event); + }); + }); + } + eventBus.on('canvas.init', function (event) { + initEvents(event.svg); + }); +} +TouchInteractionEvents.$inject = ['injector', 'canvas', 'eventBus', 'elementRegistry', 'interactionEvents', 'touchFix']; + +/***/ }), + +/***/ 85591: +/*!*************************************************************!*\ + !*** ./node_modules/diagram-js/lib/features/touch/index.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _interaction_events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interaction-events */ 57250); +/* harmony import */ var _TouchInteractionEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TouchInteractionEvents */ 72575); +/* harmony import */ var _TouchFix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TouchFix */ 32473); + + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_interaction_events__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['touchInteractionEvents'], + touchInteractionEvents: ['type', _TouchInteractionEvents__WEBPACK_IMPORTED_MODULE_1__["default"]], + touchFix: ['type', _TouchFix__WEBPACK_IMPORTED_MODULE_2__["default"]] +}); + +/***/ }), + +/***/ 3933: +/*!*************************************************************!*\ + !*** ./node_modules/diagram-js/lib/i18n/translate/index.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _translate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./translate */ 23755); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + translate: ['value', _translate__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 23755: +/*!*****************************************************************!*\ + !*** ./node_modules/diagram-js/lib/i18n/translate/translate.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ translate) +/* harmony export */ }); +/** + * A simple translation stub to be used for multi-language support + * in diagrams. Can be easily replaced with a more sophisticated + * solution. + * + * @example + * + * // use it inside any diagram component by injecting `translate`. + * + * function MyService(translate) { + * alert(translate('HELLO {you}', { you: 'You!' })); + * } + * + * @param {string} template to interpolate + * @param {Object} [replacements] a map with substitutes + * + * @return {string} the translated string + */ +function translate(template, replacements) { + replacements = replacements || {}; + return template.replace(/{([^}]+)}/g, function (_, key) { + return replacements[key] || '{' + key + '}'; + }); +} + +/***/ }), + +/***/ 17640: +/*!************************************************************!*\ + !*** ./node_modules/diagram-js/lib/layout/BaseLayouter.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ BaseLayouter) +/* harmony export */ }); +/* harmony import */ var _LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LayoutUtil */ 8610); + + +/** + * A base connection layouter implementation + * that layouts the connection by directly connecting + * mid(source) + mid(target). + */ +function BaseLayouter() {} + +/** + * Return the new layouted waypoints for the given connection. + * + * The connection passed is still unchanged; you may figure out about + * the new connection start / end via the layout hints provided. + * + * @param {djs.model.Connection} connection + * @param {Object} [hints] + * @param {Point} [hints.connectionStart] + * @param {Point} [hints.connectionEnd] + * @param {Point} [hints.source] + * @param {Point} [hints.target] + * + * @return {Array} the layouted connection waypoints + */ +BaseLayouter.prototype.layoutConnection = function (connection, hints) { + hints = hints || {}; + return [hints.connectionStart || (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getMid)(hints.source || connection.source), hints.connectionEnd || (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getMid)(hints.target || connection.target)]; +}; + +/***/ }), + +/***/ 91569: +/*!*************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/layout/CroppingConnectionDocking.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ CroppingConnectionDocking) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LayoutUtil */ 8610); + + +function dockingToPoint(docking) { + // use the dockings actual point and + // retain the original docking + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ + original: docking.point.original || docking.point + }, docking.actual); +} + +/** + * A {@link ConnectionDocking} that crops connection waypoints based on + * the path(s) of the connection source and target. + * + * @param {djs.core.ElementRegistry} elementRegistry + */ +function CroppingConnectionDocking(elementRegistry, graphicsFactory) { + this._elementRegistry = elementRegistry; + this._graphicsFactory = graphicsFactory; +} +CroppingConnectionDocking.$inject = ['elementRegistry', 'graphicsFactory']; + +/** + * @inheritDoc ConnectionDocking#getCroppedWaypoints + */ +CroppingConnectionDocking.prototype.getCroppedWaypoints = function (connection, source, target) { + source = source || connection.source; + target = target || connection.target; + var sourceDocking = this.getDockingPoint(connection, source, true), + targetDocking = this.getDockingPoint(connection, target); + var croppedWaypoints = connection.waypoints.slice(sourceDocking.idx + 1, targetDocking.idx); + croppedWaypoints.unshift(dockingToPoint(sourceDocking)); + croppedWaypoints.push(dockingToPoint(targetDocking)); + return croppedWaypoints; +}; + +/** + * Return the connection docking point on the specified shape + * + * @inheritDoc ConnectionDocking#getDockingPoint + */ +CroppingConnectionDocking.prototype.getDockingPoint = function (connection, shape, dockStart) { + var waypoints = connection.waypoints, + dockingIdx, + dockingPoint, + croppedPoint; + dockingIdx = dockStart ? 0 : waypoints.length - 1; + dockingPoint = waypoints[dockingIdx]; + croppedPoint = this._getIntersection(shape, connection, dockStart); + return { + point: dockingPoint, + actual: croppedPoint || dockingPoint, + idx: dockingIdx + }; +}; + +// helpers ////////////////////// + +CroppingConnectionDocking.prototype._getIntersection = function (shape, connection, takeFirst) { + var shapePath = this._getShapePath(shape), + connectionPath = this._getConnectionPath(connection); + return (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getElementLineIntersection)(shapePath, connectionPath, takeFirst); +}; +CroppingConnectionDocking.prototype._getConnectionPath = function (connection) { + return this._graphicsFactory.getConnectionPath(connection); +}; +CroppingConnectionDocking.prototype._getShapePath = function (shape) { + return this._graphicsFactory.getShapePath(shape); +}; +CroppingConnectionDocking.prototype._getGfx = function (element) { + return this._elementRegistry.getGraphics(element); +}; + +/***/ }), + +/***/ 8610: +/*!**********************************************************!*\ + !*** ./node_modules/diagram-js/lib/layout/LayoutUtil.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ asBounds: () => (/* binding */ asBounds), +/* harmony export */ asTRBL: () => (/* binding */ asTRBL), +/* harmony export */ filterRedundantWaypoints: () => (/* binding */ filterRedundantWaypoints), +/* harmony export */ getElementLineIntersection: () => (/* binding */ getElementLineIntersection), +/* harmony export */ getIntersections: () => (/* binding */ getIntersections), +/* harmony export */ getMid: () => (/* binding */ getMid), +/* harmony export */ getOrientation: () => (/* binding */ getOrientation), +/* harmony export */ roundBounds: () => (/* binding */ roundBounds), +/* harmony export */ roundPoint: () => (/* binding */ roundPoint) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _util_Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/Geometry */ 3242); +/* harmony import */ var path_intersection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path-intersection */ 67166); +/* harmony import */ var path_intersection__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path_intersection__WEBPACK_IMPORTED_MODULE_0__); + + + +function roundBounds(bounds) { + return { + x: Math.round(bounds.x), + y: Math.round(bounds.y), + width: Math.round(bounds.width), + height: Math.round(bounds.height) + }; +} +function roundPoint(point) { + return { + x: Math.round(point.x), + y: Math.round(point.y) + }; +} + +/** + * Convert the given bounds to a { top, left, bottom, right } descriptor. + * + * @param {Bounds|Point} bounds + * + * @return {Object} + */ +function asTRBL(bounds) { + return { + top: bounds.y, + right: bounds.x + (bounds.width || 0), + bottom: bounds.y + (bounds.height || 0), + left: bounds.x + }; +} + +/** + * Convert a { top, left, bottom, right } to an objects bounds. + * + * @param {Object} trbl + * + * @return {Bounds} + */ +function asBounds(trbl) { + return { + x: trbl.left, + y: trbl.top, + width: trbl.right - trbl.left, + height: trbl.bottom - trbl.top + }; +} + +/** + * Get the mid of the given bounds or point. + * + * @param {Bounds|Point} bounds + * + * @return {Point} + */ +function getMid(bounds) { + return roundPoint({ + x: bounds.x + (bounds.width || 0) / 2, + y: bounds.y + (bounds.height || 0) / 2 + }); +} + +// orientation utils ////////////////////// + +/** + * Get orientation of the given rectangle with respect to + * the reference rectangle. + * + * A padding (positive or negative) may be passed to influence + * horizontal / vertical orientation and intersection. + * + * @param {Bounds} rect + * @param {Bounds} reference + * @param {Point|number} padding + * + * @return {string} the orientation; one of top, top-left, left, ..., bottom, right or intersect. + */ +function getOrientation(rect, reference, padding) { + padding = padding || 0; + + // make sure we can use an object, too + // for individual { x, y } padding + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isObject)(padding)) { + padding = { + x: padding, + y: padding + }; + } + var rectOrientation = asTRBL(rect), + referenceOrientation = asTRBL(reference); + var top = rectOrientation.bottom + padding.y <= referenceOrientation.top, + right = rectOrientation.left - padding.x >= referenceOrientation.right, + bottom = rectOrientation.top - padding.y >= referenceOrientation.bottom, + left = rectOrientation.right + padding.x <= referenceOrientation.left; + var vertical = top ? 'top' : bottom ? 'bottom' : null, + horizontal = left ? 'left' : right ? 'right' : null; + if (horizontal && vertical) { + return vertical + '-' + horizontal; + } else { + return horizontal || vertical || 'intersect'; + } +} + +// intersection utils ////////////////////// + +/** + * Get intersection between an element and a line path. + * + * @param {PathDef} elementPath + * @param {PathDef} linePath + * @param {boolean} cropStart crop from start or end + * + * @return {Point} + */ +function getElementLineIntersection(elementPath, linePath, cropStart) { + var intersections = getIntersections(elementPath, linePath); + + // recognize intersections + // only one -> choose + // two close together -> choose first + // two or more distinct -> pull out appropriate one + // none -> ok (fallback to point itself) + if (intersections.length === 1) { + return roundPoint(intersections[0]); + } else if (intersections.length === 2 && (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointDistance)(intersections[0], intersections[1]) < 1) { + return roundPoint(intersections[0]); + } else if (intersections.length > 1) { + // sort by intersections based on connection segment + + // distance from start + intersections = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.sortBy)(intersections, function (i) { + var distance = Math.floor(i.t2 * 100) || 1; + distance = 100 - distance; + distance = (distance < 10 ? '0' : '') + distance; + + // create a sort string that makes sure we sort + // line segment ASC + line segment position DESC (for cropStart) + // line segment ASC + line segment position ASC (for cropEnd) + return i.segment2 + '#' + distance; + }); + return roundPoint(intersections[cropStart ? 0 : intersections.length - 1]); + } + return null; +} +function getIntersections(a, b) { + return path_intersection__WEBPACK_IMPORTED_MODULE_0___default()(a, b); +} +function filterRedundantWaypoints(waypoints) { + // alter copy of waypoints, not original + waypoints = waypoints.slice(); + var idx = 0, + point, + previousPoint, + nextPoint; + while (waypoints[idx]) { + point = waypoints[idx]; + previousPoint = waypoints[idx - 1]; + nextPoint = waypoints[idx + 1]; + if ((0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointDistance)(point, nextPoint) === 0 || (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointsOnLine)(previousPoint, nextPoint, point)) { + // remove point, if overlapping with {nextPoint} + // or on line with {previousPoint} -> {point} -> {nextPoint} + waypoints.splice(idx, 1); + } else { + idx++; + } + } + return waypoints; +} + +/***/ }), + +/***/ 98624: +/*!***************************************************************!*\ + !*** ./node_modules/diagram-js/lib/layout/ManhattanLayout.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ connectPoints: () => (/* binding */ connectPoints), +/* harmony export */ connectRectangles: () => (/* binding */ connectRectangles), +/* harmony export */ repairConnection: () => (/* binding */ repairConnection), +/* harmony export */ tryLayoutStraight: () => (/* binding */ tryLayoutStraight), +/* harmony export */ withoutRedundantPoints: () => (/* binding */ withoutRedundantPoints) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var _LayoutUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LayoutUtil */ 8610); +/* harmony import */ var _util_Geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/Geometry */ 3242); + + + +var MIN_SEGMENT_LENGTH = 20, + POINT_ORIENTATION_PADDING = 5; +var round = Math.round; +var INTERSECTION_THRESHOLD = 20, + ORIENTATION_THRESHOLD = { + 'h:h': 20, + 'v:v': 20, + 'h:v': -10, + 'v:h': -10 + }; +function needsTurn(orientation, startDirection) { + return !{ + t: /top/, + r: /right/, + b: /bottom/, + l: /left/, + h: /./, + v: /./ + }[startDirection].test(orientation); +} +function canLayoutStraight(direction, targetOrientation) { + return { + t: /top/, + r: /right/, + b: /bottom/, + l: /left/, + h: /left|right/, + v: /top|bottom/ + }[direction].test(targetOrientation); +} +function getSegmentBendpoints(a, b, directions) { + var orientation = (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getOrientation)(b, a, POINT_ORIENTATION_PADDING); + var startDirection = directions.split(':')[0]; + var xmid = round((b.x - a.x) / 2 + a.x), + ymid = round((b.y - a.y) / 2 + a.y); + var segmentEnd, segmentDirections; + var layoutStraight = canLayoutStraight(startDirection, orientation), + layoutHorizontal = /h|r|l/.test(startDirection), + layoutTurn = false; + var turnNextDirections = false; + if (layoutStraight) { + segmentEnd = layoutHorizontal ? { + x: xmid, + y: a.y + } : { + x: a.x, + y: ymid + }; + segmentDirections = layoutHorizontal ? 'h:h' : 'v:v'; + } else { + layoutTurn = needsTurn(orientation, startDirection); + segmentDirections = layoutHorizontal ? 'h:v' : 'v:h'; + if (layoutTurn) { + if (layoutHorizontal) { + turnNextDirections = ymid === a.y; + segmentEnd = { + x: a.x + MIN_SEGMENT_LENGTH * (/l/.test(startDirection) ? -1 : 1), + y: turnNextDirections ? ymid + MIN_SEGMENT_LENGTH : ymid + }; + } else { + turnNextDirections = xmid === a.x; + segmentEnd = { + x: turnNextDirections ? xmid + MIN_SEGMENT_LENGTH : xmid, + y: a.y + MIN_SEGMENT_LENGTH * (/t/.test(startDirection) ? -1 : 1) + }; + } + } else { + segmentEnd = { + x: xmid, + y: ymid + }; + } + } + return { + waypoints: getBendpoints(a, segmentEnd, segmentDirections).concat(segmentEnd), + directions: segmentDirections, + turnNextDirections: turnNextDirections + }; +} +function getStartSegment(a, b, directions) { + return getSegmentBendpoints(a, b, directions); +} +function getEndSegment(a, b, directions) { + var invertedSegment = getSegmentBendpoints(b, a, invertDirections(directions)); + return { + waypoints: invertedSegment.waypoints.slice().reverse(), + directions: invertDirections(invertedSegment.directions), + turnNextDirections: invertedSegment.turnNextDirections + }; +} +function getMidSegment(startSegment, endSegment) { + var startDirection = startSegment.directions.split(':')[1], + endDirection = endSegment.directions.split(':')[0]; + if (startSegment.turnNextDirections) { + startDirection = startDirection == 'h' ? 'v' : 'h'; + } + if (endSegment.turnNextDirections) { + endDirection = endDirection == 'h' ? 'v' : 'h'; + } + var directions = startDirection + ':' + endDirection; + var bendpoints = getBendpoints(startSegment.waypoints[startSegment.waypoints.length - 1], endSegment.waypoints[0], directions); + return { + waypoints: bendpoints, + directions: directions + }; +} +function invertDirections(directions) { + return directions.split(':').reverse().join(':'); +} + +/** + * Handle simple layouts with maximum two bendpoints. + */ +function getSimpleBendpoints(a, b, directions) { + var xmid = round((b.x - a.x) / 2 + a.x), + ymid = round((b.y - a.y) / 2 + a.y); + + // one point, right or left from a + if (directions === 'h:v') { + return [{ + x: b.x, + y: a.y + }]; + } + + // one point, above or below a + if (directions === 'v:h') { + return [{ + x: a.x, + y: b.y + }]; + } + + // vertical segment between a and b + if (directions === 'h:h') { + return [{ + x: xmid, + y: a.y + }, { + x: xmid, + y: b.y + }]; + } + + // horizontal segment between a and b + if (directions === 'v:v') { + return [{ + x: a.x, + y: ymid + }, { + x: b.x, + y: ymid + }]; + } + throw new Error('invalid directions: can only handle varians of [hv]:[hv]'); +} + +/** + * Returns the mid points for a manhattan connection between two points. + * + * @example h:h (horizontal:horizontal) + * + * [a]----[x] + * | + * [x]----[b] + * + * @example h:v (horizontal:vertical) + * + * [a]----[x] + * | + * [b] + * + * @example h:r (horizontal:right) + * + * [a]----[x] + * | + * [b]-[x] + * + * @param {Point} a + * @param {Point} b + * @param {string} directions + * + * @return {Array} + */ +function getBendpoints(a, b, directions) { + directions = directions || 'h:h'; + if (!isValidDirections(directions)) { + throw new Error('unknown directions: <' + directions + '>: ' + 'must be specified as : ' + 'with start/end in { h,v,t,r,b,l }'); + } + + // compute explicit directions, involving trbl dockings + // using a three segmented layouting algorithm + if (isExplicitDirections(directions)) { + var startSegment = getStartSegment(a, b, directions), + endSegment = getEndSegment(a, b, directions), + midSegment = getMidSegment(startSegment, endSegment); + return [].concat(startSegment.waypoints, midSegment.waypoints, endSegment.waypoints); + } + + // handle simple [hv]:[hv] cases that can be easily computed + return getSimpleBendpoints(a, b, directions); +} + +/** + * Create a connection between the two points according + * to the manhattan layout (only horizontal and vertical) edges. + * + * @param {Point} a + * @param {Point} b + * + * @param {string} [directions='h:h'] specifies manhattan directions for each point as {adirection}:{bdirection}. + A directionfor a point is either `h` (horizontal) or `v` (vertical) + * + * @return {Array} + */ +function connectPoints(a, b, directions) { + var points = getBendpoints(a, b, directions); + points.unshift(a); + points.push(b); + return withoutRedundantPoints(points); +} + +/** + * Connect two rectangles using a manhattan layouted connection. + * + * @param {Bounds} source source rectangle + * @param {Bounds} target target rectangle + * @param {Point} [start] source docking + * @param {Point} [end] target docking + * + * @param {Object} [hints] + * @param {string} [hints.preserveDocking=source] preserve docking on selected side + * @param {Array} [hints.preferredLayouts] + * @param {Point|boolean} [hints.connectionStart] whether the start changed + * @param {Point|boolean} [hints.connectionEnd] whether the end changed + * + * @return {Array} connection points + */ +function connectRectangles(source, target, start, end, hints) { + var preferredLayouts = hints && hints.preferredLayouts || []; + var preferredLayout = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.without)(preferredLayouts, 'straight')[0] || 'h:h'; + var threshold = ORIENTATION_THRESHOLD[preferredLayout] || 0; + var orientation = (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getOrientation)(source, target, threshold); + var directions = getDirections(orientation, preferredLayout); + start = start || (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getMid)(source); + end = end || (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getMid)(target); + var directionSplit = directions.split(':'); + + // compute actual docking points for start / end + // this ensures we properly layout only parts of the + // connection that lies in between the two rectangles + var startDocking = getDockingPoint(start, source, directionSplit[0], invertOrientation(orientation)), + endDocking = getDockingPoint(end, target, directionSplit[1], orientation); + return connectPoints(startDocking, endDocking, directions); +} + +/** + * Repair the connection between two rectangles, of which one has been updated. + * + * @param {Bounds} source + * @param {Bounds} target + * @param {Point} [start] + * @param {Point} [end] + * @param {Array} [waypoints] + * @param {Object} [hints] + * @param {Array} [hints.preferredLayouts] list of preferred layouts + * @param {boolean} [hints.connectionStart] + * @param {boolean} [hints.connectionEnd] + * + * @return {Array} repaired waypoints + */ +function repairConnection(source, target, start, end, waypoints, hints) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_1__.isArray)(start)) { + waypoints = start; + hints = end; + start = (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getMid)(source); + end = (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getMid)(target); + } + hints = (0,min_dash__WEBPACK_IMPORTED_MODULE_1__.assign)({ + preferredLayouts: [] + }, hints); + waypoints = waypoints || []; + var preferredLayouts = hints.preferredLayouts, + preferStraight = preferredLayouts.indexOf('straight') !== -1, + repairedWaypoints; + + // just layout non-existing or simple connections + // attempt to render straight lines, if required + + // attempt to layout a straight line + repairedWaypoints = preferStraight && tryLayoutStraight(source, target, start, end, hints); + if (repairedWaypoints) { + return repairedWaypoints; + } + + // try to layout from end + repairedWaypoints = hints.connectionEnd && tryRepairConnectionEnd(target, source, end, waypoints); + if (repairedWaypoints) { + return repairedWaypoints; + } + + // try to layout from start + repairedWaypoints = hints.connectionStart && tryRepairConnectionStart(source, target, start, waypoints); + if (repairedWaypoints) { + return repairedWaypoints; + } + + // or whether nothing seems to have changed + if (!hints.connectionStart && !hints.connectionEnd && waypoints && waypoints.length) { + return waypoints; + } + + // simply reconnect if nothing else worked + return connectRectangles(source, target, start, end, hints); +} +function inRange(a, start, end) { + return a >= start && a <= end; +} +function isInRange(axis, a, b) { + var size = { + x: 'width', + y: 'height' + }; + return inRange(a[axis], b[axis], b[axis] + b[size[axis]]); +} + +/** + * Layout a straight connection + * + * @param {Bounds} source + * @param {Bounds} target + * @param {Point} start + * @param {Point} end + * @param {Object} [hints] + * + * @return {Array|null} waypoints if straight layout worked + */ +function tryLayoutStraight(source, target, start, end, hints) { + var axis = {}, + primaryAxis, + orientation; + orientation = (0,_LayoutUtil__WEBPACK_IMPORTED_MODULE_0__.getOrientation)(source, target); + + // only layout a straight connection if shapes are + // horizontally or vertically aligned + if (!/^(top|bottom|left|right)$/.test(orientation)) { + return null; + } + if (/top|bottom/.test(orientation)) { + primaryAxis = 'x'; + } + if (/left|right/.test(orientation)) { + primaryAxis = 'y'; + } + if (hints.preserveDocking === 'target') { + if (!isInRange(primaryAxis, end, source)) { + return null; + } + axis[primaryAxis] = end[primaryAxis]; + return [{ + x: axis.x !== undefined ? axis.x : start.x, + y: axis.y !== undefined ? axis.y : start.y, + original: { + x: axis.x !== undefined ? axis.x : start.x, + y: axis.y !== undefined ? axis.y : start.y + } + }, { + x: end.x, + y: end.y + }]; + } else { + if (!isInRange(primaryAxis, start, target)) { + return null; + } + axis[primaryAxis] = start[primaryAxis]; + return [{ + x: start.x, + y: start.y + }, { + x: axis.x !== undefined ? axis.x : end.x, + y: axis.y !== undefined ? axis.y : end.y, + original: { + x: axis.x !== undefined ? axis.x : end.x, + y: axis.y !== undefined ? axis.y : end.y + } + }]; + } +} + +/** + * Repair a connection from start. + * + * @param {Bounds} moved + * @param {Bounds} other + * @param {Point} newDocking + * @param {Array} points originalPoints from moved to other + * + * @return {Array|null} the repaired points between the two rectangles + */ +function tryRepairConnectionStart(moved, other, newDocking, points) { + return _tryRepairConnectionSide(moved, other, newDocking, points); +} + +/** + * Repair a connection from end. + * + * @param {Bounds} moved + * @param {Bounds} other + * @param {Point} newDocking + * @param {Array} points originalPoints from moved to other + * + * @return {Array|null} the repaired points between the two rectangles + */ +function tryRepairConnectionEnd(moved, other, newDocking, points) { + var waypoints = points.slice().reverse(); + waypoints = _tryRepairConnectionSide(moved, other, newDocking, waypoints); + return waypoints ? waypoints.reverse() : null; +} + +/** + * Repair a connection from one side that moved. + * + * @param {Bounds} moved + * @param {Bounds} other + * @param {Point} newDocking + * @param {Array} points originalPoints from moved to other + * + * @return {Array} the repaired points between the two rectangles + */ +function _tryRepairConnectionSide(moved, other, newDocking, points) { + function needsRelayout(points) { + if (points.length < 3) { + return true; + } + if (points.length > 4) { + return false; + } + + // relayout if two points overlap + // this is most likely due to + return !!(0,min_dash__WEBPACK_IMPORTED_MODULE_1__.find)(points, function (p, idx) { + var q = points[idx - 1]; + return q && (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointDistance)(p, q) < 3; + }); + } + function repairBendpoint(candidate, oldPeer, newPeer) { + var alignment = (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointsAligned)(oldPeer, candidate); + switch (alignment) { + case 'v': + // repair horizontal alignment + return { + x: newPeer.x, + y: candidate.y + }; + case 'h': + // repair vertical alignment + return { + x: candidate.x, + y: newPeer.y + }; + } + return { + x: candidate.x, + y: candidate.y + }; + } + function removeOverlapping(points, a, b) { + var i; + for (i = points.length - 2; i !== 0; i--) { + // intersects (?) break, remove all bendpoints up to this one and relayout + if ((0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointInRect)(points[i], a, INTERSECTION_THRESHOLD) || (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointInRect)(points[i], b, INTERSECTION_THRESHOLD)) { + // return sliced old connection + return points.slice(i); + } + } + return points; + } + + // (0) only repair what has layoutable bendpoints + + // (1) if only one bendpoint and on shape moved onto other shapes axis + // (horizontally / vertically), relayout + + if (needsRelayout(points)) { + return null; + } + var oldDocking = points[0], + newPoints = points.slice(), + slicedPoints; + + // (2) repair only last line segment and only if it was layouted before + + newPoints[0] = newDocking; + newPoints[1] = repairBendpoint(newPoints[1], oldDocking, newDocking); + + // (3) if shape intersects with any bendpoint after repair, + // remove all segments up to this bendpoint and repair from there + slicedPoints = removeOverlapping(newPoints, moved, other); + if (slicedPoints !== newPoints) { + newPoints = _tryRepairConnectionSide(moved, other, newDocking, slicedPoints); + } + + // (4) do NOT repair if repaired bendpoints are aligned + if (newPoints && (0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointsAligned)(newPoints)) { + return null; + } + return newPoints; +} + +/** + * Returns the manhattan directions connecting two rectangles + * with the given orientation. + * + * Will always return the default layout, if it is specific + * regarding sides already (trbl). + * + * @example + * + * getDirections('top'); // -> 'v:v' + * getDirections('intersect'); // -> 't:t' + * + * getDirections('top-right', 'v:h'); // -> 'v:h' + * getDirections('top-right', 'h:h'); // -> 'h:h' + * + * + * @param {string} orientation + * @param {string} defaultLayout + * + * @return {string} + */ +function getDirections(orientation, defaultLayout) { + // don't override specific trbl directions + if (isExplicitDirections(defaultLayout)) { + return defaultLayout; + } + switch (orientation) { + case 'intersect': + return 't:t'; + case 'top': + case 'bottom': + return 'v:v'; + case 'left': + case 'right': + return 'h:h'; + + // 'top-left' + // 'top-right' + // 'bottom-left' + // 'bottom-right' + default: + return defaultLayout; + } +} +function isValidDirections(directions) { + return directions && /^h|v|t|r|b|l:h|v|t|r|b|l$/.test(directions); +} +function isExplicitDirections(directions) { + return directions && /t|r|b|l/.test(directions); +} +function invertOrientation(orientation) { + return { + 'top': 'bottom', + 'bottom': 'top', + 'left': 'right', + 'right': 'left', + 'top-left': 'bottom-right', + 'bottom-right': 'top-left', + 'top-right': 'bottom-left', + 'bottom-left': 'top-right' + }[orientation]; +} +function getDockingPoint(point, rectangle, dockingDirection, targetOrientation) { + // ensure we end up with a specific docking direction + // based on the targetOrientation, if is being passed + + if (dockingDirection === 'h') { + dockingDirection = /left/.test(targetOrientation) ? 'l' : 'r'; + } + if (dockingDirection === 'v') { + dockingDirection = /top/.test(targetOrientation) ? 't' : 'b'; + } + if (dockingDirection === 't') { + return { + original: point, + x: point.x, + y: rectangle.y + }; + } + if (dockingDirection === 'r') { + return { + original: point, + x: rectangle.x + rectangle.width, + y: point.y + }; + } + if (dockingDirection === 'b') { + return { + original: point, + x: point.x, + y: rectangle.y + rectangle.height + }; + } + if (dockingDirection === 'l') { + return { + original: point, + x: rectangle.x, + y: point.y + }; + } + throw new Error('unexpected dockingDirection: <' + dockingDirection + '>'); +} + +/** + * Return list of waypoints with redundant ones filtered out. + * + * @example + * + * Original points: + * + * [x] ----- [x] ------ [x] + * | + * [x] ----- [x] - [x] + * + * Filtered: + * + * [x] ---------------- [x] + * | + * [x] ----------- [x] + * + * @param {Array} waypoints + * + * @return {Array} + */ +function withoutRedundantPoints(waypoints) { + return waypoints.reduce(function (points, p, idx) { + var previous = points[points.length - 1], + next = waypoints[idx + 1]; + if (!(0,_util_Geometry__WEBPACK_IMPORTED_MODULE_2__.pointsOnLine)(previous, next, p, 0)) { + points.push(p); + } + return points; + }, []); +} + +/***/ }), + +/***/ 83377: +/*!****************************************************!*\ + !*** ./node_modules/diagram-js/lib/model/index.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Base: () => (/* binding */ Base), +/* harmony export */ Connection: () => (/* binding */ Connection), +/* harmony export */ Label: () => (/* binding */ Label), +/* harmony export */ Root: () => (/* binding */ Root), +/* harmony export */ Shape: () => (/* binding */ Shape), +/* harmony export */ create: () => (/* binding */ create) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! inherits */ 98069); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var object_refs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! object-refs */ 16712); +/* harmony import */ var object_refs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(object_refs__WEBPACK_IMPORTED_MODULE_1__); + + + +var parentRefs = new (object_refs__WEBPACK_IMPORTED_MODULE_1___default())({ + name: 'children', + enumerable: true, + collection: true + }, { + name: 'parent' + }), + labelRefs = new (object_refs__WEBPACK_IMPORTED_MODULE_1___default())({ + name: 'labels', + enumerable: true, + collection: true + }, { + name: 'labelTarget' + }), + attacherRefs = new (object_refs__WEBPACK_IMPORTED_MODULE_1___default())({ + name: 'attachers', + collection: true + }, { + name: 'host' + }), + outgoingRefs = new (object_refs__WEBPACK_IMPORTED_MODULE_1___default())({ + name: 'outgoing', + collection: true + }, { + name: 'source' + }), + incomingRefs = new (object_refs__WEBPACK_IMPORTED_MODULE_1___default())({ + name: 'incoming', + collection: true + }, { + name: 'target' + }); + +/** + * @namespace djs.model + */ + +/** + * @memberOf djs.model + */ + +/** + * The basic graphical representation + * + * @class + * + * @abstract + */ +function Base() { + /** + * The object that backs up the shape + * + * @name Base#businessObject + * @type Object + */ + Object.defineProperty(this, 'businessObject', { + writable: true + }); + + /** + * Single label support, will mapped to multi label array + * + * @name Base#label + * @type Object + */ + Object.defineProperty(this, 'label', { + get: function () { + return this.labels[0]; + }, + set: function (newLabel) { + var label = this.label, + labels = this.labels; + if (!newLabel && label) { + labels.remove(label); + } else { + labels.add(newLabel, 0); + } + } + }); + + /** + * The parent shape + * + * @name Base#parent + * @type Shape + */ + parentRefs.bind(this, 'parent'); + + /** + * The list of labels + * + * @name Base#labels + * @type Label + */ + labelRefs.bind(this, 'labels'); + + /** + * The list of outgoing connections + * + * @name Base#outgoing + * @type Array + */ + outgoingRefs.bind(this, 'outgoing'); + + /** + * The list of incoming connections + * + * @name Base#incoming + * @type Array + */ + incomingRefs.bind(this, 'incoming'); +} + +/** + * A graphical object + * + * @class + * @constructor + * + * @extends Base + */ +function Shape() { + Base.call(this); + + /** + * Indicates frame shapes + * + * @name Shape#isFrame + * @type boolean + */ + + /** + * The list of children + * + * @name Shape#children + * @type Array + */ + parentRefs.bind(this, 'children'); + + /** + * @name Shape#host + * @type Shape + */ + attacherRefs.bind(this, 'host'); + + /** + * @name Shape#attachers + * @type Shape + */ + attacherRefs.bind(this, 'attachers'); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(Shape, Base); + +/** + * A root graphical object + * + * @class + * @constructor + * + * @extends Shape + */ +function Root() { + Shape.call(this); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(Root, Shape); + +/** + * A label for an element + * + * @class + * @constructor + * + * @extends Shape + */ +function Label() { + Shape.call(this); + + /** + * The labeled element + * + * @name Label#labelTarget + * @type Base + */ + labelRefs.bind(this, 'labelTarget'); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(Label, Shape); + +/** + * A connection between two elements + * + * @class + * @constructor + * + * @extends Base + */ +function Connection() { + Base.call(this); + + /** + * The element this connection originates from + * + * @name Connection#source + * @type Base + */ + outgoingRefs.bind(this, 'source'); + + /** + * The element this connection points to + * + * @name Connection#target + * @type Base + */ + incomingRefs.bind(this, 'target'); +} +inherits__WEBPACK_IMPORTED_MODULE_0___default()(Connection, Base); +var types = { + connection: Connection, + shape: Shape, + label: Label, + root: Root +}; + +/** + * Creates a new model element of the specified type + * + * @method create + * + * @example + * + * var shape1 = Model.create('shape', { x: 10, y: 10, width: 100, height: 100 }); + * var shape2 = Model.create('shape', { x: 210, y: 210, width: 100, height: 100 }); + * + * var connection = Model.create('connection', { waypoints: [ { x: 110, y: 55 }, {x: 210, y: 55 } ] }); + * + * @param {string} type lower-cased model name + * @param {Object} attrs attributes to initialize the new model instance with + * + * @return {Base} the new model instance + */ +function create(type, attrs) { + var Type = types[type]; + if (!Type) { + throw new Error('unknown type: <' + type + '>'); + } + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(new Type(), attrs); +} + +/***/ }), + +/***/ 32006: +/*!******************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/navigation/keyboard-move/KeyboardMove.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ KeyboardMove) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + +var DEFAULT_CONFIG = { + moveSpeed: 50, + moveSpeedAccelerated: 200 +}; + +/** + * A feature that allows users to move the canvas using the keyboard. + * + * @param {Object} config + * @param {number} [config.moveSpeed=50] + * @param {number} [config.moveSpeedAccelerated=200] + * @param {Keyboard} keyboard + * @param {Canvas} canvas + */ +function KeyboardMove(config, keyboard, canvas) { + var self = this; + this._config = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, DEFAULT_CONFIG, config || {}); + keyboard.addListener(arrowsListener); + function arrowsListener(context) { + var event = context.keyEvent, + config = self._config; + if (!keyboard.isCmd(event)) { + return; + } + if (keyboard.isKey(['ArrowLeft', 'Left', 'ArrowUp', 'Up', 'ArrowDown', 'Down', 'ArrowRight', 'Right'], event)) { + var speed = keyboard.isShift(event) ? config.moveSpeedAccelerated : config.moveSpeed; + var direction; + switch (event.key) { + case 'ArrowLeft': + case 'Left': + direction = 'left'; + break; + case 'ArrowUp': + case 'Up': + direction = 'up'; + break; + case 'ArrowRight': + case 'Right': + direction = 'right'; + break; + case 'ArrowDown': + case 'Down': + direction = 'down'; + break; + } + self.moveCanvas({ + speed: speed, + direction: direction + }); + return true; + } + } + this.moveCanvas = function (opts) { + var dx = 0, + dy = 0, + speed = opts.speed; + var actualSpeed = speed / Math.min(Math.sqrt(canvas.viewbox().scale), 1); + switch (opts.direction) { + case 'left': + // Left + dx = actualSpeed; + break; + case 'up': + // Up + dy = actualSpeed; + break; + case 'right': + // Right + dx = -actualSpeed; + break; + case 'down': + // Down + dy = -actualSpeed; + break; + } + canvas.scroll({ + dx: dx, + dy: dy + }); + }; +} +KeyboardMove.$inject = ['config.keyboardMove', 'keyboard', 'canvas']; + +/***/ }), + +/***/ 9612: +/*!***********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/navigation/keyboard-move/index.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _features_keyboard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../features/keyboard */ 6329); +/* harmony import */ var _KeyboardMove__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./KeyboardMove */ 32006); + + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_features_keyboard__WEBPACK_IMPORTED_MODULE_0__["default"]], + __init__: ['keyboardMove'], + keyboardMove: ['type', _KeyboardMove__WEBPACK_IMPORTED_MODULE_1__["default"]] +}); + +/***/ }), + +/***/ 8089: +/*!*************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/navigation/movecanvas/MoveCanvas.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ MoveCanvas) +/* harmony export */ }); +/* harmony import */ var _util_Cursor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/Cursor */ 89388); +/* harmony import */ var _util_ClickTrap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../util/ClickTrap */ 58767); +/* harmony import */ var _util_PositionUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../util/PositionUtil */ 28929); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _util_Event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Event */ 74716); + + + + + +var THRESHOLD = 15; + +/** + * Move the canvas via mouse. + * + * @param {EventBus} eventBus + * @param {Canvas} canvas + */ +function MoveCanvas(eventBus, canvas) { + var context; + + // listen for move on element mouse down; + // allow others to hook into the event before us though + // (dragging / element moving will do this) + eventBus.on('element.mousedown', 500, function (e) { + return handleStart(e.originalEvent); + }); + function handleMove(event) { + var start = context.start, + button = context.button, + position = (0,_util_Event__WEBPACK_IMPORTED_MODULE_0__.toPoint)(event), + delta = (0,_util_PositionUtil__WEBPACK_IMPORTED_MODULE_1__.delta)(position, start); + if (!context.dragging && length(delta) > THRESHOLD) { + context.dragging = true; + if (button === 0) { + (0,_util_ClickTrap__WEBPACK_IMPORTED_MODULE_2__.install)(eventBus); + } + (0,_util_Cursor__WEBPACK_IMPORTED_MODULE_3__.set)('grab'); + } + if (context.dragging) { + var lastPosition = context.last || context.start; + delta = (0,_util_PositionUtil__WEBPACK_IMPORTED_MODULE_1__.delta)(position, lastPosition); + canvas.scroll({ + dx: delta.x, + dy: delta.y + }); + context.last = position; + } + + // prevent select + event.preventDefault(); + } + function handleEnd(event) { + min_dom__WEBPACK_IMPORTED_MODULE_4__.event.unbind(document, 'mousemove', handleMove); + min_dom__WEBPACK_IMPORTED_MODULE_4__.event.unbind(document, 'mouseup', handleEnd); + context = null; + (0,_util_Cursor__WEBPACK_IMPORTED_MODULE_3__.unset)(); + } + function handleStart(event) { + // event is already handled by '.djs-draggable' + if ((0,min_dom__WEBPACK_IMPORTED_MODULE_4__.closest)(event.target, '.djs-draggable')) { + return; + } + var button = event.button; + + // reject right mouse button or modifier key + if (button >= 2 || event.ctrlKey || event.shiftKey || event.altKey) { + return; + } + context = { + button: button, + start: (0,_util_Event__WEBPACK_IMPORTED_MODULE_0__.toPoint)(event) + }; + min_dom__WEBPACK_IMPORTED_MODULE_4__.event.bind(document, 'mousemove', handleMove); + min_dom__WEBPACK_IMPORTED_MODULE_4__.event.bind(document, 'mouseup', handleEnd); + + // we've handled the event + return true; + } + this.isActive = function () { + return !!context; + }; +} +MoveCanvas.$inject = ['eventBus', 'canvas']; + +// helpers /////// + +function length(point) { + return Math.sqrt(Math.pow(point.x, 2) + Math.pow(point.y, 2)); +} + +/***/ }), + +/***/ 26962: +/*!********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/navigation/movecanvas/index.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _MoveCanvas__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MoveCanvas */ 8089); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['moveCanvas'], + moveCanvas: ['type', _MoveCanvas__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 16342: +/*!***************************************************************!*\ + !*** ./node_modules/diagram-js/lib/navigation/touch/index.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _features_touch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../features/touch */ 85591); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __depends__: [_features_touch__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 42827: +/*!*************************************************************************!*\ + !*** ./node_modules/diagram-js/lib/navigation/zoomscroll/ZoomScroll.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ZoomScroll) +/* harmony export */ }); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dom */ 73599); +/* harmony import */ var _ZoomUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ZoomUtil */ 34538); +/* harmony import */ var _util_Math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../util/Math */ 35964); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + + + +var sign = Math.sign || function (n) { + return n >= 0 ? 1 : -1; +}; +var RANGE = { + min: 0.2, + max: 4 + }, + NUM_STEPS = 10; +var DELTA_THRESHOLD = 0.1; +var DEFAULT_SCALE = 0.75; + +/** + * An implementation of zooming and scrolling within the + * {@link Canvas} via the mouse wheel. + * + * Mouse wheel zooming / scrolling may be disabled using + * the {@link toggle(enabled)} method. + * + * @param {Object} [config] + * @param {boolean} [config.enabled=true] default enabled state + * @param {number} [config.scale=.75] scroll sensivity + * @param {EventBus} eventBus + * @param {Canvas} canvas + */ +function ZoomScroll(config, eventBus, canvas) { + config = config || {}; + this._enabled = false; + this._canvas = canvas; + this._container = canvas._container; + this._handleWheel = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(this._handleWheel, this); + this._totalDelta = 0; + this._scale = config.scale || DEFAULT_SCALE; + var self = this; + eventBus.on('canvas.init', function (e) { + self._init(config.enabled !== false); + }); +} +ZoomScroll.$inject = ['config.zoomScroll', 'eventBus', 'canvas']; +ZoomScroll.prototype.scroll = function scroll(delta) { + this._canvas.scroll(delta); +}; +ZoomScroll.prototype.reset = function reset() { + this._canvas.zoom('fit-viewport'); +}; + +/** + * Zoom depending on delta. + * + * @param {number} delta + * @param {Object} position + */ +ZoomScroll.prototype.zoom = function zoom(delta, position) { + // zoom with half the step size of stepZoom + var stepSize = (0,_ZoomUtil__WEBPACK_IMPORTED_MODULE_1__.getStepSize)(RANGE, NUM_STEPS * 2); + + // add until threshold reached + this._totalDelta += delta; + if (Math.abs(this._totalDelta) > DELTA_THRESHOLD) { + this._zoom(delta, position, stepSize); + + // reset + this._totalDelta = 0; + } +}; +ZoomScroll.prototype._handleWheel = function handleWheel(event) { + // event is already handled by '.djs-scrollable' + if ((0,min_dom__WEBPACK_IMPORTED_MODULE_2__.closest)(event.target, '.djs-scrollable', true)) { + return; + } + var element = this._container; + event.preventDefault(); + + // pinch to zoom is mapped to wheel + ctrlKey = true + // in modern browsers (!) + + var isZoom = event.ctrlKey; + var isHorizontalScroll = event.shiftKey; + var factor = -1 * this._scale, + delta; + if (isZoom) { + factor *= event.deltaMode === 0 ? 0.020 : 0.32; + } else { + factor *= event.deltaMode === 0 ? 1.0 : 16.0; + } + if (isZoom) { + var elementRect = element.getBoundingClientRect(); + var offset = { + x: event.clientX - elementRect.left, + y: event.clientY - elementRect.top + }; + delta = Math.sqrt(Math.pow(event.deltaY, 2) + Math.pow(event.deltaX, 2)) * sign(event.deltaY) * factor; + + // zoom in relative to diagram {x,y} coordinates + this.zoom(delta, offset); + } else { + if (isHorizontalScroll) { + delta = { + dx: factor * event.deltaY, + dy: 0 + }; + } else { + delta = { + dx: factor * event.deltaX, + dy: factor * event.deltaY + }; + } + this.scroll(delta); + } +}; + +/** + * Zoom with fixed step size. + * + * @param {number} delta - Zoom delta (1 for zooming in, -1 for out). + * @param {Object} position + */ +ZoomScroll.prototype.stepZoom = function stepZoom(delta, position) { + var stepSize = (0,_ZoomUtil__WEBPACK_IMPORTED_MODULE_1__.getStepSize)(RANGE, NUM_STEPS); + this._zoom(delta, position, stepSize); +}; + +/** + * Zoom in/out given a step size. + * + * @param {number} delta + * @param {Object} position + * @param {number} stepSize + */ +ZoomScroll.prototype._zoom = function (delta, position, stepSize) { + var canvas = this._canvas; + var direction = delta > 0 ? 1 : -1; + var currentLinearZoomLevel = (0,_util_Math__WEBPACK_IMPORTED_MODULE_3__.log10)(canvas.zoom()); + + // snap to a proximate zoom step + var newLinearZoomLevel = Math.round(currentLinearZoomLevel / stepSize) * stepSize; + + // increase or decrease one zoom step in the given direction + newLinearZoomLevel += stepSize * direction; + + // calculate the absolute logarithmic zoom level based on the linear zoom level + // (e.g. 2 for an absolute x2 zoom) + var newLogZoomLevel = Math.pow(10, newLinearZoomLevel); + canvas.zoom((0,_ZoomUtil__WEBPACK_IMPORTED_MODULE_1__.cap)(RANGE, newLogZoomLevel), position); +}; + +/** + * Toggle the zoom scroll ability via mouse wheel. + * + * @param {boolean} [newEnabled] new enabled state + */ +ZoomScroll.prototype.toggle = function toggle(newEnabled) { + var element = this._container; + var handleWheel = this._handleWheel; + var oldEnabled = this._enabled; + if (typeof newEnabled === 'undefined') { + newEnabled = !oldEnabled; + } + + // only react on actual changes + if (oldEnabled !== newEnabled) { + // add or remove wheel listener based on + // changed enabled state + min_dom__WEBPACK_IMPORTED_MODULE_2__.event[newEnabled ? 'bind' : 'unbind'](element, 'wheel', handleWheel, false); + } + this._enabled = newEnabled; + return newEnabled; +}; +ZoomScroll.prototype._init = function (newEnabled) { + this.toggle(newEnabled); +}; + +/***/ }), + +/***/ 34538: +/*!***********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/navigation/zoomscroll/ZoomUtil.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ cap: () => (/* binding */ cap), +/* harmony export */ getStepSize: () => (/* binding */ getStepSize) +/* harmony export */ }); +/* harmony import */ var _util_Math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../util/Math */ 35964); + + +/** + * Get step size for given range and number of steps. + * + * @param {Object} range + * @param {number} range.min + * @param {number} range.max + */ +function getStepSize(range, steps) { + var minLinearRange = (0,_util_Math__WEBPACK_IMPORTED_MODULE_0__.log10)(range.min), + maxLinearRange = (0,_util_Math__WEBPACK_IMPORTED_MODULE_0__.log10)(range.max); + var absoluteLinearRange = Math.abs(minLinearRange) + Math.abs(maxLinearRange); + return absoluteLinearRange / steps; +} +function cap(range, scale) { + return Math.max(range.min, Math.min(range.max, scale)); +} + +/***/ }), + +/***/ 8901: +/*!********************************************************************!*\ + !*** ./node_modules/diagram-js/lib/navigation/zoomscroll/index.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _ZoomScroll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ZoomScroll */ 42827); + +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + __init__: ['zoomScroll'], + zoomScroll: ['type', _ZoomScroll__WEBPACK_IMPORTED_MODULE_0__["default"]] +}); + +/***/ }), + +/***/ 93999: +/*!********************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/AttachUtil.js ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getNewAttachPoint: () => (/* binding */ getNewAttachPoint), +/* harmony export */ getNewAttachShapeDelta: () => (/* binding */ getNewAttachShapeDelta) +/* harmony export */ }); +/* harmony import */ var _layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../layout/LayoutUtil */ 8610); +/* harmony import */ var _PositionUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PositionUtil */ 28929); + + + +/** + * Calculates the absolute point relative to the new element's position + * + * @param {point} point [absolute] + * @param {bounds} oldBounds + * @param {bounds} newBounds + * + * @return {point} point [absolute] + */ +function getNewAttachPoint(point, oldBounds, newBounds) { + var oldCenter = (0,_PositionUtil__WEBPACK_IMPORTED_MODULE_0__.center)(oldBounds), + newCenter = (0,_PositionUtil__WEBPACK_IMPORTED_MODULE_0__.center)(newBounds), + oldDelta = (0,_PositionUtil__WEBPACK_IMPORTED_MODULE_0__.delta)(point, oldCenter); + var newDelta = { + x: oldDelta.x * (newBounds.width / oldBounds.width), + y: oldDelta.y * (newBounds.height / oldBounds.height) + }; + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.roundPoint)({ + x: newCenter.x + newDelta.x, + y: newCenter.y + newDelta.y + }); +} + +/** + * Calculates the shape's delta relative to a new position + * of a certain element's bounds + * + * @param {djs.model.Shape} point [absolute] + * @param {bounds} oldBounds + * @param {bounds} newBounds + * + * @return {delta} delta + */ +function getNewAttachShapeDelta(shape, oldBounds, newBounds) { + var shapeCenter = (0,_PositionUtil__WEBPACK_IMPORTED_MODULE_0__.center)(shape), + oldCenter = (0,_PositionUtil__WEBPACK_IMPORTED_MODULE_0__.center)(oldBounds), + newCenter = (0,_PositionUtil__WEBPACK_IMPORTED_MODULE_0__.center)(newBounds), + shapeDelta = (0,_PositionUtil__WEBPACK_IMPORTED_MODULE_0__.delta)(shape, shapeCenter), + oldCenterDelta = (0,_PositionUtil__WEBPACK_IMPORTED_MODULE_0__.delta)(shapeCenter, oldCenter), + stickyPositionDelta = getStickyPositionDelta(shapeCenter, oldBounds, newBounds); + if (stickyPositionDelta) { + return stickyPositionDelta; + } + var newCenterDelta = { + x: oldCenterDelta.x * (newBounds.width / oldBounds.width), + y: oldCenterDelta.y * (newBounds.height / oldBounds.height) + }; + var newShapeCenter = { + x: newCenter.x + newCenterDelta.x, + y: newCenter.y + newCenterDelta.y + }; + return (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.roundPoint)({ + x: newShapeCenter.x + shapeDelta.x - shape.x, + y: newShapeCenter.y + shapeDelta.y - shape.y + }); +} +function getStickyPositionDelta(oldShapeCenter, oldBounds, newBounds) { + var oldTRBL = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(oldBounds), + newTRBL = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.asTRBL)(newBounds); + if (isMoved(oldTRBL, newTRBL)) { + return null; + } + var oldOrientation = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getOrientation)(oldBounds, oldShapeCenter), + stickyPositionDelta, + newShapeCenter, + newOrientation; + if (oldOrientation === 'top') { + stickyPositionDelta = { + x: 0, + y: newTRBL.bottom - oldTRBL.bottom + }; + } else if (oldOrientation === 'bottom') { + stickyPositionDelta = { + x: 0, + y: newTRBL.top - oldTRBL.top + }; + } else if (oldOrientation === 'right') { + stickyPositionDelta = { + x: newTRBL.left - oldTRBL.left, + y: 0 + }; + } else if (oldOrientation === 'left') { + stickyPositionDelta = { + x: newTRBL.right - oldTRBL.right, + y: 0 + }; + } else { + // fallback to proportional movement for corner-placed attachments + return null; + } + newShapeCenter = { + x: oldShapeCenter.x + stickyPositionDelta.x, + y: oldShapeCenter.y + stickyPositionDelta.y + }; + newOrientation = (0,_layout_LayoutUtil__WEBPACK_IMPORTED_MODULE_1__.getOrientation)(newBounds, newShapeCenter); + if (newOrientation !== oldOrientation) { + // fallback to proportional movement if orientation would otherwise change + return null; + } + return stickyPositionDelta; +} +function isMoved(oldTRBL, newTRBL) { + return isHorizontallyMoved(oldTRBL, newTRBL) || isVerticallyMoved(oldTRBL, newTRBL); +} +function isHorizontallyMoved(oldTRBL, newTRBL) { + return oldTRBL.right !== newTRBL.right && oldTRBL.left !== newTRBL.left; +} +function isVerticallyMoved(oldTRBL, newTRBL) { + return oldTRBL.top !== newTRBL.top && oldTRBL.bottom !== newTRBL.bottom; +} + +/***/ }), + +/***/ 58767: +/*!*******************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/ClickTrap.js ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ install: () => (/* binding */ install) +/* harmony export */ }); +var TRAP_PRIORITY = 5000; + +/** + * Installs a click trap that prevents a ghost click following a dragging operation. + * + * @return {Function} a function to immediately remove the installed trap. + */ +function install(eventBus, eventName) { + eventName = eventName || 'element.click'; + function trap() { + return false; + } + eventBus.once(eventName, TRAP_PRIORITY, trap); + return function () { + eventBus.off(eventName, trap); + }; +} + +/***/ }), + +/***/ 39233: +/*!*********************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/Collections.js ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ add: () => (/* binding */ add), +/* harmony export */ indexOf: () => (/* binding */ indexOf), +/* harmony export */ remove: () => (/* binding */ remove) +/* harmony export */ }); +/** + * Failsafe remove an element from a collection + * + * @param {Array} [collection] + * @param {Object} [element] + * + * @return {number} the previous index of the element + */ +function remove(collection, element) { + if (!collection || !element) { + return -1; + } + var idx = collection.indexOf(element); + if (idx !== -1) { + collection.splice(idx, 1); + } + return idx; +} + +/** + * Fail save add an element to the given connection, ensuring + * it does not yet exist. + * + * @param {Array} collection + * @param {Object} element + * @param {number} idx + */ +function add(collection, element, idx) { + if (!collection || !element) { + return; + } + if (typeof idx !== 'number') { + idx = -1; + } + var currentIdx = collection.indexOf(element); + if (currentIdx !== -1) { + if (currentIdx === idx) { + // nothing to do, position has not changed + return; + } else { + if (idx !== -1) { + // remove from current position + collection.splice(currentIdx, 1); + } else { + // already exists in collection + return; + } + } + } + if (idx !== -1) { + // insert at specified position + collection.splice(idx, 0, element); + } else { + // push to end + collection.push(element); + } +} + +/** + * Fail save get the index of an element in a collection. + * + * @param {Array} collection + * @param {Object} element + * + * @return {number} the index or -1 if collection or element do + * not exist or the element is not contained. + */ +function indexOf(collection, element) { + if (!collection || !element) { + return -1; + } + return collection.indexOf(element); +} + +/***/ }), + +/***/ 89388: +/*!****************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/Cursor.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ has: () => (/* binding */ has), +/* harmony export */ set: () => (/* binding */ set), +/* harmony export */ unset: () => (/* binding */ unset) +/* harmony export */ }); +/* harmony import */ var min_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dom */ 73599); + +var CURSOR_CLS_PATTERN = /^djs-cursor-.*$/; +function set(mode) { + var classes = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(document.body); + classes.removeMatching(CURSOR_CLS_PATTERN); + if (mode) { + classes.add('djs-cursor-' + mode); + } +} +function unset() { + set(null); +} +function has(mode) { + var classes = (0,min_dom__WEBPACK_IMPORTED_MODULE_0__.classes)(document.body); + return classes.has('djs-cursor-' + mode); +} + +/***/ }), + +/***/ 35723: +/*!******************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/Elements.js ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ add: () => (/* binding */ add), +/* harmony export */ eachElement: () => (/* binding */ eachElement), +/* harmony export */ getBBox: () => (/* binding */ getBBox), +/* harmony export */ getClosure: () => (/* binding */ getClosure), +/* harmony export */ getEnclosedElements: () => (/* binding */ getEnclosedElements), +/* harmony export */ getParents: () => (/* binding */ getParents), +/* harmony export */ getType: () => (/* binding */ getType), +/* harmony export */ isFrameElement: () => (/* binding */ isFrameElement), +/* harmony export */ selfAndAllChildren: () => (/* binding */ selfAndAllChildren), +/* harmony export */ selfAndChildren: () => (/* binding */ selfAndChildren), +/* harmony export */ selfAndDirectChildren: () => (/* binding */ selfAndDirectChildren) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * Get parent elements. + * + * @param {Array} elements + * + * @returns {Array} + */ +function getParents(elements) { + // find elements that are not children of any other elements + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.filter)(elements, function (element) { + return !(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.find)(elements, function (e) { + return e !== element && getParent(element, e); + }); + }); +} +function getParent(element, parent) { + if (!parent) { + return; + } + if (element === parent) { + return parent; + } + if (!element.parent) { + return; + } + return getParent(element.parent, parent); +} + +/** + * Adds an element to a collection and returns true if the + * element was added. + * + * @param {Array} elements + * @param {Object} e + * @param {boolean} unique + */ +function add(elements, e, unique) { + var canAdd = !unique || elements.indexOf(e) === -1; + if (canAdd) { + elements.push(e); + } + return canAdd; +} + +/** + * Iterate over each element in a collection, calling the iterator function `fn` + * with (element, index, recursionDepth). + * + * Recurse into all elements that are returned by `fn`. + * + * @param {Object|Array} elements + * @param {Function} fn iterator function called with (element, index, recursionDepth) + * @param {number} [depth] maximum recursion depth + */ +function eachElement(elements, fn, depth) { + depth = depth || 0; + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(elements)) { + elements = [elements]; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (s, i) { + var filter = fn(s, i, depth); + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(filter) && filter.length) { + eachElement(filter, fn, depth + 1); + } + }); +} + +/** + * Collects self + child elements up to a given depth from a list of elements. + * + * @param {djs.model.Base|Array} elements the elements to select the children from + * @param {boolean} unique whether to return a unique result set (no duplicates) + * @param {number} maxDepth the depth to search through or -1 for infinite + * + * @return {Array} found elements + */ +function selfAndChildren(elements, unique, maxDepth) { + var result = [], + processedChildren = []; + eachElement(elements, function (element, i, depth) { + add(result, element, unique); + var children = element.children; + + // max traversal depth not reached yet + if (maxDepth === -1 || depth < maxDepth) { + // children exist && children not yet processed + if (children && add(processedChildren, children, unique)) { + return children; + } + } + }); + return result; +} + +/** + * Return self + direct children for a number of elements + * + * @param {Array} elements to query + * @param {boolean} allowDuplicates to allow duplicates in the result set + * + * @return {Array} the collected elements + */ +function selfAndDirectChildren(elements, allowDuplicates) { + return selfAndChildren(elements, !allowDuplicates, 1); +} + +/** + * Return self + ALL children for a number of elements + * + * @param {Array} elements to query + * @param {boolean} allowDuplicates to allow duplicates in the result set + * + * @return {Array} the collected elements + */ +function selfAndAllChildren(elements, allowDuplicates) { + return selfAndChildren(elements, !allowDuplicates, -1); +} + +/** + * Gets the the closure for all selected elements, + * their enclosed children and connections. + * + * @param {Array} elements + * @param {boolean} [isTopLevel=true] + * @param {Object} [existingClosure] + * + * @return {Object} newClosure + */ +function getClosure(elements, isTopLevel, closure) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isUndefined)(isTopLevel)) { + isTopLevel = true; + } + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(isTopLevel)) { + closure = isTopLevel; + isTopLevel = true; + } + closure = closure || {}; + var allShapes = copyObject(closure.allShapes), + allConnections = copyObject(closure.allConnections), + enclosedElements = copyObject(closure.enclosedElements), + enclosedConnections = copyObject(closure.enclosedConnections); + var topLevel = copyObject(closure.topLevel, isTopLevel && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.groupBy)(elements, function (e) { + return e.id; + })); + function handleConnection(c) { + if (topLevel[c.source.id] && topLevel[c.target.id]) { + topLevel[c.id] = [c]; + } + + // not enclosed as a child, but maybe logically + // (connecting two moved elements?) + if (allShapes[c.source.id] && allShapes[c.target.id]) { + enclosedConnections[c.id] = enclosedElements[c.id] = c; + } + allConnections[c.id] = c; + } + function handleElement(element) { + enclosedElements[element.id] = element; + if (element.waypoints) { + // remember connection + enclosedConnections[element.id] = allConnections[element.id] = element; + } else { + // remember shape + allShapes[element.id] = element; + + // remember all connections + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(element.incoming, handleConnection); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(element.outgoing, handleConnection); + + // recurse into children + return element.children; + } + } + eachElement(elements, handleElement); + return { + allShapes: allShapes, + allConnections: allConnections, + topLevel: topLevel, + enclosedConnections: enclosedConnections, + enclosedElements: enclosedElements + }; +} + +/** + * Returns the surrounding bbox for all elements in + * the array or the element primitive. + * + * @param {Array|djs.model.Shape} elements + * @param {boolean} stopRecursion + */ +function getBBox(elements, stopRecursion) { + stopRecursion = !!stopRecursion; + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(elements)) { + elements = [elements]; + } + var minX, minY, maxX, maxY; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + // If element is a connection the bbox must be computed first + var bbox = element; + if (element.waypoints && !stopRecursion) { + bbox = getBBox(element.waypoints, true); + } + var x = bbox.x, + y = bbox.y, + height = bbox.height || 0, + width = bbox.width || 0; + if (x < minX || minX === undefined) { + minX = x; + } + if (y < minY || minY === undefined) { + minY = y; + } + if (x + width > maxX || maxX === undefined) { + maxX = x + width; + } + if (y + height > maxY || maxY === undefined) { + maxY = y + height; + } + }); + return { + x: minX, + y: minY, + height: maxY - minY, + width: maxX - minX + }; +} + +/** + * Returns all elements that are enclosed from the bounding box. + * + * * If bbox.(width|height) is not specified the method returns + * all elements with element.x/y > bbox.x/y + * * If only bbox.x or bbox.y is specified, method return all elements with + * e.x > bbox.x or e.y > bbox.y + * + * @param {Array} elements List of Elements to search through + * @param {djs.model.Shape} bbox the enclosing bbox. + * + * @return {Array} enclosed elements + */ +function getEnclosedElements(elements, bbox) { + var filteredElements = {}; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(elements, function (element) { + var e = element; + if (e.waypoints) { + e = getBBox(e); + } + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(bbox.y) && e.x > bbox.x) { + filteredElements[element.id] = element; + } + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(bbox.x) && e.y > bbox.y) { + filteredElements[element.id] = element; + } + if (e.x > bbox.x && e.y > bbox.y) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(bbox.width) && (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(bbox.height) && e.width + e.x < bbox.width + bbox.x && e.height + e.y < bbox.height + bbox.y) { + filteredElements[element.id] = element; + } else if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(bbox.width) || !(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isNumber)(bbox.height)) { + filteredElements[element.id] = element; + } + } + }); + return filteredElements; +} +function getType(element) { + if ('waypoints' in element) { + return 'connection'; + } + if ('x' in element) { + return 'shape'; + } + return 'root'; +} +function isFrameElement(element) { + return !!(element && element.isFrame); +} + +// helpers /////////////////////////////// + +function copyObject(src1, src2) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, src1 || {}, src2 || {}); +} + +/***/ }), + +/***/ 43357: +/*!********************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/EscapeUtil.js ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ escapeCSS: () => (/* reexport default from dynamic */ css_escape__WEBPACK_IMPORTED_MODULE_0___default.a), +/* harmony export */ escapeHTML: () => (/* binding */ escapeHTML) +/* harmony export */ }); +/* harmony import */ var css_escape__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! css.escape */ 96169); +/* harmony import */ var css_escape__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(css_escape__WEBPACK_IMPORTED_MODULE_0__); + +var HTML_ESCAPE_MAP = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + '\'': ''' +}; +function escapeHTML(str) { + str = '' + str; + return str && str.replace(/[&<>"']/g, function (match) { + return HTML_ESCAPE_MAP[match]; + }); +} + +/***/ }), + +/***/ 74716: +/*!***************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/Event.js ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getOriginal: () => (/* binding */ getOriginal), +/* harmony export */ stopPropagation: () => (/* binding */ stopPropagation), +/* harmony export */ toPoint: () => (/* binding */ toPoint) +/* harmony export */ }); +function __stopPropagation(event) { + if (!event || typeof event.stopPropagation !== 'function') { + return; + } + event.stopPropagation(); +} +function getOriginal(event) { + return event.originalEvent || event.srcEvent; +} +function stopPropagation(event, immediate) { + __stopPropagation(event, immediate); + __stopPropagation(getOriginal(event), immediate); +} +function toPoint(event) { + if (event.pointers && event.pointers.length) { + event = event.pointers[0]; + } + if (event.touches && event.touches.length) { + event = event.touches[0]; + } + return event ? { + x: event.clientX, + y: event.clientY + } : null; +} + +/***/ }), + +/***/ 3242: +/*!******************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/Geometry.js ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getMidPoint: () => (/* binding */ getMidPoint), +/* harmony export */ pointDistance: () => (/* binding */ pointDistance), +/* harmony export */ pointInRect: () => (/* binding */ pointInRect), +/* harmony export */ pointsAligned: () => (/* binding */ pointsAligned), +/* harmony export */ pointsAlignedHorizontally: () => (/* binding */ pointsAlignedHorizontally), +/* harmony export */ pointsAlignedVertically: () => (/* binding */ pointsAlignedVertically), +/* harmony export */ pointsOnLine: () => (/* binding */ pointsOnLine) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); + + +/** + * Computes the distance between two points + * + * @param {Point} p + * @param {Point} q + * + * @return {number} distance + */ +function pointDistance(a, b) { + if (!a || !b) { + return -1; + } + return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)); +} + +/** + * Returns true if the point r is on the line between p and q + * + * @param {Point} p + * @param {Point} q + * @param {Point} r + * @param {number} [accuracy=5] accuracy for points on line check (lower is better) + * + * @return {boolean} + */ +function pointsOnLine(p, q, r, accuracy) { + if (typeof accuracy === 'undefined') { + accuracy = 5; + } + if (!p || !q || !r) { + return false; + } + var val = (q.x - p.x) * (r.y - p.y) - (q.y - p.y) * (r.x - p.x), + dist = pointDistance(p, q); + + // @see http://stackoverflow.com/a/907491/412190 + return Math.abs(val / dist) <= accuracy; +} +var ALIGNED_THRESHOLD = 2; + +/** + * Check whether two points are horizontally or vertically aligned. + * + * @param {Array|Point} + * @param {Point} + * + * @return {string|boolean} + */ +function pointsAligned(a, b) { + var points; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(a)) { + points = a; + } else { + points = [a, b]; + } + if (pointsAlignedHorizontally(points)) { + return 'h'; + } + if (pointsAlignedVertically(points)) { + return 'v'; + } + return false; +} +function pointsAlignedHorizontally(a, b) { + var points; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(a)) { + points = a; + } else { + points = [a, b]; + } + var firstPoint = points.slice().shift(); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.every)(points, function (point) { + return Math.abs(firstPoint.y - point.y) <= ALIGNED_THRESHOLD; + }); +} +function pointsAlignedVertically(a, b) { + var points; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isArray)(a)) { + points = a; + } else { + points = [a, b]; + } + var firstPoint = points.slice().shift(); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.every)(points, function (point) { + return Math.abs(firstPoint.x - point.x) <= ALIGNED_THRESHOLD; + }); +} + +/** + * Returns true if the point p is inside the rectangle rect + * + * @param {Point} p + * @param {Rect} rect + * @param {number} tolerance + * + * @return {boolean} + */ +function pointInRect(p, rect, tolerance) { + tolerance = tolerance || 0; + return p.x > rect.x - tolerance && p.y > rect.y - tolerance && p.x < rect.x + rect.width + tolerance && p.y < rect.y + rect.height + tolerance; +} + +/** + * Returns a point in the middle of points p and q + * + * @param {Point} p + * @param {Point} q + * + * @return {Point} middle point + */ +function getMidPoint(p, q) { + return { + x: Math.round(p.x + (q.x - p.x) / 2.0), + y: Math.round(p.y + (q.y - p.y) / 2.0) + }; +} + +/***/ }), + +/***/ 35451: +/*!**********************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/GraphicsUtil.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getChildren: () => (/* binding */ getChildren), +/* harmony export */ getVisual: () => (/* binding */ getVisual) +/* harmony export */ }); +/** + * SVGs for elements are generated by the {@link GraphicsFactory}. + * + * This utility gives quick access to the important semantic + * parts of an element. + */ + +/** + * Returns the visual part of a diagram element + * + * @param {Snap} gfx + * + * @return {Snap} + */ +function getVisual(gfx) { + return gfx.childNodes[0]; +} + +/** + * Returns the children for a given diagram element. + * + * @param {Snap} gfx + * @return {Snap} + */ +function getChildren(gfx) { + return gfx.parentNode.childNodes[1]; +} + +/***/ }), + +/***/ 39902: +/*!*********************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/IdGenerator.js ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ IdGenerator) +/* harmony export */ }); +/** + * Util that provides unique IDs. + * + * @class djs.util.IdGenerator + * @constructor + * @memberOf djs.util + * + * The ids can be customized via a given prefix and contain a random value to avoid collisions. + * + * @param {string} prefix a prefix to prepend to generated ids (for better readability) + */ +function IdGenerator(prefix) { + this._counter = 0; + this._prefix = (prefix ? prefix + '-' : '') + Math.floor(Math.random() * 1000000000) + '-'; +} + +/** + * Returns a next unique ID. + * + * @method djs.util.IdGenerator#next + * + * @returns {string} the id + */ +IdGenerator.prototype.next = function () { + return this._prefix + ++this._counter; +}; + +/***/ }), + +/***/ 91373: +/*!**************************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/LineIntersection.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getApproxIntersection: () => (/* binding */ getApproxIntersection) +/* harmony export */ }); +/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Geometry */ 3242); +/* harmony import */ var path_intersection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path-intersection */ 67166); +/* harmony import */ var path_intersection__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path_intersection__WEBPACK_IMPORTED_MODULE_0__); + + +var round = Math.round, + max = Math.max; +function circlePath(center, r) { + var x = center.x, + y = center.y; + return [['M', x, y], ['m', 0, -r], ['a', r, r, 0, 1, 1, 0, 2 * r], ['a', r, r, 0, 1, 1, 0, -2 * r], ['z']]; +} +function linePath(points) { + var segments = []; + points.forEach(function (p, idx) { + segments.push([idx === 0 ? 'M' : 'L', p.x, p.y]); + }); + return segments; +} +var INTERSECTION_THRESHOLD = 10; +function getBendpointIntersection(waypoints, reference) { + var i, w; + for (i = 0; w = waypoints[i]; i++) { + if ((0,_Geometry__WEBPACK_IMPORTED_MODULE_1__.pointDistance)(w, reference) <= INTERSECTION_THRESHOLD) { + return { + point: waypoints[i], + bendpoint: true, + index: i + }; + } + } + return null; +} +function getPathIntersection(waypoints, reference) { + var intersections = path_intersection__WEBPACK_IMPORTED_MODULE_0___default()(circlePath(reference, INTERSECTION_THRESHOLD), linePath(waypoints)); + var a = intersections[0], + b = intersections[intersections.length - 1], + idx; + if (!a) { + // no intersection + return null; + } + if (a !== b) { + if (a.segment2 !== b.segment2) { + // we use the bendpoint in between both segments + // as the intersection point + + idx = max(a.segment2, b.segment2) - 1; + return { + point: waypoints[idx], + bendpoint: true, + index: idx + }; + } + return { + point: { + x: round(a.x + b.x) / 2, + y: round(a.y + b.y) / 2 + }, + index: a.segment2 + }; + } + return { + point: { + x: round(a.x), + y: round(a.y) + }, + index: a.segment2 + }; +} + +/** + * Returns the closest point on the connection towards a given reference point. + * + * @param {Array} waypoints + * @param {Point} reference + * + * @return {Object} intersection data (segment, point) + */ +function getApproxIntersection(waypoints, reference) { + return getBendpointIntersection(waypoints, reference) || getPathIntersection(waypoints, reference); +} + +/***/ }), + +/***/ 35964: +/*!**************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/Math.js ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ log10: () => (/* binding */ log10), +/* harmony export */ substract: () => (/* reexport safe */ _PositionUtil__WEBPACK_IMPORTED_MODULE_0__.delta) +/* harmony export */ }); +/* harmony import */ var _PositionUtil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PositionUtil */ 28929); +/** + * Get the logarithm of x with base 10 + * @param {Integer} value + */ +function log10(x) { + return Math.log(x) / Math.log(10); +} + + +/***/ }), + +/***/ 53171: +/*!***************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/Mouse.js ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ hasPrimaryModifier: () => (/* binding */ hasPrimaryModifier), +/* harmony export */ hasSecondaryModifier: () => (/* binding */ hasSecondaryModifier), +/* harmony export */ isAuxiliaryButton: () => (/* binding */ isAuxiliaryButton), +/* harmony export */ isButton: () => (/* binding */ isButton), +/* harmony export */ isMac: () => (/* reexport safe */ _Platform__WEBPACK_IMPORTED_MODULE_0__.isMac), +/* harmony export */ isPrimaryButton: () => (/* binding */ isPrimaryButton), +/* harmony export */ isSecondaryButton: () => (/* binding */ isSecondaryButton) +/* harmony export */ }); +/* harmony import */ var _Event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Event */ 74716); +/* harmony import */ var _Platform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Platform */ 90717); + + + +function isButton(event, button) { + return ((0,_Event__WEBPACK_IMPORTED_MODULE_1__.getOriginal)(event) || event).button === button; +} +function isPrimaryButton(event) { + // button === 0 -> left áka primary mouse button + return isButton(event, 0); +} +function isAuxiliaryButton(event) { + // button === 1 -> auxiliary áka wheel button + return isButton(event, 1); +} +function isSecondaryButton(event) { + // button === 2 -> right áka secondary button + return isButton(event, 2); +} +function hasPrimaryModifier(event) { + var originalEvent = (0,_Event__WEBPACK_IMPORTED_MODULE_1__.getOriginal)(event) || event; + if (!isPrimaryButton(event)) { + return false; + } + + // Use cmd as primary modifier key for mac OS + if ((0,_Platform__WEBPACK_IMPORTED_MODULE_0__.isMac)()) { + return originalEvent.metaKey; + } else { + return originalEvent.ctrlKey; + } +} +function hasSecondaryModifier(event) { + var originalEvent = (0,_Event__WEBPACK_IMPORTED_MODULE_1__.getOriginal)(event) || event; + return isPrimaryButton(event) && originalEvent.shiftKey; +} + +/***/ }), + +/***/ 90717: +/*!******************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/Platform.js ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isMac: () => (/* binding */ isMac) +/* harmony export */ }); +function isMac() { + return /mac/i.test(navigator.platform); +} + +/***/ }), + +/***/ 28929: +/*!**********************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/PositionUtil.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ center: () => (/* binding */ center), +/* harmony export */ delta: () => (/* binding */ delta) +/* harmony export */ }); +function center(bounds) { + return { + x: bounds.x + bounds.width / 2, + y: bounds.y + bounds.height / 2 + }; +} +function delta(a, b) { + return { + x: a.x - b.x, + y: a.y - b.y + }; +} + +/***/ }), + +/***/ 80324: +/*!*****************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/Removal.js ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ saveClear: () => (/* binding */ saveClear) +/* harmony export */ }); +/** + * Remove from the beginning of a collection until it is empty. + * + * This is a null-safe operation that ensures elements + * are being removed from the given collection until the + * collection is empty. + * + * The implementation deals with the fact that a remove operation + * may touch, i.e. remove multiple elements in the collection + * at a time. + * + * @param {Array} [collection] + * @param {Function} removeFn + * + * @return {Array} the cleared collection + */ +function saveClear(collection, removeFn) { + if (typeof removeFn !== 'function') { + throw new Error('removeFn iterator must be a function'); + } + if (!collection) { + return; + } + var e; + while (e = collection[0]) { + removeFn(e); + } + return collection; +} + +/***/ }), + +/***/ 96546: +/*!********************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/RenderUtil.js ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ componentsToPath: () => (/* binding */ componentsToPath), +/* harmony export */ createLine: () => (/* binding */ createLine), +/* harmony export */ toSVGPoints: () => (/* binding */ toSVGPoints), +/* harmony export */ updateLine: () => (/* binding */ updateLine) +/* harmony export */ }); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ 57491); + +function componentsToPath(elements) { + return elements.join(',').replace(/,?([A-z]),?/g, '$1'); +} +function toSVGPoints(points) { + var result = ''; + for (var i = 0, p; p = points[i]; i++) { + result += p.x + ',' + p.y + ' '; + } + return result; +} +function createLine(points, attrs) { + var line = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.create)('polyline'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(line, { + points: toSVGPoints(points) + }); + if (attrs) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(line, attrs); + } + return line; +} +function updateLine(gfx, points) { + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.attr)(gfx, { + points: toSVGPoints(points) + }); + return gfx; +} + +/***/ }), + +/***/ 81384: +/*!**************************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/SvgTransformUtil.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ rotate: () => (/* binding */ rotate), +/* harmony export */ scale: () => (/* binding */ scale), +/* harmony export */ transform: () => (/* binding */ transform), +/* harmony export */ translate: () => (/* binding */ translate) +/* harmony export */ }); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-svg */ 57491); + + +/** + * @param {} element + * @param {number} x + * @param {number} y + * @param {number} angle + * @param {number} amount + */ +function transform(gfx, x, y, angle, amount) { + var translate = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.createTransform)(); + translate.setTranslate(x, y); + var rotate = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.createTransform)(); + rotate.setRotate(angle || 0, 0, 0); + var scale = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.createTransform)(); + scale.setScale(amount || 1, amount || 1); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.transform)(gfx, [translate, rotate, scale]); +} + +/** + * @param {SVGElement} element + * @param {number} x + * @param {number} y + */ +function translate(gfx, x, y) { + var translate = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.createTransform)(); + translate.setTranslate(x, y); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.transform)(gfx, translate); +} + +/** + * @param {SVGElement} element + * @param {number} angle + */ +function rotate(gfx, angle) { + var rotate = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.createTransform)(); + rotate.setRotate(angle, 0, 0); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.transform)(gfx, rotate); +} + +/** + * @param {SVGElement} element + * @param {number} amount + */ +function scale(gfx, amount) { + var scale = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.createTransform)(); + scale.setScale(amount, amount); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_0__.transform)(gfx, scale); +} + +/***/ }), + +/***/ 46209: +/*!**************************************************!*\ + !*** ./node_modules/diagram-js/lib/util/Text.js ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Text) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 47504); +/* harmony import */ var tiny_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-svg */ 57491); + + +var DEFAULT_BOX_PADDING = 0; +var DEFAULT_LABEL_SIZE = { + width: 150, + height: 50 +}; +function parseAlign(align) { + var parts = align.split('-'); + return { + horizontal: parts[0] || 'center', + vertical: parts[1] || 'top' + }; +} +function parsePadding(padding) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(padding)) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({ + top: 0, + left: 0, + right: 0, + bottom: 0 + }, padding); + } else { + return { + top: padding, + left: padding, + right: padding, + bottom: padding + }; + } +} +function getTextBBox(text, fakeText) { + fakeText.textContent = text; + var textBBox; + try { + var bbox, + emptyLine = text === ''; + + // add dummy text, when line is empty to + // determine correct height + fakeText.textContent = emptyLine ? 'dummy' : text; + textBBox = fakeText.getBBox(); + + // take text rendering related horizontal + // padding into account + bbox = { + width: textBBox.width + textBBox.x * 2, + height: textBBox.height + }; + if (emptyLine) { + // correct width + bbox.width = 0; + } + return bbox; + } catch (e) { + return { + width: 0, + height: 0 + }; + } +} + +/** + * Layout the next line and return the layouted element. + * + * Alters the lines passed. + * + * @param {Array} lines + * @return {Object} the line descriptor, an object { width, height, text } + */ +function layoutNext(lines, maxWidth, fakeText) { + var originalLine = lines.shift(), + fitLine = originalLine; + var textBBox; + for (;;) { + textBBox = getTextBBox(fitLine, fakeText); + textBBox.width = fitLine ? textBBox.width : 0; + + // try to fit + if (fitLine === ' ' || fitLine === '' || textBBox.width < Math.round(maxWidth) || fitLine.length < 2) { + return fit(lines, fitLine, originalLine, textBBox); + } + fitLine = shortenLine(fitLine, textBBox.width, maxWidth); + } +} +function fit(lines, fitLine, originalLine, textBBox) { + if (fitLine.length < originalLine.length) { + var remainder = originalLine.slice(fitLine.length).trim(); + lines.unshift(remainder); + } + return { + width: textBBox.width, + height: textBBox.height, + text: fitLine + }; +} +var SOFT_BREAK = '\u00AD'; + +/** + * Shortens a line based on spacing and hyphens. + * Returns the shortened result on success. + * + * @param {string} line + * @param {number} maxLength the maximum characters of the string + * @return {string} the shortened string + */ +function semanticShorten(line, maxLength) { + var parts = line.split(/(\s|-|\u00AD)/g), + part, + shortenedParts = [], + length = 0; + + // try to shorten via break chars + if (parts.length > 1) { + while (part = parts.shift()) { + if (part.length + length < maxLength) { + shortenedParts.push(part); + length += part.length; + } else { + // remove previous part, too if hyphen does not fit anymore + if (part === '-' || part === SOFT_BREAK) { + shortenedParts.pop(); + } + break; + } + } + } + var last = shortenedParts[shortenedParts.length - 1]; + + // translate trailing soft break to actual hyphen + if (last && last === SOFT_BREAK) { + shortenedParts[shortenedParts.length - 1] = '-'; + } + return shortenedParts.join(''); +} +function shortenLine(line, width, maxWidth) { + var length = Math.max(line.length * (maxWidth / width), 1); + + // try to shorten semantically (i.e. based on spaces and hyphens) + var shortenedLine = semanticShorten(line, length); + if (!shortenedLine) { + // force shorten by cutting the long word + shortenedLine = line.slice(0, Math.max(Math.round(length - 1), 1)); + } + return shortenedLine; +} +function getHelperSvg() { + var helperSvg = document.getElementById('helper-svg'); + if (!helperSvg) { + helperSvg = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('svg'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(helperSvg, { + id: 'helper-svg', + width: 0, + height: 0, + style: 'visibility: hidden; position: fixed' + }); + document.body.appendChild(helperSvg); + } + return helperSvg; +} + +/** + * Creates a new label utility + * + * @param {Object} config + * @param {Dimensions} config.size + * @param {number} config.padding + * @param {Object} config.style + * @param {string} config.align + */ +function Text(config) { + this._config = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, { + size: DEFAULT_LABEL_SIZE, + padding: DEFAULT_BOX_PADDING, + style: {}, + align: 'center-top' + }, config || {}); +} + +/** + * Returns the layouted text as an SVG element. + * + * @param {string} text + * @param {Object} options + * + * @return {SVGElement} + */ +Text.prototype.createText = function (text, options) { + return this.layoutText(text, options).element; +}; + +/** + * Returns a labels layouted dimensions. + * + * @param {string} text to layout + * @param {Object} options + * + * @return {Dimensions} + */ +Text.prototype.getDimensions = function (text, options) { + return this.layoutText(text, options).dimensions; +}; + +/** + * Creates and returns a label and its bounding box. + * + * @method Text#createText + * + * @param {string} text the text to render on the label + * @param {Object} options + * @param {string} options.align how to align in the bounding box. + * Any of { 'center-middle', 'center-top' }, + * defaults to 'center-top'. + * @param {string} options.style style to be applied to the text + * @param {boolean} options.fitBox indicates if box will be recalculated to + * fit text + * + * @return {Object} { element, dimensions } + */ +Text.prototype.layoutText = function (text, options) { + var box = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, this._config.size, options.box), + style = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, this._config.style, options.style), + align = parseAlign(options.align || this._config.align), + padding = parsePadding(options.padding !== undefined ? options.padding : this._config.padding), + fitBox = options.fitBox || false; + var lineHeight = getLineHeight(style); + + // we split text by lines and normalize + // {soft break} + {line break} => { line break } + var lines = text.split(/\u00AD?\r?\n/), + layouted = []; + var maxWidth = box.width - padding.left - padding.right; + + // ensure correct rendering by attaching helper text node to invisible SVG + var helperText = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('text'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(helperText, { + x: 0, + y: 0 + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(helperText, style); + var helperSvg = getHelperSvg(); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(helperSvg, helperText); + while (lines.length) { + layouted.push(layoutNext(lines, maxWidth, helperText)); + } + if (align.vertical === 'middle') { + padding.top = padding.bottom = 0; + } + var totalHeight = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(layouted, function (sum, line, idx) { + return sum + (lineHeight || line.height); + }, 0) + padding.top + padding.bottom; + var maxLineWidth = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.reduce)(layouted, function (sum, line, idx) { + return line.width > sum ? line.width : sum; + }, 0); + + // the y position of the next line + var y = padding.top; + if (align.vertical === 'middle') { + y += (box.height - totalHeight) / 2; + } + + // magic number initial offset + y -= (lineHeight || layouted[0].height) / 4; + var textElement = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('text'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(textElement, style); + + // layout each line taking into account that parent + // shape might resize to fit text size + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(layouted, function (line) { + var x; + y += lineHeight || line.height; + switch (align.horizontal) { + case 'left': + x = padding.left; + break; + case 'right': + x = (fitBox ? maxLineWidth : maxWidth) - padding.right - line.width; + break; + default: + // aka center + x = Math.max(((fitBox ? maxLineWidth : maxWidth) - line.width) / 2 + padding.left, 0); + } + var tspan = (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.create)('tspan'); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.attr)(tspan, { + x: x, + y: y + }); + tspan.textContent = line.text; + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.append)(textElement, tspan); + }); + (0,tiny_svg__WEBPACK_IMPORTED_MODULE_1__.remove)(helperText); + var dimensions = { + width: maxLineWidth, + height: totalHeight + }; + return { + dimensions: dimensions, + element: textElement + }; +}; +function getLineHeight(style) { + if ('fontSize' in style && 'lineHeight' in style) { + return style.lineHeight * parseInt(style.fontSize, 10); + } +} + +/***/ }), + +/***/ 47504: +/*!****************!*\ + !*** min-dash ***! + \****************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ assign: () => (/* binding */ assign), +/* harmony export */ bind: () => (/* binding */ bind), +/* harmony export */ debounce: () => (/* binding */ debounce), +/* harmony export */ ensureArray: () => (/* binding */ ensureArray), +/* harmony export */ every: () => (/* binding */ every), +/* harmony export */ filter: () => (/* binding */ filter), +/* harmony export */ find: () => (/* binding */ find), +/* harmony export */ findIndex: () => (/* binding */ findIndex), +/* harmony export */ flatten: () => (/* binding */ flatten), +/* harmony export */ forEach: () => (/* binding */ forEach), +/* harmony export */ get: () => (/* binding */ get), +/* harmony export */ groupBy: () => (/* binding */ groupBy), +/* harmony export */ has: () => (/* binding */ has), +/* harmony export */ isArray: () => (/* binding */ isArray), +/* harmony export */ isDefined: () => (/* binding */ isDefined), +/* harmony export */ isFunction: () => (/* binding */ isFunction), +/* harmony export */ isNil: () => (/* binding */ isNil), +/* harmony export */ isNumber: () => (/* binding */ isNumber), +/* harmony export */ isObject: () => (/* binding */ isObject), +/* harmony export */ isString: () => (/* binding */ isString), +/* harmony export */ isUndefined: () => (/* binding */ isUndefined), +/* harmony export */ keys: () => (/* binding */ keys), +/* harmony export */ map: () => (/* binding */ map), +/* harmony export */ matchPattern: () => (/* binding */ matchPattern), +/* harmony export */ merge: () => (/* binding */ merge), +/* harmony export */ omit: () => (/* binding */ omit), +/* harmony export */ pick: () => (/* binding */ pick), +/* harmony export */ reduce: () => (/* binding */ reduce), +/* harmony export */ set: () => (/* binding */ set), +/* harmony export */ size: () => (/* binding */ size), +/* harmony export */ some: () => (/* binding */ some), +/* harmony export */ sortBy: () => (/* binding */ sortBy), +/* harmony export */ throttle: () => (/* binding */ throttle), +/* harmony export */ unionBy: () => (/* binding */ unionBy), +/* harmony export */ uniqueBy: () => (/* binding */ uniqueBy), +/* harmony export */ values: () => (/* binding */ values), +/* harmony export */ without: () => (/* binding */ without) +/* harmony export */ }); +/** + * Flatten array, one level deep. + * + * @param {Array} arr + * + * @return {Array} + */ +function flatten(arr) { + return Array.prototype.concat.apply([], arr); +} +var nativeToString = Object.prototype.toString; +var nativeHasOwnProperty = Object.prototype.hasOwnProperty; +function isUndefined(obj) { + return obj === undefined; +} +function isDefined(obj) { + return obj !== undefined; +} +function isNil(obj) { + return obj == null; +} +function isArray(obj) { + return nativeToString.call(obj) === '[object Array]'; +} +function isObject(obj) { + return nativeToString.call(obj) === '[object Object]'; +} +function isNumber(obj) { + return nativeToString.call(obj) === '[object Number]'; +} +function isFunction(obj) { + var tag = nativeToString.call(obj); + return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]'; +} +function isString(obj) { + return nativeToString.call(obj) === '[object String]'; +} +/** + * Ensure collection is an array. + * + * @param {Object} obj + */ + +function ensureArray(obj) { + if (isArray(obj)) { + return; + } + throw new Error('must supply array'); +} +/** + * Return true, if target owns a property with the given key. + * + * @param {Object} target + * @param {String} key + * + * @return {Boolean} + */ + +function has(target, key) { + return nativeHasOwnProperty.call(target, key); +} + +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function|Object} matcher + * + * @return {Object} + */ + +function find(collection, matcher) { + matcher = toMatcher(matcher); + var match; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + match = val; + return false; + } + }); + return match; +} +/** + * Find element index in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Object} + */ + +function findIndex(collection, matcher) { + matcher = toMatcher(matcher); + var idx = isArray(collection) ? -1 : undefined; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + idx = key; + return false; + } + }); + return idx; +} +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Array} result + */ + +function filter(collection, matcher) { + var result = []; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + result.push(val); + } + }); + return result; +} +/** + * Iterate over collection; returning something + * (non-undefined) will stop iteration. + * + * @param {Array|Object} collection + * @param {Function} iterator + * + * @return {Object} return result that stopped the iteration + */ + +function forEach(collection, iterator) { + var val, result; + if (isUndefined(collection)) { + return; + } + var convertKey = isArray(collection) ? toNum : identity; + for (var key in collection) { + if (has(collection, key)) { + val = collection[key]; + result = iterator(val, convertKey(key)); + if (result === false) { + return val; + } + } + } +} +/** + * Return collection without element. + * + * @param {Array} arr + * @param {Function} matcher + * + * @return {Array} + */ + +function without(arr, matcher) { + if (isUndefined(arr)) { + return []; + } + ensureArray(arr); + matcher = toMatcher(matcher); + return arr.filter(function (el, idx) { + return !matcher(el, idx); + }); +} +/** + * Reduce collection, returning a single result. + * + * @param {Object|Array} collection + * @param {Function} iterator + * @param {Any} result + * + * @return {Any} result returned from last iterator + */ + +function reduce(collection, iterator, result) { + forEach(collection, function (value, idx) { + result = iterator(result, value, idx); + }); + return result; +} +/** + * Return true if every element in the collection + * matches the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function every(collection, matcher) { + return !!reduce(collection, function (matches, val, key) { + return matches && matcher(val, key); + }, true); +} +/** + * Return true if some elements in the collection + * match the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function some(collection, matcher) { + return !!find(collection, matcher); +} +/** + * Transform a collection into another collection + * by piping each member through the given fn. + * + * @param {Object|Array} collection + * @param {Function} fn + * + * @return {Array} transformed collection + */ + +function map(collection, fn) { + var result = []; + forEach(collection, function (val, key) { + result.push(fn(val, key)); + }); + return result; +} +/** + * Get the collections keys. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function keys(collection) { + return collection && Object.keys(collection) || []; +} +/** + * Shorthand for `keys(o).length`. + * + * @param {Object|Array} collection + * + * @return {Number} + */ + +function size(collection) { + return keys(collection).length; +} +/** + * Get the values in the collection. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function values(collection) { + return map(collection, function (val) { + return val; + }); +} +/** + * Group collection members by attribute. + * + * @param {Object|Array} collection + * @param {Function} extractor + * + * @return {Object} map with { attrValue => [ a, b, c ] } + */ + +function groupBy(collection, extractor) { + var grouped = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + extractor = toExtractor(extractor); + forEach(collection, function (val) { + var discriminator = extractor(val) || '_'; + var group = grouped[discriminator]; + if (!group) { + group = grouped[discriminator] = []; + } + group.push(val); + }); + return grouped; +} +function uniqueBy(extractor) { + extractor = toExtractor(extractor); + var grouped = {}; + for (var _len = arguments.length, collections = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + collections[_key - 1] = arguments[_key]; + } + forEach(collections, function (c) { + return groupBy(c, extractor, grouped); + }); + var result = map(grouped, function (val, key) { + return val[0]; + }); + return result; +} +var unionBy = uniqueBy; +/** + * Sort collection by criteria. + * + * @param {Object|Array} collection + * @param {String|Function} extractor + * + * @return {Array} + */ + +function sortBy(collection, extractor) { + extractor = toExtractor(extractor); + var sorted = []; + forEach(collection, function (value, key) { + var disc = extractor(value, key); + var entry = { + d: disc, + v: value + }; + for (var idx = 0; idx < sorted.length; idx++) { + var d = sorted[idx].d; + if (disc < d) { + sorted.splice(idx, 0, entry); + return; + } + } // not inserted, append (!) + + sorted.push(entry); + }); + return map(sorted, function (e) { + return e.v; + }); +} +/** + * Create an object pattern matcher. + * + * @example + * + * const matcher = matchPattern({ id: 1 }); + * + * let element = find(elements, matcher); + * + * @param {Object} pattern + * + * @return {Function} matcherFn + */ + +function matchPattern(pattern) { + return function (el) { + return every(pattern, function (val, key) { + return el[key] === val; + }); + }; +} +function toExtractor(extractor) { + return isFunction(extractor) ? extractor : function (e) { + return e[extractor]; + }; +} +function toMatcher(matcher) { + return isFunction(matcher) ? matcher : function (e) { + return e === matcher; + }; +} +function identity(arg) { + return arg; +} +function toNum(arg) { + return Number(arg); +} + +/** + * Debounce fn, calling it only once if the given time + * elapsed between calls. + * + * Lodash-style the function exposes methods to `#clear` + * and `#flush` to control internal behavior. + * + * @param {Function} fn + * @param {Number} timeout + * + * @return {Function} debounced function + */ +function debounce(fn, timeout) { + var timer; + var lastArgs; + var lastThis; + var lastNow; + function fire(force) { + var now = Date.now(); + var scheduledDiff = force ? 0 : lastNow + timeout - now; + if (scheduledDiff > 0) { + return schedule(scheduledDiff); + } + fn.apply(lastThis, lastArgs); + clear(); + } + function schedule(timeout) { + timer = setTimeout(fire, timeout); + } + function clear() { + if (timer) { + clearTimeout(timer); + } + timer = lastNow = lastArgs = lastThis = undefined; + } + function flush() { + if (timer) { + fire(true); + } + clear(); + } + function callback() { + lastNow = Date.now(); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + lastArgs = args; + lastThis = this; // ensure an execution is scheduled + + if (!timer) { + schedule(timeout); + } + } + callback.flush = flush; + callback.cancel = clear; + return callback; +} +/** + * Throttle fn, calling at most once + * in the given interval. + * + * @param {Function} fn + * @param {Number} interval + * + * @return {Function} throttled function + */ + +function throttle(fn, interval) { + var throttling = false; + return function () { + if (throttling) { + return; + } + fn.apply(void 0, arguments); + throttling = true; + setTimeout(function () { + throttling = false; + }, interval); + }; +} +/** + * Bind function against target . + * + * @param {Function} fn + * @param {Object} target + * + * @return {Function} bound function + */ + +function bind(fn, target) { + return fn.bind(target); +} +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + return _typeof(obj); +} +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends.apply(this, arguments); +} + +/** + * Convenience wrapper for `Object.assign`. + * + * @param {Object} target + * @param {...Object} others + * + * @return {Object} the target + */ + +function assign(target) { + for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + others[_key - 1] = arguments[_key]; + } + return _extends.apply(void 0, [target].concat(others)); +} +/** + * Sets a nested property of a given object to the specified value. + * + * This mutates the object and returns it. + * + * @param {Object} target The target of the set operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} value The value to set. + */ + +function set(target, path, value) { + var currentTarget = target; + forEach(path, function (key, idx) { + if (typeof key !== 'number' && typeof key !== 'string') { + throw new Error('illegal key type: ' + _typeof(key) + '. Key should be of type number or string.'); + } + if (key === 'constructor') { + throw new Error('illegal key: constructor'); + } + if (key === '__proto__') { + throw new Error('illegal key: __proto__'); + } + var nextKey = path[idx + 1]; + var nextTarget = currentTarget[key]; + if (isDefined(nextKey) && isNil(nextTarget)) { + nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : []; + } + if (isUndefined(nextKey)) { + if (isUndefined(value)) { + delete currentTarget[key]; + } else { + currentTarget[key] = value; + } + } else { + currentTarget = nextTarget; + } + }); + return target; +} +/** + * Gets a nested property of a given object. + * + * @param {Object} target The target of the get operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} [defaultValue] The value to return if no value exists. + */ + +function get(target, path, defaultValue) { + var currentTarget = target; + forEach(path, function (key) { + // accessing nil property yields + if (isNil(currentTarget)) { + currentTarget = undefined; + return false; + } + currentTarget = currentTarget[key]; + }); + return isUndefined(currentTarget) ? defaultValue : currentTarget; +} +/** + * Pick given properties from the target object. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function pick(target, properties) { + var result = {}; + var obj = Object(target); + forEach(properties, function (prop) { + if (prop in obj) { + result[prop] = target[prop]; + } + }); + return result; +} +/** + * Pick all target properties, excluding the given ones. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function omit(target, properties) { + var result = {}; + var obj = Object(target); + forEach(obj, function (prop, key) { + if (properties.indexOf(key) === -1) { + result[key] = prop; + } + }); + return result; +} +/** + * Recursively merge `...sources` into given target. + * + * Does support merging objects; does not support merging arrays. + * + * @param {Object} target + * @param {...Object} sources + * + * @return {Object} the target + */ + +function merge(target) { + for (var _len2 = arguments.length, sources = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + sources[_key2 - 1] = arguments[_key2]; + } + if (!sources.length) { + return target; + } + forEach(sources, function (source) { + // skip non-obj sources, i.e. null + if (!source || !isObject(source)) { + return; + } + forEach(source, function (sourceVal, key) { + if (key === '__proto__') { + return; + } + var targetVal = target[key]; + if (isObject(sourceVal)) { + if (!isObject(targetVal)) { + // override target[key] with object + targetVal = {}; + } + target[key] = merge(targetVal, sourceVal); + } else { + target[key] = sourceVal; + } + }); + }); + return target; +} + + +/***/ }), + +/***/ 12668: +/*!*********************************************!*\ + !*** ./node_modules/didi/dist/index.esm.js ***! + \*********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Injector: () => (/* binding */ Injector), +/* harmony export */ Module: () => (/* binding */ Module), +/* harmony export */ annotate: () => (/* binding */ annotate), +/* harmony export */ parseAnnotations: () => (/* binding */ parseAnnotations) +/* harmony export */ }); +var CLASS_PATTERN = /^class /; +function isClass(fn) { + return CLASS_PATTERN.test(fn.toString()); +} +function isArray(obj) { + return Object.prototype.toString.call(obj) === '[object Array]'; +} +function hasOwnProp(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +function annotate() { + var args = Array.prototype.slice.call(arguments); + if (args.length === 1 && isArray(args[0])) { + args = args[0]; + } + var fn = args.pop(); + fn.$inject = args; + return fn; +} + +// Current limitations: +// - can't put into "function arg" comments +// function /* (no parenthesis like this) */ (){} +// function abc( /* xx (no parenthesis like this) */ a, b) {} +// +// Just put the comment before function or inside: +// /* (((this is fine))) */ function(a, b) {} +// function abc(a) { /* (((this is fine))) */} +// +// - can't reliably auto-annotate constructor; we'll match the +// first constructor(...) pattern found which may be the one +// of a nested class, too. + +var CONSTRUCTOR_ARGS = /constructor\s*[^(]*\(\s*([^)]*)\)/m; +var FN_ARGS = /^(?:async )?(?:function\s*)?[^(]*\(\s*([^)]*)\)/m; +var FN_ARG = /\/\*([^*]*)\*\//m; +function parseAnnotations(fn) { + if (typeof fn !== 'function') { + throw new Error('Cannot annotate "' + fn + '". Expected a function!'); + } + var match = fn.toString().match(isClass(fn) ? CONSTRUCTOR_ARGS : FN_ARGS); + + // may parse class without constructor + if (!match) { + return []; + } + return match[1] && match[1].split(',').map(function (arg) { + match = arg.match(FN_ARG); + return match ? match[1].trim() : arg.trim(); + }) || []; +} +function Module() { + var providers = []; + this.factory = function (name, factory) { + providers.push([name, 'factory', factory]); + return this; + }; + this.value = function (name, value) { + providers.push([name, 'value', value]); + return this; + }; + this.type = function (name, type) { + providers.push([name, 'type', type]); + return this; + }; + this.forEach = function (iterator) { + providers.forEach(iterator); + }; +} +function Injector(modules, parent) { + parent = parent || { + get: function (name, strict) { + currentlyResolving.push(name); + if (strict === false) { + return null; + } else { + throw error('No provider for "' + name + '"!'); + } + } + }; + var currentlyResolving = []; + var providers = this._providers = Object.create(parent._providers || null); + var instances = this._instances = Object.create(null); + var self = instances.injector = this; + var error = function (msg) { + var stack = currentlyResolving.join(' -> '); + currentlyResolving.length = 0; + return new Error(stack ? msg + ' (Resolving: ' + stack + ')' : msg); + }; + + /** + * Return a named service. + * + * @param {String} name + * @param {Boolean} [strict=true] if false, resolve missing services to null + * + * @return {Object} + */ + var get = function (name, strict) { + if (!providers[name] && name.indexOf('.') !== -1) { + var parts = name.split('.'); + var pivot = get(parts.shift()); + while (parts.length) { + pivot = pivot[parts.shift()]; + } + return pivot; + } + if (hasOwnProp(instances, name)) { + return instances[name]; + } + if (hasOwnProp(providers, name)) { + if (currentlyResolving.indexOf(name) !== -1) { + currentlyResolving.push(name); + throw error('Cannot resolve circular dependency!'); + } + currentlyResolving.push(name); + instances[name] = providers[name][0](providers[name][1]); + currentlyResolving.pop(); + return instances[name]; + } + return parent.get(name, strict); + }; + var fnDef = function (fn, locals) { + if (typeof locals === 'undefined') { + locals = {}; + } + if (typeof fn !== 'function') { + if (isArray(fn)) { + fn = annotate(fn.slice()); + } else { + throw new Error('Cannot invoke "' + fn + '". Expected a function!'); + } + } + var inject = fn.$inject || parseAnnotations(fn); + var dependencies = inject.map(function (dep) { + if (hasOwnProp(locals, dep)) { + return locals[dep]; + } else { + return get(dep); + } + }); + return { + fn: fn, + dependencies: dependencies + }; + }; + var instantiate = function (Type) { + var def = fnDef(Type); + var fn = def.fn, + dependencies = def.dependencies; + + // instantiate var args constructor + var Constructor = Function.prototype.bind.apply(fn, [null].concat(dependencies)); + return new Constructor(); + }; + var invoke = function (func, context, locals) { + var def = fnDef(func, locals); + var fn = def.fn, + dependencies = def.dependencies; + return fn.apply(context, dependencies); + }; + var createPrivateInjectorFactory = function (privateChildInjector) { + return annotate(function (key) { + return privateChildInjector.get(key); + }); + }; + var createChild = function (modules, forceNewInstances) { + if (forceNewInstances && forceNewInstances.length) { + var fromParentModule = Object.create(null); + var matchedScopes = Object.create(null); + var privateInjectorsCache = []; + var privateChildInjectors = []; + var privateChildFactories = []; + var provider; + var cacheIdx; + var privateChildInjector; + var privateChildInjectorFactory; + for (var name in providers) { + provider = providers[name]; + if (forceNewInstances.indexOf(name) !== -1) { + if (provider[2] === 'private') { + cacheIdx = privateInjectorsCache.indexOf(provider[3]); + if (cacheIdx === -1) { + privateChildInjector = provider[3].createChild([], forceNewInstances); + privateChildInjectorFactory = createPrivateInjectorFactory(privateChildInjector); + privateInjectorsCache.push(provider[3]); + privateChildInjectors.push(privateChildInjector); + privateChildFactories.push(privateChildInjectorFactory); + fromParentModule[name] = [privateChildInjectorFactory, name, 'private', privateChildInjector]; + } else { + fromParentModule[name] = [privateChildFactories[cacheIdx], name, 'private', privateChildInjectors[cacheIdx]]; + } + } else { + fromParentModule[name] = [provider[2], provider[1]]; + } + matchedScopes[name] = true; + } + if ((provider[2] === 'factory' || provider[2] === 'type') && provider[1].$scope) { + /* jshint -W083 */ + forceNewInstances.forEach(function (scope) { + if (provider[1].$scope.indexOf(scope) !== -1) { + fromParentModule[name] = [provider[2], provider[1]]; + matchedScopes[scope] = true; + } + }); + } + } + forceNewInstances.forEach(function (scope) { + if (!matchedScopes[scope]) { + throw new Error('No provider for "' + scope + '". Cannot use provider from the parent!'); + } + }); + modules.unshift(fromParentModule); + } + return new Injector(modules, self); + }; + var factoryMap = { + factory: invoke, + type: instantiate, + value: function (value) { + return value; + } + }; + modules.forEach(function (module) { + function arrayUnwrap(type, value) { + if (type !== 'value' && isArray(value)) { + value = annotate(value.slice()); + } + return value; + } + + // TODO(vojta): handle wrong inputs (modules) + if (module instanceof Module) { + module.forEach(function (provider) { + var name = provider[0]; + var type = provider[1]; + var value = provider[2]; + providers[name] = [factoryMap[type], arrayUnwrap(type, value), type]; + }); + } else if (typeof module === 'object') { + if (module.__exports__) { + var clonedModule = Object.keys(module).reduce(function (m, key) { + if (key.substring(0, 2) !== '__') { + m[key] = module[key]; + } + return m; + }, Object.create(null)); + var privateInjector = new Injector((module.__modules__ || []).concat([clonedModule]), self); + var getFromPrivateInjector = annotate(function (key) { + return privateInjector.get(key); + }); + module.__exports__.forEach(function (key) { + providers[key] = [getFromPrivateInjector, key, 'private', privateInjector]; + }); + } else { + Object.keys(module).forEach(function (name) { + if (module[name][2] === 'private') { + providers[name] = module[name]; + return; + } + var type = module[name][0]; + var value = module[name][1]; + providers[name] = [factoryMap[type], arrayUnwrap(type, value), type]; + }); + } + } + }); + + // public API + this.get = get; + this.invoke = invoke; + this.instantiate = instantiate; + this.createChild = createChild; +} + + +/***/ }), + +/***/ 13280: +/*!*********************************!*\ + !*** ./node_modules/dot/doT.js ***! + \*********************************/ +/***/ ((module, exports, __webpack_require__) => { + +var __WEBPACK_AMD_DEFINE_RESULT__;// doT.js +// 2011-2014, Laura Doktorova, https://github.com/olado/doT +// Licensed under the MIT license. + +(function () { + "use strict"; + + var doT = { + name: "doT", + version: "1.1.1", + templateSettings: { + evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g, + interpolate: /\{\{=([\s\S]+?)\}\}/g, + encode: /\{\{!([\s\S]+?)\}\}/g, + use: /\{\{#([\s\S]+?)\}\}/g, + useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g, + define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g, + defineParams: /^\s*([\w$]+):([\s\S]+)/, + conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g, + iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g, + varname: "it", + strip: true, + append: true, + selfcontained: false, + doNotSkipEncoded: false + }, + template: undefined, + //fn, compile template + compile: undefined, + //fn, for express + log: true + }, + _globals; + doT.encodeHTMLSource = function (doNotSkipEncoded) { + var encodeHTMLRules = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + "/": "/" + }, + matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g; + return function (code) { + return code ? code.toString().replace(matchHTML, function (m) { + return encodeHTMLRules[m] || m; + }) : ""; + }; + }; + _globals = function () { + return this || (0, eval)("this"); + }(); + + /* istanbul ignore else */ + if ( true && module.exports) { + module.exports = doT; + } else if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return doT; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} + var startend = { + append: { + start: "'+(", + end: ")+'", + startencode: "'+encodeHTML(" + }, + split: { + start: "';out+=(", + end: ");out+='", + startencode: "';out+=encodeHTML(" + } + }, + skip = /$^/; + function resolveDefs(c, block, def) { + return (typeof block === "string" ? block : block.toString()).replace(c.define || skip, function (m, code, assign, value) { + if (code.indexOf("def.") === 0) { + code = code.substring(4); + } + if (!(code in def)) { + if (assign === ":") { + if (c.defineParams) value.replace(c.defineParams, function (m, param, v) { + def[code] = { + arg: param, + text: v + }; + }); + if (!(code in def)) def[code] = value; + } else { + new Function("def", "def['" + code + "']=" + value)(def); + } + } + return ""; + }).replace(c.use || skip, function (m, code) { + if (c.useParams) code = code.replace(c.useParams, function (m, s, d, param) { + if (def[d] && def[d].arg && param) { + var rw = (d + ":" + param).replace(/'|\\/g, "_"); + def.__exp = def.__exp || {}; + def.__exp[rw] = def[d].text.replace(new RegExp("(^|[^\\w$])" + def[d].arg + "([^\\w$])", "g"), "$1" + param + "$2"); + return s + "def.__exp['" + rw + "']"; + } + }); + var v = new Function("def", "return " + code)(def); + return v ? resolveDefs(c, v, def) : v; + }); + } + function unescape(code) { + return code.replace(/\\('|\\)/g, "$1").replace(/[\r\t\n]/g, " "); + } + doT.template = function (tmpl, c, def) { + c = c || doT.templateSettings; + var cse = c.append ? startend.append : startend.split, + needhtmlencode, + sid = 0, + indv, + str = c.use || c.define ? resolveDefs(c, tmpl, def || {}) : tmpl; + str = ("var out='" + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, " ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, "") : str).replace(/'|\\/g, "\\$&").replace(c.interpolate || skip, function (m, code) { + return cse.start + unescape(code) + cse.end; + }).replace(c.encode || skip, function (m, code) { + needhtmlencode = true; + return cse.startencode + unescape(code) + cse.end; + }).replace(c.conditional || skip, function (m, elsecase, code) { + return elsecase ? code ? "';}else if(" + unescape(code) + "){out+='" : "';}else{out+='" : code ? "';if(" + unescape(code) + "){out+='" : "';}out+='"; + }).replace(c.iterate || skip, function (m, iterate, vname, iname) { + if (!iterate) return "';} } out+='"; + sid += 1; + indv = iname || "i" + sid; + iterate = unescape(iterate); + return "';var arr" + sid + "=" + iterate + ";if(arr" + sid + "){var " + vname + "," + indv + "=-1,l" + sid + "=arr" + sid + ".length-1;while(" + indv + " { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 25118); + +/** @type {import('.')} */ +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { + value: 1 + }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} +module.exports = $defineProperty; + +/***/ }), + +/***/ 87832: +/*!****************************************!*\ + !*** ./node_modules/es-errors/eval.js ***! + \****************************************/ +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./eval')} */ +module.exports = EvalError; + +/***/ }), + +/***/ 80204: +/*!*****************************************!*\ + !*** ./node_modules/es-errors/index.js ***! + \*****************************************/ +/***/ ((module) => { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = Error; + +/***/ }), + +/***/ 51649: +/*!*****************************************!*\ + !*** ./node_modules/es-errors/range.js ***! + \*****************************************/ +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./range')} */ +module.exports = RangeError; + +/***/ }), + +/***/ 12433: +/*!***************************************!*\ + !*** ./node_modules/es-errors/ref.js ***! + \***************************************/ +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./ref')} */ +module.exports = ReferenceError; + +/***/ }), + +/***/ 28769: +/*!******************************************!*\ + !*** ./node_modules/es-errors/syntax.js ***! + \******************************************/ +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; + +/***/ }), + +/***/ 70970: +/*!****************************************!*\ + !*** ./node_modules/es-errors/type.js ***! + \****************************************/ +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./type')} */ +module.exports = TypeError; + +/***/ }), + +/***/ 82378: +/*!***************************************!*\ + !*** ./node_modules/es-errors/uri.js ***! + \***************************************/ +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./uri')} */ +module.exports = URIError; + +/***/ }), + +/***/ 30235: +/*!****************************************!*\ + !*** ./node_modules/for-each/index.js ***! + \****************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var isCallable = __webpack_require__(/*! is-callable */ 84107); +var toStr = Object.prototype.toString; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var forEachArray = function forEachArray(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } +}; +var forEachString = function forEachString(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + // no such thing as a sparse string. + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } +}; +var forEachObject = function forEachObject(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } +}; +var forEach = function forEach(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError('iterator must be a function'); + } + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + if (toStr.call(list) === '[object Array]') { + forEachArray(list, iterator, receiver); + } else if (typeof list === 'string') { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } +}; +module.exports = forEach; + +/***/ }), + +/***/ 26040: +/*!******************************************************!*\ + !*** ./node_modules/function-bind/implementation.js ***! + \******************************************************/ +/***/ ((module) => { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; +var concatty = function concatty(a, b) { + var arr = []; + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + return arr; +}; +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply(this, concatty(args, arguments)); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply(that, concatty(args, arguments)); + }; + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + return bound; +}; + +/***/ }), + +/***/ 28244: +/*!*********************************************!*\ + !*** ./node_modules/function-bind/index.js ***! + \*********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var implementation = __webpack_require__(/*! ./implementation */ 26040); +module.exports = Function.prototype.bind || implementation; + +/***/ }), + +/***/ 25118: +/*!*********************************************!*\ + !*** ./node_modules/get-intrinsic/index.js ***! + \*********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var undefined; +var $Error = __webpack_require__(/*! es-errors */ 80204); +var $EvalError = __webpack_require__(/*! es-errors/eval */ 87832); +var $RangeError = __webpack_require__(/*! es-errors/range */ 51649); +var $ReferenceError = __webpack_require__(/*! es-errors/ref */ 12433); +var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ 28769); +var $TypeError = __webpack_require__(/*! es-errors/type */ 70970); +var $URIError = __webpack_require__(/*! es-errors/uri */ 82378); +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD ? function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } +}() : throwTypeError; +var hasSymbols = __webpack_require__(/*! has-symbols */ 17936)(); +var hasProto = __webpack_require__(/*! has-proto */ 50811)(); +var getProto = Object.getPrototypeOf || (hasProto ? function (x) { + return x.__proto__; +} // eslint-disable-line no-proto +: null); +var needsEval = {}; +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, + // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + INTRINSICS[name] = value; + return value; +}; +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; +var bind = __webpack_require__(/*! function-bind */ 28244); +var hasOwn = __webpack_require__(/*! hasown */ 48196); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ((first === '"' || first === "'" || first === '`' || last === '"' || last === "'" || last === '`') && first !== last) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && i + 1 >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + +/***/ }), + +/***/ 56730: +/*!************************************!*\ + !*** ./node_modules/gopd/index.js ***! + \************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 25118); +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} +module.exports = $gOPD; + +/***/ }), + +/***/ 57019: +/*!*****************************************!*\ + !*** ./node_modules/hammerjs/hammer.js ***! + \*****************************************/ +/***/ ((module, exports, __webpack_require__) => { + +var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.7 - 2016-04-22 + * http://hammerjs.github.io/ + * + * Copyright (c) 2016 Jorik Tangelder; + * Licensed under the MIT license */ +(function (window, document, exportName, undefined) { + 'use strict'; + + var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; + var TEST_ELEMENT = document.createElement('div'); + var TYPE_FUNCTION = 'function'; + var round = Math.round; + var abs = Math.abs; + var now = Date.now; + + /** + * set a timeout with a given scope + * @param {Function} fn + * @param {Number} timeout + * @param {Object} context + * @returns {number} + */ + function setTimeoutContext(fn, timeout, context) { + return setTimeout(bindFn(fn, context), timeout); + } + + /** + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} + */ + function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + return false; + } + + /** + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context + */ + function each(obj, iterator, context) { + var i; + if (!obj) { + return; + } + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); + } + } + } + + /** + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. + */ + function deprecate(method, name, message) { + var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n'; + return function () { + var e = new Error('get-stack-trace'); + var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '').replace(/^\s+at\s+/gm, '').replace(/^Object.\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + var log = window.console && (window.console.warn || window.console.log); + if (log) { + log.call(window.console, deprecationMessage, stack); + } + return method.apply(this, arguments); + }; + } + + /** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ + var assign; + if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + var output = Object(target); + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + return output; + }; + } else { + assign = Object.assign; + } + + /** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge=false] + * @returns {Object} dest + */ + var extend = deprecate(function extend(dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + while (i < keys.length) { + if (!merge || merge && dest[keys[i]] === undefined) { + dest[keys[i]] = src[keys[i]]; + } + i++; + } + return dest; + }, 'extend', 'Use `assign`.'); + + /** + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ + var merge = deprecate(function merge(dest, src) { + return extend(dest, src, true); + }, 'merge', 'Use `assign`.'); + + /** + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ + function inherit(child, base, properties) { + var baseP = base.prototype, + childP; + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + if (properties) { + assign(childP, properties); + } + } + + /** + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ + function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; + } + + /** + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ + function boolOrFn(val, args) { + if (typeof val == TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + return val; + } + + /** + * use the val2 when val1 is undefined + * @param {*} val1 + * @param {*} val2 + * @returns {*} + */ + function ifUndefined(val1, val2) { + return val1 === undefined ? val2 : val1; + } + + /** + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + function addEventListeners(target, types, handler) { + each(splitStr(types), function (type) { + target.addEventListener(type, handler, false); + }); + } + + /** + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ + function removeEventListeners(target, types, handler) { + each(splitStr(types), function (type) { + target.removeEventListener(type, handler, false); + }); + } + + /** + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ + function hasParent(node, parent) { + while (node) { + if (node == parent) { + return true; + } + node = node.parentNode; + } + return false; + } + + /** + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found + */ + function inStr(str, find) { + return str.indexOf(find) > -1; + } + + /** + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ + function splitStr(str) { + return str.trim().split(/\s+/g); + } + + /** + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ + function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + while (i < src.length) { + if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) { + return i; + } + i++; + } + return -1; + } + } + + /** + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ + function toArray(obj) { + return Array.prototype.slice.call(obj, 0); + } + + /** + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ + function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + if (inArray(values, val) < 0) { + results.push(src[i]); + } + values[i] = val; + i++; + } + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function sortUniqueArray(a, b) { + return a[key] > b[key]; + }); + } + } + return results; + } + + /** + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed + */ + function prefixed(obj, property) { + var prefix, prop; + var camelProp = property[0].toUpperCase() + property.slice(1); + var i = 0; + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = prefix ? prefix + camelProp : property; + if (prop in obj) { + return prop; + } + i++; + } + return undefined; + } + + /** + * get a unique id + * @returns {number} uniqueId + */ + var _uniqueId = 1; + function uniqueId() { + return _uniqueId++; + } + + /** + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ + function getWindowForElement(element) { + var doc = element.ownerDocument || element; + return doc.defaultView || doc.parentWindow || window; + } + var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; + var SUPPORT_TOUCH = ('ontouchstart' in window); + var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; + var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); + var INPUT_TYPE_TOUCH = 'touch'; + var INPUT_TYPE_PEN = 'pen'; + var INPUT_TYPE_MOUSE = 'mouse'; + var INPUT_TYPE_KINECT = 'kinect'; + var COMPUTE_INTERVAL = 25; + var INPUT_START = 1; + var INPUT_MOVE = 2; + var INPUT_END = 4; + var INPUT_CANCEL = 8; + var DIRECTION_NONE = 1; + var DIRECTION_LEFT = 2; + var DIRECTION_RIGHT = 4; + var DIRECTION_UP = 8; + var DIRECTION_DOWN = 16; + var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; + var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; + var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + var PROPS_XY = ['x', 'y']; + var PROPS_CLIENT_XY = ['clientX', 'clientY']; + + /** + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor + */ + function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; + + // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + this.domHandler = function (ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + this.init(); + } + Input.prototype = { + /** + * should handle the inputEvent data and trigger the callback + * @virtual + */ + handler: function () {}, + /** + * bind the events + */ + init: function () { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }, + /** + * unbind the events + */ + destroy: function () { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + } + }; + + /** + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ + function createInputInstance(manager) { + var Type; + var inputClass = manager.options.inputClass; + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + return new Type(manager, inputHandler); + } + + /** + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ + function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0; + var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0; + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; + if (isFirst) { + manager.session = {}; + } + + // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + input.eventType = eventType; + + // compute scale, rotation etc + computeInputData(manager, input); + + // emit secret event + manager.emit('hammer.input', input); + manager.recognize(input); + manager.session.prevInput = input; + } + + /** + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input + */ + function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; + + // store the first input to calculate the distance and direction + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); + } + + // to compute scale and rotation we need to store the multiple touches + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } + var firstInput = session.firstInput; + var firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); + var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y; + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers; + computeIntervalInputData(session, input); + + // find the correct target + var target = manager.element; + if (hasParent(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + input.target = target; + } + function computeDeltaXY(session, input) { + var center = input.center; + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); + } + + /** + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input + */ + function computeIntervalInputData(session, input) { + var last = session.lastInterval || input, + deltaTime = input.timeStamp - last.timeStamp, + velocity, + velocityX, + velocityY, + direction; + if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = input.deltaX - last.deltaX; + var deltaY = input.deltaY - last.deltaY; + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = abs(v.x) > abs(v.y) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; + } + + /** + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData + */ + function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; + } + + /** + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ + function getCenter(pointers) { + var pointersLength = pointers.length; + + // no need to loop when only one touch + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } + var x = 0, + y = 0, + i = 0; + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; + } + + /** + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ + function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; + } + + /** + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ + function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } + if (abs(x) >= abs(y)) { + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; + } + + /** + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ + function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + return Math.sqrt(x * x + y * y); + } + + /** + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ + function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; + } + + /** + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ + function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); + } + + /** + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ + function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); + } + var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END + }; + var MOUSE_ELEMENT_EVENTS = 'mousedown'; + var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; + + /** + * Mouse events input + * @constructor + * @extends Input + */ + function MouseInput() { + this.evEl = MOUSE_ELEMENT_EVENTS; + this.evWin = MOUSE_WINDOW_EVENTS; + this.pressed = false; // mousedown state + + Input.apply(this, arguments); + } + inherit(MouseInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function MEhandler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; + + // on start we want to have the left mouse button down + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } + + // mouse must be down + if (!this.pressed) { + return; + } + if (eventType & INPUT_END) { + this.pressed = false; + } + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + } + }); + var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL + }; + + // in IE10 the pointer types is defined as an enum + var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 + }; + + var POINTER_ELEMENT_EVENTS = 'pointerdown'; + var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; + + // IE10 has prefixed support, and case-sensitive + if (window.MSPointerEvent && !window.PointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; + } + + /** + * Pointer events input + * @constructor + * @extends Input + */ + function PointerEventInput() { + this.evEl = POINTER_ELEMENT_EVENTS; + this.evWin = POINTER_WINDOW_EVENTS; + Input.apply(this, arguments); + this.store = this.manager.session.pointerEvents = []; + } + inherit(PointerEventInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function PEhandler(ev) { + var store = this.store; + var removePointer = false; + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; + var isTouch = pointerType == INPUT_TYPE_TOUCH; + + // get index of the event in the store + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); + + // start and mouse must be down + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } + + // it not found, so the pointer hasn't been down (so it's probably a hover) + if (storeIndex < 0) { + return; + } + + // update the event in the store + store[storeIndex] = ev; + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + } + }); + var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL + }; + var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; + var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; + + /** + * Touch events input + * @constructor + * @extends Input + */ + function SingleTouchInput() { + this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + this.started = false; + Input.apply(this, arguments); + } + inherit(SingleTouchInput, Input, { + handler: function TEhandler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; + + // should we handle the touch events? + if (type === INPUT_START) { + this.started = true; + } + if (!this.started) { + return; + } + var touches = normalizeSingleTouches.call(this, ev, type); + + // when done, reset the started state + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } + }); + + /** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ + function normalizeSingleTouches(ev, type) { + var all = toArray(ev.touches); + var changed = toArray(ev.changedTouches); + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } + return [all, changed]; + } + var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL + }; + var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; + + /** + * Multi-user touch events input + * @constructor + * @extends Input + */ + function TouchInput() { + this.evTarget = TOUCH_TARGET_EVENTS; + this.targetIds = {}; + Input.apply(this, arguments); + } + inherit(TouchInput, Input, { + handler: function MTEhandler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + if (!touches) { + return; + } + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } + }); + + /** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ + function getTouches(ev, type) { + var allTouches = toArray(ev.touches); + var targetIds = this.targetIds; + + // when there is only one touch, the process can be simplified + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } + var i, + targetTouches, + changedTouches = toArray(ev.changedTouches), + changedTargetTouches = [], + target = this.target; + + // get target touches from touches + targetTouches = allTouches.filter(function (touch) { + return hasParent(touch.target, target); + }); + + // collect touches + if (type === INPUT_START) { + i = 0; + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } + + // filter changed touches to only contain touches that exist in the collected target ids + i = 0; + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } + + // cleanup removed touches + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + i++; + } + if (!changedTargetTouches.length) { + return; + } + return [ + // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches]; + } + + /** + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ + + var DEDUP_TIMEOUT = 2500; + var DEDUP_DISTANCE = 25; + function TouchMouseInput() { + Input.apply(this, arguments); + var handler = bindFn(this.handler, this); + this.touch = new TouchInput(this.manager, handler); + this.mouse = new MouseInput(this.manager, handler); + this.primaryTouch = null; + this.lastTouches = []; + } + inherit(TouchMouseInput, Input, { + /** + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + handler: function TMEhandler(manager, inputEvent, inputData) { + var isTouch = inputData.pointerType == INPUT_TYPE_TOUCH, + isMouse = inputData.pointerType == INPUT_TYPE_MOUSE; + if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { + return; + } + + // when we're in a touch event, record touches to de-dupe synthetic mouse event + if (isTouch) { + recordTouches.call(this, inputEvent, inputData); + } else if (isMouse && isSyntheticEvent.call(this, inputData)) { + return; + } + this.callback(manager, inputEvent, inputData); + }, + /** + * remove the event listeners + */ + destroy: function destroy() { + this.touch.destroy(); + this.mouse.destroy(); + } + }); + function recordTouches(eventType, eventData) { + if (eventType & INPUT_START) { + this.primaryTouch = eventData.changedPointers[0].identifier; + setLastTouch.call(this, eventData); + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + setLastTouch.call(this, eventData); + } + } + function setLastTouch(eventData) { + var touch = eventData.changedPointers[0]; + if (touch.identifier === this.primaryTouch) { + var lastTouch = { + x: touch.clientX, + y: touch.clientY + }; + this.lastTouches.push(lastTouch); + var lts = this.lastTouches; + var removeLastTouch = function () { + var i = lts.indexOf(lastTouch); + if (i > -1) { + lts.splice(i, 1); + } + }; + setTimeout(removeLastTouch, DEDUP_TIMEOUT); + } + } + function isSyntheticEvent(eventData) { + var x = eventData.srcEvent.clientX, + y = eventData.srcEvent.clientY; + for (var i = 0; i < this.lastTouches.length; i++) { + var t = this.lastTouches[i]; + var dx = Math.abs(x - t.x), + dy = Math.abs(y - t.y); + if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { + return true; + } + } + return false; + } + var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); + var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; + + // magical touchAction value + var TOUCH_ACTION_COMPUTE = 'compute'; + var TOUCH_ACTION_AUTO = 'auto'; + var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented + var TOUCH_ACTION_NONE = 'none'; + var TOUCH_ACTION_PAN_X = 'pan-x'; + var TOUCH_ACTION_PAN_Y = 'pan-y'; + var TOUCH_ACTION_MAP = getTouchActionProps(); + + /** + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ + function TouchAction(manager, value) { + this.manager = manager; + this.set(value); + } + TouchAction.prototype = { + /** + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + set: function (value) { + // find out the touch-action by the event handlers + if (value == TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } + if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + this.actions = value.toLowerCase().trim(); + }, + /** + * just re-set the touchAction value + */ + update: function () { + this.set(this.manager.options.touchAction); + }, + /** + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + compute: function () { + var actions = []; + each(this.manager.recognizers, function (recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }, + /** + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + preventDefaults: function (input) { + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; + + // if the touch action did prevented once this session + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; + } + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; + if (hasNone) { + //do not prevent defaults if this is a tap gesture + + var isTapPointer = input.pointers.length === 1; + var isTapMovement = input.distance < 2; + var isTapTouchTime = input.deltaTime < 250; + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } + if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) { + return this.preventSrc(srcEvent); + } + }, + /** + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + preventSrc: function (srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + } + }; + + /** + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} + */ + function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; + } + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + + // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning + if (hasPanX && hasPanY) { + return TOUCH_ACTION_NONE; + } + + // pan-x OR pan-y + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } + + // manipulation + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + return TOUCH_ACTION_AUTO; + } + function getTouchActionProps() { + if (!NATIVE_TOUCH_ACTION) { + return false; + } + var touchMap = {}; + var cssSupports = window.CSS && window.CSS.supports; + ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) { + // If css.supports is not supported but there is native touch-action assume it supports + // all values. This is the case for IE 10 and 11. + touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true; + }); + return touchMap; + } + + /** + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ + var STATE_POSSIBLE = 1; + var STATE_BEGAN = 2; + var STATE_CHANGED = 4; + var STATE_ENDED = 8; + var STATE_RECOGNIZED = STATE_ENDED; + var STATE_CANCELLED = 16; + var STATE_FAILED = 32; + + /** + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ + function Recognizer(options) { + this.options = assign({}, this.defaults, options || {}); + this.id = uniqueId(); + this.manager = null; + + // default is enable true + this.options.enable = ifUndefined(this.options.enable, true); + this.state = STATE_POSSIBLE; + this.simultaneous = {}; + this.requireFail = []; + } + Recognizer.prototype = { + /** + * @virtual + * @type {Object} + */ + defaults: {}, + /** + * set options + * @param {Object} options + * @return {Recognizer} + */ + set: function (options) { + assign(this.options, options); + + // also update the touchAction, in case something changed about the directions/enabled state + this.manager && this.manager.touchAction.update(); + return this; + }, + /** + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + recognizeWith: function (otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + return this; + }, + /** + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRecognizeWith: function (otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }, + /** + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + requireFailure: function (otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + return this; + }, + /** + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRequireFailure: function (otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + if (index > -1) { + this.requireFail.splice(index, 1); + } + return this; + }, + /** + * has require failures boolean + * @returns {boolean} + */ + hasRequireFailures: function () { + return this.requireFail.length > 0; + }, + /** + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + canRecognizeWith: function (otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }, + /** + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + emit: function (input) { + var self = this; + var state = this.state; + function emit(event) { + self.manager.emit(event, input); + } + + // 'panstart' and 'panmove' + if (state < STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + emit(self.options.event); // simple 'eventName' events + + if (input.additionalEvent) { + // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } + + // panend and pancancel + if (state >= STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + }, + /** + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + tryEmit: function (input) { + if (this.canEmit()) { + return this.emit(input); + } + // it's failing anyway + this.state = STATE_FAILED; + }, + /** + * can we emit? + * @returns {boolean} + */ + canEmit: function () { + var i = 0; + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + i++; + } + return true; + }, + /** + * update the recognizer + * @param {Object} inputData + */ + recognize: function (inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = assign({}, inputData); + + // is is enabled and allow recognizing? + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } + + // reset when we've reached the end + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } + this.state = this.process(inputDataClone); + + // the recognizer has recognized a gesture + // so trigger an event + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }, + /** + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {Const} STATE + */ + process: function (inputData) {}, + // jshint ignore:line + + /** + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + getTouchAction: function () {}, + /** + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + reset: function () {} + }; + + /** + * get a usable string, used as event postfix + * @param {Const} state + * @returns {String} state + */ + function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + return ''; + } + + /** + * direction cons to string + * @param {Const} direction + * @returns {String} + */ + function directionStr(direction) { + if (direction == DIRECTION_DOWN) { + return 'down'; + } else if (direction == DIRECTION_UP) { + return 'up'; + } else if (direction == DIRECTION_LEFT) { + return 'left'; + } else if (direction == DIRECTION_RIGHT) { + return 'right'; + } + return ''; + } + + /** + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ + function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + if (manager) { + return manager.get(otherRecognizer); + } + return otherRecognizer; + } + + /** + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ + function AttrRecognizer() { + Recognizer.apply(this, arguments); + } + inherit(AttrRecognizer, Recognizer, { + /** + * @namespace + * @memberof AttrRecognizer + */ + defaults: { + /** + * @type {Number} + * @default 1 + */ + pointers: 1 + }, + /** + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + attrTest: function (input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }, + /** + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + process: function (input) { + var state = this.state; + var eventType = input.eventType; + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); + + // on cancel input and we've recognized before, return STATE_CANCELLED + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + return state | STATE_CHANGED; + } + return STATE_FAILED; + } + }); + + /** + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ + function PanRecognizer() { + AttrRecognizer.apply(this, arguments); + this.pX = null; + this.pY = null; + } + inherit(PanRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PanRecognizer + */ + defaults: { + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, + getTouchAction: function () { + var direction = this.options.direction; + var actions = []; + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + return actions; + }, + directionTest: function (input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; + + // lock to axis? + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x != this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y != this.pY; + distance = Math.abs(input.deltaY); + } + } + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }, + attrTest: function (input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && (this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input)); + }, + emit: function (input) { + this.pX = input.deltaX; + this.pY = input.deltaY; + var direction = directionStr(input.direction); + if (direction) { + input.additionalEvent = this.options.event + direction; + } + this._super.emit.call(this, input); + } + }); + + /** + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ + function PinchRecognizer() { + AttrRecognizer.apply(this, arguments); + } + inherit(PinchRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'pinch', + threshold: 0, + pointers: 2 + }, + getTouchAction: function () { + return [TOUCH_ACTION_NONE]; + }, + attrTest: function (input) { + return this._super.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }, + emit: function (input) { + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + input.additionalEvent = this.options.event + inOut; + } + this._super.emit.call(this, input); + } + }); + + /** + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ + function PressRecognizer() { + Recognizer.apply(this, arguments); + this._timer = null; + this._input = null; + } + inherit(PressRecognizer, Recognizer, { + /** + * @namespace + * @memberof PressRecognizer + */ + defaults: { + event: 'press', + pointers: 1, + time: 251, + // minimal time of the pointer to be pressed + threshold: 9 // a minimal movement is ok, but keep it low + }, + + getTouchAction: function () { + return [TOUCH_ACTION_AUTO]; + }, + process: function (input) { + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; + this._input = input; + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeoutContext(function () { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.time, this); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + return STATE_FAILED; + }, + reset: function () { + clearTimeout(this._timer); + }, + emit: function (input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } + if (input && input.eventType & INPUT_END) { + this.manager.emit(this.options.event + 'up', input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + } + }); + + /** + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ + function RotateRecognizer() { + AttrRecognizer.apply(this, arguments); + } + inherit(RotateRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof RotateRecognizer + */ + defaults: { + event: 'rotate', + threshold: 0, + pointers: 2 + }, + getTouchAction: function () { + return [TOUCH_ACTION_NONE]; + }, + attrTest: function (input) { + return this._super.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + } + }); + + /** + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer + */ + function SwipeRecognizer() { + AttrRecognizer.apply(this, arguments); + } + inherit(SwipeRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof SwipeRecognizer + */ + defaults: { + event: 'swipe', + threshold: 10, + velocity: 0.3, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, + getTouchAction: function () { + return PanRecognizer.prototype.getTouchAction.call(this); + }, + attrTest: function (input) { + var direction = this.options.direction; + var velocity; + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.overallVelocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.overallVelocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.overallVelocityY; + } + return this._super.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers == this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }, + emit: function (input) { + var direction = directionStr(input.offsetDirection); + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + this.manager.emit(this.options.event, input); + } + }); + + /** + * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ + function TapRecognizer() { + Recognizer.apply(this, arguments); + + // previous time and center, + // used for tap counting + this.pTime = false; + this.pCenter = false; + this._timer = null; + this._input = null; + this.count = 0; + } + inherit(TapRecognizer, Recognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, + // max time between the multi-tap taps + time: 250, + // max time of the pointer to be down (like finger on the screen) + threshold: 9, + // a minimal movement is ok, but keep it low + posThreshold: 10 // a multi-tap can be a bit off the initial position + }, + + getTouchAction: function () { + return [TOUCH_ACTION_MANIPULATION]; + }, + process: function (input) { + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; + this.reset(); + if (input.eventType & INPUT_START && this.count === 0) { + return this.failTimeout(); + } + + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (validMovement && validTouchTime && validPointers) { + if (input.eventType != INPUT_END) { + return this.failTimeout(); + } + var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; + this.pTime = input.timeStamp; + this.pCenter = input.center; + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } + this._input = input; + + // if tap count matches we have recognized it, + // else it has began recognizing... + var tapCount = this.count % options.taps; + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeoutContext(function () { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.interval, this); + return STATE_BEGAN; + } + } + } + return STATE_FAILED; + }, + failTimeout: function () { + this._timer = setTimeoutContext(function () { + this.state = STATE_FAILED; + }, this.options.interval, this); + return STATE_FAILED; + }, + reset: function () { + clearTimeout(this._timer); + }, + emit: function () { + if (this.state == STATE_RECOGNIZED) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + } + }); + + /** + * Simple way to create a manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ + function Hammer(element, options) { + options = options || {}; + options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); + return new Manager(element, options); + } + + /** + * @const {string} + */ + Hammer.VERSION = '2.0.7'; + + /** + * default settings + * @namespace + */ + Hammer.defaults = { + /** + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, + /** + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + /** + * @type {Boolean} + * @default true + */ + enable: true, + /** + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + /** + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + /** + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [ + // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, { + enable: false + }], [PinchRecognizer, { + enable: false + }, ['rotate']], [SwipeRecognizer, { + direction: DIRECTION_HORIZONTAL + }], [PanRecognizer, { + direction: DIRECTION_HORIZONTAL + }, ['swipe']], [TapRecognizer], [TapRecognizer, { + event: 'doubletap', + taps: 2 + }, ['tap']], [PressRecognizer]], + /** + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: 'none', + /** + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: 'none', + /** + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: 'none', + /** + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: 'none', + /** + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: 'none', + /** + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: 'rgba(0,0,0,0)' + } + }; + var STOP = 1; + var FORCED_STOP = 2; + + /** + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ + function Manager(element, options) { + this.options = assign({}, Hammer.defaults, options || {}); + this.options.inputTarget = this.options.inputTarget || element; + this.handlers = {}; + this.session = {}; + this.recognizers = []; + this.oldCssProps = {}; + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + toggleCssProps(this, true); + each(this.options.recognizers, function (item) { + var recognizer = this.add(new item[0](item[1])); + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); + } + Manager.prototype = { + /** + * set options + * @param {Object} options + * @returns {Manager} + */ + set: function (options) { + assign(this.options, options); + + // Options that need a little more setup + if (options.touchAction) { + this.touchAction.update(); + } + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + return this; + }, + /** + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + stop: function (force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }, + /** + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + recognize: function (inputData) { + var session = this.session; + if (session.stopped) { + return; + } + + // run the touch-action polyfill + this.touchAction.preventDefaults(inputData); + var recognizer; + var recognizers = this.recognizers; + + // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + var curRecognizer = session.curRecognizer; + + // reset when the last recognizer is recognized + // or when we're in a new session + if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) { + curRecognizer = session.curRecognizer = null; + } + var i = 0; + while (i < recognizers.length) { + recognizer = recognizers[i]; + + // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + if (session.stopped !== FORCED_STOP && ( + // 1 + !curRecognizer || recognizer == curRecognizer || + // 2 + recognizer.canRecognizeWith(curRecognizer))) { + // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } + + // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + curRecognizer = session.curRecognizer = recognizer; + } + i++; + } + }, + /** + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + get: function (recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; + } + var recognizers = this.recognizers; + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event == recognizer) { + return recognizers[i]; + } + } + return null; + }, + /** + * add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + add: function (recognizer) { + if (invokeArrayArg(recognizer, 'add', this)) { + return this; + } + + // remove existing + var existing = this.get(recognizer.options.event); + if (existing) { + this.remove(existing); + } + this.recognizers.push(recognizer); + recognizer.manager = this; + this.touchAction.update(); + return recognizer; + }, + /** + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + remove: function (recognizer) { + if (invokeArrayArg(recognizer, 'remove', this)) { + return this; + } + recognizer = this.get(recognizer); + + // let's make sure this recognizer exists + if (recognizer) { + var recognizers = this.recognizers; + var index = inArray(recognizers, recognizer); + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } + return this; + }, + /** + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + on: function (events, handler) { + if (events === undefined) { + return; + } + if (handler === undefined) { + return; + } + var handlers = this.handlers; + each(splitStr(events), function (event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }, + /** + * unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + off: function (events, handler) { + if (events === undefined) { + return; + } + var handlers = this.handlers; + each(splitStr(events), function (event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }, + /** + * emit event to the listeners + * @param {String} event + * @param {Object} data + */ + emit: function (event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } + + // no handlers, so skip it all + var handlers = this.handlers[event] && this.handlers[event].slice(); + if (!handlers || !handlers.length) { + return; + } + data.type = event; + data.preventDefault = function () { + data.srcEvent.preventDefault(); + }; + var i = 0; + while (i < handlers.length) { + handlers[i](data); + i++; + } + }, + /** + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + destroy: function () { + this.element && toggleCssProps(this, false); + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; + } + }; + + /** + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ + function toggleCssProps(manager, add) { + var element = manager.element; + if (!element.style) { + return; + } + var prop; + each(manager.options.cssProps, function (value, name) { + prop = prefixed(element.style, name); + if (add) { + manager.oldCssProps[prop] = element.style[prop]; + element.style[prop] = value; + } else { + element.style[prop] = manager.oldCssProps[prop] || ''; + } + }); + if (!add) { + manager.oldCssProps = {}; + } + } + + /** + * trigger dom event + * @param {String} event + * @param {Object} data + */ + function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent('Event'); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); + } + assign(Hammer, { + INPUT_START: INPUT_START, + INPUT_MOVE: INPUT_MOVE, + INPUT_END: INPUT_END, + INPUT_CANCEL: INPUT_CANCEL, + STATE_POSSIBLE: STATE_POSSIBLE, + STATE_BEGAN: STATE_BEGAN, + STATE_CHANGED: STATE_CHANGED, + STATE_ENDED: STATE_ENDED, + STATE_RECOGNIZED: STATE_RECOGNIZED, + STATE_CANCELLED: STATE_CANCELLED, + STATE_FAILED: STATE_FAILED, + DIRECTION_NONE: DIRECTION_NONE, + DIRECTION_LEFT: DIRECTION_LEFT, + DIRECTION_RIGHT: DIRECTION_RIGHT, + DIRECTION_UP: DIRECTION_UP, + DIRECTION_DOWN: DIRECTION_DOWN, + DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL: DIRECTION_VERTICAL, + DIRECTION_ALL: DIRECTION_ALL, + Manager: Manager, + Input: Input, + TouchAction: TouchAction, + TouchInput: TouchInput, + MouseInput: MouseInput, + PointerEventInput: PointerEventInput, + TouchMouseInput: TouchMouseInput, + SingleTouchInput: SingleTouchInput, + Recognizer: Recognizer, + AttrRecognizer: AttrRecognizer, + Tap: TapRecognizer, + Pan: PanRecognizer, + Swipe: SwipeRecognizer, + Pinch: PinchRecognizer, + Rotate: RotateRecognizer, + Press: PressRecognizer, + on: addEventListeners, + off: removeEventListeners, + each: each, + merge: merge, + extend: extend, + assign: assign, + inherit: inherit, + bindFn: bindFn, + prefixed: prefixed + }); + + // this prevents errors when Hammer is loaded in the presence of an AMD + // style loader but by script tag, not by the loader. + var freeGlobal = typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}; // jshint ignore:line + freeGlobal.Hammer = Hammer; + if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return Hammer; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +})(window, document, 'Hammer'); + +/***/ }), + +/***/ 85593: +/*!********************************************************!*\ + !*** ./node_modules/has-property-descriptors/index.js ***! + \********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var $defineProperty = __webpack_require__(/*! es-define-property */ 98030); +var hasPropertyDescriptors = function hasPropertyDescriptors() { + return !!$defineProperty; +}; +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!$defineProperty) { + return null; + } + try { + return $defineProperty([], 'length', { + value: 1 + }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; +module.exports = hasPropertyDescriptors; + +/***/ }), + +/***/ 50811: +/*!*****************************************!*\ + !*** ./node_modules/has-proto/index.js ***! + \*****************************************/ +/***/ ((module) => { + +"use strict"; + + +var test = { + foo: {} +}; +var $Object = Object; +module.exports = function hasProto() { + return { + __proto__: test + }.foo === test.foo && !({ + __proto__: null + } instanceof $Object); +}; + +/***/ }), + +/***/ 17936: +/*!*******************************************!*\ + !*** ./node_modules/has-symbols/index.js ***! + \*******************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(/*! ./shams */ 7186); +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { + return false; + } + if (typeof Symbol !== 'function') { + return false; + } + if (typeof origSymbol('foo') !== 'symbol') { + return false; + } + if (typeof Symbol('bar') !== 'symbol') { + return false; + } + return hasSymbolSham(); +}; + +/***/ }), + +/***/ 7186: +/*!*******************************************!*\ + !*** ./node_modules/has-symbols/shams.js ***! + \*******************************************/ +/***/ ((module) => { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { + return false; + } + if (typeof Symbol.iterator === 'symbol') { + return true; + } + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { + return false; + } + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { + return false; + } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { + return false; + } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { + return false; + } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { + return false; + } + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { + return false; + } + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { + return false; + } + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { + return false; + } + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { + return false; + } + } + return true; +}; + +/***/ }), + +/***/ 91279: +/*!***********************************************!*\ + !*** ./node_modules/has-tostringtag/shams.js ***! + \***********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var hasSymbols = __webpack_require__(/*! has-symbols/shams */ 7186); +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; + +/***/ }), + +/***/ 48196: +/*!**************************************!*\ + !*** ./node_modules/hasown/index.js ***! + \**************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = __webpack_require__(/*! function-bind */ 28244); + +/** @type {(o: {}, p: PropertyKey) => p is keyof o} */ +module.exports = bind.call(call, $hasOwn); + +/***/ }), + +/***/ 70678: +/*!********************************************!*\ + !*** ./node_modules/ids/dist/index.esm.js ***! + \********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +function createCommonjsModule(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; +} +var hat_1 = createCommonjsModule(function (module) { + var hat = module.exports = function (bits, base) { + if (!base) base = 16; + if (bits === undefined) bits = 128; + if (bits <= 0) return '0'; + var digits = Math.log(Math.pow(2, bits)) / Math.log(base); + for (var i = 2; digits === Infinity; i *= 2) { + digits = Math.log(Math.pow(2, bits / i)) / Math.log(base) * i; + } + var rem = digits - Math.floor(digits); + var res = ''; + for (var i = 0; i < Math.floor(digits); i++) { + var x = Math.floor(Math.random() * base).toString(base); + res = x + res; + } + if (rem) { + var b = Math.pow(base, rem); + var x = Math.floor(Math.random() * b).toString(base); + res = x + res; + } + var parsed = parseInt(res, base); + if (parsed !== Infinity && parsed >= Math.pow(2, bits)) { + return hat(bits, base); + } else return res; + }; + hat.rack = function (bits, base, expandBy) { + var fn = function (data) { + var iters = 0; + do { + if (iters++ > 10) { + if (expandBy) bits += expandBy;else throw new Error('too many ID collisions, use more bits'); + } + var id = hat(bits, base); + } while (Object.hasOwnProperty.call(hats, id)); + hats[id] = data; + return id; + }; + var hats = fn.hats = {}; + fn.get = function (id) { + return fn.hats[id]; + }; + fn.set = function (id, value) { + fn.hats[id] = value; + return fn; + }; + fn.bits = bits || 128; + fn.base = base || 16; + return fn; + }; +}); + +/** + * Create a new id generator / cache instance. + * + * You may optionally provide a seed that is used internally. + * + * @param {Seed} seed + */ +function Ids(seed) { + if (!(this instanceof Ids)) { + return new Ids(seed); + } + seed = seed || [128, 36, 1]; + this._seed = seed.length ? hat_1.rack(seed[0], seed[1], seed[2]) : seed; +} + +/** + * Generate a next id. + * + * @param {Object} [element] element to bind the id to + * + * @return {String} id + */ +Ids.prototype.next = function (element) { + return this._seed(element || true); +}; + +/** + * Generate a next id with a given prefix. + * + * @param {Object} [element] element to bind the id to + * + * @return {String} id + */ +Ids.prototype.nextPrefixed = function (prefix, element) { + var id; + do { + id = prefix + this.next(true); + } while (this.assigned(id)); + + // claim {prefix}{random} + this.claim(id, element); + + // return + return id; +}; + +/** + * Manually claim an existing id. + * + * @param {String} id + * @param {String} [element] element the id is claimed by + */ +Ids.prototype.claim = function (id, element) { + this._seed.set(id, element || true); +}; + +/** + * Returns true if the given id has already been assigned. + * + * @param {String} id + * @return {Boolean} + */ +Ids.prototype.assigned = function (id) { + return this._seed.get(id) || false; +}; + +/** + * Unclaim an id. + * + * @param {String} id the id to unclaim + */ +Ids.prototype.unclaim = function (id) { + delete this._seed.hats[id]; +}; + +/** + * Clear all claimed ids. + */ +Ids.prototype.clear = function () { + var hats = this._seed.hats, + id; + for (id in hats) { + this.unclaim(id); + } +}; +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Ids); + +/***/ }), + +/***/ 98069: +/*!***************************************************!*\ + !*** ./node_modules/inherits/inherits_browser.js ***! + \***************************************************/ +/***/ ((module) => { + +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; +} + +/***/ }), + +/***/ 64257: +/*!********************************************!*\ + !*** ./node_modules/is-arguments/index.js ***! + \********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 91279)(); +var callBound = __webpack_require__(/*! call-bind/callBound */ 26112); +var $toString = callBound('Object.prototype.toString'); +var isStandardArguments = function isArguments(value) { + if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) { + return false; + } + return $toString(value) === '[object Arguments]'; +}; +var isLegacyArguments = function isArguments(value) { + if (isStandardArguments(value)) { + return true; + } + return value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && $toString(value) !== '[object Array]' && $toString(value.callee) === '[object Function]'; +}; +var supportsStandardArguments = function () { + return isStandardArguments(arguments); +}(); +isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests + +module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; + +/***/ }), + +/***/ 84107: +/*!*******************************************!*\ + !*** ./node_modules/is-callable/index.js ***! + \*******************************************/ +/***/ ((module) => { + +"use strict"; + + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { + throw 42; + }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { + return false; + } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var objectClass = '[object Object]'; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var ddaClass = '[object HTMLAllCollection]'; // IE 11 +var ddaClass2 = '[object HTML document.all class]'; +var ddaClass3 = '[object HTMLCollection]'; // IE 9-10 +var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` + +var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing + +var isDDA = function isDocumentDotAll() { + return false; +}; +if (typeof document === 'object') { + // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly + var all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + /* globals document: false */ + // in IE 6-8, typeof document.all is "object" and it's truthy + if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { + try { + var str = toStr.call(value); + return (str === ddaClass || str === ddaClass2 || str === ddaClass3 // opera 12.16 + || str === objectClass // IE 6-8 + ) && value('') == null; // eslint-disable-line eqeqeq + } catch (e) {/**/} + } + return false; + }; + } +} +module.exports = reflectApply ? function isCallable(value) { + if (isDDA(value)) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== 'function' && typeof value !== 'object') { + return false; + } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { + return false; + } + } + return !isES6ClassFn(value) && tryFunctionObject(value); +} : function isCallable(value) { + if (isDDA(value)) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== 'function' && typeof value !== 'object') { + return false; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) { + return false; + } + return tryFunctionObject(value); +}; + +/***/ }), + +/***/ 12963: +/*!*****************************************************!*\ + !*** ./node_modules/is-generator-function/index.js ***! + \*****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var toStr = Object.prototype.toString; +var fnToStr = Function.prototype.toString; +var isFnRegex = /^\s*(?:function)?\*/; +var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 91279)(); +var getProto = Object.getPrototypeOf; +var getGeneratorFunc = function () { + // eslint-disable-line consistent-return + if (!hasToStringTag) { + return false; + } + try { + return Function('return function*() {}')(); + } catch (e) {} +}; +var GeneratorFunction; +module.exports = function isGeneratorFunction(fn) { + if (typeof fn !== 'function') { + return false; + } + if (isFnRegex.test(fnToStr.call(fn))) { + return true; + } + if (!hasToStringTag) { + var str = toStr.call(fn); + return str === '[object GeneratorFunction]'; + } + if (!getProto) { + return false; + } + if (typeof GeneratorFunction === 'undefined') { + var generatorFunc = getGeneratorFunc(); + GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false; + } + return getProto(fn) === GeneratorFunction; +}; + +/***/ }), + +/***/ 85357: +/*!**********************************************!*\ + !*** ./node_modules/is-typed-array/index.js ***! + \**********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var whichTypedArray = __webpack_require__(/*! which-typed-array */ 93960); +module.exports = function isTypedArray(value) { + return !!whichTypedArray(value); +}; + +/***/ }), + +/***/ 73599: +/*!************************************************!*\ + !*** ./node_modules/min-dom/dist/index.esm.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ assignStyle: () => (/* binding */ assign$1), +/* harmony export */ attr: () => (/* binding */ attr), +/* harmony export */ classes: () => (/* binding */ classes), +/* harmony export */ clear: () => (/* binding */ clear), +/* harmony export */ closest: () => (/* binding */ closest), +/* harmony export */ delegate: () => (/* binding */ delegate), +/* harmony export */ domify: () => (/* binding */ domify), +/* harmony export */ event: () => (/* binding */ componentEvent), +/* harmony export */ matches: () => (/* binding */ matchesSelector), +/* harmony export */ query: () => (/* binding */ query), +/* harmony export */ queryAll: () => (/* binding */ all), +/* harmony export */ remove: () => (/* binding */ remove) +/* harmony export */ }); +/** + * Flatten array, one level deep. + * + * @param {Array} arr + * + * @return {Array} + */ + +var nativeToString = Object.prototype.toString; +var nativeHasOwnProperty = Object.prototype.hasOwnProperty; +function isUndefined(obj) { + return obj === undefined; +} +function isArray(obj) { + return nativeToString.call(obj) === '[object Array]'; +} +/** + * Return true, if target owns a property with the given key. + * + * @param {Object} target + * @param {String} key + * + * @return {Boolean} + */ + +function has(target, key) { + return nativeHasOwnProperty.call(target, key); +} +/** + * Iterate over collection; returning something + * (non-undefined) will stop iteration. + * + * @param {Array|Object} collection + * @param {Function} iterator + * + * @return {Object} return result that stopped the iteration + */ + +function forEach(collection, iterator) { + var val, result; + if (isUndefined(collection)) { + return; + } + var convertKey = isArray(collection) ? toNum : identity; + for (var key in collection) { + if (has(collection, key)) { + val = collection[key]; + result = iterator(val, convertKey(key)); + if (result === false) { + return val; + } + } + } +} +function identity(arg) { + return arg; +} +function toNum(arg) { + return Number(arg); +} + +/** + * Assigns style attributes in a style-src compliant way. + * + * @param {Element} element + * @param {...Object} styleSources + * + * @return {Element} the element + */ +function assign$1(element) { + var target = element.style; + for (var _len = arguments.length, styleSources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + styleSources[_key - 1] = arguments[_key]; + } + forEach(styleSources, function (style) { + if (!style) { + return; + } + forEach(style, function (value, key) { + target[key] = value; + }); + }); + return element; +} + +/** + * Set attribute `name` to `val`, or get attr `name`. + * + * @param {Element} el + * @param {String} name + * @param {String} [val] + * @api public + */ +function attr(el, name, val) { + // get + if (arguments.length == 2) { + return el.getAttribute(name); + } + + // remove + if (val === null) { + return el.removeAttribute(name); + } + + // set + el.setAttribute(name, val); + return el; +} +var indexOf = [].indexOf; +var indexof = function (arr, obj) { + if (indexOf) return arr.indexOf(obj); + for (var i = 0; i < arr.length; ++i) { + if (arr[i] === obj) return i; + } + return -1; +}; + +/** + * Taken from https://github.com/component/classes + * + * Without the component bits. + */ + +/** + * Whitespace regexp. + */ + +var re = /\s+/; + +/** + * toString reference. + */ + +var toString = Object.prototype.toString; + +/** + * Wrap `el` in a `ClassList`. + * + * @param {Element} el + * @return {ClassList} + * @api public + */ + +function classes(el) { + return new ClassList(el); +} + +/** + * Initialize a new ClassList for `el`. + * + * @param {Element} el + * @api private + */ + +function ClassList(el) { + if (!el || !el.nodeType) { + throw new Error('A DOM element reference is required'); + } + this.el = el; + this.list = el.classList; +} + +/** + * Add class `name` if not already present. + * + * @param {String} name + * @return {ClassList} + * @api public + */ + +ClassList.prototype.add = function (name) { + // classList + if (this.list) { + this.list.add(name); + return this; + } + + // fallback + var arr = this.array(); + var i = indexof(arr, name); + if (!~i) arr.push(name); + this.el.className = arr.join(' '); + return this; +}; + +/** + * Remove class `name` when present, or + * pass a regular expression to remove + * any which match. + * + * @param {String|RegExp} name + * @return {ClassList} + * @api public + */ + +ClassList.prototype.remove = function (name) { + if ('[object RegExp]' == toString.call(name)) { + return this.removeMatching(name); + } + + // classList + if (this.list) { + this.list.remove(name); + return this; + } + + // fallback + var arr = this.array(); + var i = indexof(arr, name); + if (~i) arr.splice(i, 1); + this.el.className = arr.join(' '); + return this; +}; + +/** + * Remove all classes matching `re`. + * + * @param {RegExp} re + * @return {ClassList} + * @api private + */ + +ClassList.prototype.removeMatching = function (re) { + var arr = this.array(); + for (var i = 0; i < arr.length; i++) { + if (re.test(arr[i])) { + this.remove(arr[i]); + } + } + return this; +}; + +/** + * Toggle class `name`, can force state via `force`. + * + * For browsers that support classList, but do not support `force` yet, + * the mistake will be detected and corrected. + * + * @param {String} name + * @param {Boolean} force + * @return {ClassList} + * @api public + */ + +ClassList.prototype.toggle = function (name, force) { + // classList + if (this.list) { + if ('undefined' !== typeof force) { + if (force !== this.list.toggle(name, force)) { + this.list.toggle(name); // toggle again to correct + } + } else { + this.list.toggle(name); + } + return this; + } + + // fallback + if ('undefined' !== typeof force) { + if (!force) { + this.remove(name); + } else { + this.add(name); + } + } else { + if (this.has(name)) { + this.remove(name); + } else { + this.add(name); + } + } + return this; +}; + +/** + * Return an array of classes. + * + * @return {Array} + * @api public + */ + +ClassList.prototype.array = function () { + var className = this.el.getAttribute('class') || ''; + var str = className.replace(/^\s+|\s+$/g, ''); + var arr = str.split(re); + if ('' === arr[0]) arr.shift(); + return arr; +}; + +/** + * Check if class `name` is present. + * + * @param {String} name + * @return {ClassList} + * @api public + */ + +ClassList.prototype.has = ClassList.prototype.contains = function (name) { + return this.list ? this.list.contains(name) : !!~indexof(this.array(), name); +}; + +/** + * Remove all children from the given element. + */ +function clear(el) { + var c; + while (el.childNodes.length) { + c = el.childNodes[0]; + el.removeChild(c); + } + return el; +} +var proto = typeof Element !== 'undefined' ? Element.prototype : {}; +var vendor = proto.matches || proto.matchesSelector || proto.webkitMatchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector; +var matchesSelector = match; + +/** + * Match `el` to `selector`. + * + * @param {Element} el + * @param {String} selector + * @return {Boolean} + * @api public + */ + +function match(el, selector) { + if (!el || el.nodeType !== 1) return false; + if (vendor) return vendor.call(el, selector); + var nodes = el.parentNode.querySelectorAll(selector); + for (var i = 0; i < nodes.length; i++) { + if (nodes[i] == el) return true; + } + return false; +} + +/** + * Closest + * + * @param {Element} el + * @param {String} selector + * @param {Boolean} checkYourSelf (optional) + */ +function closest(element, selector, checkYourSelf) { + var currentElem = checkYourSelf ? element : element.parentNode; + while (currentElem && currentElem.nodeType !== document.DOCUMENT_NODE && currentElem.nodeType !== document.DOCUMENT_FRAGMENT_NODE) { + if (matchesSelector(currentElem, selector)) { + return currentElem; + } + currentElem = currentElem.parentNode; + } + return matchesSelector(currentElem, selector) ? currentElem : null; +} +var bind$1 = window.addEventListener ? 'addEventListener' : 'attachEvent', + unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent', + prefix = bind$1 !== 'addEventListener' ? 'on' : ''; + +/** + * Bind `el` event `type` to `fn`. + * + * @param {Element} el + * @param {String} type + * @param {Function} fn + * @param {Boolean} capture + * @return {Function} + * @api public + */ + +var bind_1 = function (el, type, fn, capture) { + el[bind$1](prefix + type, fn, capture || false); + return fn; +}; + +/** + * Unbind `el` event `type`'s callback `fn`. + * + * @param {Element} el + * @param {String} type + * @param {Function} fn + * @param {Boolean} capture + * @return {Function} + * @api public + */ + +var unbind_1 = function (el, type, fn, capture) { + el[unbind](prefix + type, fn, capture || false); + return fn; +}; +var componentEvent = { + bind: bind_1, + unbind: unbind_1 +}; + +/** + * Module dependencies. + */ + +/** + * Delegate event `type` to `selector` + * and invoke `fn(e)`. A callback function + * is returned which may be passed to `.unbind()`. + * + * @param {Element} el + * @param {String} selector + * @param {String} type + * @param {Function} fn + * @param {Boolean} capture + * @return {Function} + * @api public + */ + +// Some events don't bubble, so we want to bind to the capture phase instead +// when delegating. +var forceCaptureEvents = ['focus', 'blur']; +function bind$2(el, selector, type, fn, capture) { + if (forceCaptureEvents.indexOf(type) !== -1) { + capture = true; + } + return componentEvent.bind(el, type, function (e) { + var target = e.target || e.srcElement; + e.delegateTarget = closest(target, selector, true, el); + if (e.delegateTarget) { + fn.call(el, e); + } + }, capture); +} + +/** + * Unbind event `type`'s callback `fn`. + * + * @param {Element} el + * @param {String} type + * @param {Function} fn + * @param {Boolean} capture + * @api public + */ +function unbind$1(el, type, fn, capture) { + if (forceCaptureEvents.indexOf(type) !== -1) { + capture = true; + } + return componentEvent.unbind(el, type, fn, capture); +} +var delegate = { + bind: bind$2, + unbind: unbind$1 +}; + +/** + * Expose `parse`. + */ + +var domify = parse; + +/** + * Tests for browser support. + */ + +var innerHTMLBug = false; +var bugTestDiv; +if (typeof document !== 'undefined') { + bugTestDiv = document.createElement('div'); + // Setup + bugTestDiv.innerHTML = '
a'; + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + innerHTMLBug = !bugTestDiv.getElementsByTagName('link').length; + bugTestDiv = undefined; +} + +/** + * Wrap map from jquery. + */ + +var map$1 = { + legend: [1, '
', '
'], + tr: [2, '', '
'], + col: [2, '', '
'], + // for script/link/style tags to work in IE6-8, you have to wrap + // in a div with a non-whitespace character in front, ha! + _default: innerHTMLBug ? [1, 'X
', '
'] : [0, '', ''] +}; +map$1.td = map$1.th = [3, '', '
']; +map$1.option = map$1.optgroup = [1, '']; +map$1.thead = map$1.tbody = map$1.colgroup = map$1.caption = map$1.tfoot = [1, '', '
']; +map$1.polyline = map$1.ellipse = map$1.polygon = map$1.circle = map$1.text = map$1.line = map$1.path = map$1.rect = map$1.g = [1, '', '']; + +/** + * Parse `html` and return a DOM Node instance, which could be a TextNode, + * HTML DOM Node of some kind (
for example), or a DocumentFragment + * instance, depending on the contents of the `html` string. + * + * @param {String} html - HTML string to "domify" + * @param {Document} doc - The `document` instance to create the Node for + * @return {DOMNode} the TextNode, DOM Node, or DocumentFragment instance + * @api private + */ + +function parse(html, doc) { + if ('string' != typeof html) throw new TypeError('String expected'); + + // default to the global `document` object + if (!doc) doc = document; + + // tag name + var m = /<([\w:]+)/.exec(html); + if (!m) return doc.createTextNode(html); + html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace + + var tag = m[1]; + + // body support + if (tag == 'body') { + var el = doc.createElement('html'); + el.innerHTML = html; + return el.removeChild(el.lastChild); + } + + // wrap map + var wrap = map$1[tag] || map$1._default; + var depth = wrap[0]; + var prefix = wrap[1]; + var suffix = wrap[2]; + var el = doc.createElement('div'); + el.innerHTML = prefix + html + suffix; + while (depth--) el = el.lastChild; + + // one element + if (el.firstChild == el.lastChild) { + return el.removeChild(el.firstChild); + } + + // several elements + var fragment = doc.createDocumentFragment(); + while (el.firstChild) { + fragment.appendChild(el.removeChild(el.firstChild)); + } + return fragment; +} +function query(selector, el) { + el = el || document; + return el.querySelector(selector); +} +function all(selector, el) { + el = el || document; + return el.querySelectorAll(selector); +} +function remove(el) { + el.parentNode && el.parentNode.removeChild(el); +} + + +/***/ }), + +/***/ 54045: +/*!***************************************************!*\ + !*** ./node_modules/moddle-xml/dist/index.esm.js ***! + \***************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Reader: () => (/* binding */ Reader), +/* harmony export */ Writer: () => (/* binding */ Writer) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! min-dash */ 19080); +/* harmony import */ var saxen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! saxen */ 73881); +/* harmony import */ var moddle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! moddle */ 22377); + + + +function hasLowerCaseAlias(pkg) { + return pkg.xml && pkg.xml.tagAlias === 'lowerCase'; +} +var DEFAULT_NS_MAP = { + 'xsi': 'http://www.w3.org/2001/XMLSchema-instance', + 'xml': 'http://www.w3.org/XML/1998/namespace' +}; +var XSI_TYPE = 'xsi:type'; +function serializeFormat(element) { + return element.xml && element.xml.serialize; +} +function serializeAsType(element) { + return serializeFormat(element) === XSI_TYPE; +} +function serializeAsProperty(element) { + return serializeFormat(element) === 'property'; +} +function capitalize(str) { + return str.charAt(0).toUpperCase() + str.slice(1); +} +function aliasToName(aliasNs, pkg) { + if (!hasLowerCaseAlias(pkg)) { + return aliasNs.name; + } + return aliasNs.prefix + ':' + capitalize(aliasNs.localName); +} +function prefixedToName(nameNs, pkg) { + var name = nameNs.name, + localName = nameNs.localName; + var typePrefix = pkg.xml && pkg.xml.typePrefix; + if (typePrefix && localName.indexOf(typePrefix) === 0) { + return nameNs.prefix + ':' + localName.slice(typePrefix.length); + } else { + return name; + } +} +function normalizeXsiTypeName(name, model) { + var nameNs = (0,moddle__WEBPACK_IMPORTED_MODULE_1__.parseNameNS)(name); + var pkg = model.getPackage(nameNs.prefix); + return prefixedToName(nameNs, pkg); +} +function error(message) { + return new Error(message); +} + +/** + * Get the moddle descriptor for a given instance or type. + * + * @param {ModdleElement|Function} element + * + * @return {Object} the moddle descriptor + */ +function getModdleDescriptor(element) { + return element.$descriptor; +} + +/** + * A parse context. + * + * @class + * + * @param {Object} options + * @param {ElementHandler} options.rootHandler the root handler for parsing a document + * @param {boolean} [options.lax=false] whether or not to ignore invalid elements + */ +function Context(options) { + /** + * @property {ElementHandler} rootHandler + */ + + /** + * @property {Boolean} lax + */ + + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(this, options); + this.elementsById = {}; + this.references = []; + this.warnings = []; + + /** + * Add an unresolved reference. + * + * @param {Object} reference + */ + this.addReference = function (reference) { + this.references.push(reference); + }; + + /** + * Add a processed element. + * + * @param {ModdleElement} element + */ + this.addElement = function (element) { + if (!element) { + throw error('expected element'); + } + var elementsById = this.elementsById; + var descriptor = getModdleDescriptor(element); + var idProperty = descriptor.idProperty, + id; + if (idProperty) { + id = element.get(idProperty.name); + if (id) { + // for QName validation as per http://www.w3.org/TR/REC-xml/#NT-NameChar + if (!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(id)) { + throw new Error('illegal ID <' + id + '>'); + } + if (elementsById[id]) { + throw error('duplicate ID <' + id + '>'); + } + elementsById[id] = element; + } + } + }; + + /** + * Add an import warning. + * + * @param {Object} warning + * @param {String} warning.message + * @param {Error} [warning.error] + */ + this.addWarning = function (warning) { + this.warnings.push(warning); + }; +} +function BaseHandler() {} +BaseHandler.prototype.handleEnd = function () {}; +BaseHandler.prototype.handleText = function () {}; +BaseHandler.prototype.handleNode = function () {}; + +/** + * A simple pass through handler that does nothing except for + * ignoring all input it receives. + * + * This is used to ignore unknown elements and + * attributes. + */ +function NoopHandler() {} +NoopHandler.prototype = Object.create(BaseHandler.prototype); +NoopHandler.prototype.handleNode = function () { + return this; +}; +function BodyHandler() {} +BodyHandler.prototype = Object.create(BaseHandler.prototype); +BodyHandler.prototype.handleText = function (text) { + this.body = (this.body || '') + text; +}; +function ReferenceHandler(property, context) { + this.property = property; + this.context = context; +} +ReferenceHandler.prototype = Object.create(BodyHandler.prototype); +ReferenceHandler.prototype.handleNode = function (node) { + if (this.element) { + throw error('expected no sub nodes'); + } else { + this.element = this.createReference(node); + } + return this; +}; +ReferenceHandler.prototype.handleEnd = function () { + this.element.id = this.body; +}; +ReferenceHandler.prototype.createReference = function (node) { + return { + property: this.property.ns.name, + id: '' + }; +}; +function ValueHandler(propertyDesc, element) { + this.element = element; + this.propertyDesc = propertyDesc; +} +ValueHandler.prototype = Object.create(BodyHandler.prototype); +ValueHandler.prototype.handleEnd = function () { + var value = this.body || '', + element = this.element, + propertyDesc = this.propertyDesc; + value = (0,moddle__WEBPACK_IMPORTED_MODULE_1__.coerceType)(propertyDesc.type, value); + if (propertyDesc.isMany) { + element.get(propertyDesc.name).push(value); + } else { + element.set(propertyDesc.name, value); + } +}; +function BaseElementHandler() {} +BaseElementHandler.prototype = Object.create(BodyHandler.prototype); +BaseElementHandler.prototype.handleNode = function (node) { + var parser = this, + element = this.element; + if (!element) { + element = this.element = this.createElement(node); + this.context.addElement(element); + } else { + parser = this.handleChild(node); + } + return parser; +}; + +/** + * @class Reader.ElementHandler + * + */ +function ElementHandler(model, typeName, context) { + this.model = model; + this.type = model.getType(typeName); + this.context = context; +} +ElementHandler.prototype = Object.create(BaseElementHandler.prototype); +ElementHandler.prototype.addReference = function (reference) { + this.context.addReference(reference); +}; +ElementHandler.prototype.handleText = function (text) { + var element = this.element, + descriptor = getModdleDescriptor(element), + bodyProperty = descriptor.bodyProperty; + if (!bodyProperty) { + throw error('unexpected body text <' + text + '>'); + } + BodyHandler.prototype.handleText.call(this, text); +}; +ElementHandler.prototype.handleEnd = function () { + var value = this.body, + element = this.element, + descriptor = getModdleDescriptor(element), + bodyProperty = descriptor.bodyProperty; + if (bodyProperty && value !== undefined) { + value = (0,moddle__WEBPACK_IMPORTED_MODULE_1__.coerceType)(bodyProperty.type, value); + element.set(bodyProperty.name, value); + } +}; + +/** + * Create an instance of the model from the given node. + * + * @param {Element} node the xml node + */ +ElementHandler.prototype.createElement = function (node) { + var attributes = node.attributes, + Type = this.type, + descriptor = getModdleDescriptor(Type), + context = this.context, + instance = new Type({}), + model = this.model, + propNameNs; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attributes, function (value, name) { + var prop = descriptor.propertiesByName[name], + values; + if (prop && prop.isReference) { + if (!prop.isMany) { + context.addReference({ + element: instance, + property: prop.ns.name, + id: value + }); + } else { + // IDREFS: parse references as whitespace-separated list + values = value.split(' '); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(values, function (v) { + context.addReference({ + element: instance, + property: prop.ns.name, + id: v + }); + }); + } + } else { + if (prop) { + value = (0,moddle__WEBPACK_IMPORTED_MODULE_1__.coerceType)(prop.type, value); + } else if (name !== 'xmlns') { + propNameNs = (0,moddle__WEBPACK_IMPORTED_MODULE_1__.parseNameNS)(name, descriptor.ns.prefix); + + // check whether attribute is defined in a well-known namespace + // if that is the case we emit a warning to indicate potential misuse + if (model.getPackage(propNameNs.prefix)) { + context.addWarning({ + message: 'unknown attribute <' + name + '>', + element: instance, + property: name, + value: value + }); + } + } + instance.set(name, value); + } + }); + return instance; +}; +ElementHandler.prototype.getPropertyForNode = function (node) { + var name = node.name; + var nameNs = (0,moddle__WEBPACK_IMPORTED_MODULE_1__.parseNameNS)(name); + var type = this.type, + model = this.model, + descriptor = getModdleDescriptor(type); + var propertyName = nameNs.name, + property = descriptor.propertiesByName[propertyName], + elementTypeName, + elementType; + + // search for properties by name first + + if (property && !property.isAttr) { + if (serializeAsType(property)) { + elementTypeName = node.attributes[XSI_TYPE]; + + // xsi type is optional, if it does not exists the + // default type is assumed + if (elementTypeName) { + // take possible type prefixes from XML + // into account, i.e.: xsi:type="t{ActualType}" + elementTypeName = normalizeXsiTypeName(elementTypeName, model); + elementType = model.getType(elementTypeName); + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({}, property, { + effectiveType: getModdleDescriptor(elementType).name + }); + } + } + + // search for properties by name first + return property; + } + var pkg = model.getPackage(nameNs.prefix); + if (pkg) { + elementTypeName = aliasToName(nameNs, pkg); + elementType = model.getType(elementTypeName); + + // search for collection members later + property = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(descriptor.properties, function (p) { + return !p.isVirtual && !p.isReference && !p.isAttribute && elementType.hasType(p.type); + }); + if (property) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({}, property, { + effectiveType: getModdleDescriptor(elementType).name + }); + } + } else { + // parse unknown element (maybe extension) + property = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.find)(descriptor.properties, function (p) { + return !p.isReference && !p.isAttribute && p.type === 'Element'; + }); + if (property) { + return property; + } + } + throw error('unrecognized element <' + nameNs.name + '>'); +}; +ElementHandler.prototype.toString = function () { + return 'ElementDescriptor[' + getModdleDescriptor(this.type).name + ']'; +}; +ElementHandler.prototype.valueHandler = function (propertyDesc, element) { + return new ValueHandler(propertyDesc, element); +}; +ElementHandler.prototype.referenceHandler = function (propertyDesc) { + return new ReferenceHandler(propertyDesc, this.context); +}; +ElementHandler.prototype.handler = function (type) { + if (type === 'Element') { + return new GenericElementHandler(this.model, type, this.context); + } else { + return new ElementHandler(this.model, type, this.context); + } +}; + +/** + * Handle the child element parsing + * + * @param {Element} node the xml node + */ +ElementHandler.prototype.handleChild = function (node) { + var propertyDesc, type, element, childHandler; + propertyDesc = this.getPropertyForNode(node); + element = this.element; + type = propertyDesc.effectiveType || propertyDesc.type; + if ((0,moddle__WEBPACK_IMPORTED_MODULE_1__.isSimpleType)(type)) { + return this.valueHandler(propertyDesc, element); + } + if (propertyDesc.isReference) { + childHandler = this.referenceHandler(propertyDesc).handleNode(node); + } else { + childHandler = this.handler(type).handleNode(node); + } + var newElement = childHandler.element; + + // child handles may decide to skip elements + // by not returning anything + if (newElement !== undefined) { + if (propertyDesc.isMany) { + element.get(propertyDesc.name).push(newElement); + } else { + element.set(propertyDesc.name, newElement); + } + if (propertyDesc.isReference) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(newElement, { + element: element + }); + this.context.addReference(newElement); + } else { + // establish child -> parent relationship + newElement.$parent = element; + } + } + return childHandler; +}; + +/** + * An element handler that performs special validation + * to ensure the node it gets initialized with matches + * the handlers type (namespace wise). + * + * @param {Moddle} model + * @param {String} typeName + * @param {Context} context + */ +function RootElementHandler(model, typeName, context) { + ElementHandler.call(this, model, typeName, context); +} +RootElementHandler.prototype = Object.create(ElementHandler.prototype); +RootElementHandler.prototype.createElement = function (node) { + var name = node.name, + nameNs = (0,moddle__WEBPACK_IMPORTED_MODULE_1__.parseNameNS)(name), + model = this.model, + type = this.type, + pkg = model.getPackage(nameNs.prefix), + typeName = pkg && aliasToName(nameNs, pkg) || name; + + // verify the correct namespace if we parse + // the first element in the handler tree + // + // this ensures we don't mistakenly import wrong namespace elements + if (!type.hasType(typeName)) { + throw error('unexpected element <' + node.originalName + '>'); + } + return ElementHandler.prototype.createElement.call(this, node); +}; +function GenericElementHandler(model, typeName, context) { + this.model = model; + this.context = context; +} +GenericElementHandler.prototype = Object.create(BaseElementHandler.prototype); +GenericElementHandler.prototype.createElement = function (node) { + var name = node.name, + ns = (0,moddle__WEBPACK_IMPORTED_MODULE_1__.parseNameNS)(name), + prefix = ns.prefix, + uri = node.ns[prefix + '$uri'], + attributes = node.attributes; + return this.model.createAny(name, uri, attributes); +}; +GenericElementHandler.prototype.handleChild = function (node) { + var handler = new GenericElementHandler(this.model, 'Element', this.context).handleNode(node), + element = this.element; + var newElement = handler.element, + children; + if (newElement !== undefined) { + children = element.$children = element.$children || []; + children.push(newElement); + + // establish child -> parent relationship + newElement.$parent = element; + } + return handler; +}; +GenericElementHandler.prototype.handleEnd = function () { + if (this.body) { + this.element.$body = this.body; + } +}; + +/** + * A reader for a meta-model + * + * @param {Object} options + * @param {Model} options.model used to read xml files + * @param {Boolean} options.lax whether to make parse errors warnings + */ +function Reader(options) { + if (options instanceof moddle__WEBPACK_IMPORTED_MODULE_1__.Moddle) { + options = { + model: options + }; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)(this, { + lax: false + }, options); +} + +/** + * The fromXML result. + * + * @typedef {Object} ParseResult + * + * @property {ModdleElement} rootElement + * @property {Array} references + * @property {Array} warnings + * @property {Object} elementsById - a mapping containing each ID -> ModdleElement + */ + +/** + * The fromXML result. + * + * @typedef {Error} ParseError + * + * @property {Array} warnings + */ + +/** + * Parse the given XML into a moddle document tree. + * + * @param {String} xml + * @param {ElementHandler|Object} options or rootHandler + * + * @returns {Promise} + */ +Reader.prototype.fromXML = function (xml, options, done) { + var rootHandler = options.rootHandler; + if (options instanceof ElementHandler) { + // root handler passed via (xml, { rootHandler: ElementHandler }, ...) + rootHandler = options; + options = {}; + } else { + if (typeof options === 'string') { + // rootHandler passed via (xml, 'someString', ...) + rootHandler = this.handler(options); + options = {}; + } else if (typeof rootHandler === 'string') { + // rootHandler passed via (xml, { rootHandler: 'someString' }, ...) + rootHandler = this.handler(rootHandler); + } + } + var model = this.model, + lax = this.lax; + var context = new Context((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({}, options, { + rootHandler: rootHandler + })), + parser = new saxen__WEBPACK_IMPORTED_MODULE_0__.Parser({ + proxy: true + }), + stack = createStack(); + rootHandler.context = context; + + // push root handler + stack.push(rootHandler); + + /** + * Handle error. + * + * @param {Error} err + * @param {Function} getContext + * @param {boolean} lax + * + * @return {boolean} true if handled + */ + function handleError(err, getContext, lax) { + var ctx = getContext(); + var line = ctx.line, + column = ctx.column, + data = ctx.data; + + // we receive the full context data here, + // for elements trim down the information + // to the tag name, only + if (data.charAt(0) === '<' && data.indexOf(' ') !== -1) { + data = data.slice(0, data.indexOf(' ')) + '>'; + } + var message = 'unparsable content ' + (data ? data + ' ' : '') + 'detected\n\t' + 'line: ' + line + '\n\t' + 'column: ' + column + '\n\t' + 'nested error: ' + err.message; + if (lax) { + context.addWarning({ + message: message, + error: err + }); + return true; + } else { + throw error(message); + } + } + function handleWarning(err, getContext) { + // just like handling errors in mode + return handleError(err, getContext, true); + } + + /** + * Resolve collected references on parse end. + */ + function resolveReferences() { + var elementsById = context.elementsById; + var references = context.references; + var i, r; + for (i = 0; r = references[i]; i++) { + var element = r.element; + var reference = elementsById[r.id]; + var property = getModdleDescriptor(element).propertiesByName[r.property]; + if (!reference) { + context.addWarning({ + message: 'unresolved reference <' + r.id + '>', + element: r.element, + property: r.property, + value: r.id + }); + } + if (property.isMany) { + var collection = element.get(property.name), + idx = collection.indexOf(r); + + // we replace an existing place holder (idx != -1) or + // append to the collection instead + if (idx === -1) { + idx = collection.length; + } + if (!reference) { + // remove unresolvable reference + collection.splice(idx, 1); + } else { + // add or update reference in collection + collection[idx] = reference; + } + } else { + element.set(property.name, reference); + } + } + } + function handleClose() { + stack.pop().handleEnd(); + } + var PREAMBLE_START_PATTERN = /^<\?xml /i; + var ENCODING_PATTERN = / encoding="([^"]+)"/i; + var UTF_8_PATTERN = /^utf-8$/i; + function handleQuestion(question) { + if (!PREAMBLE_START_PATTERN.test(question)) { + return; + } + var match = ENCODING_PATTERN.exec(question); + var encoding = match && match[1]; + if (!encoding || UTF_8_PATTERN.test(encoding)) { + return; + } + context.addWarning({ + message: 'unsupported document encoding <' + encoding + '>, ' + 'falling back to UTF-8' + }); + } + function handleOpen(node, getContext) { + var handler = stack.peek(); + try { + stack.push(handler.handleNode(node)); + } catch (err) { + if (handleError(err, getContext, lax)) { + stack.push(new NoopHandler()); + } + } + } + function handleCData(text, getContext) { + try { + stack.peek().handleText(text); + } catch (err) { + handleWarning(err, getContext); + } + } + function handleText(text, getContext) { + // strip whitespace only nodes, i.e. before + // sections and in between tags + + if (!text.trim()) { + return; + } + handleCData(text, getContext); + } + var uriMap = model.getPackages().reduce(function (uriMap, p) { + uriMap[p.uri] = p.prefix; + return uriMap; + }, { + 'http://www.w3.org/XML/1998/namespace': 'xml' // add default xml ns + }); + + parser.ns(uriMap).on('openTag', function (obj, decodeStr, selfClosing, getContext) { + // gracefully handle unparsable attributes (attrs=false) + var attrs = obj.attrs || {}; + var decodedAttrs = Object.keys(attrs).reduce(function (d, key) { + var value = decodeStr(attrs[key]); + d[key] = value; + return d; + }, {}); + var node = { + name: obj.name, + originalName: obj.originalName, + attributes: decodedAttrs, + ns: obj.ns + }; + handleOpen(node, getContext); + }).on('question', handleQuestion).on('closeTag', handleClose).on('cdata', handleCData).on('text', function (text, decodeEntities, getContext) { + handleText(decodeEntities(text), getContext); + }).on('error', handleError).on('warn', handleWarning); + + // async XML parsing to make sure the execution environment + // (node or brower) is kept responsive and that certain optimization + // strategies can kick in. + return new Promise(function (resolve, reject) { + var err; + try { + parser.parse(xml); + resolveReferences(); + } catch (e) { + err = e; + } + var rootElement = rootHandler.element; + if (!err && !rootElement) { + err = error('failed to parse document as <' + rootHandler.type.$descriptor.name + '>'); + } + var warnings = context.warnings; + var references = context.references; + var elementsById = context.elementsById; + if (err) { + err.warnings = warnings; + return reject(err); + } else { + return resolve({ + rootElement: rootElement, + elementsById: elementsById, + references: references, + warnings: warnings + }); + } + }); +}; +Reader.prototype.handler = function (name) { + return new RootElementHandler(this.model, name); +}; + +// helpers ////////////////////////// + +function createStack() { + var stack = []; + Object.defineProperty(stack, 'peek', { + value: function () { + return this[this.length - 1]; + } + }); + return stack; +} +var XML_PREAMBLE = '\n'; +var ESCAPE_ATTR_CHARS = /<|>|'|"|&|\n\r|\n/g; +var ESCAPE_CHARS = /<|>|&/g; +function Namespaces(parent) { + var prefixMap = {}; + var uriMap = {}; + var used = {}; + var wellknown = []; + var custom = []; + + // API + + this.byUri = function (uri) { + return uriMap[uri] || parent && parent.byUri(uri); + }; + this.add = function (ns, isWellknown) { + uriMap[ns.uri] = ns; + if (isWellknown) { + wellknown.push(ns); + } else { + custom.push(ns); + } + this.mapPrefix(ns.prefix, ns.uri); + }; + this.uriByPrefix = function (prefix) { + return prefixMap[prefix || 'xmlns']; + }; + this.mapPrefix = function (prefix, uri) { + prefixMap[prefix || 'xmlns'] = uri; + }; + this.getNSKey = function (ns) { + return ns.prefix !== undefined ? ns.uri + '|' + ns.prefix : ns.uri; + }; + this.logUsed = function (ns) { + var uri = ns.uri; + var nsKey = this.getNSKey(ns); + used[nsKey] = this.byUri(uri); + + // Inform parent recursively about the usage of this NS + if (parent) { + parent.logUsed(ns); + } + }; + this.getUsed = function (ns) { + function isUsed(ns) { + var nsKey = self.getNSKey(ns); + return used[nsKey]; + } + var self = this; + var allNs = [].concat(wellknown, custom); + return allNs.filter(isUsed); + }; +} +function lower(string) { + return string.charAt(0).toLowerCase() + string.slice(1); +} +function nameToAlias(name, pkg) { + if (hasLowerCaseAlias(pkg)) { + return lower(name); + } else { + return name; + } +} +function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); +} +function nsName(ns) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isString)(ns)) { + return ns; + } else { + return (ns.prefix ? ns.prefix + ':' : '') + ns.localName; + } +} +function getNsAttrs(namespaces) { + return namespaces.getUsed().filter(function (ns) { + // do not serialize built in namespace + return ns.prefix !== 'xml'; + }).map(function (ns) { + var name = 'xmlns' + (ns.prefix ? ':' + ns.prefix : ''); + return { + name: name, + value: ns.uri + }; + }); +} +function getElementNs(ns, descriptor) { + if (descriptor.isGeneric) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + localName: descriptor.ns.localName + }, ns); + } else { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) + }, ns); + } +} +function getPropertyNs(ns, descriptor) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + localName: descriptor.ns.localName + }, ns); +} +function getSerializableProperties(element) { + var descriptor = element.$descriptor; + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(descriptor.properties, function (p) { + var name = p.name; + if (p.isVirtual) { + return false; + } + + // do not serialize defaults + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_2__.has)(element, name)) { + return false; + } + var value = element[name]; + + // do not serialize default equals + if (value === p.default) { + return false; + } + + // do not serialize null properties + if (value === null) { + return false; + } + return p.isMany ? value.length : true; + }); +} +var ESCAPE_ATTR_MAP = { + '\n': '#10', + '\n\r': '#10', + '"': '#34', + '\'': '#39', + '<': '#60', + '>': '#62', + '&': '#38' +}; +var ESCAPE_MAP = { + '<': 'lt', + '>': 'gt', + '&': 'amp' +}; +function escape(str, charPattern, replaceMap) { + // ensure we are handling strings here + str = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isString)(str) ? str : '' + str; + return str.replace(charPattern, function (s) { + return '&' + replaceMap[s] + ';'; + }); +} + +/** + * Escape a string attribute to not contain any bad values (line breaks, '"', ...) + * + * @param {String} str the string to escape + * @return {String} the escaped string + */ +function escapeAttr(str) { + return escape(str, ESCAPE_ATTR_CHARS, ESCAPE_ATTR_MAP); +} +function escapeBody(str) { + return escape(str, ESCAPE_CHARS, ESCAPE_MAP); +} +function filterAttributes(props) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(props, function (p) { + return p.isAttr; + }); +} +function filterContained(props) { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.filter)(props, function (p) { + return !p.isAttr; + }); +} +function ReferenceSerializer(tagName) { + this.tagName = tagName; +} +ReferenceSerializer.prototype.build = function (element) { + this.element = element; + return this; +}; +ReferenceSerializer.prototype.serializeTo = function (writer) { + writer.appendIndent().append('<' + this.tagName + '>' + this.element.id + '').appendNewLine(); +}; +function BodySerializer() {} +BodySerializer.prototype.serializeValue = BodySerializer.prototype.serializeTo = function (writer) { + writer.append(this.escape ? escapeBody(this.value) : this.value); +}; +BodySerializer.prototype.build = function (prop, value) { + this.value = value; + if (prop.type === 'String' && value.search(ESCAPE_CHARS) !== -1) { + this.escape = true; + } + return this; +}; +function ValueSerializer(tagName) { + this.tagName = tagName; +} +inherits(ValueSerializer, BodySerializer); +ValueSerializer.prototype.serializeTo = function (writer) { + writer.appendIndent().append('<' + this.tagName + '>'); + this.serializeValue(writer); + writer.append('').appendNewLine(); +}; +function ElementSerializer(parent, propertyDescriptor) { + this.body = []; + this.attrs = []; + this.parent = parent; + this.propertyDescriptor = propertyDescriptor; +} +ElementSerializer.prototype.build = function (element) { + this.element = element; + var elementDescriptor = element.$descriptor, + propertyDescriptor = this.propertyDescriptor; + var otherAttrs, properties; + var isGeneric = elementDescriptor.isGeneric; + if (isGeneric) { + otherAttrs = this.parseGeneric(element); + } else { + otherAttrs = this.parseNsAttributes(element); + } + if (propertyDescriptor) { + this.ns = this.nsPropertyTagName(propertyDescriptor); + } else { + this.ns = this.nsTagName(elementDescriptor); + } + + // compute tag name + this.tagName = this.addTagName(this.ns); + if (!isGeneric) { + properties = getSerializableProperties(element); + this.parseAttributes(filterAttributes(properties)); + this.parseContainments(filterContained(properties)); + } + this.parseGenericAttributes(element, otherAttrs); + return this; +}; +ElementSerializer.prototype.nsTagName = function (descriptor) { + var effectiveNs = this.logNamespaceUsed(descriptor.ns); + return getElementNs(effectiveNs, descriptor); +}; +ElementSerializer.prototype.nsPropertyTagName = function (descriptor) { + var effectiveNs = this.logNamespaceUsed(descriptor.ns); + return getPropertyNs(effectiveNs, descriptor); +}; +ElementSerializer.prototype.isLocalNs = function (ns) { + return ns.uri === this.ns.uri; +}; + +/** + * Get the actual ns attribute name for the given element. + * + * @param {Object} element + * @param {Boolean} [element.inherited=false] + * + * @return {Object} nsName + */ +ElementSerializer.prototype.nsAttributeName = function (element) { + var ns; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isString)(element)) { + ns = (0,moddle__WEBPACK_IMPORTED_MODULE_1__.parseNameNS)(element); + } else { + ns = element.ns; + } + + // return just local name for inherited attributes + if (element.inherited) { + return { + localName: ns.localName + }; + } + + // parse + log effective ns + var effectiveNs = this.logNamespaceUsed(ns); + + // LOG ACTUAL namespace use + this.getNamespaces().logUsed(effectiveNs); + + // strip prefix if same namespace like parent + if (this.isLocalNs(effectiveNs)) { + return { + localName: ns.localName + }; + } else { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + localName: ns.localName + }, effectiveNs); + } +}; +ElementSerializer.prototype.parseGeneric = function (element) { + var self = this, + body = this.body; + var attributes = []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(element, function (val, key) { + var nonNsAttr; + if (key === '$body') { + body.push(new BodySerializer().build({ + type: 'String' + }, val)); + } else if (key === '$children') { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(val, function (child) { + body.push(new ElementSerializer(self).build(child)); + }); + } else if (key.indexOf('$') !== 0) { + nonNsAttr = self.parseNsAttribute(element, key, val); + if (nonNsAttr) { + attributes.push({ + name: key, + value: val + }); + } + } + }); + return attributes; +}; +ElementSerializer.prototype.parseNsAttribute = function (element, name, value) { + var model = element.$model; + var nameNs = (0,moddle__WEBPACK_IMPORTED_MODULE_1__.parseNameNS)(name); + var ns; + + // parse xmlns:foo="http://foo.bar" + if (nameNs.prefix === 'xmlns') { + ns = { + prefix: nameNs.localName, + uri: value + }; + } + + // parse xmlns="http://foo.bar" + if (!nameNs.prefix && nameNs.localName === 'xmlns') { + ns = { + uri: value + }; + } + if (!ns) { + return { + name: name, + value: value + }; + } + if (model && model.getPackage(value)) { + // register well known namespace + this.logNamespace(ns, true, true); + } else { + // log custom namespace directly as used + var actualNs = this.logNamespaceUsed(ns, true); + this.getNamespaces().logUsed(actualNs); + } +}; + +/** + * Parse namespaces and return a list of left over generic attributes + * + * @param {Object} element + * @return {Array} + */ +ElementSerializer.prototype.parseNsAttributes = function (element, attrs) { + var self = this; + var genericAttrs = element.$attrs; + var attributes = []; + + // parse namespace attributes first + // and log them. push non namespace attributes to a list + // and process them later + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(genericAttrs, function (value, name) { + var nonNsAttr = self.parseNsAttribute(element, name, value); + if (nonNsAttr) { + attributes.push(nonNsAttr); + } + }); + return attributes; +}; +ElementSerializer.prototype.parseGenericAttributes = function (element, attributes) { + var self = this; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attributes, function (attr) { + // do not serialize xsi:type attribute + // it is set manually based on the actual implementation type + if (attr.name === XSI_TYPE) { + return; + } + try { + self.addAttribute(self.nsAttributeName(attr.name), attr.value); + } catch (e) { + console.warn('missing namespace information for ', attr.name, '=', attr.value, 'on', element, e); + } + }); +}; +ElementSerializer.prototype.parseContainments = function (properties) { + var self = this, + body = this.body, + element = this.element; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(properties, function (p) { + var value = element.get(p.name), + isReference = p.isReference, + isMany = p.isMany; + if (!isMany) { + value = [value]; + } + if (p.isBody) { + body.push(new BodySerializer().build(p, value[0])); + } else if ((0,moddle__WEBPACK_IMPORTED_MODULE_1__.isSimpleType)(p.type)) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(value, function (v) { + body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v)); + }); + } else if (isReference) { + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(value, function (v) { + body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v)); + }); + } else { + // allow serialization via type + // rather than element name + var asType = serializeAsType(p), + asProperty = serializeAsProperty(p); + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(value, function (v) { + var serializer; + if (asType) { + serializer = new TypeSerializer(self, p); + } else if (asProperty) { + serializer = new ElementSerializer(self, p); + } else { + serializer = new ElementSerializer(self); + } + body.push(serializer.build(v)); + }); + } + }); +}; +ElementSerializer.prototype.getNamespaces = function (local) { + var namespaces = this.namespaces, + parent = this.parent, + parentNamespaces; + if (!namespaces) { + parentNamespaces = parent && parent.getNamespaces(); + if (local || !parentNamespaces) { + this.namespaces = namespaces = new Namespaces(parentNamespaces); + } else { + namespaces = parentNamespaces; + } + } + return namespaces; +}; +ElementSerializer.prototype.logNamespace = function (ns, wellknown, local) { + var namespaces = this.getNamespaces(local); + var nsUri = ns.uri, + nsPrefix = ns.prefix; + var existing = namespaces.byUri(nsUri); + if (!existing || local) { + namespaces.add(ns, wellknown); + } + namespaces.mapPrefix(nsPrefix, nsUri); + return ns; +}; +ElementSerializer.prototype.logNamespaceUsed = function (ns, local) { + var element = this.element, + model = element.$model, + namespaces = this.getNamespaces(local); + + // ns may be + // + // * prefix only + // * prefix:uri + // * localName only + + var prefix = ns.prefix, + uri = ns.uri, + newPrefix, + idx, + wellknownUri; + + // handle anonymous namespaces (elementForm=unqualified), cf. #23 + if (!prefix && !uri) { + return { + localName: ns.localName + }; + } + wellknownUri = DEFAULT_NS_MAP[prefix] || model && (model.getPackage(prefix) || {}).uri; + uri = uri || wellknownUri || namespaces.uriByPrefix(prefix); + if (!uri) { + throw new Error('no namespace uri given for prefix <' + prefix + '>'); + } + ns = namespaces.byUri(uri); + if (!ns) { + newPrefix = prefix; + idx = 1; + + // find a prefix that is not mapped yet + while (namespaces.uriByPrefix(newPrefix)) { + newPrefix = prefix + '_' + idx++; + } + ns = this.logNamespace({ + prefix: newPrefix, + uri: uri + }, wellknownUri === uri); + } + if (prefix) { + namespaces.mapPrefix(prefix, uri); + } + return ns; +}; +ElementSerializer.prototype.parseAttributes = function (properties) { + var self = this, + element = this.element; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(properties, function (p) { + var value = element.get(p.name); + if (p.isReference) { + if (!p.isMany) { + value = value.id; + } else { + var values = []; + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(value, function (v) { + values.push(v.id); + }); + + // IDREFS is a whitespace-separated list of references. + value = values.join(' '); + } + } + self.addAttribute(self.nsAttributeName(p), value); + }); +}; +ElementSerializer.prototype.addTagName = function (nsTagName) { + var actualNs = this.logNamespaceUsed(nsTagName); + this.getNamespaces().logUsed(actualNs); + return nsName(nsTagName); +}; +ElementSerializer.prototype.addAttribute = function (name, value) { + var attrs = this.attrs; + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_2__.isString)(value)) { + value = escapeAttr(value); + } + + // de-duplicate attributes + // https://github.com/bpmn-io/moddle-xml/issues/66 + var idx = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.findIndex)(attrs, function (element) { + return element.name.localName === name.localName && element.name.uri === name.uri && element.name.prefix === name.prefix; + }); + var attr = { + name: name, + value: value + }; + if (idx !== -1) { + attrs.splice(idx, 1, attr); + } else { + attrs.push(attr); + } +}; +ElementSerializer.prototype.serializeAttributes = function (writer) { + var attrs = this.attrs, + namespaces = this.namespaces; + if (namespaces) { + attrs = getNsAttrs(namespaces).concat(attrs); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(attrs, function (a) { + writer.append(' ').append(nsName(a.name)).append('="').append(a.value).append('"'); + }); +}; +ElementSerializer.prototype.serializeTo = function (writer) { + var firstBody = this.body[0], + indent = firstBody && firstBody.constructor !== BodySerializer; + writer.appendIndent().append('<' + this.tagName); + this.serializeAttributes(writer); + writer.append(firstBody ? '>' : ' />'); + if (firstBody) { + if (indent) { + writer.appendNewLine().indent(); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.forEach)(this.body, function (b) { + b.serializeTo(writer); + }); + if (indent) { + writer.unindent().appendIndent(); + } + writer.append(''); + } + writer.appendNewLine(); +}; + +/** + * A serializer for types that handles serialization of data types + */ +function TypeSerializer(parent, propertyDescriptor) { + ElementSerializer.call(this, parent, propertyDescriptor); +} +inherits(TypeSerializer, ElementSerializer); +TypeSerializer.prototype.parseNsAttributes = function (element) { + // extracted attributes + var attributes = ElementSerializer.prototype.parseNsAttributes.call(this, element); + var descriptor = element.$descriptor; + + // only serialize xsi:type if necessary + if (descriptor.name === this.propertyDescriptor.type) { + return attributes; + } + var typeNs = this.typeNs = this.nsTagName(descriptor); + this.getNamespaces().logUsed(this.typeNs); + + // add xsi:type attribute to represent the elements + // actual type + + var pkg = element.$model.getPackage(typeNs.uri), + typePrefix = pkg.xml && pkg.xml.typePrefix || ''; + this.addAttribute(this.nsAttributeName(XSI_TYPE), (typeNs.prefix ? typeNs.prefix + ':' : '') + typePrefix + descriptor.ns.localName); + return attributes; +}; +TypeSerializer.prototype.isLocalNs = function (ns) { + return ns.uri === (this.typeNs || this.ns).uri; +}; +function SavingWriter() { + this.value = ''; + this.write = function (str) { + this.value += str; + }; +} +function FormatingWriter(out, format) { + var indent = ['']; + this.append = function (str) { + out.write(str); + return this; + }; + this.appendNewLine = function () { + if (format) { + out.write('\n'); + } + return this; + }; + this.appendIndent = function () { + if (format) { + out.write(indent.join(' ')); + } + return this; + }; + this.indent = function () { + indent.push(''); + return this; + }; + this.unindent = function () { + indent.pop(); + return this; + }; +} + +/** + * A writer for meta-model backed document trees + * + * @param {Object} options output options to pass into the writer + */ +function Writer(options) { + options = (0,min_dash__WEBPACK_IMPORTED_MODULE_2__.assign)({ + format: false, + preamble: true + }, options || {}); + function toXML(tree, writer) { + var internalWriter = writer || new SavingWriter(); + var formatingWriter = new FormatingWriter(internalWriter, options.format); + if (options.preamble) { + formatingWriter.append(XML_PREAMBLE); + } + new ElementSerializer().build(tree).serializeTo(formatingWriter); + if (!writer) { + return internalWriter.value; + } + } + return { + toXML: toXML + }; +} + + +/***/ }), + +/***/ 19080: +/*!****************!*\ + !*** min-dash ***! + \****************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ assign: () => (/* binding */ assign), +/* harmony export */ bind: () => (/* binding */ bind), +/* harmony export */ debounce: () => (/* binding */ debounce), +/* harmony export */ ensureArray: () => (/* binding */ ensureArray), +/* harmony export */ every: () => (/* binding */ every), +/* harmony export */ filter: () => (/* binding */ filter), +/* harmony export */ find: () => (/* binding */ find), +/* harmony export */ findIndex: () => (/* binding */ findIndex), +/* harmony export */ flatten: () => (/* binding */ flatten), +/* harmony export */ forEach: () => (/* binding */ forEach), +/* harmony export */ get: () => (/* binding */ get), +/* harmony export */ groupBy: () => (/* binding */ groupBy), +/* harmony export */ has: () => (/* binding */ has), +/* harmony export */ isArray: () => (/* binding */ isArray), +/* harmony export */ isDefined: () => (/* binding */ isDefined), +/* harmony export */ isFunction: () => (/* binding */ isFunction), +/* harmony export */ isNil: () => (/* binding */ isNil), +/* harmony export */ isNumber: () => (/* binding */ isNumber), +/* harmony export */ isObject: () => (/* binding */ isObject), +/* harmony export */ isString: () => (/* binding */ isString), +/* harmony export */ isUndefined: () => (/* binding */ isUndefined), +/* harmony export */ keys: () => (/* binding */ keys), +/* harmony export */ map: () => (/* binding */ map), +/* harmony export */ matchPattern: () => (/* binding */ matchPattern), +/* harmony export */ merge: () => (/* binding */ merge), +/* harmony export */ omit: () => (/* binding */ omit), +/* harmony export */ pick: () => (/* binding */ pick), +/* harmony export */ reduce: () => (/* binding */ reduce), +/* harmony export */ set: () => (/* binding */ set), +/* harmony export */ size: () => (/* binding */ size), +/* harmony export */ some: () => (/* binding */ some), +/* harmony export */ sortBy: () => (/* binding */ sortBy), +/* harmony export */ throttle: () => (/* binding */ throttle), +/* harmony export */ unionBy: () => (/* binding */ unionBy), +/* harmony export */ uniqueBy: () => (/* binding */ uniqueBy), +/* harmony export */ values: () => (/* binding */ values), +/* harmony export */ without: () => (/* binding */ without) +/* harmony export */ }); +/** + * Flatten array, one level deep. + * + * @param {Array} arr + * + * @return {Array} + */ +function flatten(arr) { + return Array.prototype.concat.apply([], arr); +} +var nativeToString = Object.prototype.toString; +var nativeHasOwnProperty = Object.prototype.hasOwnProperty; +function isUndefined(obj) { + return obj === undefined; +} +function isDefined(obj) { + return obj !== undefined; +} +function isNil(obj) { + return obj == null; +} +function isArray(obj) { + return nativeToString.call(obj) === '[object Array]'; +} +function isObject(obj) { + return nativeToString.call(obj) === '[object Object]'; +} +function isNumber(obj) { + return nativeToString.call(obj) === '[object Number]'; +} +function isFunction(obj) { + var tag = nativeToString.call(obj); + return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]'; +} +function isString(obj) { + return nativeToString.call(obj) === '[object String]'; +} +/** + * Ensure collection is an array. + * + * @param {Object} obj + */ + +function ensureArray(obj) { + if (isArray(obj)) { + return; + } + throw new Error('must supply array'); +} +/** + * Return true, if target owns a property with the given key. + * + * @param {Object} target + * @param {String} key + * + * @return {Boolean} + */ + +function has(target, key) { + return nativeHasOwnProperty.call(target, key); +} + +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function|Object} matcher + * + * @return {Object} + */ + +function find(collection, matcher) { + matcher = toMatcher(matcher); + var match; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + match = val; + return false; + } + }); + return match; +} +/** + * Find element index in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Object} + */ + +function findIndex(collection, matcher) { + matcher = toMatcher(matcher); + var idx = isArray(collection) ? -1 : undefined; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + idx = key; + return false; + } + }); + return idx; +} +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Array} result + */ + +function filter(collection, matcher) { + var result = []; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + result.push(val); + } + }); + return result; +} +/** + * Iterate over collection; returning something + * (non-undefined) will stop iteration. + * + * @param {Array|Object} collection + * @param {Function} iterator + * + * @return {Object} return result that stopped the iteration + */ + +function forEach(collection, iterator) { + var val, result; + if (isUndefined(collection)) { + return; + } + var convertKey = isArray(collection) ? toNum : identity; + for (var key in collection) { + if (has(collection, key)) { + val = collection[key]; + result = iterator(val, convertKey(key)); + if (result === false) { + return val; + } + } + } +} +/** + * Return collection without element. + * + * @param {Array} arr + * @param {Function} matcher + * + * @return {Array} + */ + +function without(arr, matcher) { + if (isUndefined(arr)) { + return []; + } + ensureArray(arr); + matcher = toMatcher(matcher); + return arr.filter(function (el, idx) { + return !matcher(el, idx); + }); +} +/** + * Reduce collection, returning a single result. + * + * @param {Object|Array} collection + * @param {Function} iterator + * @param {Any} result + * + * @return {Any} result returned from last iterator + */ + +function reduce(collection, iterator, result) { + forEach(collection, function (value, idx) { + result = iterator(result, value, idx); + }); + return result; +} +/** + * Return true if every element in the collection + * matches the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function every(collection, matcher) { + return !!reduce(collection, function (matches, val, key) { + return matches && matcher(val, key); + }, true); +} +/** + * Return true if some elements in the collection + * match the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function some(collection, matcher) { + return !!find(collection, matcher); +} +/** + * Transform a collection into another collection + * by piping each member through the given fn. + * + * @param {Object|Array} collection + * @param {Function} fn + * + * @return {Array} transformed collection + */ + +function map(collection, fn) { + var result = []; + forEach(collection, function (val, key) { + result.push(fn(val, key)); + }); + return result; +} +/** + * Get the collections keys. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function keys(collection) { + return collection && Object.keys(collection) || []; +} +/** + * Shorthand for `keys(o).length`. + * + * @param {Object|Array} collection + * + * @return {Number} + */ + +function size(collection) { + return keys(collection).length; +} +/** + * Get the values in the collection. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function values(collection) { + return map(collection, function (val) { + return val; + }); +} +/** + * Group collection members by attribute. + * + * @param {Object|Array} collection + * @param {Function} extractor + * + * @return {Object} map with { attrValue => [ a, b, c ] } + */ + +function groupBy(collection, extractor) { + var grouped = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + extractor = toExtractor(extractor); + forEach(collection, function (val) { + var discriminator = extractor(val) || '_'; + var group = grouped[discriminator]; + if (!group) { + group = grouped[discriminator] = []; + } + group.push(val); + }); + return grouped; +} +function uniqueBy(extractor) { + extractor = toExtractor(extractor); + var grouped = {}; + for (var _len = arguments.length, collections = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + collections[_key - 1] = arguments[_key]; + } + forEach(collections, function (c) { + return groupBy(c, extractor, grouped); + }); + var result = map(grouped, function (val, key) { + return val[0]; + }); + return result; +} +var unionBy = uniqueBy; +/** + * Sort collection by criteria. + * + * @param {Object|Array} collection + * @param {String|Function} extractor + * + * @return {Array} + */ + +function sortBy(collection, extractor) { + extractor = toExtractor(extractor); + var sorted = []; + forEach(collection, function (value, key) { + var disc = extractor(value, key); + var entry = { + d: disc, + v: value + }; + for (var idx = 0; idx < sorted.length; idx++) { + var d = sorted[idx].d; + if (disc < d) { + sorted.splice(idx, 0, entry); + return; + } + } // not inserted, append (!) + + sorted.push(entry); + }); + return map(sorted, function (e) { + return e.v; + }); +} +/** + * Create an object pattern matcher. + * + * @example + * + * const matcher = matchPattern({ id: 1 }); + * + * let element = find(elements, matcher); + * + * @param {Object} pattern + * + * @return {Function} matcherFn + */ + +function matchPattern(pattern) { + return function (el) { + return every(pattern, function (val, key) { + return el[key] === val; + }); + }; +} +function toExtractor(extractor) { + return isFunction(extractor) ? extractor : function (e) { + return e[extractor]; + }; +} +function toMatcher(matcher) { + return isFunction(matcher) ? matcher : function (e) { + return e === matcher; + }; +} +function identity(arg) { + return arg; +} +function toNum(arg) { + return Number(arg); +} + +/** + * Debounce fn, calling it only once if the given time + * elapsed between calls. + * + * Lodash-style the function exposes methods to `#clear` + * and `#flush` to control internal behavior. + * + * @param {Function} fn + * @param {Number} timeout + * + * @return {Function} debounced function + */ +function debounce(fn, timeout) { + var timer; + var lastArgs; + var lastThis; + var lastNow; + function fire(force) { + var now = Date.now(); + var scheduledDiff = force ? 0 : lastNow + timeout - now; + if (scheduledDiff > 0) { + return schedule(scheduledDiff); + } + fn.apply(lastThis, lastArgs); + clear(); + } + function schedule(timeout) { + timer = setTimeout(fire, timeout); + } + function clear() { + if (timer) { + clearTimeout(timer); + } + timer = lastNow = lastArgs = lastThis = undefined; + } + function flush() { + if (timer) { + fire(true); + } + clear(); + } + function callback() { + lastNow = Date.now(); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + lastArgs = args; + lastThis = this; // ensure an execution is scheduled + + if (!timer) { + schedule(timeout); + } + } + callback.flush = flush; + callback.cancel = clear; + return callback; +} +/** + * Throttle fn, calling at most once + * in the given interval. + * + * @param {Function} fn + * @param {Number} interval + * + * @return {Function} throttled function + */ + +function throttle(fn, interval) { + var throttling = false; + return function () { + if (throttling) { + return; + } + fn.apply(void 0, arguments); + throttling = true; + setTimeout(function () { + throttling = false; + }, interval); + }; +} +/** + * Bind function against target . + * + * @param {Function} fn + * @param {Object} target + * + * @return {Function} bound function + */ + +function bind(fn, target) { + return fn.bind(target); +} +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + return _typeof(obj); +} +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends.apply(this, arguments); +} + +/** + * Convenience wrapper for `Object.assign`. + * + * @param {Object} target + * @param {...Object} others + * + * @return {Object} the target + */ + +function assign(target) { + for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + others[_key - 1] = arguments[_key]; + } + return _extends.apply(void 0, [target].concat(others)); +} +/** + * Sets a nested property of a given object to the specified value. + * + * This mutates the object and returns it. + * + * @param {Object} target The target of the set operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} value The value to set. + */ + +function set(target, path, value) { + var currentTarget = target; + forEach(path, function (key, idx) { + if (typeof key !== 'number' && typeof key !== 'string') { + throw new Error('illegal key type: ' + _typeof(key) + '. Key should be of type number or string.'); + } + if (key === 'constructor') { + throw new Error('illegal key: constructor'); + } + if (key === '__proto__') { + throw new Error('illegal key: __proto__'); + } + var nextKey = path[idx + 1]; + var nextTarget = currentTarget[key]; + if (isDefined(nextKey) && isNil(nextTarget)) { + nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : []; + } + if (isUndefined(nextKey)) { + if (isUndefined(value)) { + delete currentTarget[key]; + } else { + currentTarget[key] = value; + } + } else { + currentTarget = nextTarget; + } + }); + return target; +} +/** + * Gets a nested property of a given object. + * + * @param {Object} target The target of the get operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} [defaultValue] The value to return if no value exists. + */ + +function get(target, path, defaultValue) { + var currentTarget = target; + forEach(path, function (key) { + // accessing nil property yields + if (isNil(currentTarget)) { + currentTarget = undefined; + return false; + } + currentTarget = currentTarget[key]; + }); + return isUndefined(currentTarget) ? defaultValue : currentTarget; +} +/** + * Pick given properties from the target object. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function pick(target, properties) { + var result = {}; + var obj = Object(target); + forEach(properties, function (prop) { + if (prop in obj) { + result[prop] = target[prop]; + } + }); + return result; +} +/** + * Pick all target properties, excluding the given ones. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function omit(target, properties) { + var result = {}; + var obj = Object(target); + forEach(obj, function (prop, key) { + if (properties.indexOf(key) === -1) { + result[key] = prop; + } + }); + return result; +} +/** + * Recursively merge `...sources` into given target. + * + * Does support merging objects; does not support merging arrays. + * + * @param {Object} target + * @param {...Object} sources + * + * @return {Object} the target + */ + +function merge(target) { + for (var _len2 = arguments.length, sources = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + sources[_key2 - 1] = arguments[_key2]; + } + if (!sources.length) { + return target; + } + forEach(sources, function (source) { + // skip non-obj sources, i.e. null + if (!source || !isObject(source)) { + return; + } + forEach(source, function (sourceVal, key) { + if (key === '__proto__') { + return; + } + var targetVal = target[key]; + if (isObject(sourceVal)) { + if (!isObject(targetVal)) { + // override target[key] with object + targetVal = {}; + } + target[key] = merge(targetVal, sourceVal); + } else { + target[key] = sourceVal; + } + }); + }); + return target; +} + + +/***/ }), + +/***/ 22377: +/*!***********************************************!*\ + !*** ./node_modules/moddle/dist/index.esm.js ***! + \***********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Moddle: () => (/* binding */ Moddle), +/* harmony export */ coerceType: () => (/* binding */ coerceType), +/* harmony export */ isBuiltInType: () => (/* binding */ isBuiltIn), +/* harmony export */ isSimpleType: () => (/* binding */ isSimple), +/* harmony export */ parseNameNS: () => (/* binding */ parseName) +/* harmony export */ }); +/* harmony import */ var min_dash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! min-dash */ 57708); + + +/** + * Moddle base element. + */ +function Base() {} +Base.prototype.get = function (name) { + return this.$model.properties.get(this, name); +}; +Base.prototype.set = function (name, value) { + this.$model.properties.set(this, name, value); +}; + +/** + * A model element factory. + * + * @param {Moddle} model + * @param {Properties} properties + */ +function Factory(model, properties) { + this.model = model; + this.properties = properties; +} +Factory.prototype.createType = function (descriptor) { + var model = this.model; + var props = this.properties, + prototype = Object.create(Base.prototype); + + // initialize default values + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(descriptor.properties, function (p) { + if (!p.isMany && p.default !== undefined) { + prototype[p.name] = p.default; + } + }); + props.defineModel(prototype, model); + props.defineDescriptor(prototype, descriptor); + var name = descriptor.ns.name; + + /** + * The new type constructor + */ + function ModdleElement(attrs) { + props.define(this, '$type', { + value: name, + enumerable: true + }); + props.define(this, '$attrs', { + value: {} + }); + props.define(this, '$parent', { + writable: true + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(attrs, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(function (val, key) { + this.set(key, val); + }, this)); + } + ModdleElement.prototype = prototype; + ModdleElement.hasType = prototype.$instanceOf = this.model.hasType; + + // static links + props.defineModel(ModdleElement, model); + props.defineDescriptor(ModdleElement, descriptor); + return ModdleElement; +}; + +/** + * Built-in moddle types + */ +var BUILTINS = { + String: true, + Boolean: true, + Integer: true, + Real: true, + Element: true +}; + +/** + * Converters for built in types from string representations + */ +var TYPE_CONVERTERS = { + String: function (s) { + return s; + }, + Boolean: function (s) { + return s === 'true'; + }, + Integer: function (s) { + return parseInt(s, 10); + }, + Real: function (s) { + return parseFloat(s); + } +}; + +/** + * Convert a type to its real representation + */ +function coerceType(type, value) { + var converter = TYPE_CONVERTERS[type]; + if (converter) { + return converter(value); + } else { + return value; + } +} + +/** + * Return whether the given type is built-in + */ +function isBuiltIn(type) { + return !!BUILTINS[type]; +} + +/** + * Return whether the given type is simple + */ +function isSimple(type) { + return !!TYPE_CONVERTERS[type]; +} + +/** + * Parses a namespaced attribute name of the form (ns:)localName to an object, + * given a default prefix to assume in case no explicit namespace is given. + * + * @param {String} name + * @param {String} [defaultPrefix] the default prefix to take, if none is present. + * + * @return {Object} the parsed name + */ +function parseName(name, defaultPrefix) { + var parts = name.split(/:/), + localName, + prefix; + + // no prefix (i.e. only local name) + if (parts.length === 1) { + localName = name; + prefix = defaultPrefix; + } else + // prefix + local name + if (parts.length === 2) { + localName = parts[1]; + prefix = parts[0]; + } else { + throw new Error('expected or , got ' + name); + } + name = (prefix ? prefix + ':' : '') + localName; + return { + name: name, + prefix: prefix, + localName: localName + }; +} + +/** + * A utility to build element descriptors. + */ +function DescriptorBuilder(nameNs) { + this.ns = nameNs; + this.name = nameNs.name; + this.allTypes = []; + this.allTypesByName = {}; + this.properties = []; + this.propertiesByName = {}; +} +DescriptorBuilder.prototype.build = function () { + return (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.pick)(this, ['ns', 'name', 'allTypes', 'allTypesByName', 'properties', 'propertiesByName', 'bodyProperty', 'idProperty']); +}; + +/** + * Add property at given index. + * + * @param {Object} p + * @param {Number} [idx] + * @param {Boolean} [validate=true] + */ +DescriptorBuilder.prototype.addProperty = function (p, idx, validate) { + if (typeof idx === 'boolean') { + validate = idx; + idx = undefined; + } + this.addNamedProperty(p, validate !== false); + var properties = this.properties; + if (idx !== undefined) { + properties.splice(idx, 0, p); + } else { + properties.push(p); + } +}; +DescriptorBuilder.prototype.replaceProperty = function (oldProperty, newProperty, replace) { + var oldNameNs = oldProperty.ns; + var props = this.properties, + propertiesByName = this.propertiesByName, + rename = oldProperty.name !== newProperty.name; + if (oldProperty.isId) { + if (!newProperty.isId) { + throw new Error('property <' + newProperty.ns.name + '> must be id property ' + 'to refine <' + oldProperty.ns.name + '>'); + } + this.setIdProperty(newProperty, false); + } + if (oldProperty.isBody) { + if (!newProperty.isBody) { + throw new Error('property <' + newProperty.ns.name + '> must be body property ' + 'to refine <' + oldProperty.ns.name + '>'); + } + + // TODO: Check compatibility + this.setBodyProperty(newProperty, false); + } + + // validate existence and get location of old property + var idx = props.indexOf(oldProperty); + if (idx === -1) { + throw new Error('property <' + oldNameNs.name + '> not found in property list'); + } + + // remove old property + props.splice(idx, 1); + + // replacing the named property is intentional + // + // * validate only if this is a "rename" operation + // * add at specific index unless we "replace" + // + this.addProperty(newProperty, replace ? undefined : idx, rename); + + // make new property available under old name + propertiesByName[oldNameNs.name] = propertiesByName[oldNameNs.localName] = newProperty; +}; +DescriptorBuilder.prototype.redefineProperty = function (p, targetPropertyName, replace) { + var nsPrefix = p.ns.prefix; + var parts = targetPropertyName.split('#'); + var name = parseName(parts[0], nsPrefix); + var attrName = parseName(parts[1], name.prefix).name; + var redefinedProperty = this.propertiesByName[attrName]; + if (!redefinedProperty) { + throw new Error('refined property <' + attrName + '> not found'); + } else { + this.replaceProperty(redefinedProperty, p, replace); + } + delete p.redefines; +}; +DescriptorBuilder.prototype.addNamedProperty = function (p, validate) { + var ns = p.ns, + propsByName = this.propertiesByName; + if (validate) { + this.assertNotDefined(p, ns.name); + this.assertNotDefined(p, ns.localName); + } + propsByName[ns.name] = propsByName[ns.localName] = p; +}; +DescriptorBuilder.prototype.removeNamedProperty = function (p) { + var ns = p.ns, + propsByName = this.propertiesByName; + delete propsByName[ns.name]; + delete propsByName[ns.localName]; +}; +DescriptorBuilder.prototype.setBodyProperty = function (p, validate) { + if (validate && this.bodyProperty) { + throw new Error('body property defined multiple times ' + '(<' + this.bodyProperty.ns.name + '>, <' + p.ns.name + '>)'); + } + this.bodyProperty = p; +}; +DescriptorBuilder.prototype.setIdProperty = function (p, validate) { + if (validate && this.idProperty) { + throw new Error('id property defined multiple times ' + '(<' + this.idProperty.ns.name + '>, <' + p.ns.name + '>)'); + } + this.idProperty = p; +}; +DescriptorBuilder.prototype.assertNotDefined = function (p, name) { + var propertyName = p.name, + definedProperty = this.propertiesByName[propertyName]; + if (definedProperty) { + throw new Error('property <' + propertyName + '> already defined; ' + 'override of <' + definedProperty.definedBy.ns.name + '#' + definedProperty.ns.name + '> by ' + '<' + p.definedBy.ns.name + '#' + p.ns.name + '> not allowed without redefines'); + } +}; +DescriptorBuilder.prototype.hasProperty = function (name) { + return this.propertiesByName[name]; +}; +DescriptorBuilder.prototype.addTrait = function (t, inherited) { + var typesByName = this.allTypesByName, + types = this.allTypes; + var typeName = t.name; + if (typeName in typesByName) { + return; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(t.properties, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(function (p) { + // clone property to allow extensions + p = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, p, { + name: p.ns.localName, + inherited: inherited + }); + Object.defineProperty(p, 'definedBy', { + value: t + }); + var replaces = p.replaces, + redefines = p.redefines; + + // add replace/redefine support + if (replaces || redefines) { + this.redefineProperty(p, replaces || redefines, replaces); + } else { + if (p.isBody) { + this.setBodyProperty(p); + } + if (p.isId) { + this.setIdProperty(p); + } + this.addProperty(p); + } + }, this)); + types.push(t); + typesByName[typeName] = t; +}; + +/** + * A registry of Moddle packages. + * + * @param {Array} packages + * @param {Properties} properties + */ +function Registry(packages, properties) { + this.packageMap = {}; + this.typeMap = {}; + this.packages = []; + this.properties = properties; + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(packages, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(this.registerPackage, this)); +} +Registry.prototype.getPackage = function (uriOrPrefix) { + return this.packageMap[uriOrPrefix]; +}; +Registry.prototype.getPackages = function () { + return this.packages; +}; +Registry.prototype.registerPackage = function (pkg) { + // copy package + pkg = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, pkg); + var pkgMap = this.packageMap; + ensureAvailable(pkgMap, pkg, 'prefix'); + ensureAvailable(pkgMap, pkg, 'uri'); + + // register types + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(pkg.types, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(function (descriptor) { + this.registerType(descriptor, pkg); + }, this)); + pkgMap[pkg.uri] = pkgMap[pkg.prefix] = pkg; + this.packages.push(pkg); +}; + +/** + * Register a type from a specific package with us + */ +Registry.prototype.registerType = function (type, pkg) { + type = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, type, { + superClass: (type.superClass || []).slice(), + extends: (type.extends || []).slice(), + properties: (type.properties || []).slice(), + meta: (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(type.meta || {}) + }); + var ns = parseName(type.name, pkg.prefix), + name = ns.name, + propertiesByName = {}; + + // parse properties + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(type.properties, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(function (p) { + // namespace property names + var propertyNs = parseName(p.name, ns.prefix), + propertyName = propertyNs.name; + + // namespace property types + if (!isBuiltIn(p.type)) { + p.type = parseName(p.type, propertyNs.prefix).name; + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(p, { + ns: propertyNs, + name: propertyName + }); + propertiesByName[propertyName] = p; + }, this)); + + // update ns + name + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)(type, { + ns: ns, + name: name, + propertiesByName: propertiesByName + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(type.extends, (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.bind)(function (extendsName) { + var extended = this.typeMap[extendsName]; + extended.traits = extended.traits || []; + extended.traits.push(name); + }, this)); + + // link to package + this.definePackage(type, pkg); + + // register + this.typeMap[name] = type; +}; + +/** + * Traverse the type hierarchy from bottom to top, + * calling iterator with (type, inherited) for all elements in + * the inheritance chain. + * + * @param {Object} nsName + * @param {Function} iterator + * @param {Boolean} [trait=false] + */ +Registry.prototype.mapTypes = function (nsName, iterator, trait) { + var type = isBuiltIn(nsName.name) ? { + name: nsName.name + } : this.typeMap[nsName.name]; + var self = this; + + /** + * Traverse the selected trait. + * + * @param {String} cls + */ + function traverseTrait(cls) { + return traverseSuper(cls, true); + } + + /** + * Traverse the selected super type or trait + * + * @param {String} cls + * @param {Boolean} [trait=false] + */ + function traverseSuper(cls, trait) { + var parentNs = parseName(cls, isBuiltIn(cls) ? '' : nsName.prefix); + self.mapTypes(parentNs, iterator, trait); + } + if (!type) { + throw new Error('unknown type <' + nsName.name + '>'); + } + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(type.superClass, trait ? traverseTrait : traverseSuper); + + // call iterator with (type, inherited=!trait) + iterator(type, !trait); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(type.traits, traverseTrait); +}; + +/** + * Returns the effective descriptor for a type. + * + * @param {String} type the namespaced name (ns:localName) of the type + * + * @return {Descriptor} the resulting effective descriptor + */ +Registry.prototype.getEffectiveDescriptor = function (name) { + var nsName = parseName(name); + var builder = new DescriptorBuilder(nsName); + this.mapTypes(nsName, function (type, inherited) { + builder.addTrait(type, inherited); + }); + var descriptor = builder.build(); + + // define package link + this.definePackage(descriptor, descriptor.allTypes[descriptor.allTypes.length - 1].$pkg); + return descriptor; +}; +Registry.prototype.definePackage = function (target, pkg) { + this.properties.define(target, '$pkg', { + value: pkg + }); +}; + +///////// helpers //////////////////////////// + +function ensureAvailable(packageMap, pkg, identifierKey) { + var value = pkg[identifierKey]; + if (value in packageMap) { + throw new Error('package with ' + identifierKey + ' <' + value + '> already defined'); + } +} + +/** + * A utility that gets and sets properties of model elements. + * + * @param {Model} model + */ +function Properties(model) { + this.model = model; +} + +/** + * Sets a named property on the target element. + * If the value is undefined, the property gets deleted. + * + * @param {Object} target + * @param {String} name + * @param {Object} value + */ +Properties.prototype.set = function (target, name, value) { + if (!(0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isString)(name) || !name.length) { + throw new TypeError('property name must be a non-empty string'); + } + var property = this.model.getPropertyDescriptor(target, name); + var propertyName = property && property.name; + if (isUndefined(value)) { + // unset the property, if the specified value is undefined; + // delete from $attrs (for extensions) or the target itself + if (property) { + delete target[propertyName]; + } else { + delete target.$attrs[name]; + } + } else { + // set the property, defining well defined properties on the fly + // or simply updating them in target.$attrs (for extensions) + if (property) { + if (propertyName in target) { + target[propertyName] = value; + } else { + defineProperty(target, property, value); + } + } else { + target.$attrs[name] = value; + } + } +}; + +/** + * Returns the named property of the given element + * + * @param {Object} target + * @param {String} name + * + * @return {Object} + */ +Properties.prototype.get = function (target, name) { + var property = this.model.getPropertyDescriptor(target, name); + if (!property) { + return target.$attrs[name]; + } + var propertyName = property.name; + + // check if access to collection property and lazily initialize it + if (!target[propertyName] && property.isMany) { + defineProperty(target, property, []); + } + return target[propertyName]; +}; + +/** + * Define a property on the target element + * + * @param {Object} target + * @param {String} name + * @param {Object} options + */ +Properties.prototype.define = function (target, name, options) { + if (!options.writable) { + var value = options.value; + + // use getters for read-only variables to support ES6 proxies + // cf. https://github.com/bpmn-io/internal-docs/issues/386 + options = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.assign)({}, options, { + get: function () { + return value; + } + }); + delete options.value; + } + Object.defineProperty(target, name, options); +}; + +/** + * Define the descriptor for an element + */ +Properties.prototype.defineDescriptor = function (target, descriptor) { + this.define(target, '$descriptor', { + value: descriptor + }); +}; + +/** + * Define the model for an element + */ +Properties.prototype.defineModel = function (target, model) { + this.define(target, '$model', { + value: model + }); +}; +function isUndefined(val) { + return typeof val === 'undefined'; +} +function defineProperty(target, property, value) { + Object.defineProperty(target, property.name, { + enumerable: !property.isReference, + writable: true, + value: value, + configurable: true + }); +} + +//// Moddle implementation ///////////////////////////////////////////////// + +/** + * @class Moddle + * + * A model that can be used to create elements of a specific type. + * + * @example + * + * var Moddle = require('moddle'); + * + * var pkg = { + * name: 'mypackage', + * prefix: 'my', + * types: [ + * { name: 'Root' } + * ] + * }; + * + * var moddle = new Moddle([pkg]); + * + * @param {Array} packages the packages to contain + */ +function Moddle(packages) { + this.properties = new Properties(this); + this.factory = new Factory(this, this.properties); + this.registry = new Registry(packages, this.properties); + this.typeCache = {}; +} + +/** + * Create an instance of the specified type. + * + * @method Moddle#create + * + * @example + * + * var foo = moddle.create('my:Foo'); + * var bar = moddle.create('my:Bar', { id: 'BAR_1' }); + * + * @param {String|Object} descriptor the type descriptor or name know to the model + * @param {Object} attrs a number of attributes to initialize the model instance with + * @return {Object} model instance + */ +Moddle.prototype.create = function (descriptor, attrs) { + var Type = this.getType(descriptor); + if (!Type) { + throw new Error('unknown type <' + descriptor + '>'); + } + return new Type(attrs); +}; + +/** + * Returns the type representing a given descriptor + * + * @method Moddle#getType + * + * @example + * + * var Foo = moddle.getType('my:Foo'); + * var foo = new Foo({ 'id' : 'FOO_1' }); + * + * @param {String|Object} descriptor the type descriptor or name know to the model + * @return {Object} the type representing the descriptor + */ +Moddle.prototype.getType = function (descriptor) { + var cache = this.typeCache; + var name = (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isString)(descriptor) ? descriptor : descriptor.ns.name; + var type = cache[name]; + if (!type) { + descriptor = this.registry.getEffectiveDescriptor(name); + type = cache[name] = this.factory.createType(descriptor); + } + return type; +}; + +/** + * Creates an any-element type to be used within model instances. + * + * This can be used to create custom elements that lie outside the meta-model. + * The created element contains all the meta-data required to serialize it + * as part of meta-model elements. + * + * @method Moddle#createAny + * + * @example + * + * var foo = moddle.createAny('vendor:Foo', 'http://vendor', { + * value: 'bar' + * }); + * + * var container = moddle.create('my:Container', 'http://my', { + * any: [ foo ] + * }); + * + * // go ahead and serialize the stuff + * + * + * @param {String} name the name of the element + * @param {String} nsUri the namespace uri of the element + * @param {Object} [properties] a map of properties to initialize the instance with + * @return {Object} the any type instance + */ +Moddle.prototype.createAny = function (name, nsUri, properties) { + var nameNs = parseName(name); + var element = { + $type: name, + $instanceOf: function (type) { + return type === this.$type; + } + }; + var descriptor = { + name: name, + isGeneric: true, + ns: { + prefix: nameNs.prefix, + localName: nameNs.localName, + uri: nsUri + } + }; + this.properties.defineDescriptor(element, descriptor); + this.properties.defineModel(element, this); + this.properties.define(element, '$parent', { + enumerable: false, + writable: true + }); + this.properties.define(element, '$instanceOf', { + enumerable: false, + writable: true + }); + (0,min_dash__WEBPACK_IMPORTED_MODULE_0__.forEach)(properties, function (a, key) { + if ((0,min_dash__WEBPACK_IMPORTED_MODULE_0__.isObject)(a) && a.value !== undefined) { + element[a.name] = a.value; + } else { + element[key] = a; + } + }); + return element; +}; + +/** + * Returns a registered package by uri or prefix + * + * @return {Object} the package + */ +Moddle.prototype.getPackage = function (uriOrPrefix) { + return this.registry.getPackage(uriOrPrefix); +}; + +/** + * Returns a snapshot of all known packages + * + * @return {Object} the package + */ +Moddle.prototype.getPackages = function () { + return this.registry.getPackages(); +}; + +/** + * Returns the descriptor for an element + */ +Moddle.prototype.getElementDescriptor = function (element) { + return element.$descriptor; +}; + +/** + * Returns true if the given descriptor or instance + * represents the given type. + * + * May be applied to this, if element is omitted. + */ +Moddle.prototype.hasType = function (element, type) { + if (type === undefined) { + type = element; + element = this; + } + var descriptor = element.$model.getElementDescriptor(element); + return type in descriptor.allTypesByName; +}; + +/** + * Returns the descriptor of an elements named property + */ +Moddle.prototype.getPropertyDescriptor = function (element, property) { + return this.getElementDescriptor(element).propertiesByName[property]; +}; + +/** + * Returns a mapped type's descriptor + */ +Moddle.prototype.getTypeDescriptor = function (type) { + return this.registry.typeMap[type]; +}; + + +/***/ }), + +/***/ 57708: +/*!****************!*\ + !*** min-dash ***! + \****************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ assign: () => (/* binding */ assign), +/* harmony export */ bind: () => (/* binding */ bind), +/* harmony export */ debounce: () => (/* binding */ debounce), +/* harmony export */ ensureArray: () => (/* binding */ ensureArray), +/* harmony export */ every: () => (/* binding */ every), +/* harmony export */ filter: () => (/* binding */ filter), +/* harmony export */ find: () => (/* binding */ find), +/* harmony export */ findIndex: () => (/* binding */ findIndex), +/* harmony export */ flatten: () => (/* binding */ flatten), +/* harmony export */ forEach: () => (/* binding */ forEach), +/* harmony export */ get: () => (/* binding */ get), +/* harmony export */ groupBy: () => (/* binding */ groupBy), +/* harmony export */ has: () => (/* binding */ has), +/* harmony export */ isArray: () => (/* binding */ isArray), +/* harmony export */ isDefined: () => (/* binding */ isDefined), +/* harmony export */ isFunction: () => (/* binding */ isFunction), +/* harmony export */ isNil: () => (/* binding */ isNil), +/* harmony export */ isNumber: () => (/* binding */ isNumber), +/* harmony export */ isObject: () => (/* binding */ isObject), +/* harmony export */ isString: () => (/* binding */ isString), +/* harmony export */ isUndefined: () => (/* binding */ isUndefined), +/* harmony export */ keys: () => (/* binding */ keys), +/* harmony export */ map: () => (/* binding */ map), +/* harmony export */ matchPattern: () => (/* binding */ matchPattern), +/* harmony export */ merge: () => (/* binding */ merge), +/* harmony export */ omit: () => (/* binding */ omit), +/* harmony export */ pick: () => (/* binding */ pick), +/* harmony export */ reduce: () => (/* binding */ reduce), +/* harmony export */ set: () => (/* binding */ set), +/* harmony export */ size: () => (/* binding */ size), +/* harmony export */ some: () => (/* binding */ some), +/* harmony export */ sortBy: () => (/* binding */ sortBy), +/* harmony export */ throttle: () => (/* binding */ throttle), +/* harmony export */ unionBy: () => (/* binding */ unionBy), +/* harmony export */ uniqueBy: () => (/* binding */ uniqueBy), +/* harmony export */ values: () => (/* binding */ values), +/* harmony export */ without: () => (/* binding */ without) +/* harmony export */ }); +/** + * Flatten array, one level deep. + * + * @param {Array} arr + * + * @return {Array} + */ +function flatten(arr) { + return Array.prototype.concat.apply([], arr); +} +var nativeToString = Object.prototype.toString; +var nativeHasOwnProperty = Object.prototype.hasOwnProperty; +function isUndefined(obj) { + return obj === undefined; +} +function isDefined(obj) { + return obj !== undefined; +} +function isNil(obj) { + return obj == null; +} +function isArray(obj) { + return nativeToString.call(obj) === '[object Array]'; +} +function isObject(obj) { + return nativeToString.call(obj) === '[object Object]'; +} +function isNumber(obj) { + return nativeToString.call(obj) === '[object Number]'; +} +function isFunction(obj) { + var tag = nativeToString.call(obj); + return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]'; +} +function isString(obj) { + return nativeToString.call(obj) === '[object String]'; +} +/** + * Ensure collection is an array. + * + * @param {Object} obj + */ + +function ensureArray(obj) { + if (isArray(obj)) { + return; + } + throw new Error('must supply array'); +} +/** + * Return true, if target owns a property with the given key. + * + * @param {Object} target + * @param {String} key + * + * @return {Boolean} + */ + +function has(target, key) { + return nativeHasOwnProperty.call(target, key); +} + +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function|Object} matcher + * + * @return {Object} + */ + +function find(collection, matcher) { + matcher = toMatcher(matcher); + var match; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + match = val; + return false; + } + }); + return match; +} +/** + * Find element index in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Object} + */ + +function findIndex(collection, matcher) { + matcher = toMatcher(matcher); + var idx = isArray(collection) ? -1 : undefined; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + idx = key; + return false; + } + }); + return idx; +} +/** + * Find element in collection. + * + * @param {Array|Object} collection + * @param {Function} matcher + * + * @return {Array} result + */ + +function filter(collection, matcher) { + var result = []; + forEach(collection, function (val, key) { + if (matcher(val, key)) { + result.push(val); + } + }); + return result; +} +/** + * Iterate over collection; returning something + * (non-undefined) will stop iteration. + * + * @param {Array|Object} collection + * @param {Function} iterator + * + * @return {Object} return result that stopped the iteration + */ + +function forEach(collection, iterator) { + var val, result; + if (isUndefined(collection)) { + return; + } + var convertKey = isArray(collection) ? toNum : identity; + for (var key in collection) { + if (has(collection, key)) { + val = collection[key]; + result = iterator(val, convertKey(key)); + if (result === false) { + return val; + } + } + } +} +/** + * Return collection without element. + * + * @param {Array} arr + * @param {Function} matcher + * + * @return {Array} + */ + +function without(arr, matcher) { + if (isUndefined(arr)) { + return []; + } + ensureArray(arr); + matcher = toMatcher(matcher); + return arr.filter(function (el, idx) { + return !matcher(el, idx); + }); +} +/** + * Reduce collection, returning a single result. + * + * @param {Object|Array} collection + * @param {Function} iterator + * @param {Any} result + * + * @return {Any} result returned from last iterator + */ + +function reduce(collection, iterator, result) { + forEach(collection, function (value, idx) { + result = iterator(result, value, idx); + }); + return result; +} +/** + * Return true if every element in the collection + * matches the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function every(collection, matcher) { + return !!reduce(collection, function (matches, val, key) { + return matches && matcher(val, key); + }, true); +} +/** + * Return true if some elements in the collection + * match the criteria. + * + * @param {Object|Array} collection + * @param {Function} matcher + * + * @return {Boolean} + */ + +function some(collection, matcher) { + return !!find(collection, matcher); +} +/** + * Transform a collection into another collection + * by piping each member through the given fn. + * + * @param {Object|Array} collection + * @param {Function} fn + * + * @return {Array} transformed collection + */ + +function map(collection, fn) { + var result = []; + forEach(collection, function (val, key) { + result.push(fn(val, key)); + }); + return result; +} +/** + * Get the collections keys. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function keys(collection) { + return collection && Object.keys(collection) || []; +} +/** + * Shorthand for `keys(o).length`. + * + * @param {Object|Array} collection + * + * @return {Number} + */ + +function size(collection) { + return keys(collection).length; +} +/** + * Get the values in the collection. + * + * @param {Object|Array} collection + * + * @return {Array} + */ + +function values(collection) { + return map(collection, function (val) { + return val; + }); +} +/** + * Group collection members by attribute. + * + * @param {Object|Array} collection + * @param {Function} extractor + * + * @return {Object} map with { attrValue => [ a, b, c ] } + */ + +function groupBy(collection, extractor) { + var grouped = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + extractor = toExtractor(extractor); + forEach(collection, function (val) { + var discriminator = extractor(val) || '_'; + var group = grouped[discriminator]; + if (!group) { + group = grouped[discriminator] = []; + } + group.push(val); + }); + return grouped; +} +function uniqueBy(extractor) { + extractor = toExtractor(extractor); + var grouped = {}; + for (var _len = arguments.length, collections = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + collections[_key - 1] = arguments[_key]; + } + forEach(collections, function (c) { + return groupBy(c, extractor, grouped); + }); + var result = map(grouped, function (val, key) { + return val[0]; + }); + return result; +} +var unionBy = uniqueBy; +/** + * Sort collection by criteria. + * + * @param {Object|Array} collection + * @param {String|Function} extractor + * + * @return {Array} + */ + +function sortBy(collection, extractor) { + extractor = toExtractor(extractor); + var sorted = []; + forEach(collection, function (value, key) { + var disc = extractor(value, key); + var entry = { + d: disc, + v: value + }; + for (var idx = 0; idx < sorted.length; idx++) { + var d = sorted[idx].d; + if (disc < d) { + sorted.splice(idx, 0, entry); + return; + } + } // not inserted, append (!) + + sorted.push(entry); + }); + return map(sorted, function (e) { + return e.v; + }); +} +/** + * Create an object pattern matcher. + * + * @example + * + * const matcher = matchPattern({ id: 1 }); + * + * let element = find(elements, matcher); + * + * @param {Object} pattern + * + * @return {Function} matcherFn + */ + +function matchPattern(pattern) { + return function (el) { + return every(pattern, function (val, key) { + return el[key] === val; + }); + }; +} +function toExtractor(extractor) { + return isFunction(extractor) ? extractor : function (e) { + return e[extractor]; + }; +} +function toMatcher(matcher) { + return isFunction(matcher) ? matcher : function (e) { + return e === matcher; + }; +} +function identity(arg) { + return arg; +} +function toNum(arg) { + return Number(arg); +} + +/** + * Debounce fn, calling it only once if the given time + * elapsed between calls. + * + * Lodash-style the function exposes methods to `#clear` + * and `#flush` to control internal behavior. + * + * @param {Function} fn + * @param {Number} timeout + * + * @return {Function} debounced function + */ +function debounce(fn, timeout) { + var timer; + var lastArgs; + var lastThis; + var lastNow; + function fire(force) { + var now = Date.now(); + var scheduledDiff = force ? 0 : lastNow + timeout - now; + if (scheduledDiff > 0) { + return schedule(scheduledDiff); + } + fn.apply(lastThis, lastArgs); + clear(); + } + function schedule(timeout) { + timer = setTimeout(fire, timeout); + } + function clear() { + if (timer) { + clearTimeout(timer); + } + timer = lastNow = lastArgs = lastThis = undefined; + } + function flush() { + if (timer) { + fire(true); + } + clear(); + } + function callback() { + lastNow = Date.now(); + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + lastArgs = args; + lastThis = this; // ensure an execution is scheduled + + if (!timer) { + schedule(timeout); + } + } + callback.flush = flush; + callback.cancel = clear; + return callback; +} +/** + * Throttle fn, calling at most once + * in the given interval. + * + * @param {Function} fn + * @param {Number} interval + * + * @return {Function} throttled function + */ + +function throttle(fn, interval) { + var throttling = false; + return function () { + if (throttling) { + return; + } + fn.apply(void 0, arguments); + throttling = true; + setTimeout(function () { + throttling = false; + }, interval); + }; +} +/** + * Bind function against target . + * + * @param {Function} fn + * @param {Object} target + * + * @return {Function} bound function + */ + +function bind(fn, target) { + return fn.bind(target); +} +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function (obj) { + return typeof obj; + }; + } else { + _typeof = function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + } + return _typeof(obj); +} +function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends.apply(this, arguments); +} + +/** + * Convenience wrapper for `Object.assign`. + * + * @param {Object} target + * @param {...Object} others + * + * @return {Object} the target + */ + +function assign(target) { + for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + others[_key - 1] = arguments[_key]; + } + return _extends.apply(void 0, [target].concat(others)); +} +/** + * Sets a nested property of a given object to the specified value. + * + * This mutates the object and returns it. + * + * @param {Object} target The target of the set operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} value The value to set. + */ + +function set(target, path, value) { + var currentTarget = target; + forEach(path, function (key, idx) { + if (typeof key !== 'number' && typeof key !== 'string') { + throw new Error('illegal key type: ' + _typeof(key) + '. Key should be of type number or string.'); + } + if (key === 'constructor') { + throw new Error('illegal key: constructor'); + } + if (key === '__proto__') { + throw new Error('illegal key: __proto__'); + } + var nextKey = path[idx + 1]; + var nextTarget = currentTarget[key]; + if (isDefined(nextKey) && isNil(nextTarget)) { + nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : []; + } + if (isUndefined(nextKey)) { + if (isUndefined(value)) { + delete currentTarget[key]; + } else { + currentTarget[key] = value; + } + } else { + currentTarget = nextTarget; + } + }); + return target; +} +/** + * Gets a nested property of a given object. + * + * @param {Object} target The target of the get operation. + * @param {(string|number)[]} path The path to the nested value. + * @param {any} [defaultValue] The value to return if no value exists. + */ + +function get(target, path, defaultValue) { + var currentTarget = target; + forEach(path, function (key) { + // accessing nil property yields + if (isNil(currentTarget)) { + currentTarget = undefined; + return false; + } + currentTarget = currentTarget[key]; + }); + return isUndefined(currentTarget) ? defaultValue : currentTarget; +} +/** + * Pick given properties from the target object. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function pick(target, properties) { + var result = {}; + var obj = Object(target); + forEach(properties, function (prop) { + if (prop in obj) { + result[prop] = target[prop]; + } + }); + return result; +} +/** + * Pick all target properties, excluding the given ones. + * + * @param {Object} target + * @param {Array} properties + * + * @return {Object} target + */ + +function omit(target, properties) { + var result = {}; + var obj = Object(target); + forEach(obj, function (prop, key) { + if (properties.indexOf(key) === -1) { + result[key] = prop; + } + }); + return result; +} +/** + * Recursively merge `...sources` into given target. + * + * Does support merging objects; does not support merging arrays. + * + * @param {Object} target + * @param {...Object} sources + * + * @return {Object} the target + */ + +function merge(target) { + for (var _len2 = arguments.length, sources = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + sources[_key2 - 1] = arguments[_key2]; + } + if (!sources.length) { + return target; + } + forEach(sources, function (source) { + // skip non-obj sources, i.e. null + if (!source || !isObject(source)) { + return; + } + forEach(source, function (sourceVal, key) { + if (key === '__proto__') { + return; + } + var targetVal = target[key]; + if (isObject(sourceVal)) { + if (!isObject(targetVal)) { + // override target[key] with object + targetVal = {}; + } + target[key] = merge(targetVal, sourceVal); + } else { + target[key] = sourceVal; + } + }); + }); + return target; +} + + +/***/ }), + +/***/ 16712: +/*!*******************************************!*\ + !*** ./node_modules/object-refs/index.js ***! + \*******************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +module.exports = __webpack_require__(/*! ./lib/refs */ 18172); +module.exports.Collection = __webpack_require__(/*! ./lib/collection */ 79118); + +/***/ }), + +/***/ 79118: +/*!****************************************************!*\ + !*** ./node_modules/object-refs/lib/collection.js ***! + \****************************************************/ +/***/ ((module) => { + +"use strict"; + + +/** + * An empty collection stub. Use {@link RefsCollection.extend} to extend a + * collection with ref semantics. + * + * @class RefsCollection + */ + +/** + * Extends a collection with {@link Refs} aware methods + * + * @memberof RefsCollection + * @static + * + * @param {Array} collection + * @param {Refs} refs instance + * @param {Object} property represented by the collection + * @param {Object} target object the collection is attached to + * + * @return {RefsCollection} the extended array + */ +function extend(collection, refs, property, target) { + var inverseProperty = property.inverse; + + /** + * Removes the given element from the array and returns it. + * + * @method RefsCollection#remove + * + * @param {Object} element the element to remove + */ + Object.defineProperty(collection, 'remove', { + value: function (element) { + var idx = this.indexOf(element); + if (idx !== -1) { + this.splice(idx, 1); + + // unset inverse + refs.unset(element, inverseProperty, target); + } + return element; + } + }); + + /** + * Returns true if the collection contains the given element + * + * @method RefsCollection#contains + * + * @param {Object} element the element to check for + */ + Object.defineProperty(collection, 'contains', { + value: function (element) { + return this.indexOf(element) !== -1; + } + }); + + /** + * Adds an element to the array, unless it exists already (set semantics). + * + * @method RefsCollection#add + * + * @param {Object} element the element to add + * @param {Number} optional index to add element to + * (possibly moving other elements around) + */ + Object.defineProperty(collection, 'add', { + value: function (element, idx) { + var currentIdx = this.indexOf(element); + if (typeof idx === 'undefined') { + if (currentIdx !== -1) { + // element already in collection (!) + return; + } + + // add to end of array, as no idx is specified + idx = this.length; + } + + // handle already in collection + if (currentIdx !== -1) { + // remove element from currentIdx + this.splice(currentIdx, 1); + } + + // add element at idx + this.splice(idx, 0, element); + if (currentIdx === -1) { + // set inverse, unless element was + // in collection already + refs.set(element, inverseProperty, target); + } + } + }); + + // a simple marker, identifying this element + // as being a refs collection + Object.defineProperty(collection, '__refs_collection', { + value: true + }); + return collection; +} +function isExtended(collection) { + return collection.__refs_collection === true; +} +module.exports.extend = extend; +module.exports.isExtended = isExtended; + +/***/ }), + +/***/ 18172: +/*!**********************************************!*\ + !*** ./node_modules/object-refs/lib/refs.js ***! + \**********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var Collection = __webpack_require__(/*! ./collection */ 79118); +function hasOwnProperty(e, property) { + return Object.prototype.hasOwnProperty.call(e, property.name || property); +} +function defineCollectionProperty(ref, property, target) { + var collection = Collection.extend(target[property.name] || [], ref, property, target); + Object.defineProperty(target, property.name, { + enumerable: property.enumerable, + value: collection + }); + if (collection.length) { + collection.forEach(function (o) { + ref.set(o, property.inverse, target); + }); + } +} +function defineProperty(ref, property, target) { + var inverseProperty = property.inverse; + var _value = target[property.name]; + Object.defineProperty(target, property.name, { + configurable: property.configurable, + enumerable: property.enumerable, + get: function () { + return _value; + }, + set: function (value) { + // return if we already performed all changes + if (value === _value) { + return; + } + var old = _value; + + // temporary set null + _value = null; + if (old) { + ref.unset(old, inverseProperty, target); + } + + // set new value + _value = value; + + // set inverse value + ref.set(_value, inverseProperty, target); + } + }); +} + +/** + * Creates a new references object defining two inversly related + * attribute descriptors a and b. + * + *

+ * When bound to an object using {@link Refs#bind} the references + * get activated and ensure that add and remove operations are applied + * reversely, too. + *

+ * + *

+ * For attributes represented as collections {@link Refs} provides the + * {@link RefsCollection#add}, {@link RefsCollection#remove} and {@link RefsCollection#contains} extensions + * that must be used to properly hook into the inverse change mechanism. + *

+ * + * @class Refs + * + * @classdesc A bi-directional reference between two attributes. + * + * @param {Refs.AttributeDescriptor} a property descriptor + * @param {Refs.AttributeDescriptor} b property descriptor + * + * @example + * + * var refs = Refs({ name: 'wheels', collection: true, enumerable: true }, { name: 'car' }); + * + * var car = { name: 'toyota' }; + * var wheels = [{ pos: 'front-left' }, { pos: 'front-right' }]; + * + * refs.bind(car, 'wheels'); + * + * car.wheels // [] + * car.wheels.add(wheels[0]); + * car.wheels.add(wheels[1]); + * + * car.wheels // [{ pos: 'front-left' }, { pos: 'front-right' }] + * + * wheels[0].car // { name: 'toyota' }; + * car.wheels.remove(wheels[0]); + * + * wheels[0].car // undefined + */ +function Refs(a, b) { + if (!(this instanceof Refs)) { + return new Refs(a, b); + } + + // link + a.inverse = b; + b.inverse = a; + this.props = {}; + this.props[a.name] = a; + this.props[b.name] = b; +} + +/** + * Binds one side of a bi-directional reference to a + * target object. + * + * @memberOf Refs + * + * @param {Object} target + * @param {String} property + */ +Refs.prototype.bind = function (target, property) { + if (typeof property === 'string') { + if (!this.props[property]) { + throw new Error('no property <' + property + '> in ref'); + } + property = this.props[property]; + } + if (property.collection) { + defineCollectionProperty(this, property, target); + } else { + defineProperty(this, property, target); + } +}; +Refs.prototype.ensureRefsCollection = function (target, property) { + var collection = target[property.name]; + if (!Collection.isExtended(collection)) { + defineCollectionProperty(this, property, target); + } + return collection; +}; +Refs.prototype.ensureBound = function (target, property) { + if (!hasOwnProperty(target, property)) { + this.bind(target, property); + } +}; +Refs.prototype.unset = function (target, property, value) { + if (target) { + this.ensureBound(target, property); + if (property.collection) { + this.ensureRefsCollection(target, property).remove(value); + } else { + target[property.name] = undefined; + } + } +}; +Refs.prototype.set = function (target, property, value) { + if (target) { + this.ensureBound(target, property); + if (property.collection) { + this.ensureRefsCollection(target, property).add(value); + } else { + target[property.name] = value; + } + } +}; +module.exports = Refs; + +/** + * An attribute descriptor to be used specify an attribute in a {@link Refs} instance + * + * @typedef {Object} Refs.AttributeDescriptor + * @property {String} name + * @property {boolean} [collection=false] + * @property {boolean} [enumerable=false] + */ + +/***/ }), + +/***/ 67166: +/*!*****************************************************!*\ + !*** ./node_modules/path-intersection/intersect.js ***! + \*****************************************************/ +/***/ ((module) => { + +"use strict"; + + +/** + * This file contains source code adapted from Snap.svg (licensed Apache-2.0). + * + * @see https://github.com/adobe-webplatform/Snap.svg/blob/master/src/path.js + */ + +/* eslint no-fallthrough: "off" */ +var p2s = /,?([a-z]),?/gi, + toFloat = parseFloat, + math = Math, + PI = math.PI, + mmin = math.min, + mmax = math.max, + pow = math.pow, + abs = math.abs, + pathCommand = /([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig, + pathValues = /(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig; +var isArray = Array.isArray || function (o) { + return o instanceof Array; +}; +function hasProperty(obj, property) { + return Object.prototype.hasOwnProperty.call(obj, property); +} +function clone(obj) { + if (typeof obj == 'function' || Object(obj) !== obj) { + return obj; + } + var res = new obj.constructor(); + for (var key in obj) { + if (hasProperty(obj, key)) { + res[key] = clone(obj[key]); + } + } + return res; +} +function repush(array, item) { + for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) { + return array.push(array.splice(i, 1)[0]); + } +} +function cacher(f) { + function newf() { + var arg = Array.prototype.slice.call(arguments, 0), + args = arg.join('\u2400'), + cache = newf.cache = newf.cache || {}, + count = newf.count = newf.count || []; + if (hasProperty(cache, args)) { + repush(count, args); + return cache[args]; + } + count.length >= 1e3 && delete cache[count.shift()]; + count.push(args); + cache[args] = f.apply(0, arg); + return cache[args]; + } + return newf; +} +function parsePathString(pathString) { + if (!pathString) { + return null; + } + var pth = paths(pathString); + if (pth.arr) { + return clone(pth.arr); + } + var paramCounts = { + a: 7, + c: 6, + h: 1, + l: 2, + m: 2, + q: 4, + s: 4, + t: 2, + v: 1, + z: 0 + }, + data = []; + if (isArray(pathString) && isArray(pathString[0])) { + // rough assumption + data = clone(pathString); + } + if (!data.length) { + String(pathString).replace(pathCommand, function (a, b, c) { + var params = [], + name = b.toLowerCase(); + c.replace(pathValues, function (a, b) { + b && params.push(+b); + }); + if (name == 'm' && params.length > 2) { + data.push([b].concat(params.splice(0, 2))); + name = 'l'; + b = b == 'm' ? 'l' : 'L'; + } + while (params.length >= paramCounts[name]) { + data.push([b].concat(params.splice(0, paramCounts[name]))); + if (!paramCounts[name]) { + break; + } + } + }); + } + data.toString = paths.toString; + pth.arr = clone(data); + return data; +} +function paths(ps) { + var p = paths.ps = paths.ps || {}; + if (p[ps]) { + p[ps].sleep = 100; + } else { + p[ps] = { + sleep: 100 + }; + } + setTimeout(function () { + for (var key in p) { + if (hasProperty(p, key) && key != ps) { + p[key].sleep--; + !p[key].sleep && delete p[key]; + } + } + }); + return p[ps]; +} +function rectBBox(x, y, width, height) { + if (arguments.length === 1) { + y = x.y; + width = x.width; + height = x.height; + x = x.x; + } + return { + x: x, + y: y, + width: width, + height: height, + x2: x + width, + y2: y + height + }; +} +function pathToString() { + return this.join(',').replace(p2s, '$1'); +} +function pathClone(pathArray) { + var res = clone(pathArray); + res.toString = pathToString; + return res; +} +function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { + var t1 = 1 - t, + t13 = pow(t1, 3), + t12 = pow(t1, 2), + t2 = t * t, + t3 = t2 * t, + x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x, + y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y; + return { + x: fixError(x), + y: fixError(y) + }; +} +function bezierBBox(points) { + var bbox = curveBBox.apply(null, points); + return rectBBox(bbox.x0, bbox.y0, bbox.x1 - bbox.x0, bbox.y1 - bbox.y0); +} +function isPointInsideBBox(bbox, x, y) { + return x >= bbox.x && x <= bbox.x + bbox.width && y >= bbox.y && y <= bbox.y + bbox.height; +} +function isBBoxIntersect(bbox1, bbox2) { + bbox1 = rectBBox(bbox1); + bbox2 = rectBBox(bbox2); + return isPointInsideBBox(bbox2, bbox1.x, bbox1.y) || isPointInsideBBox(bbox2, bbox1.x2, bbox1.y) || isPointInsideBBox(bbox2, bbox1.x, bbox1.y2) || isPointInsideBBox(bbox2, bbox1.x2, bbox1.y2) || isPointInsideBBox(bbox1, bbox2.x, bbox2.y) || isPointInsideBBox(bbox1, bbox2.x2, bbox2.y) || isPointInsideBBox(bbox1, bbox2.x, bbox2.y2) || isPointInsideBBox(bbox1, bbox2.x2, bbox2.y2) || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x) && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y); +} +function base3(t, p1, p2, p3, p4) { + var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4, + t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3; + return t * t2 - 3 * p1 + 3 * p2; +} +function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) { + if (z == null) { + z = 1; + } + z = z > 1 ? 1 : z < 0 ? 0 : z; + var z2 = z / 2, + n = 12, + Tvalues = [-.1252, .1252, -.3678, .3678, -.5873, .5873, -.7699, .7699, -.9041, .9041, -.9816, .9816], + Cvalues = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472], + sum = 0; + for (var i = 0; i < n; i++) { + var ct = z2 * Tvalues[i] + z2, + xbase = base3(ct, x1, x2, x3, x4), + ybase = base3(ct, y1, y2, y3, y4), + comb = xbase * xbase + ybase * ybase; + sum += Cvalues[i] * math.sqrt(comb); + } + return z2 * sum; +} +function intersectLines(x1, y1, x2, y2, x3, y3, x4, y4) { + if (mmax(x1, x2) < mmin(x3, x4) || mmin(x1, x2) > mmax(x3, x4) || mmax(y1, y2) < mmin(y3, y4) || mmin(y1, y2) > mmax(y3, y4)) { + return; + } + var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4), + ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4), + denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); + if (!denominator) { + return; + } + var px = fixError(nx / denominator), + py = fixError(ny / denominator), + px2 = +px.toFixed(2), + py2 = +py.toFixed(2); + if (px2 < +mmin(x1, x2).toFixed(2) || px2 > +mmax(x1, x2).toFixed(2) || px2 < +mmin(x3, x4).toFixed(2) || px2 > +mmax(x3, x4).toFixed(2) || py2 < +mmin(y1, y2).toFixed(2) || py2 > +mmax(y1, y2).toFixed(2) || py2 < +mmin(y3, y4).toFixed(2) || py2 > +mmax(y3, y4).toFixed(2)) { + return; + } + return { + x: px, + y: py + }; +} +function fixError(number) { + return Math.round(number * 100000000000) / 100000000000; +} +function findBezierIntersections(bez1, bez2, justCount) { + var bbox1 = bezierBBox(bez1), + bbox2 = bezierBBox(bez2); + if (!isBBoxIntersect(bbox1, bbox2)) { + return justCount ? 0 : []; + } + + // As an optimization, lines will have only 1 segment + + var l1 = bezlen.apply(0, bez1), + l2 = bezlen.apply(0, bez2), + n1 = isLine(bez1) ? 1 : ~~(l1 / 5) || 1, + n2 = isLine(bez2) ? 1 : ~~(l2 / 5) || 1, + dots1 = [], + dots2 = [], + xy = {}, + res = justCount ? 0 : []; + for (var i = 0; i < n1 + 1; i++) { + var p = findDotsAtSegment.apply(0, bez1.concat(i / n1)); + dots1.push({ + x: p.x, + y: p.y, + t: i / n1 + }); + } + for (i = 0; i < n2 + 1; i++) { + p = findDotsAtSegment.apply(0, bez2.concat(i / n2)); + dots2.push({ + x: p.x, + y: p.y, + t: i / n2 + }); + } + for (i = 0; i < n1; i++) { + for (var j = 0; j < n2; j++) { + var di = dots1[i], + di1 = dots1[i + 1], + dj = dots2[j], + dj1 = dots2[j + 1], + ci = abs(di1.x - di.x) < .01 ? 'y' : 'x', + cj = abs(dj1.x - dj.x) < .01 ? 'y' : 'x', + is = intersectLines(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y), + key; + if (is) { + key = is.x.toFixed(9) + '#' + is.y.toFixed(9); + if (xy[key]) { + continue; + } + xy[key] = true; + var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t), + t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t); + if (t1 >= 0 && t1 <= 1 && t2 >= 0 && t2 <= 1) { + if (justCount) { + res++; + } else { + res.push({ + x: is.x, + y: is.y, + t1: t1, + t2: t2 + }); + } + } + } + } + } + return res; +} + +/** + * Find or counts the intersections between two SVG paths. + * + * Returns a number in counting mode and a list of intersections otherwise. + * + * A single intersection entry contains the intersection coordinates (x, y) + * as well as additional information regarding the intersecting segments + * on each path (segment1, segment2) and the relative location of the + * intersection on these segments (t1, t2). + * + * The path may be an SVG path string or a list of path components + * such as `[ [ 'M', 0, 10 ], [ 'L', 20, 0 ] ]`. + * + * @example + * + * var intersections = findPathIntersections( + * 'M0,0L100,100', + * [ [ 'M', 0, 100 ], [ 'L', 100, 0 ] ] + * ); + * + * // intersections = [ + * // { x: 50, y: 50, segment1: 1, segment2: 1, t1: 0.5, t2: 0.5 } + * // ] + * + * @param {String|Array} path1 + * @param {String|Array} path2 + * @param {Boolean} [justCount=false] + * + * @return {Array|Number} + */ +function findPathIntersections(path1, path2, justCount) { + path1 = pathToCurve(path1); + path2 = pathToCurve(path2); + var x1, + y1, + x2, + y2, + x1m, + y1m, + x2m, + y2m, + bez1, + bez2, + res = justCount ? 0 : []; + for (var i = 0, ii = path1.length; i < ii; i++) { + var pi = path1[i]; + if (pi[0] == 'M') { + x1 = x1m = pi[1]; + y1 = y1m = pi[2]; + } else { + if (pi[0] == 'C') { + bez1 = [x1, y1].concat(pi.slice(1)); + x1 = bez1[6]; + y1 = bez1[7]; + } else { + bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m]; + x1 = x1m; + y1 = y1m; + } + for (var j = 0, jj = path2.length; j < jj; j++) { + var pj = path2[j]; + if (pj[0] == 'M') { + x2 = x2m = pj[1]; + y2 = y2m = pj[2]; + } else { + if (pj[0] == 'C') { + bez2 = [x2, y2].concat(pj.slice(1)); + x2 = bez2[6]; + y2 = bez2[7]; + } else { + bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m]; + x2 = x2m; + y2 = y2m; + } + var intr = findBezierIntersections(bez1, bez2, justCount); + if (justCount) { + res += intr; + } else { + for (var k = 0, kk = intr.length; k < kk; k++) { + intr[k].segment1 = i; + intr[k].segment2 = j; + intr[k].bez1 = bez1; + intr[k].bez2 = bez2; + } + res = res.concat(intr); + } + } + } + } + } + return res; +} +function pathToAbsolute(pathArray) { + var pth = paths(pathArray); + if (pth.abs) { + return pathClone(pth.abs); + } + if (!isArray(pathArray) || !isArray(pathArray && pathArray[0])) { + // rough assumption + pathArray = parsePathString(pathArray); + } + if (!pathArray || !pathArray.length) { + return [['M', 0, 0]]; + } + var res = [], + x = 0, + y = 0, + mx = 0, + my = 0, + start = 0, + pa0; + if (pathArray[0][0] == 'M') { + x = +pathArray[0][1]; + y = +pathArray[0][2]; + mx = x; + my = y; + start++; + res[0] = ['M', x, y]; + } + for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) { + res.push(r = []); + pa = pathArray[i]; + pa0 = pa[0]; + if (pa0 != pa0.toUpperCase()) { + r[0] = pa0.toUpperCase(); + switch (r[0]) { + case 'A': + r[1] = pa[1]; + r[2] = pa[2]; + r[3] = pa[3]; + r[4] = pa[4]; + r[5] = pa[5]; + r[6] = +pa[6] + x; + r[7] = +pa[7] + y; + break; + case 'V': + r[1] = +pa[1] + y; + break; + case 'H': + r[1] = +pa[1] + x; + break; + case 'M': + mx = +pa[1] + x; + my = +pa[2] + y; + default: + for (var j = 1, jj = pa.length; j < jj; j++) { + r[j] = +pa[j] + (j % 2 ? x : y); + } + } + } else { + for (var k = 0, kk = pa.length; k < kk; k++) { + r[k] = pa[k]; + } + } + pa0 = pa0.toUpperCase(); + switch (r[0]) { + case 'Z': + x = +mx; + y = +my; + break; + case 'H': + x = r[1]; + break; + case 'V': + y = r[1]; + break; + case 'M': + mx = r[r.length - 2]; + my = r[r.length - 1]; + default: + x = r[r.length - 2]; + y = r[r.length - 1]; + } + } + res.toString = pathToString; + pth.abs = pathClone(res); + return res; +} +function isLine(bez) { + return bez[0] === bez[2] && bez[1] === bez[3] && bez[4] === bez[6] && bez[5] === bez[7]; +} +function lineToCurve(x1, y1, x2, y2) { + return [x1, y1, x2, y2, x2, y2]; +} +function qubicToCurve(x1, y1, ax, ay, x2, y2) { + var _13 = 1 / 3, + _23 = 2 / 3; + return [_13 * x1 + _23 * ax, _13 * y1 + _23 * ay, _13 * x2 + _23 * ax, _13 * y2 + _23 * ay, x2, y2]; +} +function arcToCurve(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) { + // for more information of where this math came from visit: + // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes + var _120 = PI * 120 / 180, + rad = PI / 180 * (+angle || 0), + res = [], + xy, + rotate = cacher(function (x, y, rad) { + var X = x * math.cos(rad) - y * math.sin(rad), + Y = x * math.sin(rad) + y * math.cos(rad); + return { + x: X, + y: Y + }; + }); + if (!recursive) { + xy = rotate(x1, y1, -rad); + x1 = xy.x; + y1 = xy.y; + xy = rotate(x2, y2, -rad); + x2 = xy.x; + y2 = xy.y; + var x = (x1 - x2) / 2, + y = (y1 - y2) / 2; + var h = x * x / (rx * rx) + y * y / (ry * ry); + if (h > 1) { + h = math.sqrt(h); + rx = h * rx; + ry = h * ry; + } + var rx2 = rx * rx, + ry2 = ry * ry, + k = (large_arc_flag == sweep_flag ? -1 : 1) * math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))), + cx = k * rx * y / ry + (x1 + x2) / 2, + cy = k * -ry * x / rx + (y1 + y2) / 2, + f1 = math.asin(((y1 - cy) / ry).toFixed(9)), + f2 = math.asin(((y2 - cy) / ry).toFixed(9)); + f1 = x1 < cx ? PI - f1 : f1; + f2 = x2 < cx ? PI - f2 : f2; + f1 < 0 && (f1 = PI * 2 + f1); + f2 < 0 && (f2 = PI * 2 + f2); + if (sweep_flag && f1 > f2) { + f1 = f1 - PI * 2; + } + if (!sweep_flag && f2 > f1) { + f2 = f2 - PI * 2; + } + } else { + f1 = recursive[0]; + f2 = recursive[1]; + cx = recursive[2]; + cy = recursive[3]; + } + var df = f2 - f1; + if (abs(df) > _120) { + var f2old = f2, + x2old = x2, + y2old = y2; + f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1); + x2 = cx + rx * math.cos(f2); + y2 = cy + ry * math.sin(f2); + res = arcToCurve(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]); + } + df = f2 - f1; + var c1 = math.cos(f1), + s1 = math.sin(f1), + c2 = math.cos(f2), + s2 = math.sin(f2), + t = math.tan(df / 4), + hx = 4 / 3 * rx * t, + hy = 4 / 3 * ry * t, + m1 = [x1, y1], + m2 = [x1 + hx * s1, y1 - hy * c1], + m3 = [x2 + hx * s2, y2 - hy * c2], + m4 = [x2, y2]; + m2[0] = 2 * m1[0] - m2[0]; + m2[1] = 2 * m1[1] - m2[1]; + if (recursive) { + return [m2, m3, m4].concat(res); + } else { + res = [m2, m3, m4].concat(res).join().split(','); + var newres = []; + for (var i = 0, ii = res.length; i < ii; i++) { + newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; + } + return newres; + } +} + +// Returns bounding box of cubic bezier curve. +// Source: http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html +// Original version: NISHIO Hirokazu +// Modifications: https://github.com/timo22345 +function curveBBox(x0, y0, x1, y1, x2, y2, x3, y3) { + var tvalues = [], + bounds = [[], []], + a, + b, + c, + t, + t1, + t2, + b2ac, + sqrtb2ac; + for (var i = 0; i < 2; ++i) { + if (i == 0) { + b = 6 * x0 - 12 * x1 + 6 * x2; + a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3; + c = 3 * x1 - 3 * x0; + } else { + b = 6 * y0 - 12 * y1 + 6 * y2; + a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3; + c = 3 * y1 - 3 * y0; + } + if (abs(a) < 1e-12) { + if (abs(b) < 1e-12) { + continue; + } + t = -c / b; + if (0 < t && t < 1) { + tvalues.push(t); + } + continue; + } + b2ac = b * b - 4 * c * a; + sqrtb2ac = math.sqrt(b2ac); + if (b2ac < 0) { + continue; + } + t1 = (-b + sqrtb2ac) / (2 * a); + if (0 < t1 && t1 < 1) { + tvalues.push(t1); + } + t2 = (-b - sqrtb2ac) / (2 * a); + if (0 < t2 && t2 < 1) { + tvalues.push(t2); + } + } + var j = tvalues.length, + jlen = j, + mt; + while (j--) { + t = tvalues[j]; + mt = 1 - t; + bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3; + bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3; + } + bounds[0][jlen] = x0; + bounds[1][jlen] = y0; + bounds[0][jlen + 1] = x3; + bounds[1][jlen + 1] = y3; + bounds[0].length = bounds[1].length = jlen + 2; + return { + x0: mmin.apply(0, bounds[0]), + y0: mmin.apply(0, bounds[1]), + x1: mmax.apply(0, bounds[0]), + y1: mmax.apply(0, bounds[1]) + }; +} +function pathToCurve(path) { + var pth = paths(path); + + // return cached curve, if existing + if (pth.curve) { + return pathClone(pth.curve); + } + var curvedPath = pathToAbsolute(path), + attrs = { + x: 0, + y: 0, + bx: 0, + by: 0, + X: 0, + Y: 0, + qx: null, + qy: null + }, + processPath = function (path, d, pathCommand) { + var nx, ny; + if (!path) { + return ['C', d.x, d.y, d.x, d.y, d.x, d.y]; + } + !(path[0] in { + T: 1, + Q: 1 + }) && (d.qx = d.qy = null); + switch (path[0]) { + case 'M': + d.X = path[1]; + d.Y = path[2]; + break; + case 'A': + path = ['C'].concat(arcToCurve.apply(0, [d.x, d.y].concat(path.slice(1)))); + break; + case 'S': + if (pathCommand == 'C' || pathCommand == 'S') { + // In 'S' case we have to take into account, if the previous command is C/S. + nx = d.x * 2 - d.bx; + + // And reflect the previous + ny = d.y * 2 - d.by; + + // command's control point relative to the current point. + } else { + // or some else or nothing + nx = d.x; + ny = d.y; + } + path = ['C', nx, ny].concat(path.slice(1)); + break; + case 'T': + if (pathCommand == 'Q' || pathCommand == 'T') { + // In 'T' case we have to take into account, if the previous command is Q/T. + d.qx = d.x * 2 - d.qx; + + // And make a reflection similar + d.qy = d.y * 2 - d.qy; + + // to case 'S'. + } else { + // or something else or nothing + d.qx = d.x; + d.qy = d.y; + } + path = ['C'].concat(qubicToCurve(d.x, d.y, d.qx, d.qy, path[1], path[2])); + break; + case 'Q': + d.qx = path[1]; + d.qy = path[2]; + path = ['C'].concat(qubicToCurve(d.x, d.y, path[1], path[2], path[3], path[4])); + break; + case 'L': + path = ['C'].concat(lineToCurve(d.x, d.y, path[1], path[2])); + break; + case 'H': + path = ['C'].concat(lineToCurve(d.x, d.y, path[1], d.y)); + break; + case 'V': + path = ['C'].concat(lineToCurve(d.x, d.y, d.x, path[1])); + break; + case 'Z': + path = ['C'].concat(lineToCurve(d.x, d.y, d.X, d.Y)); + break; + } + return path; + }, + fixArc = function (pp, i) { + if (pp[i].length > 7) { + pp[i].shift(); + var pi = pp[i]; + while (pi.length) { + pathCommands[i] = 'A'; // if created multiple C:s, their original seg is saved + pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6))); + } + pp.splice(i, 1); + ii = curvedPath.length; + } + }, + pathCommands = [], + // path commands of original path p + pfirst = '', + // temporary holder for original path command + pathCommand = ''; // holder for previous path command of original path + + for (var i = 0, ii = curvedPath.length; i < ii; i++) { + curvedPath[i] && (pfirst = curvedPath[i][0]); // save current path command + + if (pfirst != 'C') + // C is not saved yet, because it may be result of conversion + { + pathCommands[i] = pfirst; // Save current path command + i && (pathCommand = pathCommands[i - 1]); // Get previous path command pathCommand + } + + curvedPath[i] = processPath(curvedPath[i], attrs, pathCommand); // Previous path command is inputted to processPath + + if (pathCommands[i] != 'A' && pfirst == 'C') pathCommands[i] = 'C'; // A is the only command + // which may produce multiple C:s + // so we have to make sure that C is also C in original path + + fixArc(curvedPath, i); // fixArc adds also the right amount of A:s to pathCommands + + var seg = curvedPath[i], + seglen = seg.length; + attrs.x = seg[seglen - 2]; + attrs.y = seg[seglen - 1]; + attrs.bx = toFloat(seg[seglen - 4]) || attrs.x; + attrs.by = toFloat(seg[seglen - 3]) || attrs.y; + } + + // cache curve + pth.curve = pathClone(curvedPath); + return curvedPath; +} +module.exports = findPathIntersections; + +/***/ }), + +/***/ 96273: +/*!*****************************************!*\ + !*** ./node_modules/process/browser.js ***! + \*****************************************/ +/***/ ((module) => { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout() { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +})(); +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e) { + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e) { + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + var len = queue.length; + while (len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; +function noop() {} +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; +process.listeners = function (name) { + return []; +}; +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; +process.cwd = function () { + return '/'; +}; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function () { + return 0; +}; + +/***/ }), + +/***/ 95536: +/*!****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/BehaviorSubject.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ BehaviorSubject: () => (/* binding */ BehaviorSubject) +/* harmony export */ }); +/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ 63150); + +class BehaviorSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__.Subject { + constructor(_value) { + super(); + this._value = _value; + } + get value() { + return this.getValue(); + } + _subscribe(subscriber) { + const subscription = super._subscribe(subscriber); + !subscription.closed && subscriber.next(this._value); + return subscription; + } + getValue() { + const { + hasError, + thrownError, + _value + } = this; + if (hasError) { + throw thrownError; + } + this._throwIfClosed(); + return _value; + } + next(value) { + super.next(this._value = value); + } +} + +/***/ }), + +/***/ 68465: +/*!**********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/NotificationFactories.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ COMPLETE_NOTIFICATION: () => (/* binding */ COMPLETE_NOTIFICATION), +/* harmony export */ createNotification: () => (/* binding */ createNotification), +/* harmony export */ errorNotification: () => (/* binding */ errorNotification), +/* harmony export */ nextNotification: () => (/* binding */ nextNotification) +/* harmony export */ }); +const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))(); +function errorNotification(error) { + return createNotification('E', undefined, error); +} +function nextNotification(value) { + return createNotification('N', value, undefined); +} +function createNotification(kind, value, error) { + return { + kind, + value, + error + }; +} + +/***/ }), + +/***/ 64517: +/*!***********************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/Observable.js ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Observable: () => (/* binding */ Observable) +/* harmony export */ }); +/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscriber */ 4258); +/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Subscription */ 36421); +/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/observable */ 44770); +/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util/pipe */ 2652); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./config */ 90302); +/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/isFunction */ 78347); +/* harmony import */ var _util_errorContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/errorContext */ 38806); + + + + + + + +class Observable { + constructor(subscribe) { + if (subscribe) { + this._subscribe = subscribe; + } + } + lift(operator) { + const observable = new Observable(); + observable.source = this; + observable.operator = operator; + return observable; + } + subscribe(observerOrNext, error, complete) { + const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new _Subscriber__WEBPACK_IMPORTED_MODULE_0__.SafeSubscriber(observerOrNext, error, complete); + (0,_util_errorContext__WEBPACK_IMPORTED_MODULE_1__.errorContext)(() => { + const { + operator, + source + } = this; + subscriber.add(operator ? operator.call(subscriber, source) : source ? this._subscribe(subscriber) : this._trySubscribe(subscriber)); + }); + return subscriber; + } + _trySubscribe(sink) { + try { + return this._subscribe(sink); + } catch (err) { + sink.error(err); + } + } + forEach(next, promiseCtor) { + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor((resolve, reject) => { + const subscriber = new _Subscriber__WEBPACK_IMPORTED_MODULE_0__.SafeSubscriber({ + next: value => { + try { + next(value); + } catch (err) { + reject(err); + subscriber.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + this.subscribe(subscriber); + }); + } + _subscribe(subscriber) { + var _a; + return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); + } + [_symbol_observable__WEBPACK_IMPORTED_MODULE_2__.observable]() { + return this; + } + pipe(...operations) { + return (0,_util_pipe__WEBPACK_IMPORTED_MODULE_3__.pipeFromArray)(operations)(this); + } + toPromise(promiseCtor) { + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor((resolve, reject) => { + let value; + this.subscribe(x => value = x, err => reject(err), () => resolve(value)); + }); + } +} +Observable.create = subscribe => { + return new Observable(subscribe); +}; +function getPromiseCtor(promiseCtor) { + var _a; + return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : _config__WEBPACK_IMPORTED_MODULE_4__.config.Promise) !== null && _a !== void 0 ? _a : Promise; +} +function isObserver(value) { + return value && (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_5__.isFunction)(value.next) && (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_5__.isFunction)(value.error) && (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_5__.isFunction)(value.complete); +} +function isSubscriber(value) { + return value && value instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber || isObserver(value) && (0,_Subscription__WEBPACK_IMPORTED_MODULE_6__.isSubscription)(value); +} + +/***/ }), + +/***/ 61151: +/*!**************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/ReplaySubject.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ReplaySubject: () => (/* binding */ ReplaySubject) +/* harmony export */ }); +/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ 63150); +/* harmony import */ var _scheduler_dateTimestampProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scheduler/dateTimestampProvider */ 7221); + + +class ReplaySubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__.Subject { + constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = _scheduler_dateTimestampProvider__WEBPACK_IMPORTED_MODULE_1__.dateTimestampProvider) { + super(); + this._bufferSize = _bufferSize; + this._windowTime = _windowTime; + this._timestampProvider = _timestampProvider; + this._buffer = []; + this._infiniteTimeWindow = true; + this._infiniteTimeWindow = _windowTime === Infinity; + this._bufferSize = Math.max(1, _bufferSize); + this._windowTime = Math.max(1, _windowTime); + } + next(value) { + const { + isStopped, + _buffer, + _infiniteTimeWindow, + _timestampProvider, + _windowTime + } = this; + if (!isStopped) { + _buffer.push(value); + !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); + } + this._trimBuffer(); + super.next(value); + } + _subscribe(subscriber) { + this._throwIfClosed(); + this._trimBuffer(); + const subscription = this._innerSubscribe(subscriber); + const { + _infiniteTimeWindow, + _buffer + } = this; + const copy = _buffer.slice(); + for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { + subscriber.next(copy[i]); + } + this._checkFinalizedStatuses(subscriber); + return subscription; + } + _trimBuffer() { + const { + _bufferSize, + _timestampProvider, + _buffer, + _infiniteTimeWindow + } = this; + const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; + _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); + if (!_infiniteTimeWindow) { + const now = _timestampProvider.now(); + let last = 0; + for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { + last = i; + } + last && _buffer.splice(0, last + 1); + } + } +} + +/***/ }), + +/***/ 14267: +/*!**********************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/Scheduler.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Scheduler: () => (/* binding */ Scheduler) +/* harmony export */ }); +/* harmony import */ var _scheduler_dateTimestampProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scheduler/dateTimestampProvider */ 7221); + +class Scheduler { + constructor(schedulerActionCtor, now = Scheduler.now) { + this.schedulerActionCtor = schedulerActionCtor; + this.now = now; + } + schedule(work, delay = 0, state) { + return new this.schedulerActionCtor(this, work).schedule(state, delay); + } +} +Scheduler.now = _scheduler_dateTimestampProvider__WEBPACK_IMPORTED_MODULE_0__.dateTimestampProvider.now; + +/***/ }), + +/***/ 63150: +/*!********************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/Subject.js ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AnonymousSubject: () => (/* binding */ AnonymousSubject), +/* harmony export */ Subject: () => (/* binding */ Subject) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Observable */ 64517); +/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Subscription */ 36421); +/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ 24649); +/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/arrRemove */ 38248); +/* harmony import */ var _util_errorContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/errorContext */ 38806); + + + + + +class Subject extends _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable { + constructor() { + super(); + this.closed = false; + this.currentObservers = null; + this.observers = []; + this.isStopped = false; + this.hasError = false; + this.thrownError = null; + } + lift(operator) { + const subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + } + _throwIfClosed() { + if (this.closed) { + throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_1__.ObjectUnsubscribedError(); + } + } + next(value) { + (0,_util_errorContext__WEBPACK_IMPORTED_MODULE_2__.errorContext)(() => { + this._throwIfClosed(); + if (!this.isStopped) { + if (!this.currentObservers) { + this.currentObservers = Array.from(this.observers); + } + for (const observer of this.currentObservers) { + observer.next(value); + } + } + }); + } + error(err) { + (0,_util_errorContext__WEBPACK_IMPORTED_MODULE_2__.errorContext)(() => { + this._throwIfClosed(); + if (!this.isStopped) { + this.hasError = this.isStopped = true; + this.thrownError = err; + const { + observers + } = this; + while (observers.length) { + observers.shift().error(err); + } + } + }); + } + complete() { + (0,_util_errorContext__WEBPACK_IMPORTED_MODULE_2__.errorContext)(() => { + this._throwIfClosed(); + if (!this.isStopped) { + this.isStopped = true; + const { + observers + } = this; + while (observers.length) { + observers.shift().complete(); + } + } + }); + } + unsubscribe() { + this.isStopped = this.closed = true; + this.observers = this.currentObservers = null; + } + get observed() { + var _a; + return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; + } + _trySubscribe(subscriber) { + this._throwIfClosed(); + return super._trySubscribe(subscriber); + } + _subscribe(subscriber) { + this._throwIfClosed(); + this._checkFinalizedStatuses(subscriber); + return this._innerSubscribe(subscriber); + } + _innerSubscribe(subscriber) { + const { + hasError, + isStopped, + observers + } = this; + if (hasError || isStopped) { + return _Subscription__WEBPACK_IMPORTED_MODULE_3__.EMPTY_SUBSCRIPTION; + } + this.currentObservers = null; + observers.push(subscriber); + return new _Subscription__WEBPACK_IMPORTED_MODULE_3__.Subscription(() => { + this.currentObservers = null; + (0,_util_arrRemove__WEBPACK_IMPORTED_MODULE_4__.arrRemove)(observers, subscriber); + }); + } + _checkFinalizedStatuses(subscriber) { + const { + hasError, + thrownError, + isStopped + } = this; + if (hasError) { + subscriber.error(thrownError); + } else if (isStopped) { + subscriber.complete(); + } + } + asObservable() { + const observable = new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(); + observable.source = this; + return observable; + } +} +Subject.create = (destination, source) => { + return new AnonymousSubject(destination, source); +}; +class AnonymousSubject extends Subject { + constructor(destination, source) { + super(); + this.destination = destination; + this.source = source; + } + next(value) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); + } + error(err) { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); + } + complete() { + var _a, _b; + (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); + } + _subscribe(subscriber) { + var _a, _b; + return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : _Subscription__WEBPACK_IMPORTED_MODULE_3__.EMPTY_SUBSCRIPTION; + } +} + +/***/ }), + +/***/ 4258: +/*!***********************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/Subscriber.js ***! + \***********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ EMPTY_OBSERVER: () => (/* binding */ EMPTY_OBSERVER), +/* harmony export */ SafeSubscriber: () => (/* binding */ SafeSubscriber), +/* harmony export */ Subscriber: () => (/* binding */ Subscriber) +/* harmony export */ }); +/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/isFunction */ 78347); +/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subscription */ 36421); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ 90302); +/* harmony import */ var _util_reportUnhandledError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util/reportUnhandledError */ 38058); +/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util/noop */ 86075); +/* harmony import */ var _NotificationFactories__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./NotificationFactories */ 68465); +/* harmony import */ var _scheduler_timeoutProvider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./scheduler/timeoutProvider */ 73514); +/* harmony import */ var _util_errorContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util/errorContext */ 38806); + + + + + + + + +class Subscriber extends _Subscription__WEBPACK_IMPORTED_MODULE_0__.Subscription { + constructor(destination) { + super(); + this.isStopped = false; + if (destination) { + this.destination = destination; + if ((0,_Subscription__WEBPACK_IMPORTED_MODULE_0__.isSubscription)(destination)) { + destination.add(this); + } + } else { + this.destination = EMPTY_OBSERVER; + } + } + static create(next, error, complete) { + return new SafeSubscriber(next, error, complete); + } + next(value) { + if (this.isStopped) { + handleStoppedNotification((0,_NotificationFactories__WEBPACK_IMPORTED_MODULE_1__.nextNotification)(value), this); + } else { + this._next(value); + } + } + error(err) { + if (this.isStopped) { + handleStoppedNotification((0,_NotificationFactories__WEBPACK_IMPORTED_MODULE_1__.errorNotification)(err), this); + } else { + this.isStopped = true; + this._error(err); + } + } + complete() { + if (this.isStopped) { + handleStoppedNotification(_NotificationFactories__WEBPACK_IMPORTED_MODULE_1__.COMPLETE_NOTIFICATION, this); + } else { + this.isStopped = true; + this._complete(); + } + } + unsubscribe() { + if (!this.closed) { + this.isStopped = true; + super.unsubscribe(); + this.destination = null; + } + } + _next(value) { + this.destination.next(value); + } + _error(err) { + try { + this.destination.error(err); + } finally { + this.unsubscribe(); + } + } + _complete() { + try { + this.destination.complete(); + } finally { + this.unsubscribe(); + } + } +} +const _bind = Function.prototype.bind; +function bind(fn, thisArg) { + return _bind.call(fn, thisArg); +} +class ConsumerObserver { + constructor(partialObserver) { + this.partialObserver = partialObserver; + } + next(value) { + const { + partialObserver + } = this; + if (partialObserver.next) { + try { + partialObserver.next(value); + } catch (error) { + handleUnhandledError(error); + } + } + } + error(err) { + const { + partialObserver + } = this; + if (partialObserver.error) { + try { + partialObserver.error(err); + } catch (error) { + handleUnhandledError(error); + } + } else { + handleUnhandledError(err); + } + } + complete() { + const { + partialObserver + } = this; + if (partialObserver.complete) { + try { + partialObserver.complete(); + } catch (error) { + handleUnhandledError(error); + } + } + } +} +class SafeSubscriber extends Subscriber { + constructor(observerOrNext, error, complete) { + super(); + let partialObserver; + if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_2__.isFunction)(observerOrNext) || !observerOrNext) { + partialObserver = { + next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined, + error: error !== null && error !== void 0 ? error : undefined, + complete: complete !== null && complete !== void 0 ? complete : undefined + }; + } else { + let context; + if (this && _config__WEBPACK_IMPORTED_MODULE_3__.config.useDeprecatedNextContext) { + context = Object.create(observerOrNext); + context.unsubscribe = () => this.unsubscribe(); + partialObserver = { + next: observerOrNext.next && bind(observerOrNext.next, context), + error: observerOrNext.error && bind(observerOrNext.error, context), + complete: observerOrNext.complete && bind(observerOrNext.complete, context) + }; + } else { + partialObserver = observerOrNext; + } + } + this.destination = new ConsumerObserver(partialObserver); + } +} +function handleUnhandledError(error) { + if (_config__WEBPACK_IMPORTED_MODULE_3__.config.useDeprecatedSynchronousErrorHandling) { + (0,_util_errorContext__WEBPACK_IMPORTED_MODULE_4__.captureError)(error); + } else { + (0,_util_reportUnhandledError__WEBPACK_IMPORTED_MODULE_5__.reportUnhandledError)(error); + } +} +function defaultErrorHandler(err) { + throw err; +} +function handleStoppedNotification(notification, subscriber) { + const { + onStoppedNotification + } = _config__WEBPACK_IMPORTED_MODULE_3__.config; + onStoppedNotification && _scheduler_timeoutProvider__WEBPACK_IMPORTED_MODULE_6__.timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber)); +} +const EMPTY_OBSERVER = { + closed: true, + next: _util_noop__WEBPACK_IMPORTED_MODULE_7__.noop, + error: defaultErrorHandler, + complete: _util_noop__WEBPACK_IMPORTED_MODULE_7__.noop +}; + +/***/ }), + +/***/ 36421: +/*!*************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/Subscription.js ***! + \*************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ EMPTY_SUBSCRIPTION: () => (/* binding */ EMPTY_SUBSCRIPTION), +/* harmony export */ Subscription: () => (/* binding */ Subscription), +/* harmony export */ isSubscription: () => (/* binding */ isSubscription) +/* harmony export */ }); +/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/isFunction */ 78347); +/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/UnsubscriptionError */ 62907); +/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/arrRemove */ 38248); + + + +class Subscription { + constructor(initialTeardown) { + this.initialTeardown = initialTeardown; + this.closed = false; + this._parentage = null; + this._finalizers = null; + } + unsubscribe() { + let errors; + if (!this.closed) { + this.closed = true; + const { + _parentage + } = this; + if (_parentage) { + this._parentage = null; + if (Array.isArray(_parentage)) { + for (const parent of _parentage) { + parent.remove(this); + } + } else { + _parentage.remove(this); + } + } + const { + initialTeardown: initialFinalizer + } = this; + if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(initialFinalizer)) { + try { + initialFinalizer(); + } catch (e) { + errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError ? e.errors : [e]; + } + } + const { + _finalizers + } = this; + if (_finalizers) { + this._finalizers = null; + for (const finalizer of _finalizers) { + try { + execFinalizer(finalizer); + } catch (err) { + errors = errors !== null && errors !== void 0 ? errors : []; + if (err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError) { + errors = [...errors, ...err.errors]; + } else { + errors.push(err); + } + } + } + } + if (errors) { + throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_1__.UnsubscriptionError(errors); + } + } + } + add(teardown) { + var _a; + if (teardown && teardown !== this) { + if (this.closed) { + execFinalizer(teardown); + } else { + if (teardown instanceof Subscription) { + if (teardown.closed || teardown._hasParent(this)) { + return; + } + teardown._addParent(this); + } + (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); + } + } + } + _hasParent(parent) { + const { + _parentage + } = this; + return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent); + } + _addParent(parent) { + const { + _parentage + } = this; + this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; + } + _removeParent(parent) { + const { + _parentage + } = this; + if (_parentage === parent) { + this._parentage = null; + } else if (Array.isArray(_parentage)) { + (0,_util_arrRemove__WEBPACK_IMPORTED_MODULE_2__.arrRemove)(_parentage, parent); + } + } + remove(teardown) { + const { + _finalizers + } = this; + _finalizers && (0,_util_arrRemove__WEBPACK_IMPORTED_MODULE_2__.arrRemove)(_finalizers, teardown); + if (teardown instanceof Subscription) { + teardown._removeParent(this); + } + } +} +Subscription.EMPTY = (() => { + const empty = new Subscription(); + empty.closed = true; + return empty; +})(); +const EMPTY_SUBSCRIPTION = Subscription.EMPTY; +function isSubscription(value) { + return value instanceof Subscription || value && 'closed' in value && (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(value.remove) && (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(value.add) && (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(value.unsubscribe); +} +function execFinalizer(finalizer) { + if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(finalizer)) { + finalizer(); + } else { + finalizer.unsubscribe(); + } +} + +/***/ }), + +/***/ 90302: +/*!*******************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/config.js ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ config: () => (/* binding */ config) +/* harmony export */ }); +const config = { + onUnhandledError: null, + onStoppedNotification: null, + Promise: undefined, + useDeprecatedSynchronousErrorHandling: false, + useDeprecatedNextContext: false +}; + +/***/ }), + +/***/ 60381: +/*!*********************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ConnectableObservable: () => (/* binding */ ConnectableObservable) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 64517); +/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscription */ 36421); +/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../operators/refCount */ 78606); +/* harmony import */ var _operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/OperatorSubscriber */ 21676); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/lift */ 81474); + + + + + +class ConnectableObservable extends _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable { + constructor(source, subjectFactory) { + super(); + this.source = source; + this.subjectFactory = subjectFactory; + this._subject = null; + this._refCount = 0; + this._connection = null; + if ((0,_util_lift__WEBPACK_IMPORTED_MODULE_1__.hasLift)(source)) { + this.lift = source.lift; + } + } + _subscribe(subscriber) { + return this.getSubject().subscribe(subscriber); + } + getSubject() { + const subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + } + _teardown() { + this._refCount = 0; + const { + _connection + } = this; + this._subject = this._connection = null; + _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); + } + connect() { + let connection = this._connection; + if (!connection) { + connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_2__.Subscription(); + const subject = this.getSubject(); + connection.add(this.source.subscribe((0,_operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_3__.createOperatorSubscriber)(subject, undefined, () => { + this._teardown(); + subject.complete(); + }, err => { + this._teardown(); + subject.error(err); + }, () => this._teardown()))); + if (connection.closed) { + this._connection = null; + connection = _Subscription__WEBPACK_IMPORTED_MODULE_2__.Subscription.EMPTY; + } + } + return connection; + } + refCount() { + return (0,_operators_refCount__WEBPACK_IMPORTED_MODULE_4__.refCount)()(this); + } +} + +/***/ }), + +/***/ 11640: +/*!*************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/combineLatest.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ combineLatest: () => (/* binding */ combineLatest), +/* harmony export */ combineLatestInit: () => (/* binding */ combineLatestInit) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Observable */ 64517); +/* harmony import */ var _util_argsArgArrayOrObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/argsArgArrayOrObject */ 65541); +/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./from */ 73496); +/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/identity */ 12337); +/* harmony import */ var _util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/mapOneOrManyArgs */ 8758); +/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/args */ 61866); +/* harmony import */ var _util_createObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/createObject */ 63060); +/* harmony import */ var _operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../operators/OperatorSubscriber */ 21676); +/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util/executeSchedule */ 82437); + + + + + + + + + +function combineLatest(...args) { + const scheduler = (0,_util_args__WEBPACK_IMPORTED_MODULE_0__.popScheduler)(args); + const resultSelector = (0,_util_args__WEBPACK_IMPORTED_MODULE_0__.popResultSelector)(args); + const { + args: observables, + keys + } = (0,_util_argsArgArrayOrObject__WEBPACK_IMPORTED_MODULE_1__.argsArgArrayOrObject)(args); + if (observables.length === 0) { + return (0,_from__WEBPACK_IMPORTED_MODULE_2__.from)([], scheduler); + } + const result = new _Observable__WEBPACK_IMPORTED_MODULE_3__.Observable(combineLatestInit(observables, scheduler, keys ? values => (0,_util_createObject__WEBPACK_IMPORTED_MODULE_4__.createObject)(keys, values) : _util_identity__WEBPACK_IMPORTED_MODULE_5__.identity)); + return resultSelector ? result.pipe((0,_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_6__.mapOneOrManyArgs)(resultSelector)) : result; +} +function combineLatestInit(observables, scheduler, valueTransform = _util_identity__WEBPACK_IMPORTED_MODULE_5__.identity) { + return subscriber => { + maybeSchedule(scheduler, () => { + const { + length + } = observables; + const values = new Array(length); + let active = length; + let remainingFirstValues = length; + for (let i = 0; i < length; i++) { + maybeSchedule(scheduler, () => { + const source = (0,_from__WEBPACK_IMPORTED_MODULE_2__.from)(observables[i], scheduler); + let hasFirstValue = false; + source.subscribe((0,_operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_7__.createOperatorSubscriber)(subscriber, value => { + values[i] = value; + if (!hasFirstValue) { + hasFirstValue = true; + remainingFirstValues--; + } + if (!remainingFirstValues) { + subscriber.next(valueTransform(values.slice())); + } + }, () => { + if (! --active) { + subscriber.complete(); + } + })); + }, subscriber); + } + }, subscriber); + }; +} +function maybeSchedule(scheduler, execute, subscription) { + if (scheduler) { + (0,_util_executeSchedule__WEBPACK_IMPORTED_MODULE_8__.executeSchedule)(subscription, scheduler, execute); + } else { + execute(); + } +} + +/***/ }), + +/***/ 36812: +/*!******************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/concat.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ concat: () => (/* binding */ concat) +/* harmony export */ }); +/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../operators/concatAll */ 47679); +/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/args */ 61866); +/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ 73496); + + + +function concat(...args) { + return (0,_operators_concatAll__WEBPACK_IMPORTED_MODULE_0__.concatAll)()((0,_from__WEBPACK_IMPORTED_MODULE_1__.from)(args, (0,_util_args__WEBPACK_IMPORTED_MODULE_2__.popScheduler)(args))); +} + +/***/ }), + +/***/ 78210: +/*!*****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/defer.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ defer: () => (/* binding */ defer) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 64517); +/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./innerFrom */ 58); + + +function defer(observableFactory) { + return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => { + (0,_innerFrom__WEBPACK_IMPORTED_MODULE_1__.innerFrom)(observableFactory()).subscribe(subscriber); + }); +} + +/***/ }), + +/***/ 90523: +/*!*****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/empty.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ EMPTY: () => (/* binding */ EMPTY), +/* harmony export */ empty: () => (/* binding */ empty) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 64517); + +const EMPTY = new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => subscriber.complete()); +function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : EMPTY; +} +function emptyScheduled(scheduler) { + return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => scheduler.schedule(() => subscriber.complete())); +} + +/***/ }), + +/***/ 4656: +/*!********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/forkJoin.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ forkJoin: () => (/* binding */ forkJoin) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ 64517); +/* harmony import */ var _util_argsArgArrayOrObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/argsArgArrayOrObject */ 65541); +/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./innerFrom */ 58); +/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/args */ 61866); +/* harmony import */ var _operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../operators/OperatorSubscriber */ 21676); +/* harmony import */ var _util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/mapOneOrManyArgs */ 8758); +/* harmony import */ var _util_createObject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/createObject */ 63060); + + + + + + + +function forkJoin(...args) { + const resultSelector = (0,_util_args__WEBPACK_IMPORTED_MODULE_0__.popResultSelector)(args); + const { + args: sources, + keys + } = (0,_util_argsArgArrayOrObject__WEBPACK_IMPORTED_MODULE_1__.argsArgArrayOrObject)(args); + const result = new _Observable__WEBPACK_IMPORTED_MODULE_2__.Observable(subscriber => { + const { + length + } = sources; + if (!length) { + subscriber.complete(); + return; + } + const values = new Array(length); + let remainingCompletions = length; + let remainingEmissions = length; + for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) { + let hasValue = false; + (0,_innerFrom__WEBPACK_IMPORTED_MODULE_3__.innerFrom)(sources[sourceIndex]).subscribe((0,_operators_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_4__.createOperatorSubscriber)(subscriber, value => { + if (!hasValue) { + hasValue = true; + remainingEmissions--; + } + values[sourceIndex] = value; + }, () => remainingCompletions--, undefined, () => { + if (!remainingCompletions || !hasValue) { + if (!remainingEmissions) { + subscriber.next(keys ? (0,_util_createObject__WEBPACK_IMPORTED_MODULE_5__.createObject)(keys, values) : values); + } + subscriber.complete(); + } + })); + } + }); + return resultSelector ? result.pipe((0,_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_6__.mapOneOrManyArgs)(resultSelector)) : result; +} + +/***/ }), + +/***/ 73496: +/*!****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/from.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ from: () => (/* binding */ from) +/* harmony export */ }); +/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduled/scheduled */ 76333); +/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./innerFrom */ 58); + + +function from(input, scheduler) { + return scheduler ? (0,_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_0__.scheduled)(input, scheduler) : (0,_innerFrom__WEBPACK_IMPORTED_MODULE_1__.innerFrom)(input); +} + +/***/ }), + +/***/ 47066: +/*!*********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/fromEvent.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ fromEvent: () => (/* binding */ fromEvent) +/* harmony export */ }); +/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../observable/innerFrom */ 58); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Observable */ 64517); +/* harmony import */ var _operators_mergeMap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/mergeMap */ 64752); +/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArrayLike */ 19085); +/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isFunction */ 78347); +/* harmony import */ var _util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/mapOneOrManyArgs */ 8758); + + + + + + +const nodeEventEmitterMethods = ['addListener', 'removeListener']; +const eventTargetMethods = ['addEventListener', 'removeEventListener']; +const jqueryMethods = ['on', 'off']; +function fromEvent(target, eventName, options, resultSelector) { + if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(options)) { + resultSelector = options; + options = undefined; + } + if (resultSelector) { + return fromEvent(target, eventName, options).pipe((0,_util_mapOneOrManyArgs__WEBPACK_IMPORTED_MODULE_1__.mapOneOrManyArgs)(resultSelector)); + } + const [add, remove] = isEventTarget(target) ? eventTargetMethods.map(methodName => handler => target[methodName](eventName, handler, options)) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : []; + if (!add) { + if ((0,_util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__.isArrayLike)(target)) { + return (0,_operators_mergeMap__WEBPACK_IMPORTED_MODULE_3__.mergeMap)(subTarget => fromEvent(subTarget, eventName, options))((0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_4__.innerFrom)(target)); + } + } + if (!add) { + throw new TypeError('Invalid event target'); + } + return new _Observable__WEBPACK_IMPORTED_MODULE_5__.Observable(subscriber => { + const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]); + add(handler); + return () => remove(handler); + }); +} +function toCommonHandlerRegistry(target, eventName) { + return methodName => handler => target[methodName](eventName, handler); +} +function isNodeStyleEventEmitter(target) { + return (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(target.addListener) && (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(target.removeListener); +} +function isJQueryStyleEventEmitter(target) { + return (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(target.on) && (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(target.off); +} +function isEventTarget(target) { + return (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(target.addEventListener) && (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(target.removeEventListener); +} + +/***/ }), + +/***/ 58: +/*!*********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/innerFrom.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ fromArrayLike: () => (/* binding */ fromArrayLike), +/* harmony export */ fromAsyncIterable: () => (/* binding */ fromAsyncIterable), +/* harmony export */ fromInteropObservable: () => (/* binding */ fromInteropObservable), +/* harmony export */ fromIterable: () => (/* binding */ fromIterable), +/* harmony export */ fromPromise: () => (/* binding */ fromPromise), +/* harmony export */ fromReadableStreamLike: () => (/* binding */ fromReadableStreamLike), +/* harmony export */ innerFrom: () => (/* binding */ innerFrom) +/* harmony export */ }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! tslib */ 9799); +/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArrayLike */ 19085); +/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isPromise */ 182); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 64517); +/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isInteropObservable */ 20835); +/* harmony import */ var _util_isAsyncIterable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isAsyncIterable */ 10165); +/* harmony import */ var _util_throwUnobservableError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util/throwUnobservableError */ 37603); +/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/isIterable */ 54377); +/* harmony import */ var _util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/isReadableStreamLike */ 48120); +/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../util/isFunction */ 78347); +/* harmony import */ var _util_reportUnhandledError__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../util/reportUnhandledError */ 38058); +/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../symbol/observable */ 44770); + + + + + + + + + + + + +function innerFrom(input) { + if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable) { + return input; + } + if (input != null) { + if ((0,_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_1__.isInteropObservable)(input)) { + return fromInteropObservable(input); + } + if ((0,_util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__.isArrayLike)(input)) { + return fromArrayLike(input); + } + if ((0,_util_isPromise__WEBPACK_IMPORTED_MODULE_3__.isPromise)(input)) { + return fromPromise(input); + } + if ((0,_util_isAsyncIterable__WEBPACK_IMPORTED_MODULE_4__.isAsyncIterable)(input)) { + return fromAsyncIterable(input); + } + if ((0,_util_isIterable__WEBPACK_IMPORTED_MODULE_5__.isIterable)(input)) { + return fromIterable(input); + } + if ((0,_util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_6__.isReadableStreamLike)(input)) { + return fromReadableStreamLike(input); + } + } + throw (0,_util_throwUnobservableError__WEBPACK_IMPORTED_MODULE_7__.createInvalidObservableTypeError)(input); +} +function fromInteropObservable(obj) { + return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => { + const obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__.observable](); + if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_9__.isFunction)(obs.subscribe)) { + return obs.subscribe(subscriber); + } + throw new TypeError('Provided object does not correctly implement Symbol.observable'); + }); +} +function fromArrayLike(array) { + return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => { + for (let i = 0; i < array.length && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + subscriber.complete(); + }); +} +function fromPromise(promise) { + return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => { + promise.then(value => { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, err => subscriber.error(err)).then(null, _util_reportUnhandledError__WEBPACK_IMPORTED_MODULE_10__.reportUnhandledError); + }); +} +function fromIterable(iterable) { + return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => { + for (const value of iterable) { + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + subscriber.complete(); + }); +} +function fromAsyncIterable(asyncIterable) { + return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => { + process(asyncIterable, subscriber).catch(err => subscriber.error(err)); + }); +} +function fromReadableStreamLike(readableStream) { + return fromAsyncIterable((0,_util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_6__.readableStreamLikeToAsyncGenerator)(readableStream)); +} +function process(asyncIterable, subscriber) { + var asyncIterable_1, asyncIterable_1_1; + var e_1, _a; + return (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__awaiter)(this, void 0, void 0, function* () { + try { + for (asyncIterable_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__asyncValues)(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) { + const value = asyncIterable_1_1.value; + subscriber.next(value); + if (subscriber.closed) { + return; + } + } + } catch (e_1_1) { + e_1 = { + error: e_1_1 + }; + } finally { + try { + if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1); + } finally { + if (e_1) throw e_1.error; + } + } + subscriber.complete(); + }); +} + +/***/ }), + +/***/ 870: +/*!*****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/merge.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ merge: () => (/* binding */ merge) +/* harmony export */ }); +/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../operators/mergeAll */ 9041); +/* harmony import */ var _innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./innerFrom */ 58); +/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./empty */ 90523); +/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/args */ 61866); +/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./from */ 73496); + + + + + +function merge(...args) { + const scheduler = (0,_util_args__WEBPACK_IMPORTED_MODULE_0__.popScheduler)(args); + const concurrent = (0,_util_args__WEBPACK_IMPORTED_MODULE_0__.popNumber)(args, Infinity); + const sources = args; + return !sources.length ? _empty__WEBPACK_IMPORTED_MODULE_1__.EMPTY : sources.length === 1 ? (0,_innerFrom__WEBPACK_IMPORTED_MODULE_2__.innerFrom)(sources[0]) : (0,_operators_mergeAll__WEBPACK_IMPORTED_MODULE_3__.mergeAll)(concurrent)((0,_from__WEBPACK_IMPORTED_MODULE_4__.from)(sources, scheduler)); +} + +/***/ }), + +/***/ 13901: +/*!**************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/of.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ of: () => (/* binding */ of) +/* harmony export */ }); +/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/args */ 61866); +/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./from */ 73496); + + +function of(...args) { + const scheduler = (0,_util_args__WEBPACK_IMPORTED_MODULE_0__.popScheduler)(args); + return (0,_from__WEBPACK_IMPORTED_MODULE_1__.from)(args, scheduler); +} + +/***/ }), + +/***/ 5219: +/*!*****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/observable/timer.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ timer: () => (/* binding */ timer) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Observable */ 64517); +/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ 64672); +/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isScheduler */ 72114); +/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isDate */ 40623); + + + + +function timer(dueTime = 0, intervalOrScheduler, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__.async) { + let intervalDuration = -1; + if (intervalOrScheduler != null) { + if ((0,_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__.isScheduler)(intervalOrScheduler)) { + scheduler = intervalOrScheduler; + } else { + intervalDuration = intervalOrScheduler; + } + } + return new _Observable__WEBPACK_IMPORTED_MODULE_2__.Observable(subscriber => { + let due = (0,_util_isDate__WEBPACK_IMPORTED_MODULE_3__.isValidDate)(dueTime) ? +dueTime - scheduler.now() : dueTime; + if (due < 0) { + due = 0; + } + let n = 0; + return scheduler.schedule(function () { + if (!subscriber.closed) { + subscriber.next(n++); + if (0 <= intervalDuration) { + this.schedule(undefined, intervalDuration); + } else { + subscriber.complete(); + } + } + }, due); + }); +} + +/***/ }), + +/***/ 21676: +/*!*****************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ OperatorSubscriber: () => (/* binding */ OperatorSubscriber), +/* harmony export */ createOperatorSubscriber: () => (/* binding */ createOperatorSubscriber) +/* harmony export */ }); +/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscriber */ 4258); + +function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { + return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); +} +class OperatorSubscriber extends _Subscriber__WEBPACK_IMPORTED_MODULE_0__.Subscriber { + constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { + super(destination); + this.onFinalize = onFinalize; + this.shouldUnsubscribe = shouldUnsubscribe; + this._next = onNext ? function (value) { + try { + onNext(value); + } catch (err) { + destination.error(err); + } + } : super._next; + this._error = onError ? function (err) { + try { + onError(err); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : super._error; + this._complete = onComplete ? function () { + try { + onComplete(); + } catch (err) { + destination.error(err); + } finally { + this.unsubscribe(); + } + } : super._complete; + } + unsubscribe() { + var _a; + if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { + const { + closed + } = this; + super.unsubscribe(); + !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); + } + } +} + +/***/ }), + +/***/ 76515: +/*!****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/audit.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ audit: () => (/* binding */ audit) +/* harmony export */ }); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/innerFrom */ 58); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + + +function audit(durationSelector) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + let hasValue = false; + let lastValue = null; + let durationSubscriber = null; + let isComplete = false; + const endDuration = () => { + durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); + durationSubscriber = null; + if (hasValue) { + hasValue = false; + const value = lastValue; + lastValue = null; + subscriber.next(value); + } + isComplete && subscriber.complete(); + }; + const cleanupDuration = () => { + durationSubscriber = null; + isComplete && subscriber.complete(); + }; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, value => { + hasValue = true; + lastValue = value; + if (!durationSubscriber) { + (0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__.innerFrom)(durationSelector(value)).subscribe(durationSubscriber = (0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, endDuration, cleanupDuration)); + } + }, () => { + isComplete = true; + (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); + })); + }); +} + +/***/ }), + +/***/ 71654: +/*!********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/auditTime.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ auditTime: () => (/* binding */ auditTime) +/* harmony export */ }); +/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ 64672); +/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./audit */ 76515); +/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/timer */ 5219); + + + +function auditTime(duration, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__.asyncScheduler) { + return (0,_audit__WEBPACK_IMPORTED_MODULE_1__.audit)(() => (0,_observable_timer__WEBPACK_IMPORTED_MODULE_2__.timer)(duration, scheduler)); +} + +/***/ }), + +/***/ 47679: +/*!********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/concatAll.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ concatAll: () => (/* binding */ concatAll) +/* harmony export */ }); +/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeAll */ 9041); + +function concatAll() { + return (0,_mergeAll__WEBPACK_IMPORTED_MODULE_0__.mergeAll)(1); +} + +/***/ }), + +/***/ 75214: +/*!********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/concatMap.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ concatMap: () => (/* binding */ concatMap) +/* harmony export */ }); +/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeMap */ 64752); +/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isFunction */ 78347); + + +function concatMap(project, resultSelector) { + return (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(resultSelector) ? (0,_mergeMap__WEBPACK_IMPORTED_MODULE_1__.mergeMap)(project, resultSelector, 1) : (0,_mergeMap__WEBPACK_IMPORTED_MODULE_1__.mergeMap)(project, 1); +} + +/***/ }), + +/***/ 43396: +/*!***********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/debounceTime.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ debounceTime: () => (/* binding */ debounceTime) +/* harmony export */ }); +/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/async */ 64672); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + + +function debounceTime(dueTime, scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__.asyncScheduler) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_1__.operate)((source, subscriber) => { + let activeTask = null; + let lastValue = null; + let lastTime = null; + const emit = () => { + if (activeTask) { + activeTask.unsubscribe(); + activeTask = null; + const value = lastValue; + lastValue = null; + subscriber.next(value); + } + }; + function emitWhenIdle() { + const targetTime = lastTime + dueTime; + const now = scheduler.now(); + if (now < targetTime) { + activeTask = this.schedule(undefined, targetTime - now); + subscriber.add(activeTask); + return; + } + emit(); + } + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__.createOperatorSubscriber)(subscriber, value => { + lastValue = value; + lastTime = scheduler.now(); + if (!activeTask) { + activeTask = scheduler.schedule(emitWhenIdle, dueTime); + subscriber.add(activeTask); + } + }, () => { + emit(); + subscriber.complete(); + }, undefined, () => { + lastValue = activeTask = null; + })); + }); +} + +/***/ }), + +/***/ 46257: +/*!*************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ defaultIfEmpty: () => (/* binding */ defaultIfEmpty) +/* harmony export */ }); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + +function defaultIfEmpty(defaultValue) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + let hasValue = false; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, value => { + hasValue = true; + subscriber.next(value); + }, () => { + if (!hasValue) { + subscriber.next(defaultValue); + } + subscriber.complete(); + })); + }); +} + +/***/ }), + +/***/ 79746: +/*!*******************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ distinctUntilChanged: () => (/* binding */ distinctUntilChanged) +/* harmony export */ }); +/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/identity */ 12337); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + + +function distinctUntilChanged(comparator, keySelector = _util_identity__WEBPACK_IMPORTED_MODULE_0__.identity) { + comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_1__.operate)((source, subscriber) => { + let previousKey; + let first = true; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__.createOperatorSubscriber)(subscriber, value => { + const currentKey = keySelector(value); + if (first || !comparator(previousKey, currentKey)) { + first = false; + previousKey = currentKey; + subscriber.next(value); + } + })); + }); +} +function defaultCompare(a, b) { + return a === b; +} + +/***/ }), + +/***/ 61856: +/*!*****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/filter.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ filter: () => (/* binding */ filter) +/* harmony export */ }); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + +function filter(predicate, thisArg) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + let index = 0; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, value => predicate.call(thisArg, value, index++) && subscriber.next(value))); + }); +} + +/***/ }), + +/***/ 39848: +/*!*******************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/finalize.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ finalize: () => (/* binding */ finalize) +/* harmony export */ }); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); + +function finalize(callback) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + try { + source.subscribe(subscriber); + } finally { + subscriber.add(callback); + } + }); +} + +/***/ }), + +/***/ 3782: +/*!****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/first.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ first: () => (/* binding */ first) +/* harmony export */ }); +/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util/EmptyError */ 53826); +/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filter */ 61856); +/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take */ 75117); +/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./defaultIfEmpty */ 46257); +/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./throwIfEmpty */ 41114); +/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ 12337); + + + + + + +function first(predicate, defaultValue) { + const hasDefaultValue = arguments.length >= 2; + return source => source.pipe(predicate ? (0,_filter__WEBPACK_IMPORTED_MODULE_0__.filter)((v, i) => predicate(v, i, source)) : _util_identity__WEBPACK_IMPORTED_MODULE_1__.identity, (0,_take__WEBPACK_IMPORTED_MODULE_2__.take)(1), hasDefaultValue ? (0,_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__.defaultIfEmpty)(defaultValue) : (0,_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__.throwIfEmpty)(() => new _util_EmptyError__WEBPACK_IMPORTED_MODULE_5__.EmptyError())); +} + +/***/ }), + +/***/ 24406: +/*!**************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/map.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ map: () => (/* binding */ map) +/* harmony export */ }); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + +function map(project, thisArg) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + let index = 0; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, value => { + subscriber.next(project.call(thisArg, value, index++)); + })); + }); +} + +/***/ }), + +/***/ 9041: +/*!*******************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/mergeAll.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ mergeAll: () => (/* binding */ mergeAll) +/* harmony export */ }); +/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeMap */ 64752); +/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/identity */ 12337); + + +function mergeAll(concurrent = Infinity) { + return (0,_mergeMap__WEBPACK_IMPORTED_MODULE_0__.mergeMap)(_util_identity__WEBPACK_IMPORTED_MODULE_1__.identity, concurrent); +} + +/***/ }), + +/***/ 64608: +/*!*************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ mergeInternals: () => (/* binding */ mergeInternals) +/* harmony export */ }); +/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/innerFrom */ 58); +/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/executeSchedule */ 82437); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + + +function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { + const buffer = []; + let active = 0; + let index = 0; + let isComplete = false; + const checkComplete = () => { + if (isComplete && !buffer.length && !active) { + subscriber.complete(); + } + }; + const outerNext = value => active < concurrent ? doInnerSub(value) : buffer.push(value); + const doInnerSub = value => { + expand && subscriber.next(value); + active++; + let innerComplete = false; + (0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__.innerFrom)(project(value, index++)).subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, innerValue => { + onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); + if (expand) { + outerNext(innerValue); + } else { + subscriber.next(innerValue); + } + }, () => { + innerComplete = true; + }, undefined, () => { + if (innerComplete) { + try { + active--; + while (buffer.length && active < concurrent) { + const bufferedValue = buffer.shift(); + if (innerSubScheduler) { + (0,_util_executeSchedule__WEBPACK_IMPORTED_MODULE_2__.executeSchedule)(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue)); + } else { + doInnerSub(bufferedValue); + } + } + checkComplete(); + } catch (err) { + subscriber.error(err); + } + } + })); + }; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, outerNext, () => { + isComplete = true; + checkComplete(); + })); + return () => { + additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); + }; +} + +/***/ }), + +/***/ 64752: +/*!*******************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/mergeMap.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ mergeMap: () => (/* binding */ mergeMap) +/* harmony export */ }); +/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map */ 24406); +/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/innerFrom */ 58); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _mergeInternals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mergeInternals */ 64608); +/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isFunction */ 78347); + + + + + +function mergeMap(project, resultSelector, concurrent = Infinity) { + if ((0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(resultSelector)) { + return mergeMap((a, i) => (0,_map__WEBPACK_IMPORTED_MODULE_1__.map)((b, ii) => resultSelector(a, b, i, ii))((0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__.innerFrom)(project(a, i))), concurrent); + } else if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_3__.operate)((source, subscriber) => (0,_mergeInternals__WEBPACK_IMPORTED_MODULE_4__.mergeInternals)(source, subscriber, project, concurrent)); +} + +/***/ }), + +/***/ 39721: +/*!********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/observeOn.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ observeOn: () => (/* binding */ observeOn) +/* harmony export */ }); +/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/executeSchedule */ 82437); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + + +function observeOn(scheduler, delay = 0) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, value => (0,_util_executeSchedule__WEBPACK_IMPORTED_MODULE_2__.executeSchedule)(subscriber, scheduler, () => subscriber.next(value), delay), () => (0,_util_executeSchedule__WEBPACK_IMPORTED_MODULE_2__.executeSchedule)(subscriber, scheduler, () => subscriber.complete(), delay), err => (0,_util_executeSchedule__WEBPACK_IMPORTED_MODULE_2__.executeSchedule)(subscriber, scheduler, () => subscriber.error(err), delay))); + }); +} + +/***/ }), + +/***/ 23246: +/*!*******************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/pairwise.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ pairwise: () => (/* binding */ pairwise) +/* harmony export */ }); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + +function pairwise() { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + let prev; + let hasPrev = false; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, value => { + const p = prev; + prev = value; + hasPrev && subscriber.next([p, value]); + hasPrev = true; + })); + }); +} + +/***/ }), + +/***/ 78606: +/*!*******************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/refCount.js ***! + \*******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ refCount: () => (/* binding */ refCount) +/* harmony export */ }); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + +function refCount() { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + let connection = null; + source._refCount++; + const refCounter = (0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, undefined, undefined, undefined, () => { + if (!source || source._refCount <= 0 || 0 < --source._refCount) { + connection = null; + return; + } + const sharedConnection = source._connection; + const conn = connection; + connection = null; + if (sharedConnection && (!conn || sharedConnection === conn)) { + sharedConnection.unsubscribe(); + } + subscriber.unsubscribe(); + }); + source.subscribe(refCounter); + if (!refCounter.closed) { + connection = source.connect(); + } + }); +} + +/***/ }), + +/***/ 95603: +/*!****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/share.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ share: () => (/* binding */ share) +/* harmony export */ }); +/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../observable/innerFrom */ 58); +/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subject */ 63150); +/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Subscriber */ 4258); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/lift */ 81474); + + + + +function share(options = {}) { + const { + connector = () => new _Subject__WEBPACK_IMPORTED_MODULE_0__.Subject(), + resetOnError = true, + resetOnComplete = true, + resetOnRefCountZero = true + } = options; + return wrapperSource => { + let connection; + let resetConnection; + let subject; + let refCount = 0; + let hasCompleted = false; + let hasErrored = false; + const cancelReset = () => { + resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); + resetConnection = undefined; + }; + const reset = () => { + cancelReset(); + connection = subject = undefined; + hasCompleted = hasErrored = false; + }; + const resetAndUnsubscribe = () => { + const conn = connection; + reset(); + conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); + }; + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_1__.operate)((source, subscriber) => { + refCount++; + if (!hasErrored && !hasCompleted) { + cancelReset(); + } + const dest = subject = subject !== null && subject !== void 0 ? subject : connector(); + subscriber.add(() => { + refCount--; + if (refCount === 0 && !hasErrored && !hasCompleted) { + resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); + } + }); + dest.subscribe(subscriber); + if (!connection && refCount > 0) { + connection = new _Subscriber__WEBPACK_IMPORTED_MODULE_2__.SafeSubscriber({ + next: value => dest.next(value), + error: err => { + hasErrored = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnError, err); + dest.error(err); + }, + complete: () => { + hasCompleted = true; + cancelReset(); + resetConnection = handleReset(reset, resetOnComplete); + dest.complete(); + } + }); + (0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__.innerFrom)(source).subscribe(connection); + } + })(wrapperSource); + }; +} +function handleReset(reset, on, ...args) { + if (on === true) { + reset(); + return; + } + if (on === false) { + return; + } + const onSubscriber = new _Subscriber__WEBPACK_IMPORTED_MODULE_2__.SafeSubscriber({ + next: () => { + onSubscriber.unsubscribe(); + reset(); + } + }); + return (0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_3__.innerFrom)(on(...args)).subscribe(onSubscriber); +} + +/***/ }), + +/***/ 95840: +/*!**********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/shareReplay.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ shareReplay: () => (/* binding */ shareReplay) +/* harmony export */ }); +/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ReplaySubject */ 61151); +/* harmony import */ var _share__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./share */ 95603); + + +function shareReplay(configOrBufferSize, windowTime, scheduler) { + let bufferSize; + let refCount = false; + if (configOrBufferSize && typeof configOrBufferSize === 'object') { + ({ + bufferSize = Infinity, + windowTime = Infinity, + refCount = false, + scheduler + } = configOrBufferSize); + } else { + bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity; + } + return (0,_share__WEBPACK_IMPORTED_MODULE_0__.share)({ + connector: () => new _ReplaySubject__WEBPACK_IMPORTED_MODULE_1__.ReplaySubject(bufferSize, windowTime, scheduler), + resetOnError: true, + resetOnComplete: false, + resetOnRefCountZero: refCount + }); +} + +/***/ }), + +/***/ 99473: +/*!***************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/skip.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ skip: () => (/* binding */ skip) +/* harmony export */ }); +/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filter */ 61856); + +function skip(count) { + return (0,_filter__WEBPACK_IMPORTED_MODULE_0__.filter)((_, index) => count <= index); +} + +/***/ }), + +/***/ 56816: +/*!********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/startWith.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ startWith: () => (/* binding */ startWith) +/* harmony export */ }); +/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/concat */ 36812); +/* harmony import */ var _util_args__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/args */ 61866); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/lift */ 81474); + + + +function startWith(...values) { + const scheduler = (0,_util_args__WEBPACK_IMPORTED_MODULE_0__.popScheduler)(values); + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_1__.operate)((source, subscriber) => { + (scheduler ? (0,_observable_concat__WEBPACK_IMPORTED_MODULE_2__.concat)(values, source, scheduler) : (0,_observable_concat__WEBPACK_IMPORTED_MODULE_2__.concat)(values, source)).subscribe(subscriber); + }); +} + +/***/ }), + +/***/ 14869: +/*!**********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ subscribeOn: () => (/* binding */ subscribeOn) +/* harmony export */ }); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); + +function subscribeOn(scheduler, delay = 0) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay)); + }); +} + +/***/ }), + +/***/ 21082: +/*!********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/switchMap.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ switchMap: () => (/* binding */ switchMap) +/* harmony export */ }); +/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../observable/innerFrom */ 58); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + + +function switchMap(project, resultSelector) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + let innerSubscriber = null; + let index = 0; + let isComplete = false; + const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete(); + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, value => { + innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); + let innerIndex = 0; + const outerIndex = index++; + (0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_2__.innerFrom)(project(value, outerIndex)).subscribe(innerSubscriber = (0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, innerValue => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => { + innerSubscriber = null; + checkComplete(); + })); + }, () => { + isComplete = true; + checkComplete(); + })); + }); +} + +/***/ }), + +/***/ 75117: +/*!***************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/take.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ take: () => (/* binding */ take) +/* harmony export */ }); +/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/empty */ 90523); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + + +function take(count) { + return count <= 0 ? () => _observable_empty__WEBPACK_IMPORTED_MODULE_0__.EMPTY : (0,_util_lift__WEBPACK_IMPORTED_MODULE_1__.operate)((source, subscriber) => { + let seen = 0; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__.createOperatorSubscriber)(subscriber, value => { + if (++seen <= count) { + subscriber.next(value); + if (count <= seen) { + subscriber.complete(); + } + } + })); + }); +} + +/***/ }), + +/***/ 65213: +/*!********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/takeUntil.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ takeUntil: () => (/* binding */ takeUntil) +/* harmony export */ }); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); +/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../observable/innerFrom */ 58); +/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/noop */ 86075); + + + + +function takeUntil(notifier) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + (0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_1__.innerFrom)(notifier).subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__.createOperatorSubscriber)(subscriber, () => subscriber.complete(), _util_noop__WEBPACK_IMPORTED_MODULE_3__.noop)); + !subscriber.closed && source.subscribe(subscriber); + }); +} + +/***/ }), + +/***/ 92348: +/*!********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/takeWhile.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ takeWhile: () => (/* binding */ takeWhile) +/* harmony export */ }); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + +function takeWhile(predicate, inclusive = false) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + let index = 0; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, value => { + const result = predicate(value, index++); + (result || inclusive) && subscriber.next(value); + !result && subscriber.complete(); + })); + }); +} + +/***/ }), + +/***/ 61969: +/*!**************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/tap.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ tap: () => (/* binding */ tap) +/* harmony export */ }); +/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isFunction */ 78347); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); +/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/identity */ 12337); + + + + +function tap(observerOrNext, error, complete) { + const tapObserver = (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(observerOrNext) || error || complete ? { + next: observerOrNext, + error, + complete + } : observerOrNext; + return tapObserver ? (0,_util_lift__WEBPACK_IMPORTED_MODULE_1__.operate)((source, subscriber) => { + var _a; + (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + let isUnsub = true; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__.createOperatorSubscriber)(subscriber, value => { + var _a; + (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); + subscriber.next(value); + }, () => { + var _a; + isUnsub = false; + (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + subscriber.complete(); + }, err => { + var _a; + isUnsub = false; + (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); + subscriber.error(err); + }, () => { + var _a, _b; + if (isUnsub) { + (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); + } + (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); + })); + }) : _util_identity__WEBPACK_IMPORTED_MODULE_3__.identity; +} + +/***/ }), + +/***/ 41114: +/*!***********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js ***! + \***********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ throwIfEmpty: () => (/* binding */ throwIfEmpty) +/* harmony export */ }); +/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/EmptyError */ 53826); +/* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/lift */ 81474); +/* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperatorSubscriber */ 21676); + + + +function throwIfEmpty(errorFactory = defaultErrorFactory) { + return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__.operate)((source, subscriber) => { + let hasValue = false; + source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__.createOperatorSubscriber)(subscriber, value => { + hasValue = true; + subscriber.next(value); + }, () => hasValue ? subscriber.complete() : subscriber.error(errorFactory()))); + }); +} +function defaultErrorFactory() { + return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__.EmptyError(); +} + +/***/ }), + +/***/ 69064: +/*!************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ scheduleArray: () => (/* binding */ scheduleArray) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 64517); + +function scheduleArray(input, scheduler) { + return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => { + let i = 0; + return scheduler.schedule(function () { + if (i === input.length) { + subscriber.complete(); + } else { + subscriber.next(input[i++]); + if (!subscriber.closed) { + this.schedule(); + } + } + }); + }); +} + +/***/ }), + +/***/ 98663: +/*!********************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ scheduleAsyncIterable: () => (/* binding */ scheduleAsyncIterable) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 64517); +/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/executeSchedule */ 82437); + + +function scheduleAsyncIterable(input, scheduler) { + if (!input) { + throw new Error('Iterable cannot be null'); + } + return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => { + (0,_util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__.executeSchedule)(subscriber, scheduler, () => { + const iterator = input[Symbol.asyncIterator](); + (0,_util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__.executeSchedule)(subscriber, scheduler, () => { + iterator.next().then(result => { + if (result.done) { + subscriber.complete(); + } else { + subscriber.next(result.value); + } + }); + }, 0, true); + }); + }); +} + +/***/ }), + +/***/ 32843: +/*!***************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ scheduleIterable: () => (/* binding */ scheduleIterable) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 64517); +/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../symbol/iterator */ 30477); +/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util/isFunction */ 78347); +/* harmony import */ var _util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/executeSchedule */ 82437); + + + + +function scheduleIterable(input, scheduler) { + return new _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable(subscriber => { + let iterator; + (0,_util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__.executeSchedule)(subscriber, scheduler, () => { + iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__.iterator](); + (0,_util_executeSchedule__WEBPACK_IMPORTED_MODULE_1__.executeSchedule)(subscriber, scheduler, () => { + let value; + let done; + try { + ({ + value, + done + } = iterator.next()); + } catch (err) { + subscriber.error(err); + return; + } + if (done) { + subscriber.complete(); + } else { + subscriber.next(value); + } + }, 0, true); + }); + return () => (0,_util_isFunction__WEBPACK_IMPORTED_MODULE_3__.isFunction)(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); + }); +} + +/***/ }), + +/***/ 99888: +/*!*****************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ scheduleObservable: () => (/* binding */ scheduleObservable) +/* harmony export */ }); +/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/innerFrom */ 58); +/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/observeOn */ 39721); +/* harmony import */ var _operators_subscribeOn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../operators/subscribeOn */ 14869); + + + +function scheduleObservable(input, scheduler) { + return (0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__.innerFrom)(input).pipe((0,_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_1__.subscribeOn)(scheduler), (0,_operators_observeOn__WEBPACK_IMPORTED_MODULE_2__.observeOn)(scheduler)); +} + +/***/ }), + +/***/ 97328: +/*!**************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ schedulePromise: () => (/* binding */ schedulePromise) +/* harmony export */ }); +/* harmony import */ var _observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../observable/innerFrom */ 58); +/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../operators/observeOn */ 39721); +/* harmony import */ var _operators_subscribeOn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../operators/subscribeOn */ 14869); + + + +function schedulePromise(input, scheduler) { + return (0,_observable_innerFrom__WEBPACK_IMPORTED_MODULE_0__.innerFrom)(input).pipe((0,_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_1__.subscribeOn)(scheduler), (0,_operators_observeOn__WEBPACK_IMPORTED_MODULE_2__.observeOn)(scheduler)); +} + +/***/ }), + +/***/ 52662: +/*!*************************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js ***! + \*************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ scheduleReadableStreamLike: () => (/* binding */ scheduleReadableStreamLike) +/* harmony export */ }); +/* harmony import */ var _scheduleAsyncIterable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scheduleAsyncIterable */ 98663); +/* harmony import */ var _util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/isReadableStreamLike */ 48120); + + +function scheduleReadableStreamLike(input, scheduler) { + return (0,_scheduleAsyncIterable__WEBPACK_IMPORTED_MODULE_0__.scheduleAsyncIterable)((0,_util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_1__.readableStreamLikeToAsyncGenerator)(input), scheduler); +} + +/***/ }), + +/***/ 76333: +/*!********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ scheduled: () => (/* binding */ scheduled) +/* harmony export */ }); +/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scheduleObservable */ 99888); +/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./schedulePromise */ 97328); +/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./scheduleArray */ 69064); +/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./scheduleIterable */ 32843); +/* harmony import */ var _scheduleAsyncIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./scheduleAsyncIterable */ 98663); +/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/isInteropObservable */ 20835); +/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util/isPromise */ 182); +/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/isArrayLike */ 19085); +/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../util/isIterable */ 54377); +/* harmony import */ var _util_isAsyncIterable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../util/isAsyncIterable */ 10165); +/* harmony import */ var _util_throwUnobservableError__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../util/throwUnobservableError */ 37603); +/* harmony import */ var _util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../util/isReadableStreamLike */ 48120); +/* harmony import */ var _scheduleReadableStreamLike__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./scheduleReadableStreamLike */ 52662); + + + + + + + + + + + + + +function scheduled(input, scheduler) { + if (input != null) { + if ((0,_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_0__.isInteropObservable)(input)) { + return (0,_scheduleObservable__WEBPACK_IMPORTED_MODULE_1__.scheduleObservable)(input, scheduler); + } + if ((0,_util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__.isArrayLike)(input)) { + return (0,_scheduleArray__WEBPACK_IMPORTED_MODULE_3__.scheduleArray)(input, scheduler); + } + if ((0,_util_isPromise__WEBPACK_IMPORTED_MODULE_4__.isPromise)(input)) { + return (0,_schedulePromise__WEBPACK_IMPORTED_MODULE_5__.schedulePromise)(input, scheduler); + } + if ((0,_util_isAsyncIterable__WEBPACK_IMPORTED_MODULE_6__.isAsyncIterable)(input)) { + return (0,_scheduleAsyncIterable__WEBPACK_IMPORTED_MODULE_7__.scheduleAsyncIterable)(input, scheduler); + } + if ((0,_util_isIterable__WEBPACK_IMPORTED_MODULE_8__.isIterable)(input)) { + return (0,_scheduleIterable__WEBPACK_IMPORTED_MODULE_9__.scheduleIterable)(input, scheduler); + } + if ((0,_util_isReadableStreamLike__WEBPACK_IMPORTED_MODULE_10__.isReadableStreamLike)(input)) { + return (0,_scheduleReadableStreamLike__WEBPACK_IMPORTED_MODULE_11__.scheduleReadableStreamLike)(input, scheduler); + } + } + throw (0,_util_throwUnobservableError__WEBPACK_IMPORTED_MODULE_12__.createInvalidObservableTypeError)(input); +} + +/***/ }), + +/***/ 12048: +/*!*****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/Action.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Action: () => (/* binding */ Action) +/* harmony export */ }); +/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ 36421); + +class Action extends _Subscription__WEBPACK_IMPORTED_MODULE_0__.Subscription { + constructor(scheduler, work) { + super(); + } + schedule(state, delay = 0) { + return this; + } +} + +/***/ }), + +/***/ 9151: +/*!*******************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js ***! + \*******************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AnimationFrameAction: () => (/* binding */ AnimationFrameAction) +/* harmony export */ }); +/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ 73978); +/* harmony import */ var _animationFrameProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./animationFrameProvider */ 14276); + + +class AnimationFrameAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_0__.AsyncAction { + constructor(scheduler, work) { + super(scheduler, work); + this.scheduler = scheduler; + this.work = work; + } + requestAsyncId(scheduler, id, delay = 0) { + if (delay !== null && delay > 0) { + return super.requestAsyncId(scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = _animationFrameProvider__WEBPACK_IMPORTED_MODULE_1__.animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined))); + } + recycleAsyncId(scheduler, id, delay = 0) { + var _a; + if (delay != null ? delay > 0 : this.delay > 0) { + return super.recycleAsyncId(scheduler, id, delay); + } + const { + actions + } = scheduler; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + _animationFrameProvider__WEBPACK_IMPORTED_MODULE_1__.animationFrameProvider.cancelAnimationFrame(id); + scheduler._scheduled = undefined; + } + return undefined; + } +} + +/***/ }), + +/***/ 65812: +/*!**********************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js ***! + \**********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AnimationFrameScheduler: () => (/* binding */ AnimationFrameScheduler) +/* harmony export */ }); +/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ 63999); + +class AnimationFrameScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__.AsyncScheduler { + flush(action) { + this._active = true; + const flushId = this._scheduled; + this._scheduled = undefined; + const { + actions + } = this; + let error; + action = action || actions.shift(); + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + } +} + +/***/ }), + +/***/ 77357: +/*!*********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AsapAction: () => (/* binding */ AsapAction) +/* harmony export */ }); +/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncAction */ 73978); +/* harmony import */ var _immediateProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./immediateProvider */ 73064); + + +class AsapAction extends _AsyncAction__WEBPACK_IMPORTED_MODULE_0__.AsyncAction { + constructor(scheduler, work) { + super(scheduler, work); + this.scheduler = scheduler; + this.work = work; + } + requestAsyncId(scheduler, id, delay = 0) { + if (delay !== null && delay > 0) { + return super.requestAsyncId(scheduler, id, delay); + } + scheduler.actions.push(this); + return scheduler._scheduled || (scheduler._scheduled = _immediateProvider__WEBPACK_IMPORTED_MODULE_1__.immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); + } + recycleAsyncId(scheduler, id, delay = 0) { + var _a; + if (delay != null ? delay > 0 : this.delay > 0) { + return super.recycleAsyncId(scheduler, id, delay); + } + const { + actions + } = scheduler; + if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { + _immediateProvider__WEBPACK_IMPORTED_MODULE_1__.immediateProvider.clearImmediate(id); + if (scheduler._scheduled === id) { + scheduler._scheduled = undefined; + } + } + return undefined; + } +} + +/***/ }), + +/***/ 18550: +/*!************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AsapScheduler: () => (/* binding */ AsapScheduler) +/* harmony export */ }); +/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ 63999); + +class AsapScheduler extends _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__.AsyncScheduler { + flush(action) { + this._active = true; + const flushId = this._scheduled; + this._scheduled = undefined; + const { + actions + } = this; + let error; + action = action || actions.shift(); + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while ((action = actions[0]) && action.id === flushId && actions.shift()); + this._active = false; + if (error) { + while ((action = actions[0]) && action.id === flushId && actions.shift()) { + action.unsubscribe(); + } + throw error; + } + } +} + +/***/ }), + +/***/ 73978: +/*!**********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AsyncAction: () => (/* binding */ AsyncAction) +/* harmony export */ }); +/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ 12048); +/* harmony import */ var _intervalProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./intervalProvider */ 78186); +/* harmony import */ var _util_arrRemove__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/arrRemove */ 38248); + + + +class AsyncAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action { + constructor(scheduler, work) { + super(scheduler, work); + this.scheduler = scheduler; + this.work = work; + this.pending = false; + } + schedule(state, delay = 0) { + var _a; + if (this.closed) { + return this; + } + this.state = state; + const id = this.id; + const scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay); + return this; + } + requestAsyncId(scheduler, _id, delay = 0) { + return _intervalProvider__WEBPACK_IMPORTED_MODULE_1__.intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); + } + recycleAsyncId(_scheduler, id, delay = 0) { + if (delay != null && this.delay === delay && this.pending === false) { + return id; + } + if (id != null) { + _intervalProvider__WEBPACK_IMPORTED_MODULE_1__.intervalProvider.clearInterval(id); + } + return undefined; + } + execute(state, delay) { + if (this.closed) { + return new Error('executing a cancelled action'); + } + this.pending = false; + const error = this._execute(state, delay); + if (error) { + return error; + } else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + } + _execute(state, _delay) { + let errored = false; + let errorValue; + try { + this.work(state); + } catch (e) { + errored = true; + errorValue = e ? e : new Error('Scheduled action threw falsy error'); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + } + unsubscribe() { + if (!this.closed) { + const { + id, + scheduler + } = this; + const { + actions + } = scheduler; + this.work = this.state = this.scheduler = null; + this.pending = false; + (0,_util_arrRemove__WEBPACK_IMPORTED_MODULE_2__.arrRemove)(actions, this); + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + super.unsubscribe(); + } + } +} + +/***/ }), + +/***/ 63999: +/*!*************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AsyncScheduler: () => (/* binding */ AsyncScheduler) +/* harmony export */ }); +/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Scheduler */ 14267); + +class AsyncScheduler extends _Scheduler__WEBPACK_IMPORTED_MODULE_0__.Scheduler { + constructor(SchedulerAction, now = _Scheduler__WEBPACK_IMPORTED_MODULE_0__.Scheduler.now) { + super(SchedulerAction, now); + this.actions = []; + this._active = false; + } + flush(action) { + const { + actions + } = this; + if (this._active) { + actions.push(action); + return; + } + let error; + this._active = true; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (action = actions.shift()); + this._active = false; + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + } +} + +/***/ }), + +/***/ 97757: +/*!*************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ animationFrame: () => (/* binding */ animationFrame), +/* harmony export */ animationFrameScheduler: () => (/* binding */ animationFrameScheduler) +/* harmony export */ }); +/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AnimationFrameAction */ 9151); +/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AnimationFrameScheduler */ 65812); + + +const animationFrameScheduler = new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_0__.AnimationFrameScheduler(_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_1__.AnimationFrameAction); +const animationFrame = animationFrameScheduler; + +/***/ }), + +/***/ 14276: +/*!*********************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js ***! + \*********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ animationFrameProvider: () => (/* binding */ animationFrameProvider) +/* harmony export */ }); +/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Subscription */ 36421); + +const animationFrameProvider = { + schedule(callback) { + let request = requestAnimationFrame; + let cancel = cancelAnimationFrame; + const { + delegate + } = animationFrameProvider; + if (delegate) { + request = delegate.requestAnimationFrame; + cancel = delegate.cancelAnimationFrame; + } + const handle = request(timestamp => { + cancel = undefined; + callback(timestamp); + }); + return new _Subscription__WEBPACK_IMPORTED_MODULE_0__.Subscription(() => cancel === null || cancel === void 0 ? void 0 : cancel(handle)); + }, + requestAnimationFrame(...args) { + const { + delegate + } = animationFrameProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame)(...args); + }, + cancelAnimationFrame(...args) { + const { + delegate + } = animationFrameProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame)(...args); + }, + delegate: undefined +}; + +/***/ }), + +/***/ 45351: +/*!***************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/asap.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ asap: () => (/* binding */ asap), +/* harmony export */ asapScheduler: () => (/* binding */ asapScheduler) +/* harmony export */ }); +/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsapAction */ 77357); +/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsapScheduler */ 18550); + + +const asapScheduler = new _AsapScheduler__WEBPACK_IMPORTED_MODULE_0__.AsapScheduler(_AsapAction__WEBPACK_IMPORTED_MODULE_1__.AsapAction); +const asap = asapScheduler; + +/***/ }), + +/***/ 64672: +/*!****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/async.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ async: () => (/* binding */ async), +/* harmony export */ asyncScheduler: () => (/* binding */ asyncScheduler) +/* harmony export */ }); +/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AsyncAction */ 73978); +/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AsyncScheduler */ 63999); + + +const asyncScheduler = new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_0__.AsyncScheduler(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__.AsyncAction); +const async = asyncScheduler; + +/***/ }), + +/***/ 7221: +/*!********************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ dateTimestampProvider: () => (/* binding */ dateTimestampProvider) +/* harmony export */ }); +const dateTimestampProvider = { + now() { + return (dateTimestampProvider.delegate || Date).now(); + }, + delegate: undefined +}; + +/***/ }), + +/***/ 73064: +/*!****************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ immediateProvider: () => (/* binding */ immediateProvider) +/* harmony export */ }); +/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/Immediate */ 21314); + +const { + setImmediate, + clearImmediate +} = _util_Immediate__WEBPACK_IMPORTED_MODULE_0__.Immediate; +const immediateProvider = { + setImmediate(...args) { + const { + delegate + } = immediateProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate)(...args); + }, + clearImmediate(handle) { + const { + delegate + } = immediateProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); + }, + delegate: undefined +}; + +/***/ }), + +/***/ 78186: +/*!***************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ intervalProvider: () => (/* binding */ intervalProvider) +/* harmony export */ }); +const intervalProvider = { + setInterval(handler, timeout, ...args) { + const { + delegate + } = intervalProvider; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { + return delegate.setInterval(handler, timeout, ...args); + } + return setInterval(handler, timeout, ...args); + }, + clearInterval(handle) { + const { + delegate + } = intervalProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); + }, + delegate: undefined +}; + +/***/ }), + +/***/ 73514: +/*!**************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ timeoutProvider: () => (/* binding */ timeoutProvider) +/* harmony export */ }); +const timeoutProvider = { + setTimeout(handler, timeout, ...args) { + const { + delegate + } = timeoutProvider; + if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { + return delegate.setTimeout(handler, timeout, ...args); + } + return setTimeout(handler, timeout, ...args); + }, + clearTimeout(handle) { + const { + delegate + } = timeoutProvider; + return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); + }, + delegate: undefined +}; + +/***/ }), + +/***/ 30477: +/*!****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/symbol/iterator.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getSymbolIterator: () => (/* binding */ getSymbolIterator), +/* harmony export */ iterator: () => (/* binding */ iterator) +/* harmony export */ }); +function getSymbolIterator() { + if (typeof Symbol !== 'function' || !Symbol.iterator) { + return '@@iterator'; + } + return Symbol.iterator; +} +const iterator = getSymbolIterator(); + +/***/ }), + +/***/ 44770: +/*!******************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/symbol/observable.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ observable: () => (/* binding */ observable) +/* harmony export */ }); +const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')(); + +/***/ }), + +/***/ 53826: +/*!****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/EmptyError.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ EmptyError: () => (/* binding */ EmptyError) +/* harmony export */ }); +/* harmony import */ var _createErrorClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createErrorClass */ 40849); + +const EmptyError = (0,_createErrorClass__WEBPACK_IMPORTED_MODULE_0__.createErrorClass)(_super => function EmptyErrorImpl() { + _super(this); + this.name = 'EmptyError'; + this.message = 'no elements in sequence'; +}); + +/***/ }), + +/***/ 21314: +/*!***************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/Immediate.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Immediate: () => (/* binding */ Immediate), +/* harmony export */ TestTools: () => (/* binding */ TestTools) +/* harmony export */ }); +let nextHandle = 1; +let resolved; +const activeHandles = {}; +function findAndClearHandle(handle) { + if (handle in activeHandles) { + delete activeHandles[handle]; + return true; + } + return false; +} +const Immediate = { + setImmediate(cb) { + const handle = nextHandle++; + activeHandles[handle] = true; + if (!resolved) { + resolved = Promise.resolve(); + } + resolved.then(() => findAndClearHandle(handle) && cb()); + return handle; + }, + clearImmediate(handle) { + findAndClearHandle(handle); + } +}; +const TestTools = { + pending() { + return Object.keys(activeHandles).length; + } +}; + +/***/ }), + +/***/ 24649: +/*!*****************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js ***! + \*****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ObjectUnsubscribedError: () => (/* binding */ ObjectUnsubscribedError) +/* harmony export */ }); +/* harmony import */ var _createErrorClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createErrorClass */ 40849); + +const ObjectUnsubscribedError = (0,_createErrorClass__WEBPACK_IMPORTED_MODULE_0__.createErrorClass)(_super => function ObjectUnsubscribedErrorImpl() { + _super(this); + this.name = 'ObjectUnsubscribedError'; + this.message = 'object unsubscribed'; +}); + +/***/ }), + +/***/ 62907: +/*!*************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ UnsubscriptionError: () => (/* binding */ UnsubscriptionError) +/* harmony export */ }); +/* harmony import */ var _createErrorClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createErrorClass */ 40849); + +const UnsubscriptionError = (0,_createErrorClass__WEBPACK_IMPORTED_MODULE_0__.createErrorClass)(_super => function UnsubscriptionErrorImpl(errors) { + _super(this); + this.message = errors ? `${errors.length} errors occurred during unsubscription: +${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n ')}` : ''; + this.name = 'UnsubscriptionError'; + this.errors = errors; +}); + +/***/ }), + +/***/ 61866: +/*!**********************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/args.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ popNumber: () => (/* binding */ popNumber), +/* harmony export */ popResultSelector: () => (/* binding */ popResultSelector), +/* harmony export */ popScheduler: () => (/* binding */ popScheduler) +/* harmony export */ }); +/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isFunction */ 78347); +/* harmony import */ var _isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isScheduler */ 72114); + + +function last(arr) { + return arr[arr.length - 1]; +} +function popResultSelector(args) { + return (0,_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(last(args)) ? args.pop() : undefined; +} +function popScheduler(args) { + return (0,_isScheduler__WEBPACK_IMPORTED_MODULE_1__.isScheduler)(last(args)) ? args.pop() : undefined; +} +function popNumber(args, defaultValue) { + return typeof last(args) === 'number' ? args.pop() : defaultValue; +} + +/***/ }), + +/***/ 65541: +/*!**************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ argsArgArrayOrObject: () => (/* binding */ argsArgArrayOrObject) +/* harmony export */ }); +const { + isArray +} = Array; +const { + getPrototypeOf, + prototype: objectProto, + keys: getKeys +} = Object; +function argsArgArrayOrObject(args) { + if (args.length === 1) { + const first = args[0]; + if (isArray(first)) { + return { + args: first, + keys: null + }; + } + if (isPOJO(first)) { + const keys = getKeys(first); + return { + args: keys.map(key => first[key]), + keys + }; + } + } + return { + args: args, + keys: null + }; +} +function isPOJO(obj) { + return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; +} + +/***/ }), + +/***/ 38248: +/*!***************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/arrRemove.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ arrRemove: () => (/* binding */ arrRemove) +/* harmony export */ }); +function arrRemove(arr, item) { + if (arr) { + const index = arr.indexOf(item); + 0 <= index && arr.splice(index, 1); + } +} + +/***/ }), + +/***/ 40849: +/*!**********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/createErrorClass.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ createErrorClass: () => (/* binding */ createErrorClass) +/* harmony export */ }); +function createErrorClass(createImpl) { + const _super = instance => { + Error.call(instance); + instance.stack = new Error().stack; + }; + const ctorFunc = createImpl(_super); + ctorFunc.prototype = Object.create(Error.prototype); + ctorFunc.prototype.constructor = ctorFunc; + return ctorFunc; +} + +/***/ }), + +/***/ 63060: +/*!******************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/createObject.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ createObject: () => (/* binding */ createObject) +/* harmony export */ }); +function createObject(keys, values) { + return keys.reduce((result, key, i) => (result[key] = values[i], result), {}); +} + +/***/ }), + +/***/ 38806: +/*!******************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/errorContext.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ captureError: () => (/* binding */ captureError), +/* harmony export */ errorContext: () => (/* binding */ errorContext) +/* harmony export */ }); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../config */ 90302); + +let context = null; +function errorContext(cb) { + if (_config__WEBPACK_IMPORTED_MODULE_0__.config.useDeprecatedSynchronousErrorHandling) { + const isRoot = !context; + if (isRoot) { + context = { + errorThrown: false, + error: null + }; + } + cb(); + if (isRoot) { + const { + errorThrown, + error + } = context; + context = null; + if (errorThrown) { + throw error; + } + } + } else { + cb(); + } +} +function captureError(err) { + if (_config__WEBPACK_IMPORTED_MODULE_0__.config.useDeprecatedSynchronousErrorHandling && context) { + context.errorThrown = true; + context.error = err; + } +} + +/***/ }), + +/***/ 82437: +/*!*********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/executeSchedule.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ executeSchedule: () => (/* binding */ executeSchedule) +/* harmony export */ }); +function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) { + const scheduleSubscription = scheduler.schedule(function () { + work(); + if (repeat) { + parentSubscription.add(this.schedule(null, delay)); + } else { + this.unsubscribe(); + } + }, delay); + parentSubscription.add(scheduleSubscription); + if (!repeat) { + return scheduleSubscription; + } +} + +/***/ }), + +/***/ 12337: +/*!**************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/identity.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ identity: () => (/* binding */ identity) +/* harmony export */ }); +function identity(x) { + return x; +} + +/***/ }), + +/***/ 19085: +/*!*****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/isArrayLike.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isArrayLike: () => (/* binding */ isArrayLike) +/* harmony export */ }); +const isArrayLike = x => x && typeof x.length === 'number' && typeof x !== 'function'; + +/***/ }), + +/***/ 10165: +/*!*********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isAsyncIterable: () => (/* binding */ isAsyncIterable) +/* harmony export */ }); +/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isFunction */ 78347); + +function isAsyncIterable(obj) { + return Symbol.asyncIterator && (0,_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); +} + +/***/ }), + +/***/ 40623: +/*!************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/isDate.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isValidDate: () => (/* binding */ isValidDate) +/* harmony export */ }); +function isValidDate(value) { + return value instanceof Date && !isNaN(value); +} + +/***/ }), + +/***/ 78347: +/*!****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/isFunction.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isFunction: () => (/* binding */ isFunction) +/* harmony export */ }); +function isFunction(value) { + return typeof value === 'function'; +} + +/***/ }), + +/***/ 20835: +/*!*************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isInteropObservable: () => (/* binding */ isInteropObservable) +/* harmony export */ }); +/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../symbol/observable */ 44770); +/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isFunction */ 78347); + + +function isInteropObservable(input) { + return (0,_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(input[_symbol_observable__WEBPACK_IMPORTED_MODULE_1__.observable]); +} + +/***/ }), + +/***/ 54377: +/*!****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/isIterable.js ***! + \****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isIterable: () => (/* binding */ isIterable) +/* harmony export */ }); +/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../symbol/iterator */ 30477); +/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isFunction */ 78347); + + +function isIterable(input) { + return (0,_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(input === null || input === void 0 ? void 0 : input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_1__.iterator]); +} + +/***/ }), + +/***/ 59918: +/*!******************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/isObservable.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isObservable: () => (/* binding */ isObservable) +/* harmony export */ }); +/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ 64517); +/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isFunction */ 78347); + + +function isObservable(obj) { + return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__.Observable || (0,_isFunction__WEBPACK_IMPORTED_MODULE_1__.isFunction)(obj.lift) && (0,_isFunction__WEBPACK_IMPORTED_MODULE_1__.isFunction)(obj.subscribe)); +} + +/***/ }), + +/***/ 182: +/*!***************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/isPromise.js ***! + \***************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isPromise: () => (/* binding */ isPromise) +/* harmony export */ }); +/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isFunction */ 78347); + +function isPromise(value) { + return (0,_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(value === null || value === void 0 ? void 0 : value.then); +} + +/***/ }), + +/***/ 48120: +/*!**************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isReadableStreamLike: () => (/* binding */ isReadableStreamLike), +/* harmony export */ readableStreamLikeToAsyncGenerator: () => (/* binding */ readableStreamLikeToAsyncGenerator) +/* harmony export */ }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ 9799); +/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isFunction */ 78347); + + +function readableStreamLikeToAsyncGenerator(readableStream) { + return (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__asyncGenerator)(this, arguments, function* readableStreamLikeToAsyncGenerator_1() { + const reader = readableStream.getReader(); + try { + while (true) { + const { + value, + done + } = yield (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__await)(reader.read()); + if (done) { + return yield (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__await)(void 0); + } + yield yield (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__await)(value); + } + } finally { + reader.releaseLock(); + } + }); +} +function isReadableStreamLike(obj) { + return (0,_isFunction__WEBPACK_IMPORTED_MODULE_1__.isFunction)(obj === null || obj === void 0 ? void 0 : obj.getReader); +} + +/***/ }), + +/***/ 72114: +/*!*****************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/isScheduler.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ isScheduler: () => (/* binding */ isScheduler) +/* harmony export */ }); +/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isFunction */ 78347); + +function isScheduler(value) { + return value && (0,_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(value.schedule); +} + +/***/ }), + +/***/ 81474: +/*!**********************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/lift.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ hasLift: () => (/* binding */ hasLift), +/* harmony export */ operate: () => (/* binding */ operate) +/* harmony export */ }); +/* harmony import */ var _isFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isFunction */ 78347); + +function hasLift(source) { + return (0,_isFunction__WEBPACK_IMPORTED_MODULE_0__.isFunction)(source === null || source === void 0 ? void 0 : source.lift); +} +function operate(init) { + return source => { + if (hasLift(source)) { + return source.lift(function (liftedSource) { + try { + return init(liftedSource, this); + } catch (err) { + this.error(err); + } + }); + } + throw new TypeError('Unable to lift unknown Observable type'); + }; +} + +/***/ }), + +/***/ 8758: +/*!**********************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js ***! + \**********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ mapOneOrManyArgs: () => (/* binding */ mapOneOrManyArgs) +/* harmony export */ }); +/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../operators/map */ 24406); + +const { + isArray +} = Array; +function callOrApply(fn, args) { + return isArray(args) ? fn(...args) : fn(args); +} +function mapOneOrManyArgs(fn) { + return (0,_operators_map__WEBPACK_IMPORTED_MODULE_0__.map)(args => callOrApply(fn, args)); +} + +/***/ }), + +/***/ 86075: +/*!**********************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/noop.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ noop: () => (/* binding */ noop) +/* harmony export */ }); +function noop() {} + +/***/ }), + +/***/ 2652: +/*!**********************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/pipe.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ pipe: () => (/* binding */ pipe), +/* harmony export */ pipeFromArray: () => (/* binding */ pipeFromArray) +/* harmony export */ }); +/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity */ 12337); + +function pipe(...fns) { + return pipeFromArray(fns); +} +function pipeFromArray(fns) { + if (fns.length === 0) { + return _identity__WEBPACK_IMPORTED_MODULE_0__.identity; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce((prev, fn) => fn(prev), input); + }; +} + +/***/ }), + +/***/ 38058: +/*!**************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ reportUnhandledError: () => (/* binding */ reportUnhandledError) +/* harmony export */ }); +/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config */ 90302); +/* harmony import */ var _scheduler_timeoutProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scheduler/timeoutProvider */ 73514); + + +function reportUnhandledError(err) { + _scheduler_timeoutProvider__WEBPACK_IMPORTED_MODULE_0__.timeoutProvider.setTimeout(() => { + const { + onUnhandledError + } = _config__WEBPACK_IMPORTED_MODULE_1__.config; + if (onUnhandledError) { + onUnhandledError(err); + } else { + throw err; + } + }); +} + +/***/ }), + +/***/ 37603: +/*!****************************************************************************!*\ + !*** ./node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js ***! + \****************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ createInvalidObservableTypeError: () => (/* binding */ createInvalidObservableTypeError) +/* harmony export */ }); +function createInvalidObservableTypeError(input) { + return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`); +} + +/***/ }), + +/***/ 73881: +/*!**********************************************!*\ + !*** ./node_modules/saxen/dist/index.esm.js ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Parser: () => (/* binding */ Parser), +/* harmony export */ decode: () => (/* binding */ decodeEntities) +/* harmony export */ }); +var fromCharCode = String.fromCharCode; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var ENTITY_PATTERN = /&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig; +var ENTITY_MAPPING = { + 'amp': '&', + 'apos': '\'', + 'gt': '>', + 'lt': '<', + 'quot': '"' +}; + +// map UPPERCASE variants of supported special chars +Object.keys(ENTITY_MAPPING).forEach(function (k) { + ENTITY_MAPPING[k.toUpperCase()] = ENTITY_MAPPING[k]; +}); +function replaceEntities(_, d, x, z) { + // reserved names, i.e.   + if (z) { + if (hasOwnProperty.call(ENTITY_MAPPING, z)) { + return ENTITY_MAPPING[z]; + } else { + // fall back to original value + return '&' + z + ';'; + } + } + + // decimal encoded char + if (d) { + return fromCharCode(d); + } + + // hex encoded char + return fromCharCode(parseInt(x, 16)); +} + +/** + * A basic entity decoder that can decode a minimal + * sub-set of reserved names (&) as well as + * hex (ય) and decimal (ӏ) encoded characters. + * + * @param {string} str + * + * @return {string} decoded string + */ +function decodeEntities(s) { + if (s.length > 3 && s.indexOf('&') !== -1) { + return s.replace(ENTITY_PATTERN, replaceEntities); + } + return s; +} +var XSI_URI = 'http://www.w3.org/2001/XMLSchema-instance'; +var XSI_PREFIX = 'xsi'; +var XSI_TYPE = 'xsi:type'; +var NON_WHITESPACE_OUTSIDE_ROOT_NODE = 'non-whitespace outside of root node'; +function error(msg) { + return new Error(msg); +} +function missingNamespaceForPrefix(prefix) { + return 'missing namespace for prefix <' + prefix + '>'; +} +function getter(getFn) { + return { + 'get': getFn, + 'enumerable': true + }; +} +function cloneNsMatrix(nsMatrix) { + var clone = {}, + key; + for (key in nsMatrix) { + clone[key] = nsMatrix[key]; + } + return clone; +} +function uriPrefix(prefix) { + return prefix + '$uri'; +} +function buildNsMatrix(nsUriToPrefix) { + var nsMatrix = {}, + uri, + prefix; + for (uri in nsUriToPrefix) { + prefix = nsUriToPrefix[uri]; + nsMatrix[prefix] = prefix; + nsMatrix[uriPrefix(prefix)] = uri; + } + return nsMatrix; +} +function noopGetContext() { + return { + 'line': 0, + 'column': 0 + }; +} +function throwFunc(err) { + throw err; +} + +/** + * Creates a new parser with the given options. + * + * @constructor + * + * @param {!Object=} options + */ +function Parser(options) { + if (!this) { + return new Parser(options); + } + var proxy = options && options['proxy']; + var onText, + onOpenTag, + onCloseTag, + onCDATA, + onError = throwFunc, + onWarning, + onComment, + onQuestion, + onAttention; + var getContext = noopGetContext; + + /** + * Do we need to parse the current elements attributes for namespaces? + * + * @type {boolean} + */ + var maybeNS = false; + + /** + * Do we process namespaces at all? + * + * @type {boolean} + */ + var isNamespace = false; + + /** + * The caught error returned on parse end + * + * @type {Error} + */ + var returnError = null; + + /** + * Should we stop parsing? + * + * @type {boolean} + */ + var parseStop = false; + + /** + * A map of { uri: prefix } used by the parser. + * + * This map will ensure we can normalize prefixes during processing; + * for each uri, only one prefix will be exposed to the handlers. + * + * @type {!Object}} + */ + var nsUriToPrefix; + + /** + * Handle parse error. + * + * @param {string|Error} err + */ + function handleError(err) { + if (!(err instanceof Error)) { + err = error(err); + } + returnError = err; + onError(err, getContext); + } + + /** + * Handle parse error. + * + * @param {string|Error} err + */ + function handleWarning(err) { + if (!onWarning) { + return; + } + if (!(err instanceof Error)) { + err = error(err); + } + onWarning(err, getContext); + } + + /** + * Register parse listener. + * + * @param {string} name + * @param {Function} cb + * + * @return {Parser} + */ + this['on'] = function (name, cb) { + if (typeof cb !== 'function') { + throw error('required args '); + } + switch (name) { + case 'openTag': + onOpenTag = cb; + break; + case 'text': + onText = cb; + break; + case 'closeTag': + onCloseTag = cb; + break; + case 'error': + onError = cb; + break; + case 'warn': + onWarning = cb; + break; + case 'cdata': + onCDATA = cb; + break; + case 'attention': + onAttention = cb; + break; + // + case 'question': + onQuestion = cb; + break; + // + case 'comment': + onComment = cb; + break; + default: + throw error('unsupported event: ' + name); + } + return this; + }; + + /** + * Set the namespace to prefix mapping. + * + * @example + * + * parser.ns({ + * 'http://foo': 'foo', + * 'http://bar': 'bar' + * }); + * + * @param {!Object} nsMap + * + * @return {Parser} + */ + this['ns'] = function (nsMap) { + if (typeof nsMap === 'undefined') { + nsMap = {}; + } + if (typeof nsMap !== 'object') { + throw error('required args '); + } + var _nsUriToPrefix = {}, + k; + for (k in nsMap) { + _nsUriToPrefix[k] = nsMap[k]; + } + + // FORCE default mapping for schema instance + _nsUriToPrefix[XSI_URI] = XSI_PREFIX; + isNamespace = true; + nsUriToPrefix = _nsUriToPrefix; + return this; + }; + + /** + * Parse xml string. + * + * @param {string} xml + * + * @return {Error} returnError, if not thrown + */ + this['parse'] = function (xml) { + if (typeof xml !== 'string') { + throw error('required args '); + } + returnError = null; + parse(xml); + getContext = noopGetContext; + parseStop = false; + return returnError; + }; + + /** + * Stop parsing. + */ + this['stop'] = function () { + parseStop = true; + }; + + /** + * Parse string, invoking configured listeners on element. + * + * @param {string} xml + */ + function parse(xml) { + var nsMatrixStack = isNamespace ? [] : null, + nsMatrix = isNamespace ? buildNsMatrix(nsUriToPrefix) : null, + _nsMatrix, + nodeStack = [], + anonymousNsCount = 0, + tagStart = false, + tagEnd = false, + i = 0, + j = 0, + x, + y, + q, + w, + v, + xmlns, + elementName, + _elementName, + elementProxy; + var attrsString = '', + attrsStart = 0, + cachedAttrs // false = parsed with errors, null = needs parsing + ; + + /** + * Parse attributes on demand and returns the parsed attributes. + * + * Return semantics: (1) `false` on attribute parse error, + * (2) object hash on extracted attrs. + * + * @return {boolean|Object} + */ + function getAttrs() { + if (cachedAttrs !== null) { + return cachedAttrs; + } + var nsUri, + nsUriPrefix, + nsName, + defaultAlias = isNamespace && nsMatrix['xmlns'], + attrList = isNamespace && maybeNS ? [] : null, + i = attrsStart, + s = attrsString, + l = s.length, + hasNewMatrix, + newalias, + value, + alias, + name, + attrs = {}, + seenAttrs = {}, + skipAttr, + w, + j; + parseAttr: for (; i < l; i++) { + skipAttr = false; + w = s.charCodeAt(i); + if (w === 32 || w < 14 && w > 8) { + // WHITESPACE={ \f\n\r\t\v} + continue; + } + + // wait for non whitespace character + if (w < 65 || w > 122 || w > 90 && w < 97) { + if (w !== 95 && w !== 58) { + // char 95"_" 58":" + handleWarning('illegal first char attribute name'); + skipAttr = true; + } + } + + // parse attribute name + for (j = i + 1; j < l; j++) { + w = s.charCodeAt(j); + if (w > 96 && w < 123 || w > 64 && w < 91 || w > 47 && w < 59 || w === 46 || + // '.' + w === 45 || + // '-' + w === 95 // '_' + ) { + continue; + } + + // unexpected whitespace + if (w === 32 || w < 14 && w > 8) { + // WHITESPACE + handleWarning('missing attribute value'); + i = j; + continue parseAttr; + } + + // expected "=" + if (w === 61) { + // "=" == 61 + break; + } + handleWarning('illegal attribute name char'); + skipAttr = true; + } + name = s.substring(i, j); + if (name === 'xmlns:xmlns') { + handleWarning('illegal declaration of xmlns'); + skipAttr = true; + } + w = s.charCodeAt(j + 1); + if (w === 34) { + // '"' + j = s.indexOf('"', i = j + 2); + if (j === -1) { + j = s.indexOf('\'', i); + if (j !== -1) { + handleWarning('attribute value quote missmatch'); + skipAttr = true; + } + } + } else if (w === 39) { + // "'" + j = s.indexOf('\'', i = j + 2); + if (j === -1) { + j = s.indexOf('"', i); + if (j !== -1) { + handleWarning('attribute value quote missmatch'); + skipAttr = true; + } + } + } else { + handleWarning('missing attribute value quotes'); + skipAttr = true; + + // skip to next space + for (j = j + 1; j < l; j++) { + w = s.charCodeAt(j + 1); + if (w === 32 || w < 14 && w > 8) { + // WHITESPACE + break; + } + } + } + if (j === -1) { + handleWarning('missing closing quotes'); + j = l; + skipAttr = true; + } + if (!skipAttr) { + value = s.substring(i, j); + } + i = j; + + // ensure SPACE follows attribute + // skip illegal content otherwise + // example a="b"c + for (; j + 1 < l; j++) { + w = s.charCodeAt(j + 1); + if (w === 32 || w < 14 && w > 8) { + // WHITESPACE + break; + } + + // FIRST ILLEGAL CHAR + if (i === j) { + handleWarning('illegal character after attribute end'); + skipAttr = true; + } + } + + // advance cursor to next attribute + i = j + 1; + if (skipAttr) { + continue parseAttr; + } + + // check attribute re-declaration + if (name in seenAttrs) { + handleWarning('attribute <' + name + '> already defined'); + continue; + } + seenAttrs[name] = true; + if (!isNamespace) { + attrs[name] = value; + continue; + } + + // try to extract namespace information + if (maybeNS) { + newalias = name === 'xmlns' ? 'xmlns' : name.charCodeAt(0) === 120 && name.substr(0, 6) === 'xmlns:' ? name.substr(6) : null; + + // handle xmlns(:alias) assignment + if (newalias !== null) { + nsUri = decodeEntities(value); + nsUriPrefix = uriPrefix(newalias); + alias = nsUriToPrefix[nsUri]; + if (!alias) { + // no prefix defined or prefix collision + if (newalias === 'xmlns' || nsUriPrefix in nsMatrix && nsMatrix[nsUriPrefix] !== nsUri) { + // alocate free ns prefix + do { + alias = 'ns' + anonymousNsCount++; + } while (typeof nsMatrix[alias] !== 'undefined'); + } else { + alias = newalias; + } + nsUriToPrefix[nsUri] = alias; + } + if (nsMatrix[newalias] !== alias) { + if (!hasNewMatrix) { + nsMatrix = cloneNsMatrix(nsMatrix); + hasNewMatrix = true; + } + nsMatrix[newalias] = alias; + if (newalias === 'xmlns') { + nsMatrix[uriPrefix(alias)] = nsUri; + defaultAlias = alias; + } + nsMatrix[nsUriPrefix] = nsUri; + } + + // expose xmlns(:asd)="..." in attributes + attrs[name] = value; + continue; + } + + // collect attributes until all namespace + // declarations are processed + attrList.push(name, value); + continue; + } /** end if (maybeNs) */ + + // handle attributes on element without + // namespace declarations + w = name.indexOf(':'); + if (w === -1) { + attrs[name] = value; + continue; + } + + // normalize ns attribute name + if (!(nsName = nsMatrix[name.substring(0, w)])) { + handleWarning(missingNamespaceForPrefix(name.substring(0, w))); + continue; + } + name = defaultAlias === nsName ? name.substr(w + 1) : nsName + name.substr(w); + + // end: normalize ns attribute name + + // normalize xsi:type ns attribute value + if (name === XSI_TYPE) { + w = value.indexOf(':'); + if (w !== -1) { + nsName = value.substring(0, w); + + // handle default prefixes, i.e. xs:String gracefully + nsName = nsMatrix[nsName] || nsName; + value = nsName + value.substring(w); + } else { + value = defaultAlias + ':' + value; + } + } + + // end: normalize xsi:type ns attribute value + + attrs[name] = value; + } + + // handle deferred, possibly namespaced attributes + if (maybeNS) { + // normalize captured attributes + for (i = 0, l = attrList.length; i < l; i++) { + name = attrList[i++]; + value = attrList[i]; + w = name.indexOf(':'); + if (w !== -1) { + // normalize ns attribute name + if (!(nsName = nsMatrix[name.substring(0, w)])) { + handleWarning(missingNamespaceForPrefix(name.substring(0, w))); + continue; + } + name = defaultAlias === nsName ? name.substr(w + 1) : nsName + name.substr(w); + + // end: normalize ns attribute name + + // normalize xsi:type ns attribute value + if (name === XSI_TYPE) { + w = value.indexOf(':'); + if (w !== -1) { + nsName = value.substring(0, w); + + // handle default prefixes, i.e. xs:String gracefully + nsName = nsMatrix[nsName] || nsName; + value = nsName + value.substring(w); + } else { + value = defaultAlias + ':' + value; + } + } + + // end: normalize xsi:type ns attribute value + } + + attrs[name] = value; + } + + // end: normalize captured attributes + } + + return cachedAttrs = attrs; + } + + /** + * Extract the parse context { line, column, part } + * from the current parser position. + * + * @return {Object} parse context + */ + function getParseContext() { + var splitsRe = /(\r\n|\r|\n)/g; + var line = 0; + var column = 0; + var startOfLine = 0; + var endOfLine = j; + var match; + var data; + while (i >= startOfLine) { + match = splitsRe.exec(xml); + if (!match) { + break; + } + + // end of line = (break idx + break chars) + endOfLine = match[0].length + match.index; + if (endOfLine > i) { + break; + } + + // advance to next line + line += 1; + startOfLine = endOfLine; + } + + // EOF errors + if (i == -1) { + column = endOfLine; + data = xml.substring(j); + } else + // start errors + if (j === 0) { + data = xml.substring(j, i); + } + + // other errors + else { + column = i - startOfLine; + data = j == -1 ? xml.substring(i) : xml.substring(i, j + 1); + } + return { + 'data': data, + 'line': line, + 'column': column + }; + } + getContext = getParseContext; + if (proxy) { + elementProxy = Object.create({}, { + 'name': getter(function () { + return elementName; + }), + 'originalName': getter(function () { + return _elementName; + }), + 'attrs': getter(getAttrs), + 'ns': getter(function () { + return nsMatrix; + }) + }); + } + + // actual parse logic + while (j !== -1) { + if (xml.charCodeAt(j) === 60) { + // "<" + i = j; + } else { + i = xml.indexOf('<', j); + } + + // parse end + if (i === -1) { + if (nodeStack.length) { + return handleError('unexpected end of file'); + } + if (j === 0) { + return handleError('missing start tag'); + } + if (j < xml.length) { + if (xml.substring(j).trim()) { + handleWarning(NON_WHITESPACE_OUTSIDE_ROOT_NODE); + } + } + return; + } + + // parse text + if (j !== i) { + if (nodeStack.length) { + if (onText) { + onText(xml.substring(j, i), decodeEntities, getContext); + if (parseStop) { + return; + } + } + } else { + if (xml.substring(j, i).trim()) { + handleWarning(NON_WHITESPACE_OUTSIDE_ROOT_NODE); + if (parseStop) { + return; + } + } + } + } + w = xml.charCodeAt(i + 1); + + // parse comments + CDATA + if (w === 33) { + // "!" + q = xml.charCodeAt(i + 2); + + // CDATA section + if (q === 91 && xml.substr(i + 3, 6) === 'CDATA[') { + // 91 == "[" + j = xml.indexOf(']]>', i); + if (j === -1) { + return handleError('unclosed cdata'); + } + if (onCDATA) { + onCDATA(xml.substring(i + 9, j), getContext); + if (parseStop) { + return; + } + } + j += 3; + continue; + } + + // comment + if (q === 45 && xml.charCodeAt(i + 3) === 45) { + // 45 == "-" + j = xml.indexOf('-->', i); + if (j === -1) { + return handleError('unclosed comment'); + } + if (onComment) { + onComment(xml.substring(i + 4, j), decodeEntities, getContext); + if (parseStop) { + return; + } + } + j += 3; + continue; + } + } + + // parse question + if (w === 63) { + // "?" + j = xml.indexOf('?>', i); + if (j === -1) { + return handleError('unclosed question'); + } + if (onQuestion) { + onQuestion(xml.substring(i, j + 2), getContext); + if (parseStop) { + return; + } + } + j += 2; + continue; + } + + // find matching closing tag for attention or standard tags + // for that we must skip through attribute values + // (enclosed in single or double quotes) + for (x = i + 1;; x++) { + v = xml.charCodeAt(x); + if (isNaN(v)) { + j = -1; + return handleError('unclosed tag'); + } + + // [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" + // skips the quoted string + // (double quotes) does not appear in a literal enclosed by (double quotes) + // (single quote) does not appear in a literal enclosed by (single quote) + if (v === 34) { + // '"' + q = xml.indexOf('"', x + 1); + x = q !== -1 ? q : x; + } else if (v === 39) { + // "'" + q = xml.indexOf("'", x + 1); + x = q !== -1 ? q : x; + } else if (v === 62) { + // '>' + j = x; + break; + } + } + + // parse attention + // previously comment and CDATA have already been parsed + if (w === 33) { + // "!" + + if (onAttention) { + onAttention(xml.substring(i, j + 1), decodeEntities, getContext); + if (parseStop) { + return; + } + } + j += 1; + continue; + } + + // don't process attributes; + // there are none + cachedAttrs = {}; + + // if (xml.charCodeAt(i+1) === 47) { // close tag match + x = elementName = nodeStack.pop(); + q = i + 2 + x.length; + if (xml.substring(i + 2, q) !== x) { + return handleError('closing tag mismatch'); + } + + // verify chars in close tag + for (; q < j; q++) { + w = xml.charCodeAt(q); + if (w === 32 || w > 8 && w < 14) { + // \f\n\r\t\v space + continue; + } + return handleError('close tag'); + } + } else { + if (xml.charCodeAt(j - 1) === 47) { + // .../> + x = elementName = xml.substring(i + 1, j - 1); + tagStart = true; + tagEnd = true; + } else { + x = elementName = xml.substring(i + 1, j); + tagStart = true; + tagEnd = false; + } + if (!(w > 96 && w < 123 || w > 64 && w < 91 || w === 95 || w === 58)) { + // char 95"_" 58":" + return handleError('illegal first char nodeName'); + } + for (q = 1, y = x.length; q < y; q++) { + w = x.charCodeAt(q); + if (w > 96 && w < 123 || w > 64 && w < 91 || w > 47 && w < 59 || w === 45 || w === 95 || w == 46) { + continue; + } + if (w === 32 || w < 14 && w > 8) { + // \f\n\r\t\v space + elementName = x.substring(0, q); + + // maybe there are attributes + cachedAttrs = null; + break; + } + return handleError('invalid nodeName'); + } + if (!tagEnd) { + nodeStack.push(elementName); + } + } + if (isNamespace) { + _nsMatrix = nsMatrix; + if (tagStart) { + // remember old namespace + // unless we're self-closing + if (!tagEnd) { + nsMatrixStack.push(_nsMatrix); + } + if (cachedAttrs === null) { + // quick check, whether there may be namespace + // declarations on the node; if that is the case + // we need to eagerly parse the node attributes + if (maybeNS = x.indexOf('xmlns', q) !== -1) { + attrsStart = q; + attrsString = x; + getAttrs(); + maybeNS = false; + } + } + } + _elementName = elementName; + w = elementName.indexOf(':'); + if (w !== -1) { + xmlns = nsMatrix[elementName.substring(0, w)]; + + // prefix given; namespace must exist + if (!xmlns) { + return handleError('missing namespace on <' + _elementName + '>'); + } + elementName = elementName.substr(w + 1); + } else { + xmlns = nsMatrix['xmlns']; + + // if no default namespace is defined, + // we'll import the element as anonymous. + // + // it is up to users to correct that to the document defined + // targetNamespace, or whatever their undersanding of the + // XML spec mandates. + } + + // adjust namespace prefixs as configured + if (xmlns) { + elementName = xmlns + ':' + elementName; + } + } + if (tagStart) { + attrsStart = q; + attrsString = x; + if (onOpenTag) { + if (proxy) { + onOpenTag(elementProxy, decodeEntities, tagEnd, getContext); + } else { + onOpenTag(elementName, getAttrs, decodeEntities, tagEnd, getContext); + } + if (parseStop) { + return; + } + } + } + if (tagEnd) { + if (onCloseTag) { + onCloseTag(proxy ? elementProxy : elementName, decodeEntities, tagStart, getContext); + if (parseStop) { + return; + } + } + + // restore old namespace + if (isNamespace) { + if (!tagStart) { + nsMatrix = nsMatrixStack.pop(); + } else { + nsMatrix = _nsMatrix; + } + } + } + j += 1; + } + } /** end parse */ +} + + + +/***/ }), + +/***/ 35386: +/*!***************************************************!*\ + !*** ./node_modules/set-function-length/index.js ***! + \***************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 25118); +var define = __webpack_require__(/*! define-data-property */ 80364); +var hasDescriptors = __webpack_require__(/*! has-property-descriptors */ 85593)(); +var gOPD = __webpack_require__(/*! gopd */ 56730); +var $TypeError = __webpack_require__(/*! es-errors/type */ 70970); +var $floor = GetIntrinsic('%Math.floor%'); + +/** @type {import('.')} */ +module.exports = function setFunctionLength(fn, length) { + if (typeof fn !== 'function') { + throw new $TypeError('`fn` is not a function'); + } + if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { + throw new $TypeError('`length` must be a positive 32-bit integer'); + } + var loose = arguments.length > 2 && !!arguments[2]; + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ('length' in fn && gOPD) { + var desc = gOPD(fn, 'length'); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define( /** @type {Parameters[0]} */fn, 'length', length, true, true); + } else { + define( /** @type {Parameters[0]} */fn, 'length', length); + } + } + return fn; +}; + +/***/ }), + +/***/ 57491: +/*!*************************************************!*\ + !*** ./node_modules/tiny-svg/dist/index.esm.js ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ append: () => (/* binding */ append), +/* harmony export */ appendTo: () => (/* binding */ appendTo), +/* harmony export */ attr: () => (/* binding */ attr), +/* harmony export */ classes: () => (/* binding */ classes), +/* harmony export */ clear: () => (/* binding */ clear), +/* harmony export */ clone: () => (/* binding */ clone), +/* harmony export */ create: () => (/* binding */ create), +/* harmony export */ createMatrix: () => (/* binding */ createMatrix), +/* harmony export */ createPoint: () => (/* binding */ createPoint), +/* harmony export */ createTransform: () => (/* binding */ createTransform), +/* harmony export */ innerSVG: () => (/* binding */ innerSVG), +/* harmony export */ off: () => (/* binding */ off), +/* harmony export */ on: () => (/* binding */ on), +/* harmony export */ prepend: () => (/* binding */ prepend), +/* harmony export */ prependTo: () => (/* binding */ prependTo), +/* harmony export */ remove: () => (/* binding */ remove), +/* harmony export */ replace: () => (/* binding */ replace), +/* harmony export */ select: () => (/* binding */ select), +/* harmony export */ selectAll: () => (/* binding */ selectAll), +/* harmony export */ transform: () => (/* binding */ transform) +/* harmony export */ }); +function ensureImported(element, target) { + if (element.ownerDocument !== target.ownerDocument) { + try { + // may fail on webkit + return target.ownerDocument.importNode(element, true); + } catch (e) { + // ignore + } + } + return element; +} + +/** + * appendTo utility + */ + +/** + * Append a node to a target element and return the appended node. + * + * @param {SVGElement} element + * @param {SVGElement} target + * + * @return {SVGElement} the appended node + */ +function appendTo(element, target) { + return target.appendChild(ensureImported(element, target)); +} + +/** + * append utility + */ + +/** + * Append a node to an element + * + * @param {SVGElement} element + * @param {SVGElement} node + * + * @return {SVGElement} the element + */ +function append(target, node) { + appendTo(node, target); + return target; +} + +/** + * attribute accessor utility + */ + +var LENGTH_ATTR = 2; +var CSS_PROPERTIES = { + 'alignment-baseline': 1, + 'baseline-shift': 1, + 'clip': 1, + 'clip-path': 1, + 'clip-rule': 1, + 'color': 1, + 'color-interpolation': 1, + 'color-interpolation-filters': 1, + 'color-profile': 1, + 'color-rendering': 1, + 'cursor': 1, + 'direction': 1, + 'display': 1, + 'dominant-baseline': 1, + 'enable-background': 1, + 'fill': 1, + 'fill-opacity': 1, + 'fill-rule': 1, + 'filter': 1, + 'flood-color': 1, + 'flood-opacity': 1, + 'font': 1, + 'font-family': 1, + 'font-size': LENGTH_ATTR, + 'font-size-adjust': 1, + 'font-stretch': 1, + 'font-style': 1, + 'font-variant': 1, + 'font-weight': 1, + 'glyph-orientation-horizontal': 1, + 'glyph-orientation-vertical': 1, + 'image-rendering': 1, + 'kerning': 1, + 'letter-spacing': 1, + 'lighting-color': 1, + 'marker': 1, + 'marker-end': 1, + 'marker-mid': 1, + 'marker-start': 1, + 'mask': 1, + 'opacity': 1, + 'overflow': 1, + 'pointer-events': 1, + 'shape-rendering': 1, + 'stop-color': 1, + 'stop-opacity': 1, + 'stroke': 1, + 'stroke-dasharray': 1, + 'stroke-dashoffset': 1, + 'stroke-linecap': 1, + 'stroke-linejoin': 1, + 'stroke-miterlimit': 1, + 'stroke-opacity': 1, + 'stroke-width': LENGTH_ATTR, + 'text-anchor': 1, + 'text-decoration': 1, + 'text-rendering': 1, + 'unicode-bidi': 1, + 'visibility': 1, + 'word-spacing': 1, + 'writing-mode': 1 +}; +function getAttribute(node, name) { + if (CSS_PROPERTIES[name]) { + return node.style[name]; + } else { + return node.getAttributeNS(null, name); + } +} +function setAttribute(node, name, value) { + var hyphenated = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); + var type = CSS_PROPERTIES[hyphenated]; + if (type) { + // append pixel unit, unless present + if (type === LENGTH_ATTR && typeof value === 'number') { + value = String(value) + 'px'; + } + node.style[hyphenated] = value; + } else { + node.setAttributeNS(null, name, value); + } +} +function setAttributes(node, attrs) { + var names = Object.keys(attrs), + i, + name; + for (i = 0, name; name = names[i]; i++) { + setAttribute(node, name, attrs[name]); + } +} + +/** + * Gets or sets raw attributes on a node. + * + * @param {SVGElement} node + * @param {Object} [attrs] + * @param {String} [name] + * @param {String} [value] + * + * @return {String} + */ +function attr(node, name, value) { + if (typeof name === 'string') { + if (value !== undefined) { + setAttribute(node, name, value); + } else { + return getAttribute(node, name); + } + } else { + setAttributes(node, name); + } + return node; +} + +/** + * Clear utility + */ +function index(arr, obj) { + if (arr.indexOf) { + return arr.indexOf(obj); + } + for (var i = 0; i < arr.length; ++i) { + if (arr[i] === obj) { + return i; + } + } + return -1; +} +var re = /\s+/; +var toString = Object.prototype.toString; +function defined(o) { + return typeof o !== 'undefined'; +} + +/** + * Wrap `el` in a `ClassList`. + * + * @param {Element} el + * @return {ClassList} + * @api public + */ + +function classes(el) { + return new ClassList(el); +} +function ClassList(el) { + if (!el || !el.nodeType) { + throw new Error('A DOM element reference is required'); + } + this.el = el; + this.list = el.classList; +} + +/** + * Add class `name` if not already present. + * + * @param {String} name + * @return {ClassList} + * @api public + */ + +ClassList.prototype.add = function (name) { + // classList + if (this.list) { + this.list.add(name); + return this; + } + + // fallback + var arr = this.array(); + var i = index(arr, name); + if (!~i) { + arr.push(name); + } + if (defined(this.el.className.baseVal)) { + this.el.className.baseVal = arr.join(' '); + } else { + this.el.className = arr.join(' '); + } + return this; +}; + +/** + * Remove class `name` when present, or + * pass a regular expression to remove + * any which match. + * + * @param {String|RegExp} name + * @return {ClassList} + * @api public + */ + +ClassList.prototype.remove = function (name) { + if ('[object RegExp]' === toString.call(name)) { + return this.removeMatching(name); + } + + // classList + if (this.list) { + this.list.remove(name); + return this; + } + + // fallback + var arr = this.array(); + var i = index(arr, name); + if (~i) { + arr.splice(i, 1); + } + this.el.className.baseVal = arr.join(' '); + return this; +}; + +/** + * Remove all classes matching `re`. + * + * @param {RegExp} re + * @return {ClassList} + * @api private + */ + +ClassList.prototype.removeMatching = function (re) { + var arr = this.array(); + for (var i = 0; i < arr.length; i++) { + if (re.test(arr[i])) { + this.remove(arr[i]); + } + } + return this; +}; + +/** + * Toggle class `name`, can force state via `force`. + * + * For browsers that support classList, but do not support `force` yet, + * the mistake will be detected and corrected. + * + * @param {String} name + * @param {Boolean} force + * @return {ClassList} + * @api public + */ + +ClassList.prototype.toggle = function (name, force) { + // classList + if (this.list) { + if (defined(force)) { + if (force !== this.list.toggle(name, force)) { + this.list.toggle(name); // toggle again to correct + } + } else { + this.list.toggle(name); + } + return this; + } + + // fallback + if (defined(force)) { + if (!force) { + this.remove(name); + } else { + this.add(name); + } + } else { + if (this.has(name)) { + this.remove(name); + } else { + this.add(name); + } + } + return this; +}; + +/** + * Return an array of classes. + * + * @return {Array} + * @api public + */ + +ClassList.prototype.array = function () { + var className = this.el.getAttribute('class') || ''; + var str = className.replace(/^\s+|\s+$/g, ''); + var arr = str.split(re); + if ('' === arr[0]) { + arr.shift(); + } + return arr; +}; + +/** + * Check if class `name` is present. + * + * @param {String} name + * @return {ClassList} + * @api public + */ + +ClassList.prototype.has = ClassList.prototype.contains = function (name) { + return this.list ? this.list.contains(name) : !!~index(this.array(), name); +}; +function remove(element) { + var parent = element.parentNode; + if (parent) { + parent.removeChild(element); + } + return element; +} + +/** + * Clear utility + */ + +/** + * Removes all children from the given element + * + * @param {DOMElement} element + * @return {DOMElement} the element (for chaining) + */ +function clear(element) { + var child; + while (child = element.firstChild) { + remove(child); + } + return element; +} +function clone(element) { + return element.cloneNode(true); +} +var ns = { + svg: 'http://www.w3.org/2000/svg' +}; + +/** + * DOM parsing utility + */ + +var SVG_START = '' + svg + ''; + unwrap = true; + } + var parsed = parseDocument(svg); + if (!unwrap) { + return parsed; + } + var fragment = document.createDocumentFragment(); + var parent = parsed.firstChild; + while (parent.firstChild) { + fragment.appendChild(parent.firstChild); + } + return fragment; +} +function parseDocument(svg) { + var parser; + + // parse + parser = new DOMParser(); + parser.async = false; + return parser.parseFromString(svg, 'text/xml'); +} + +/** + * Create utility for SVG elements + */ + +/** + * Create a specific type from name or SVG markup. + * + * @param {String} name the name or markup of the element + * @param {Object} [attrs] attributes to set on the element + * + * @returns {SVGElement} + */ +function create(name, attrs) { + var element; + if (name.charAt(0) === '<') { + element = parse(name).firstChild; + element = document.importNode(element, true); + } else { + element = document.createElementNS(ns.svg, name); + } + if (attrs) { + attr(element, attrs); + } + return element; +} + +/** + * Events handling utility + */ + +function on(node, event, listener, useCapture) { + node.addEventListener(event, listener, useCapture); +} +function off(node, event, listener, useCapture) { + node.removeEventListener(event, listener, useCapture); +} + +/** + * Geometry helpers + */ + +// fake node used to instantiate svg geometry elements +var node = null; +function getNode() { + if (node === null) { + node = create('svg'); + } + return node; +} +function extend(object, props) { + var i, + k, + keys = Object.keys(props); + for (i = 0; k = keys[i]; i++) { + object[k] = props[k]; + } + return object; +} +function createPoint(x, y) { + var point = getNode().createSVGPoint(); + switch (arguments.length) { + case 0: + return point; + case 2: + x = { + x: x, + y: y + }; + break; + } + return extend(point, x); +} + +/** + * Create matrix via args. + * + * @example + * + * createMatrix({ a: 1, b: 1 }); + * createMatrix(); + * createMatrix(1, 2, 0, 0, 30, 20); + * + * @return {SVGMatrix} + */ +function createMatrix(a, b, c, d, e, f) { + var matrix = getNode().createSVGMatrix(); + switch (arguments.length) { + case 0: + return matrix; + case 1: + return extend(matrix, a); + case 6: + return extend(matrix, { + a: a, + b: b, + c: c, + d: d, + e: e, + f: f + }); + } +} +function createTransform(matrix) { + if (matrix) { + return getNode().createSVGTransformFromMatrix(matrix); + } else { + return getNode().createSVGTransform(); + } +} + +/** + * Serialization util + */ + +var TEXT_ENTITIES = /([&<>]{1})/g; +var ATTR_ENTITIES = /([\n\r"]{1})/g; +var ENTITY_REPLACEMENT = { + '&': '&', + '<': '<', + '>': '>', + '"': '\'' +}; +function escape(str, pattern) { + function replaceFn(match, entity) { + return ENTITY_REPLACEMENT[entity] || entity; + } + return str.replace(pattern, replaceFn); +} +function serialize(node, output) { + var i, len, attrMap, attrNode, childNodes; + switch (node.nodeType) { + // TEXT + case 3: + // replace special XML characters + output.push(escape(node.textContent, TEXT_ENTITIES)); + break; + + // ELEMENT + case 1: + output.push('<', node.tagName); + if (node.hasAttributes()) { + attrMap = node.attributes; + for (i = 0, len = attrMap.length; i < len; ++i) { + attrNode = attrMap.item(i); + output.push(' ', attrNode.name, '="', escape(attrNode.value, ATTR_ENTITIES), '"'); + } + } + if (node.hasChildNodes()) { + output.push('>'); + childNodes = node.childNodes; + for (i = 0, len = childNodes.length; i < len; ++i) { + serialize(childNodes.item(i), output); + } + output.push(''); + } else { + output.push('/>'); + } + break; + + // COMMENT + case 8: + output.push(''); + break; + + // CDATA + case 4: + output.push(''); + break; + default: + throw new Error('unable to handle node ' + node.nodeType); + } + return output; +} + +/** + * innerHTML like functionality for SVG elements. + * based on innerSVG (https://code.google.com/p/innersvg) + */ + +function set(element, svg) { + var parsed = parse(svg); + + // clear element contents + clear(element); + if (!svg) { + return; + } + if (!isFragment(parsed)) { + // extract from parsed document + parsed = parsed.documentElement; + } + var nodes = slice(parsed.childNodes); + + // import + append each node + for (var i = 0; i < nodes.length; i++) { + appendTo(nodes[i], element); + } +} +function get(element) { + var child = element.firstChild, + output = []; + while (child) { + serialize(child, output); + child = child.nextSibling; + } + return output.join(''); +} +function isFragment(node) { + return node.nodeName === '#document-fragment'; +} +function innerSVG(element, svg) { + if (svg !== undefined) { + try { + set(element, svg); + } catch (e) { + throw new Error('error parsing SVG: ' + e.message); + } + return element; + } else { + return get(element); + } +} +function slice(arr) { + return Array.prototype.slice.call(arr); +} + +/** + * Selection utilities + */ + +function select(node, selector) { + return node.querySelector(selector); +} +function selectAll(node, selector) { + var nodes = node.querySelectorAll(selector); + return [].map.call(nodes, function (element) { + return element; + }); +} + +/** + * prependTo utility + */ + +/** + * Prepend a node to a target element and return the prepended node. + * + * @param {SVGElement} node + * @param {SVGElement} target + * + * @return {SVGElement} the prepended node + */ +function prependTo(node, target) { + return target.insertBefore(ensureImported(node, target), target.firstChild || null); +} + +/** + * prepend utility + */ + +/** + * Prepend a node to a target element + * + * @param {SVGElement} target + * @param {SVGElement} node + * + * @return {SVGElement} the target element + */ +function prepend(target, node) { + prependTo(node, target); + return target; +} + +/** + * Replace utility + */ + +function replace(element, replacement) { + element.parentNode.replaceChild(ensureImported(replacement, element), element); + return replacement; +} + +/** + * transform accessor utility + */ + +function wrapMatrix(transformList, transform) { + if (transform instanceof SVGMatrix) { + return transformList.createSVGTransformFromMatrix(transform); + } + return transform; +} +function setTransforms(transformList, transforms) { + var i, t; + transformList.clear(); + for (i = 0; t = transforms[i]; i++) { + transformList.appendItem(wrapMatrix(transformList, t)); + } +} + +/** + * Get or set the transforms on the given node. + * + * @param {SVGElement} node + * @param {SVGTransform|SVGMatrix|Array} [transforms] + * + * @return {SVGTransform} the consolidated transform + */ +function transform(node, transforms) { + var transformList = node.transform.baseVal; + if (transforms) { + if (!Array.isArray(transforms)) { + transforms = [transforms]; + } + setTransforms(transformList, transforms); + } + return transformList.consolidate(); +} + + +/***/ }), + +/***/ 19162: +/*!******************************************************!*\ + !*** ./node_modules/util/support/isBufferBrowser.js ***! + \******************************************************/ +/***/ ((module) => { + +module.exports = function isBuffer(arg) { + return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; +}; + +/***/ }), + +/***/ 76293: +/*!********************************************!*\ + !*** ./node_modules/util/support/types.js ***! + \********************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; +// Currently in sync with Node.js lib/internal/util/types.js +// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9 + + + +var isArgumentsObject = __webpack_require__(/*! is-arguments */ 64257); +var isGeneratorFunction = __webpack_require__(/*! is-generator-function */ 12963); +var whichTypedArray = __webpack_require__(/*! which-typed-array */ 93960); +var isTypedArray = __webpack_require__(/*! is-typed-array */ 85357); +function uncurryThis(f) { + return f.call.bind(f); +} +var BigIntSupported = typeof BigInt !== 'undefined'; +var SymbolSupported = typeof Symbol !== 'undefined'; +var ObjectToString = uncurryThis(Object.prototype.toString); +var numberValue = uncurryThis(Number.prototype.valueOf); +var stringValue = uncurryThis(String.prototype.valueOf); +var booleanValue = uncurryThis(Boolean.prototype.valueOf); +if (BigIntSupported) { + var bigIntValue = uncurryThis(BigInt.prototype.valueOf); +} +if (SymbolSupported) { + var symbolValue = uncurryThis(Symbol.prototype.valueOf); +} +function checkBoxedPrimitive(value, prototypeValueOf) { + if (typeof value !== 'object') { + return false; + } + try { + prototypeValueOf(value); + return true; + } catch (e) { + return false; + } +} +exports.isArgumentsObject = isArgumentsObject; +exports.isGeneratorFunction = isGeneratorFunction; +exports.isTypedArray = isTypedArray; + +// Taken from here and modified for better browser support +// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js +function isPromise(input) { + return typeof Promise !== 'undefined' && input instanceof Promise || input !== null && typeof input === 'object' && typeof input.then === 'function' && typeof input.catch === 'function'; +} +exports.isPromise = isPromise; +function isArrayBufferView(value) { + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { + return ArrayBuffer.isView(value); + } + return isTypedArray(value) || isDataView(value); +} +exports.isArrayBufferView = isArrayBufferView; +function isUint8Array(value) { + return whichTypedArray(value) === 'Uint8Array'; +} +exports.isUint8Array = isUint8Array; +function isUint8ClampedArray(value) { + return whichTypedArray(value) === 'Uint8ClampedArray'; +} +exports.isUint8ClampedArray = isUint8ClampedArray; +function isUint16Array(value) { + return whichTypedArray(value) === 'Uint16Array'; +} +exports.isUint16Array = isUint16Array; +function isUint32Array(value) { + return whichTypedArray(value) === 'Uint32Array'; +} +exports.isUint32Array = isUint32Array; +function isInt8Array(value) { + return whichTypedArray(value) === 'Int8Array'; +} +exports.isInt8Array = isInt8Array; +function isInt16Array(value) { + return whichTypedArray(value) === 'Int16Array'; +} +exports.isInt16Array = isInt16Array; +function isInt32Array(value) { + return whichTypedArray(value) === 'Int32Array'; +} +exports.isInt32Array = isInt32Array; +function isFloat32Array(value) { + return whichTypedArray(value) === 'Float32Array'; +} +exports.isFloat32Array = isFloat32Array; +function isFloat64Array(value) { + return whichTypedArray(value) === 'Float64Array'; +} +exports.isFloat64Array = isFloat64Array; +function isBigInt64Array(value) { + return whichTypedArray(value) === 'BigInt64Array'; +} +exports.isBigInt64Array = isBigInt64Array; +function isBigUint64Array(value) { + return whichTypedArray(value) === 'BigUint64Array'; +} +exports.isBigUint64Array = isBigUint64Array; +function isMapToString(value) { + return ObjectToString(value) === '[object Map]'; +} +isMapToString.working = typeof Map !== 'undefined' && isMapToString(new Map()); +function isMap(value) { + if (typeof Map === 'undefined') { + return false; + } + return isMapToString.working ? isMapToString(value) : value instanceof Map; +} +exports.isMap = isMap; +function isSetToString(value) { + return ObjectToString(value) === '[object Set]'; +} +isSetToString.working = typeof Set !== 'undefined' && isSetToString(new Set()); +function isSet(value) { + if (typeof Set === 'undefined') { + return false; + } + return isSetToString.working ? isSetToString(value) : value instanceof Set; +} +exports.isSet = isSet; +function isWeakMapToString(value) { + return ObjectToString(value) === '[object WeakMap]'; +} +isWeakMapToString.working = typeof WeakMap !== 'undefined' && isWeakMapToString(new WeakMap()); +function isWeakMap(value) { + if (typeof WeakMap === 'undefined') { + return false; + } + return isWeakMapToString.working ? isWeakMapToString(value) : value instanceof WeakMap; +} +exports.isWeakMap = isWeakMap; +function isWeakSetToString(value) { + return ObjectToString(value) === '[object WeakSet]'; +} +isWeakSetToString.working = typeof WeakSet !== 'undefined' && isWeakSetToString(new WeakSet()); +function isWeakSet(value) { + return isWeakSetToString(value); +} +exports.isWeakSet = isWeakSet; +function isArrayBufferToString(value) { + return ObjectToString(value) === '[object ArrayBuffer]'; +} +isArrayBufferToString.working = typeof ArrayBuffer !== 'undefined' && isArrayBufferToString(new ArrayBuffer()); +function isArrayBuffer(value) { + if (typeof ArrayBuffer === 'undefined') { + return false; + } + return isArrayBufferToString.working ? isArrayBufferToString(value) : value instanceof ArrayBuffer; +} +exports.isArrayBuffer = isArrayBuffer; +function isDataViewToString(value) { + return ObjectToString(value) === '[object DataView]'; +} +isDataViewToString.working = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined' && isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1)); +function isDataView(value) { + if (typeof DataView === 'undefined') { + return false; + } + return isDataViewToString.working ? isDataViewToString(value) : value instanceof DataView; +} +exports.isDataView = isDataView; + +// Store a copy of SharedArrayBuffer in case it's deleted elsewhere +var SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined; +function isSharedArrayBufferToString(value) { + return ObjectToString(value) === '[object SharedArrayBuffer]'; +} +function isSharedArrayBuffer(value) { + if (typeof SharedArrayBufferCopy === 'undefined') { + return false; + } + if (typeof isSharedArrayBufferToString.working === 'undefined') { + isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy()); + } + return isSharedArrayBufferToString.working ? isSharedArrayBufferToString(value) : value instanceof SharedArrayBufferCopy; +} +exports.isSharedArrayBuffer = isSharedArrayBuffer; +function isAsyncFunction(value) { + return ObjectToString(value) === '[object AsyncFunction]'; +} +exports.isAsyncFunction = isAsyncFunction; +function isMapIterator(value) { + return ObjectToString(value) === '[object Map Iterator]'; +} +exports.isMapIterator = isMapIterator; +function isSetIterator(value) { + return ObjectToString(value) === '[object Set Iterator]'; +} +exports.isSetIterator = isSetIterator; +function isGeneratorObject(value) { + return ObjectToString(value) === '[object Generator]'; +} +exports.isGeneratorObject = isGeneratorObject; +function isWebAssemblyCompiledModule(value) { + return ObjectToString(value) === '[object WebAssembly.Module]'; +} +exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule; +function isNumberObject(value) { + return checkBoxedPrimitive(value, numberValue); +} +exports.isNumberObject = isNumberObject; +function isStringObject(value) { + return checkBoxedPrimitive(value, stringValue); +} +exports.isStringObject = isStringObject; +function isBooleanObject(value) { + return checkBoxedPrimitive(value, booleanValue); +} +exports.isBooleanObject = isBooleanObject; +function isBigIntObject(value) { + return BigIntSupported && checkBoxedPrimitive(value, bigIntValue); +} +exports.isBigIntObject = isBigIntObject; +function isSymbolObject(value) { + return SymbolSupported && checkBoxedPrimitive(value, symbolValue); +} +exports.isSymbolObject = isSymbolObject; +function isBoxedPrimitive(value) { + return isNumberObject(value) || isStringObject(value) || isBooleanObject(value) || isBigIntObject(value) || isSymbolObject(value); +} +exports.isBoxedPrimitive = isBoxedPrimitive; +function isAnyArrayBuffer(value) { + return typeof Uint8Array !== 'undefined' && (isArrayBuffer(value) || isSharedArrayBuffer(value)); +} +exports.isAnyArrayBuffer = isAnyArrayBuffer; +['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function (method) { + Object.defineProperty(exports, method, { + enumerable: false, + value: function () { + throw new Error(method + ' is not supported in userland'); + } + }); +}); + +/***/ }), + +/***/ 22122: +/*!***********************************!*\ + !*** ./node_modules/util/util.js ***! + \***********************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +/* provided dependency */ var process = __webpack_require__(/*! ./node_modules/process/browser.js */ 96273); +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors(obj) { + var keys = Object.keys(obj); + var descriptors = {}; + for (var i = 0; i < keys.length; i++) { + descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]); + } + return descriptors; +}; +var formatRegExp = /%[sdj%]/g; +exports.format = function (f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function (x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': + return String(args[i++]); + case '%d': + return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +}; + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function (fn, msg) { + if (typeof process !== 'undefined' && process.noDeprecation === true) { + return fn; + } + + // Allow for deprecating things in the process of starting up. + if (typeof process === 'undefined') { + return function () { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + return deprecated; +}; +var debugs = {}; +var debugEnvRegex = /^$/; +if (process.env.NODE_DEBUG) { + var debugEnv = process.env.NODE_DEBUG; + debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, '\\$&').replace(/\*/g, '.*').replace(/,/g, '$|^').toUpperCase(); + debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i'); +} +exports.debuglog = function (set) { + set = set.toUpperCase(); + if (!debugs[set]) { + if (debugEnvRegex.test(set)) { + var pid = process.pid; + debugs[set] = function () { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function () {}; + } + } + return debugs[set]; +}; + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold': [1, 22], + 'italic': [3, 23], + 'underline': [4, 24], + 'inverse': [7, 27], + 'white': [37, 39], + 'grey': [90, 39], + 'black': [30, 39], + 'blue': [34, 39], + 'cyan': [36, 39], + 'green': [32, 39], + 'magenta': [35, 39], + 'red': [31, 39], + 'yellow': [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} +function stylizeNoColor(str, styleType) { + return str; +} +function arrayToHash(array) { + var hash = {}; + array.forEach(function (val, idx) { + hash[val] = true; + }); + return hash; +} +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && value && isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + var base = '', + array = false, + braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + ctx.seen.push(value); + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function (key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + ctx.seen.pop(); + return reduceToSingleString(output, base, braces); +} +function formatPrimitive(ctx, value) { + if (isUndefined(value)) return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) return ctx.stylize('null', 'null'); +} +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function (key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true)); + } + }); + return output; +} +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { + value: value[key] + }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n').slice(2); + } else { + str = '\n' + str.split('\n').map(function (line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.slice(1, -1); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + return name + ': ' + str; +} +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function (prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + if (length > 60) { + return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; + } + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +exports.types = __webpack_require__(/*! ./support/types */ 76293); +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; +exports.types.isRegExp = isRegExp; +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; +exports.types.isDate = isDate; +function isError(e) { + return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; +exports.types.isNativeError = isError; +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; +function isPrimitive(arg) { + return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || + // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; +exports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ 19162); +function objectToString(o) { + return Object.prototype.toString.call(o); +} +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function () { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = __webpack_require__(/*! inherits */ 98069); +exports._extend = function (origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined; +exports.promisify = function promisify(original) { + if (typeof original !== 'function') throw new TypeError('The "original" argument must be of type Function'); + if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) { + var fn = original[kCustomPromisifiedSymbol]; + if (typeof fn !== 'function') { + throw new TypeError('The "util.promisify.custom" argument must be of type Function'); + } + Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, + enumerable: false, + writable: false, + configurable: true + }); + return fn; + } + function fn() { + var promiseResolve, promiseReject; + var promise = new Promise(function (resolve, reject) { + promiseResolve = resolve; + promiseReject = reject; + }); + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + args.push(function (err, value) { + if (err) { + promiseReject(err); + } else { + promiseResolve(value); + } + }); + try { + original.apply(this, args); + } catch (err) { + promiseReject(err); + } + return promise; + } + Object.setPrototypeOf(fn, Object.getPrototypeOf(original)); + if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, + enumerable: false, + writable: false, + configurable: true + }); + return Object.defineProperties(fn, getOwnPropertyDescriptors(original)); +}; +exports.promisify.custom = kCustomPromisifiedSymbol; +function callbackifyOnRejected(reason, cb) { + // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M). + // Because `null` is a special error value in callbacks which means "no error + // occurred", we error-wrap so the callback consumer can distinguish between + // "the promise rejected with null" or "the promise fulfilled with undefined". + if (!reason) { + var newReason = new Error('Promise was rejected with a falsy value'); + newReason.reason = reason; + reason = newReason; + } + return cb(reason); +} +function callbackify(original) { + if (typeof original !== 'function') { + throw new TypeError('The "original" argument must be of type Function'); + } + + // We DO NOT return the promise as it gives the user a false sense that + // the promise is actually somehow related to the callback's execution + // and that the callback throwing will reject the promise. + function callbackified() { + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + var maybeCb = args.pop(); + if (typeof maybeCb !== 'function') { + throw new TypeError('The last argument must be of type Function'); + } + var self = this; + var cb = function () { + return maybeCb.apply(self, arguments); + }; + // In true node style we process the callback on `nextTick` with all the + // implications (stack, `uncaughtException`, `async_hooks`) + original.apply(this, args).then(function (ret) { + process.nextTick(cb.bind(null, null, ret)); + }, function (rej) { + process.nextTick(callbackifyOnRejected.bind(null, rej, cb)); + }); + } + Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)); + Object.defineProperties(callbackified, getOwnPropertyDescriptors(original)); + return callbackified; +} +exports.callbackify = callbackify; + +/***/ }), + +/***/ 93960: +/*!*************************************************!*\ + !*** ./node_modules/which-typed-array/index.js ***! + \*************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +"use strict"; + + +var forEach = __webpack_require__(/*! for-each */ 30235); +var availableTypedArrays = __webpack_require__(/*! available-typed-arrays */ 32532); +var callBind = __webpack_require__(/*! call-bind */ 37996); +var callBound = __webpack_require__(/*! call-bind/callBound */ 26112); +var gOPD = __webpack_require__(/*! gopd */ 56730); +var $toString = callBound('Object.prototype.toString'); +var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 91279)(); +var g = typeof globalThis === 'undefined' ? global : globalThis; +var typedArrays = availableTypedArrays(); +var $slice = callBound('String.prototype.slice'); +var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof'); + +var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; +}; +var cache = { + __proto__: null +}; +if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + descriptor = gOPD(superProto, Symbol.toStringTag); + } + cache['$' + typedArray] = callBind(descriptor.get); + } + }); +} else { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + var fn = arr.slice || arr.set; + if (fn) { + cache['$' + typedArray] = callBind(fn); + } + }); +} +var tryTypedArrays = function tryAllTypedArrays(value) { + var found = false; + forEach(cache, function (getter, typedArray) { + if (!found) { + try { + if ('$' + getter(value) === typedArray) { + found = $slice(typedArray, 1); + } + } catch (e) {/**/} + } + }); + return found; +}; +var trySlices = function tryAllSlices(value) { + var found = false; + forEach(cache, function (getter, name) { + if (!found) { + try { + getter(value); + found = $slice(name, 1); + } catch (e) {/**/} + } + }); + return found; +}; +module.exports = function whichTypedArray(value) { + if (!value || typeof value !== 'object') { + return false; + } + if (!hasToStringTag) { + var tag = $slice($toString(value), 8, -1); + if ($indexOf(typedArrays, tag) > -1) { + return tag; + } + if (tag !== 'Object') { + return false; + } + // node < 0.6 hits here on real Typed Arrays + return trySlices(value); + } + if (!gOPD) { + return null; + } // unknown engine + return tryTypedArrays(value); +}; + +/***/ }), + +/***/ 32532: +/*!******************************************************!*\ + !*** ./node_modules/available-typed-arrays/index.js ***! + \******************************************************/ +/***/ ((module) => { + +"use strict"; + + +var possibleNames = ['BigInt64Array', 'BigUint64Array', 'Float32Array', 'Float64Array', 'Int16Array', 'Int32Array', 'Int8Array', 'Uint16Array', 'Uint32Array', 'Uint8Array', 'Uint8ClampedArray']; +var g = typeof globalThis === 'undefined' ? global : globalThis; +module.exports = function availableTypedArrays() { + var out = []; + for (var i = 0; i < possibleNames.length; i++) { + if (typeof g[possibleNames[i]] === 'function') { + out[out.length] = possibleNames[i]; + } + } + return out; +}; + +/***/ }), + +/***/ 12015: +/*!******************************************************************!*\ + !*** ./node_modules/@angular/animations/fesm2022/animations.mjs ***! + \******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AUTO_STYLE: () => (/* binding */ AUTO_STYLE), +/* harmony export */ AnimationBuilder: () => (/* binding */ AnimationBuilder), +/* harmony export */ AnimationFactory: () => (/* binding */ AnimationFactory), +/* harmony export */ AnimationMetadataType: () => (/* binding */ AnimationMetadataType), +/* harmony export */ NoopAnimationPlayer: () => (/* binding */ NoopAnimationPlayer), +/* harmony export */ animate: () => (/* binding */ animate), +/* harmony export */ animateChild: () => (/* binding */ animateChild), +/* harmony export */ animation: () => (/* binding */ animation), +/* harmony export */ group: () => (/* binding */ group), +/* harmony export */ keyframes: () => (/* binding */ keyframes), +/* harmony export */ query: () => (/* binding */ query), +/* harmony export */ sequence: () => (/* binding */ sequence), +/* harmony export */ stagger: () => (/* binding */ stagger), +/* harmony export */ state: () => (/* binding */ state), +/* harmony export */ style: () => (/* binding */ style), +/* harmony export */ transition: () => (/* binding */ transition), +/* harmony export */ trigger: () => (/* binding */ trigger), +/* harmony export */ useAnimation: () => (/* binding */ useAnimation), +/* harmony export */ "ɵAnimationGroupPlayer": () => (/* binding */ AnimationGroupPlayer), +/* harmony export */ "ɵBrowserAnimationBuilder": () => (/* binding */ BrowserAnimationBuilder), +/* harmony export */ "ɵPRE_STYLE": () => (/* binding */ ɵPRE_STYLE) +/* harmony export */ }); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/** + * @license Angular v17.3.3 + * (c) 2010-2022 Google LLC. https://angular.io/ + * License: MIT + */ + + + + + +/** + * @description Constants for the categories of parameters that can be defined for animations. + * + * A corresponding function defines a set of parameters for each category, and + * collects them into a corresponding `AnimationMetadata` object. + * + * @publicApi + */ +var AnimationMetadataType; +(function (AnimationMetadataType) { + /** + * Associates a named animation state with a set of CSS styles. + * See [`state()`](api/animations/state) + */ + AnimationMetadataType[AnimationMetadataType["State"] = 0] = "State"; + /** + * Data for a transition from one animation state to another. + * See `transition()` + */ + AnimationMetadataType[AnimationMetadataType["Transition"] = 1] = "Transition"; + /** + * Contains a set of animation steps. + * See `sequence()` + */ + AnimationMetadataType[AnimationMetadataType["Sequence"] = 2] = "Sequence"; + /** + * Contains a set of animation steps. + * See `{@link animations/group group()}` + */ + AnimationMetadataType[AnimationMetadataType["Group"] = 3] = "Group"; + /** + * Contains an animation step. + * See `animate()` + */ + AnimationMetadataType[AnimationMetadataType["Animate"] = 4] = "Animate"; + /** + * Contains a set of animation steps. + * See `keyframes()` + */ + AnimationMetadataType[AnimationMetadataType["Keyframes"] = 5] = "Keyframes"; + /** + * Contains a set of CSS property-value pairs into a named style. + * See `style()` + */ + AnimationMetadataType[AnimationMetadataType["Style"] = 6] = "Style"; + /** + * Associates an animation with an entry trigger that can be attached to an element. + * See `trigger()` + */ + AnimationMetadataType[AnimationMetadataType["Trigger"] = 7] = "Trigger"; + /** + * Contains a re-usable animation. + * See `animation()` + */ + AnimationMetadataType[AnimationMetadataType["Reference"] = 8] = "Reference"; + /** + * Contains data to use in executing child animations returned by a query. + * See `animateChild()` + */ + AnimationMetadataType[AnimationMetadataType["AnimateChild"] = 9] = "AnimateChild"; + /** + * Contains animation parameters for a re-usable animation. + * See `useAnimation()` + */ + AnimationMetadataType[AnimationMetadataType["AnimateRef"] = 10] = "AnimateRef"; + /** + * Contains child-animation query data. + * See `query()` + */ + AnimationMetadataType[AnimationMetadataType["Query"] = 11] = "Query"; + /** + * Contains data for staggering an animation sequence. + * See `stagger()` + */ + AnimationMetadataType[AnimationMetadataType["Stagger"] = 12] = "Stagger"; +})(AnimationMetadataType || (AnimationMetadataType = {})); +/** + * Specifies automatic styling. + * + * @publicApi + */ +const AUTO_STYLE = '*'; +/** + * Creates a named animation trigger, containing a list of [`state()`](api/animations/state) + * and `transition()` entries to be evaluated when the expression + * bound to the trigger changes. + * + * @param name An identifying string. + * @param definitions An animation definition object, containing an array of + * [`state()`](api/animations/state) and `transition()` declarations. + * + * @return An object that encapsulates the trigger data. + * + * @usageNotes + * Define an animation trigger in the `animations` section of `@Component` metadata. + * In the template, reference the trigger by name and bind it to a trigger expression that + * evaluates to a defined animation state, using the following format: + * + * `[@triggerName]="expression"` + * + * Animation trigger bindings convert all values to strings, and then match the + * previous and current values against any linked transitions. + * Booleans can be specified as `1` or `true` and `0` or `false`. + * + * ### Usage Example + * + * The following example creates an animation trigger reference based on the provided + * name value. + * The provided animation value is expected to be an array consisting of state and + * transition declarations. + * + * ```typescript + * @Component({ + * selector: "my-component", + * templateUrl: "my-component-tpl.html", + * animations: [ + * trigger("myAnimationTrigger", [ + * state(...), + * state(...), + * transition(...), + * transition(...) + * ]) + * ] + * }) + * class MyComponent { + * myStatusExp = "something"; + * } + * ``` + * + * The template associated with this component makes use of the defined trigger + * by binding to an element within its template code. + * + * ```html + * + *
...
+ * ``` + * + * ### Using an inline function + * The `transition` animation method also supports reading an inline function which can decide + * if its associated animation should be run. + * + * ```typescript + * // this method is run each time the `myAnimationTrigger` trigger value changes. + * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key: + string]: any}): boolean { + * // notice that `element` and `params` are also available here + * return toState == 'yes-please-animate'; + * } + * + * @Component({ + * selector: 'my-component', + * templateUrl: 'my-component-tpl.html', + * animations: [ + * trigger('myAnimationTrigger', [ + * transition(myInlineMatcherFn, [ + * // the animation sequence code + * ]), + * ]) + * ] + * }) + * class MyComponent { + * myStatusExp = "yes-please-animate"; + * } + * ``` + * + * ### Disabling Animations + * When true, the special animation control binding `@.disabled` binding prevents + * all animations from rendering. + * Place the `@.disabled` binding on an element to disable + * animations on the element itself, as well as any inner animation triggers + * within the element. + * + * The following example shows how to use this feature: + * + * ```typescript + * @Component({ + * selector: 'my-component', + * template: ` + *
+ *
+ *
+ * `, + * animations: [ + * trigger("childAnimation", [ + * // ... + * ]) + * ] + * }) + * class MyComponent { + * isDisabled = true; + * exp = '...'; + * } + * ``` + * + * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating, + * along with any inner animations. + * + * ### Disable animations application-wide + * When an area of the template is set to have animations disabled, + * **all** inner components have their animations disabled as well. + * This means that you can disable all animations for an app + * by placing a host binding set on `@.disabled` on the topmost Angular component. + * + * ```typescript + * import {Component, HostBinding} from '@angular/core'; + * + * @Component({ + * selector: 'app-component', + * templateUrl: 'app.component.html', + * }) + * class AppComponent { + * @HostBinding('@.disabled') + * public animationsDisabled = true; + * } + * ``` + * + * ### Overriding disablement of inner animations + * Despite inner animations being disabled, a parent animation can `query()` + * for inner elements located in disabled areas of the template and still animate + * them if needed. This is also the case for when a sub animation is + * queried by a parent and then later animated using `animateChild()`. + * + * ### Detecting when an animation is disabled + * If a region of the DOM (or the entire application) has its animations disabled, the animation + * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides + * an instance of an `AnimationEvent`. If animations are disabled, + * the `.disabled` flag on the event is true. + * + * @publicApi + */ +function trigger(name, definitions) { + return { + type: AnimationMetadataType.Trigger, + name, + definitions, + options: {} + }; +} +/** + * Defines an animation step that combines styling information with timing information. + * + * @param timings Sets `AnimateTimings` for the parent animation. + * A string in the format "duration [delay] [easing]". + * - Duration and delay are expressed as a number and optional time unit, + * such as "1s" or "10ms" for one second and 10 milliseconds, respectively. + * The default unit is milliseconds. + * - The easing value controls how the animation accelerates and decelerates + * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`, + * `ease-in-out`, or a `cubic-bezier()` function call. + * If not supplied, no easing is applied. + * + * For example, the string "1s 100ms ease-out" specifies a duration of + * 1000 milliseconds, and delay of 100 ms, and the "ease-out" easing style, + * which decelerates near the end of the duration. + * @param styles Sets AnimationStyles for the parent animation. + * A function call to either `style()` or `keyframes()` + * that returns a collection of CSS style entries to be applied to the parent animation. + * When null, uses the styles from the destination state. + * This is useful when describing an animation step that will complete an animation; + * see "Animating to the final state" in `transitions()`. + * @returns An object that encapsulates the animation step. + * + * @usageNotes + * Call within an animation `sequence()`, `{@link animations/group group()}`, or + * `transition()` call to specify an animation step + * that applies given style data to the parent animation for a given amount of time. + * + * ### Syntax Examples + * **Timing examples** + * + * The following examples show various `timings` specifications. + * - `animate(500)` : Duration is 500 milliseconds. + * - `animate("1s")` : Duration is 1000 milliseconds. + * - `animate("100ms 0.5s")` : Duration is 100 milliseconds, delay is 500 milliseconds. + * - `animate("5s ease-in")` : Duration is 5000 milliseconds, easing in. + * - `animate("5s 10ms cubic-bezier(.17,.67,.88,.1)")` : Duration is 5000 milliseconds, delay is 10 + * milliseconds, easing according to a bezier curve. + * + * **Style examples** + * + * The following example calls `style()` to set a single CSS style. + * ```typescript + * animate(500, style({ background: "red" })) + * ``` + * The following example calls `keyframes()` to set a CSS style + * to different values for successive keyframes. + * ```typescript + * animate(500, keyframes( + * [ + * style({ background: "blue" }), + * style({ background: "red" }) + * ]) + * ``` + * + * @publicApi + */ +function animate(timings, styles = null) { + return { + type: AnimationMetadataType.Animate, + styles, + timings + }; +} +/** + * @description Defines a list of animation steps to be run in parallel. + * + * @param steps An array of animation step objects. + * - When steps are defined by `style()` or `animate()` + * function calls, each call within the group is executed instantly. + * - To specify offset styles to be applied at a later time, define steps with + * `keyframes()`, or use `animate()` calls with a delay value. + * For example: + * + * ```typescript + * group([ + * animate("1s", style({ background: "black" })), + * animate("2s", style({ color: "white" })) + * ]) + * ``` + * + * @param options An options object containing a delay and + * developer-defined parameters that provide styling defaults and + * can be overridden on invocation. + * + * @return An object that encapsulates the group data. + * + * @usageNotes + * Grouped animations are useful when a series of styles must be + * animated at different starting times and closed off at different ending times. + * + * When called within a `sequence()` or a + * `transition()` call, does not continue to the next + * instruction until all of the inner animation steps have completed. + * + * @publicApi + */ +function group(steps, options = null) { + return { + type: AnimationMetadataType.Group, + steps, + options + }; +} +/** + * Defines a list of animation steps to be run sequentially, one by one. + * + * @param steps An array of animation step objects. + * - Steps defined by `style()` calls apply the styling data immediately. + * - Steps defined by `animate()` calls apply the styling data over time + * as specified by the timing data. + * + * ```typescript + * sequence([ + * style({ opacity: 0 }), + * animate("1s", style({ opacity: 1 })) + * ]) + * ``` + * + * @param options An options object containing a delay and + * developer-defined parameters that provide styling defaults and + * can be overridden on invocation. + * + * @return An object that encapsulates the sequence data. + * + * @usageNotes + * When you pass an array of steps to a + * `transition()` call, the steps run sequentially by default. + * Compare this to the `{@link animations/group group()}` call, which runs animation steps in + *parallel. + * + * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call, + * execution continues to the next instruction only after each of the inner animation + * steps have completed. + * + * @publicApi + **/ +function sequence(steps, options = null) { + return { + type: AnimationMetadataType.Sequence, + steps, + options + }; +} +/** + * Declares a key/value object containing CSS properties/styles that + * can then be used for an animation [`state`](api/animations/state), within an animation + *`sequence`, or as styling data for calls to `animate()` and `keyframes()`. + * + * @param tokens A set of CSS styles or HTML styles associated with an animation state. + * The value can be any of the following: + * - A key-value style pair associating a CSS property with a value. + * - An array of key-value style pairs. + * - An asterisk (*), to use auto-styling, where styles are derived from the element + * being animated and applied to the animation when it starts. + * + * Auto-styling can be used to define a state that depends on layout or other + * environmental factors. + * + * @return An object that encapsulates the style data. + * + * @usageNotes + * The following examples create animation styles that collect a set of + * CSS property values: + * + * ```typescript + * // string values for CSS properties + * style({ background: "red", color: "blue" }) + * + * // numerical pixel values + * style({ width: 100, height: 0 }) + * ``` + * + * The following example uses auto-styling to allow an element to animate from + * a height of 0 up to its full height: + * + * ``` + * style({ height: 0 }), + * animate("1s", style({ height: "*" })) + * ``` + * + * @publicApi + **/ +function style(tokens) { + return { + type: AnimationMetadataType.Style, + styles: tokens, + offset: null + }; +} +/** + * Declares an animation state within a trigger attached to an element. + * + * @param name One or more names for the defined state in a comma-separated string. + * The following reserved state names can be supplied to define a style for specific use + * cases: + * + * - `void` You can associate styles with this name to be used when + * the element is detached from the application. For example, when an `ngIf` evaluates + * to false, the state of the associated element is void. + * - `*` (asterisk) Indicates the default state. You can associate styles with this name + * to be used as the fallback when the state that is being animated is not declared + * within the trigger. + * + * @param styles A set of CSS styles associated with this state, created using the + * `style()` function. + * This set of styles persists on the element once the state has been reached. + * @param options Parameters that can be passed to the state when it is invoked. + * 0 or more key-value pairs. + * @return An object that encapsulates the new state data. + * + * @usageNotes + * Use the `trigger()` function to register states to an animation trigger. + * Use the `transition()` function to animate between states. + * When a state is active within a component, its associated styles persist on the element, + * even when the animation ends. + * + * @publicApi + **/ +function state(name, styles, options) { + return { + type: AnimationMetadataType.State, + name, + styles, + options + }; +} +/** + * Defines a set of animation styles, associating each style with an optional `offset` value. + * + * @param steps A set of animation styles with optional offset data. + * The optional `offset` value for a style specifies a percentage of the total animation + * time at which that style is applied. + * @returns An object that encapsulates the keyframes data. + * + * @usageNotes + * Use with the `animate()` call. Instead of applying animations + * from the current state + * to the destination state, keyframes describe how each style entry is applied and at what point + * within the animation arc. + * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp). + * + * ### Usage + * + * In the following example, the offset values describe + * when each `backgroundColor` value is applied. The color is red at the start, and changes to + * blue when 20% of the total time has elapsed. + * + * ```typescript + * // the provided offset values + * animate("5s", keyframes([ + * style({ backgroundColor: "red", offset: 0 }), + * style({ backgroundColor: "blue", offset: 0.2 }), + * style({ backgroundColor: "orange", offset: 0.3 }), + * style({ backgroundColor: "black", offset: 1 }) + * ])) + * ``` + * + * If there are no `offset` values specified in the style entries, the offsets + * are calculated automatically. + * + * ```typescript + * animate("5s", keyframes([ + * style({ backgroundColor: "red" }) // offset = 0 + * style({ backgroundColor: "blue" }) // offset = 0.33 + * style({ backgroundColor: "orange" }) // offset = 0.66 + * style({ backgroundColor: "black" }) // offset = 1 + * ])) + *``` + + * @publicApi + */ +function keyframes(steps) { + return { + type: AnimationMetadataType.Keyframes, + steps + }; +} +/** + * Declares an animation transition which is played when a certain specified condition is met. + * + * @param stateChangeExpr A string with a specific format or a function that specifies when the + * animation transition should occur (see [State Change Expression](#state-change-expression)). + * + * @param steps One or more animation objects that represent the animation's instructions. + * + * @param options An options object that can be used to specify a delay for the animation or provide + * custom parameters for it. + * + * @returns An object that encapsulates the transition data. + * + * @usageNotes + * + * ### State Change Expression + * + * The State Change Expression instructs Angular when to run the transition's animations, it can + *either be + * - a string with a specific syntax + * - or a function that compares the previous and current state (value of the expression bound to + * the element's trigger) and returns `true` if the transition should occur or `false` otherwise + * + * The string format can be: + * - `fromState => toState`, which indicates that the transition's animations should occur then the + * expression bound to the trigger's element goes from `fromState` to `toState` + * + * _Example:_ + * ```typescript + * transition('open => closed', animate('.5s ease-out', style({ height: 0 }) )) + * ``` + * + * - `fromState <=> toState`, which indicates that the transition's animations should occur then + * the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa + * + * _Example:_ + * ```typescript + * transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)')) + * ``` + * + * - `:enter`/`:leave`, which indicates that the transition's animations should occur when the + * element enters or exists the DOM + * + * _Example:_ + * ```typescript + * transition(':enter', [ + * style({ opacity: 0 }), + * animate('500ms', style({ opacity: 1 })) + * ]) + * ``` + * + * - `:increment`/`:decrement`, which indicates that the transition's animations should occur when + * the numerical expression bound to the trigger's element has increased in value or decreased + * + * _Example:_ + * ```typescript + * transition(':increment', query('@counter', animateChild())) + * ``` + * + * - a sequence of any of the above divided by commas, which indicates that transition's animations + * should occur whenever one of the state change expressions matches + * + * _Example:_ + * ```typescript + * transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([ + * style({ transform: 'scale(1)', offset: 0}), + * style({ transform: 'scale(1.1)', offset: 0.7}), + * style({ transform: 'scale(1)', offset: 1}) + * ]))), + * ``` + * + * Also note that in such context: + * - `void` can be used to indicate the absence of the element + * - asterisks can be used as wildcards that match any state + * - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is + * equivalent to `:leave`) + * - `true` and `false` also match expression values of `1` and `0` respectively (but do not match + * _truthy_ and _falsy_ values) + * + *
+ * + * Be careful about entering end leaving elements as their transitions present a common + * pitfall for developers. + * + * Note that when an element with a trigger enters the DOM its `:enter` transition always + * gets executed, but its `:leave` transition will not be executed if the element is removed + * alongside its parent (as it will be removed "without warning" before its transition has + * a chance to be executed, the only way that such transition can occur is if the element + * is exiting the DOM on its own). + * + * + *
+ * + * ### Animating to a Final State + * + * If the final step in a transition is a call to `animate()` that uses a timing value + * with no `style` data, that step is automatically considered the final animation arc, + * for the element to reach the final state, in such case Angular automatically adds or removes + * CSS styles to ensure that the element is in the correct final state. + * + * + * ### Usage Examples + * + * - Transition animations applied based on + * the trigger's expression value + * + * ```HTML + *
+ * ... + *
+ * ``` + * + * ```typescript + * trigger("myAnimationTrigger", [ + * ..., // states + * transition("on => off, open => closed", animate(500)), + * transition("* <=> error", query('.indicator', animateChild())) + * ]) + * ``` + * + * - Transition animations applied based on custom logic dependent + * on the trigger's expression value and provided parameters + * + * ```HTML + *
+ * ... + *
+ * ``` + * + * ```typescript + * trigger("myAnimationTrigger", [ + * ..., // states + * transition( + * (fromState, toState, _element, params) => + * ['firststep', 'laststep'].includes(fromState.toLowerCase()) + * && toState === params?.['target'], + * animate('1s') + * ) + * ]) + * ``` + * + * @publicApi + **/ +function transition(stateChangeExpr, steps, options = null) { + return { + type: AnimationMetadataType.Transition, + expr: stateChangeExpr, + animation: steps, + options + }; +} +/** + * Produces a reusable animation that can be invoked in another animation or sequence, + * by calling the `useAnimation()` function. + * + * @param steps One or more animation objects, as returned by the `animate()` + * or `sequence()` function, that form a transformation from one state to another. + * A sequence is used by default when you pass an array. + * @param options An options object that can contain a delay value for the start of the + * animation, and additional developer-defined parameters. + * Provided values for additional parameters are used as defaults, + * and override values can be passed to the caller on invocation. + * @returns An object that encapsulates the animation data. + * + * @usageNotes + * The following example defines a reusable animation, providing some default parameter + * values. + * + * ```typescript + * var fadeAnimation = animation([ + * style({ opacity: '{{ start }}' }), + * animate('{{ time }}', + * style({ opacity: '{{ end }}'})) + * ], + * { params: { time: '1000ms', start: 0, end: 1 }}); + * ``` + * + * The following invokes the defined animation with a call to `useAnimation()`, + * passing in override parameter values. + * + * ```js + * useAnimation(fadeAnimation, { + * params: { + * time: '2s', + * start: 1, + * end: 0 + * } + * }) + * ``` + * + * If any of the passed-in parameter values are missing from this call, + * the default values are used. If one or more parameter values are missing before a step is + * animated, `useAnimation()` throws an error. + * + * @publicApi + */ +function animation(steps, options = null) { + return { + type: AnimationMetadataType.Reference, + animation: steps, + options + }; +} +/** + * Executes a queried inner animation element within an animation sequence. + * + * @param options An options object that can contain a delay value for the start of the + * animation, and additional override values for developer-defined parameters. + * @return An object that encapsulates the child animation data. + * + * @usageNotes + * Each time an animation is triggered in Angular, the parent animation + * has priority and any child animations are blocked. In order + * for a child animation to run, the parent animation must query each of the elements + * containing child animations, and run them using this function. + * + * Note that this feature is designed to be used with `query()` and it will only work + * with animations that are assigned using the Angular animation library. CSS keyframes + * and transitions are not handled by this API. + * + * @publicApi + */ +function animateChild(options = null) { + return { + type: AnimationMetadataType.AnimateChild, + options + }; +} +/** + * Starts a reusable animation that is created using the `animation()` function. + * + * @param animation The reusable animation to start. + * @param options An options object that can contain a delay value for the start of + * the animation, and additional override values for developer-defined parameters. + * @return An object that contains the animation parameters. + * + * @publicApi + */ +function useAnimation(animation, options = null) { + return { + type: AnimationMetadataType.AnimateRef, + animation, + options + }; +} +/** + * Finds one or more inner elements within the current element that is + * being animated within a sequence. Use with `animate()`. + * + * @param selector The element to query, or a set of elements that contain Angular-specific + * characteristics, specified with one or more of the following tokens. + * - `query(":enter")` or `query(":leave")` : Query for newly inserted/removed elements (not + * all elements can be queried via these tokens, see + * [Entering and Leaving Elements](#entering-and-leaving-elements)) + * - `query(":animating")` : Query all currently animating elements. + * - `query("@triggerName")` : Query elements that contain an animation trigger. + * - `query("@*")` : Query all elements that contain an animation triggers. + * - `query(":self")` : Include the current element into the animation sequence. + * + * @param animation One or more animation steps to apply to the queried element or elements. + * An array is treated as an animation sequence. + * @param options An options object. Use the 'limit' field to limit the total number of + * items to collect. + * @return An object that encapsulates the query data. + * + * @usageNotes + * + * ### Multiple Tokens + * + * Tokens can be merged into a combined query selector string. For example: + * + * ```typescript + * query(':self, .record:enter, .record:leave, @subTrigger', [...]) + * ``` + * + * The `query()` function collects multiple elements and works internally by using + * `element.querySelectorAll`. Use the `limit` field of an options object to limit + * the total number of items to be collected. For example: + * + * ```js + * query('div', [ + * animate(...), + * animate(...) + * ], { limit: 1 }) + * ``` + * + * By default, throws an error when zero items are found. Set the + * `optional` flag to ignore this error. For example: + * + * ```js + * query('.some-element-that-may-not-be-there', [ + * animate(...), + * animate(...) + * ], { optional: true }) + * ``` + * + * ### Entering and Leaving Elements + * + * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones + * that can are those that Angular assumes can enter/leave based on their own logic + * (if their insertion/removal is simply a consequence of that of their parent they + * should be queried via a different token in their parent's `:enter`/`:leave` transitions). + * + * The only elements Angular assumes can enter/leave based on their own logic (thus the only + * ones that can be queried via the `:enter` and `:leave` tokens) are: + * - Those inserted dynamically (via `ViewContainerRef`) + * - Those that have a structural directive (which, under the hood, are a subset of the above ones) + * + *
+ * + * Note that elements will be successfully queried via `:enter`/`:leave` even if their + * insertion/removal is not done manually via `ViewContainerRef`or caused by their structural + * directive (e.g. they enter/exit alongside their parent). + * + *
+ * + *
+ * + * There is an exception to what previously mentioned, besides elements entering/leaving based on + * their own logic, elements with an animation trigger can always be queried via `:leave` when + * their parent is also leaving. + * + *
+ * + * ### Usage Example + * + * The following example queries for inner elements and animates them + * individually using `animate()`. + * + * ```typescript + * @Component({ + * selector: 'inner', + * template: ` + *
+ *

Title

+ *
+ * Blah blah blah + *
+ *
+ * `, + * animations: [ + * trigger('queryAnimation', [ + * transition('* => goAnimate', [ + * // hide the inner elements + * query('h1', style({ opacity: 0 })), + * query('.content', style({ opacity: 0 })), + * + * // animate the inner elements in, one by one + * query('h1', animate(1000, style({ opacity: 1 }))), + * query('.content', animate(1000, style({ opacity: 1 }))), + * ]) + * ]) + * ] + * }) + * class Cmp { + * exp = ''; + * + * goAnimate() { + * this.exp = 'goAnimate'; + * } + * } + * ``` + * + * @publicApi + */ +function query(selector, animation, options = null) { + return { + type: AnimationMetadataType.Query, + selector, + animation, + options + }; +} +/** + * Use within an animation `query()` call to issue a timing gap after + * each queried item is animated. + * + * @param timings A delay value. + * @param animation One ore more animation steps. + * @returns An object that encapsulates the stagger data. + * + * @usageNotes + * In the following example, a container element wraps a list of items stamped out + * by an `ngFor`. The container element contains an animation trigger that will later be set + * to query for each of the inner items. + * + * Each time items are added, the opacity fade-in animation runs, + * and each removed item is faded out. + * When either of these animations occur, the stagger effect is + * applied after each item's animation is started. + * + * ```html + * + * + *
+ *
+ *
+ * {{ item }} + *
+ *
+ * ``` + * + * Here is the component code: + * + * ```typescript + * import {trigger, transition, style, animate, query, stagger} from '@angular/animations'; + * @Component({ + * templateUrl: 'list.component.html', + * animations: [ + * trigger('listAnimation', [ + * ... + * ]) + * ] + * }) + * class ListComponent { + * items = []; + * + * showItems() { + * this.items = [0,1,2,3,4]; + * } + * + * hideItems() { + * this.items = []; + * } + * + * toggle() { + * this.items.length ? this.hideItems() : this.showItems(); + * } + * } + * ``` + * + * Here is the animation trigger code: + * + * ```typescript + * trigger('listAnimation', [ + * transition('* => *', [ // each time the binding value changes + * query(':leave', [ + * stagger(100, [ + * animate('0.5s', style({ opacity: 0 })) + * ]) + * ]), + * query(':enter', [ + * style({ opacity: 0 }), + * stagger(100, [ + * animate('0.5s', style({ opacity: 1 })) + * ]) + * ]) + * ]) + * ]) + * ``` + * + * @publicApi + */ +function stagger(timings, animation) { + return { + type: AnimationMetadataType.Stagger, + timings, + animation + }; +} + +/** + * An injectable service that produces an animation sequence programmatically within an + * Angular component or directive. + * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`. + * + * @usageNotes + * + * To use this service, add it to your component or directive as a dependency. + * The service is instantiated along with your component. + * + * Apps do not typically need to create their own animation players, but if you + * do need to, follow these steps: + * + * 1. Use the [AnimationBuilder.build](api/animations/AnimationBuilder#build)() method + * to create a programmatic animation. The method returns an `AnimationFactory` instance. + * + * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element. + * + * 3. Use the player object to control the animation programmatically. + * + * For example: + * + * ```ts + * // import the service from BrowserAnimationsModule + * import {AnimationBuilder} from '@angular/animations'; + * // require the service as a dependency + * class MyCmp { + * constructor(private _builder: AnimationBuilder) {} + * + * makeAnimation(element: any) { + * // first define a reusable animation + * const myAnimation = this._builder.build([ + * style({ width: 0 }), + * animate(1000, style({ width: '100px' })) + * ]); + * + * // use the returned factory object to create a player + * const player = myAnimation.create(element); + * + * player.play(); + * } + * } + * ``` + * + * @publicApi + */ +class AnimationBuilder { + static #_ = this.ɵfac = function AnimationBuilder_Factory(t) { + return new (t || AnimationBuilder)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: AnimationBuilder, + factory: () => (() => (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(BrowserAnimationBuilder))(), + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AnimationBuilder, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root', + useFactory: () => (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(BrowserAnimationBuilder) + }] + }], null, null); +})(); +/** + * A factory object returned from the + * [AnimationBuilder.build](api/animations/AnimationBuilder#build)() + * method. + * + * @publicApi + */ +class AnimationFactory {} +class BrowserAnimationBuilder extends AnimationBuilder { + constructor(rootRenderer, doc) { + super(); + this.animationModuleType = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.ANIMATION_MODULE_TYPE, { + optional: true + }); + this._nextAnimationId = 0; + const typeData = { + id: '0', + encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewEncapsulation.None, + styles: [], + data: { + animation: [] + } + }; + this._renderer = rootRenderer.createRenderer(doc.body, typeData); + if (this.animationModuleType === null && !isAnimationRenderer(this._renderer)) { + // We only support AnimationRenderer & DynamicDelegationRenderer for this AnimationBuilder + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3600 /* RuntimeErrorCode.BROWSER_ANIMATION_BUILDER_INJECTED_WITHOUT_ANIMATIONS */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Angular detected that the `AnimationBuilder` was injected, but animation support was not enabled. ' + 'Please make sure that you enable animations in your application by calling `provideAnimations()` or `provideAnimationsAsync()` function.'); + } + } + build(animation) { + const id = this._nextAnimationId; + this._nextAnimationId++; + const entry = Array.isArray(animation) ? sequence(animation) : animation; + issueAnimationCommand(this._renderer, null, id, 'register', [entry]); + return new BrowserAnimationFactory(id, this._renderer); + } + static #_ = this.ɵfac = function BrowserAnimationBuilder_Factory(t) { + return new (t || BrowserAnimationBuilder)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.RendererFactory2), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: BrowserAnimationBuilder, + factory: BrowserAnimationBuilder.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BrowserAnimationBuilder, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.RendererFactory2 + }, { + type: Document, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT] + }] + }], null); +})(); +class BrowserAnimationFactory extends AnimationFactory { + constructor(_id, _renderer) { + super(); + this._id = _id; + this._renderer = _renderer; + } + create(element, options) { + return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer); + } +} +class RendererAnimationPlayer { + constructor(id, element, options, _renderer) { + this.id = id; + this.element = element; + this._renderer = _renderer; + this.parentPlayer = null; + this._started = false; + this.totalTime = 0; + this._command('create', options); + } + _listen(eventName, callback) { + return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback); + } + _command(command, ...args) { + issueAnimationCommand(this._renderer, this.element, this.id, command, args); + } + onDone(fn) { + this._listen('done', fn); + } + onStart(fn) { + this._listen('start', fn); + } + onDestroy(fn) { + this._listen('destroy', fn); + } + init() { + this._command('init'); + } + hasStarted() { + return this._started; + } + play() { + this._command('play'); + this._started = true; + } + pause() { + this._command('pause'); + } + restart() { + this._command('restart'); + } + finish() { + this._command('finish'); + } + destroy() { + this._command('destroy'); + } + reset() { + this._command('reset'); + this._started = false; + } + setPosition(p) { + this._command('setPosition', p); + } + getPosition() { + return unwrapAnimationRenderer(this._renderer)?.engine?.players[this.id]?.getPosition() ?? 0; + } +} +function issueAnimationCommand(renderer, element, id, command, args) { + renderer.setProperty(element, `@@${id}:${command}`, args); +} +/** + * The following 2 methods cannot reference their correct types (AnimationRenderer & + * DynamicDelegationRenderer) since this would introduce a import cycle. + */ +function unwrapAnimationRenderer(renderer) { + const type = renderer.ɵtype; + if (type === 0 /* AnimationRendererType.Regular */) { + return renderer; + } else if (type === 1 /* AnimationRendererType.Delegated */) { + return renderer.animationRenderer; + } + return null; +} +function isAnimationRenderer(renderer) { + const type = renderer.ɵtype; + return type === 0 /* AnimationRendererType.Regular */ || type === 1 /* AnimationRendererType.Delegated */; +} + +/** + * An empty programmatic controller for reusable animations. + * Used internally when animations are disabled, to avoid + * checking for the null case when an animation player is expected. + * + * @see {@link animate} + * @see {@link AnimationPlayer} + * @see {@link ɵAnimationGroupPlayer AnimationGroupPlayer} + * + * @publicApi + */ +class NoopAnimationPlayer { + constructor(duration = 0, delay = 0) { + this._onDoneFns = []; + this._onStartFns = []; + this._onDestroyFns = []; + this._originalOnDoneFns = []; + this._originalOnStartFns = []; + this._started = false; + this._destroyed = false; + this._finished = false; + this._position = 0; + this.parentPlayer = null; + this.totalTime = duration + delay; + } + _onFinish() { + if (!this._finished) { + this._finished = true; + this._onDoneFns.forEach(fn => fn()); + this._onDoneFns = []; + } + } + onStart(fn) { + this._originalOnStartFns.push(fn); + this._onStartFns.push(fn); + } + onDone(fn) { + this._originalOnDoneFns.push(fn); + this._onDoneFns.push(fn); + } + onDestroy(fn) { + this._onDestroyFns.push(fn); + } + hasStarted() { + return this._started; + } + init() {} + play() { + if (!this.hasStarted()) { + this._onStart(); + this.triggerMicrotask(); + } + this._started = true; + } + /** @internal */ + triggerMicrotask() { + queueMicrotask(() => this._onFinish()); + } + _onStart() { + this._onStartFns.forEach(fn => fn()); + this._onStartFns = []; + } + pause() {} + restart() {} + finish() { + this._onFinish(); + } + destroy() { + if (!this._destroyed) { + this._destroyed = true; + if (!this.hasStarted()) { + this._onStart(); + } + this.finish(); + this._onDestroyFns.forEach(fn => fn()); + this._onDestroyFns = []; + } + } + reset() { + this._started = false; + this._finished = false; + this._onStartFns = this._originalOnStartFns; + this._onDoneFns = this._originalOnDoneFns; + } + setPosition(position) { + this._position = this.totalTime ? position * this.totalTime : 1; + } + getPosition() { + return this.totalTime ? this._position / this.totalTime : 1; + } + /** @internal */ + triggerCallback(phaseName) { + const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns; + methods.forEach(fn => fn()); + methods.length = 0; + } +} + +/** + * A programmatic controller for a group of reusable animations. + * Used internally to control animations. + * + * @see {@link AnimationPlayer} + * @see {@link animations/group group} + * + */ +class AnimationGroupPlayer { + constructor(_players) { + this._onDoneFns = []; + this._onStartFns = []; + this._finished = false; + this._started = false; + this._destroyed = false; + this._onDestroyFns = []; + this.parentPlayer = null; + this.totalTime = 0; + this.players = _players; + let doneCount = 0; + let destroyCount = 0; + let startCount = 0; + const total = this.players.length; + if (total == 0) { + queueMicrotask(() => this._onFinish()); + } else { + this.players.forEach(player => { + player.onDone(() => { + if (++doneCount == total) { + this._onFinish(); + } + }); + player.onDestroy(() => { + if (++destroyCount == total) { + this._onDestroy(); + } + }); + player.onStart(() => { + if (++startCount == total) { + this._onStart(); + } + }); + }); + } + this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0); + } + _onFinish() { + if (!this._finished) { + this._finished = true; + this._onDoneFns.forEach(fn => fn()); + this._onDoneFns = []; + } + } + init() { + this.players.forEach(player => player.init()); + } + onStart(fn) { + this._onStartFns.push(fn); + } + _onStart() { + if (!this.hasStarted()) { + this._started = true; + this._onStartFns.forEach(fn => fn()); + this._onStartFns = []; + } + } + onDone(fn) { + this._onDoneFns.push(fn); + } + onDestroy(fn) { + this._onDestroyFns.push(fn); + } + hasStarted() { + return this._started; + } + play() { + if (!this.parentPlayer) { + this.init(); + } + this._onStart(); + this.players.forEach(player => player.play()); + } + pause() { + this.players.forEach(player => player.pause()); + } + restart() { + this.players.forEach(player => player.restart()); + } + finish() { + this._onFinish(); + this.players.forEach(player => player.finish()); + } + destroy() { + this._onDestroy(); + } + _onDestroy() { + if (!this._destroyed) { + this._destroyed = true; + this._onFinish(); + this.players.forEach(player => player.destroy()); + this._onDestroyFns.forEach(fn => fn()); + this._onDestroyFns = []; + } + } + reset() { + this.players.forEach(player => player.reset()); + this._destroyed = false; + this._finished = false; + this._started = false; + } + setPosition(p) { + const timeAtPosition = p * this.totalTime; + this.players.forEach(player => { + const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1; + player.setPosition(position); + }); + } + getPosition() { + const longestPlayer = this.players.reduce((longestSoFar, player) => { + const newPlayerIsLongest = longestSoFar === null || player.totalTime > longestSoFar.totalTime; + return newPlayerIsLongest ? player : longestSoFar; + }, null); + return longestPlayer != null ? longestPlayer.getPosition() : 0; + } + beforeDestroy() { + this.players.forEach(player => { + if (player.beforeDestroy) { + player.beforeDestroy(); + } + }); + } + /** @internal */ + triggerCallback(phaseName) { + const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns; + methods.forEach(fn => fn()); + methods.length = 0; + } +} +const ɵPRE_STYLE = '!'; + +/** + * @module + * @description + * Entry point for all animation APIs of the animation package. + */ + +/** + * @module + * @description + * Entry point for all public APIs of this package. + */ + +// This file is not used to build this module. It is only used during editing + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 79306: +/*!***************************************************************!*\ + !*** ./node_modules/@angular/animations/fesm2022/browser.mjs ***! + \***************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AnimationDriver: () => (/* binding */ AnimationDriver), +/* harmony export */ NoopAnimationDriver: () => (/* binding */ NoopAnimationDriver), +/* harmony export */ "ɵAnimation": () => (/* binding */ Animation), +/* harmony export */ "ɵAnimationEngine": () => (/* binding */ AnimationEngine), +/* harmony export */ "ɵAnimationRenderer": () => (/* binding */ AnimationRenderer), +/* harmony export */ "ɵAnimationRendererFactory": () => (/* binding */ AnimationRendererFactory), +/* harmony export */ "ɵAnimationStyleNormalizer": () => (/* binding */ AnimationStyleNormalizer), +/* harmony export */ "ɵBaseAnimationRenderer": () => (/* binding */ BaseAnimationRenderer), +/* harmony export */ "ɵNoopAnimationStyleNormalizer": () => (/* binding */ NoopAnimationStyleNormalizer), +/* harmony export */ "ɵWebAnimationsDriver": () => (/* binding */ WebAnimationsDriver), +/* harmony export */ "ɵWebAnimationsPlayer": () => (/* binding */ WebAnimationsPlayer), +/* harmony export */ "ɵWebAnimationsStyleNormalizer": () => (/* binding */ WebAnimationsStyleNormalizer), +/* harmony export */ "ɵallowPreviousPlayerStylesMerge": () => (/* binding */ allowPreviousPlayerStylesMerge), +/* harmony export */ "ɵcamelCaseToDashCase": () => (/* binding */ camelCaseToDashCase), +/* harmony export */ "ɵcontainsElement": () => (/* binding */ containsElement), +/* harmony export */ "ɵcreateEngine": () => (/* binding */ createEngine), +/* harmony export */ "ɵgetParentElement": () => (/* binding */ getParentElement), +/* harmony export */ "ɵinvokeQuery": () => (/* binding */ invokeQuery), +/* harmony export */ "ɵnormalizeKeyframes": () => (/* binding */ normalizeKeyframes), +/* harmony export */ "ɵvalidateStyleProperty": () => (/* binding */ validateStyleProperty), +/* harmony export */ "ɵvalidateWebAnimatableStyleProperty": () => (/* binding */ validateWebAnimatableStyleProperty) +/* harmony export */ }); +/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/animations */ 12015); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/** + * @license Angular v17.3.3 + * (c) 2010-2022 Google LLC. https://angular.io/ + * License: MIT + */ + + + + +const LINE_START = '\n - '; +function invalidTimingValue(exp) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3000 /* RuntimeErrorCode.INVALID_TIMING_VALUE */, ngDevMode && `The provided timing value "${exp}" is invalid.`); +} +function negativeStepValue() { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3100 /* RuntimeErrorCode.NEGATIVE_STEP_VALUE */, ngDevMode && 'Duration values below 0 are not allowed for this animation step.'); +} +function negativeDelayValue() { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3101 /* RuntimeErrorCode.NEGATIVE_DELAY_VALUE */, ngDevMode && 'Delay values below 0 are not allowed for this animation step.'); +} +function invalidStyleParams(varName) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3001 /* RuntimeErrorCode.INVALID_STYLE_PARAMS */, ngDevMode && `Unable to resolve the local animation param ${varName} in the given list of values`); +} +function invalidParamValue(varName) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3003 /* RuntimeErrorCode.INVALID_PARAM_VALUE */, ngDevMode && `Please provide a value for the animation param ${varName}`); +} +function invalidNodeType(nodeType) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3004 /* RuntimeErrorCode.INVALID_NODE_TYPE */, ngDevMode && `Unable to resolve animation metadata node #${nodeType}`); +} +function invalidCssUnitValue(userProvidedProperty, value) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3005 /* RuntimeErrorCode.INVALID_CSS_UNIT_VALUE */, ngDevMode && `Please provide a CSS unit value for ${userProvidedProperty}:${value}`); +} +function invalidTrigger() { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3006 /* RuntimeErrorCode.INVALID_TRIGGER */, ngDevMode && "animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"); +} +function invalidDefinition() { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3007 /* RuntimeErrorCode.INVALID_DEFINITION */, ngDevMode && 'only state() and transition() definitions can sit inside of a trigger()'); +} +function invalidState(metadataName, missingSubs) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3008 /* RuntimeErrorCode.INVALID_STATE */, ngDevMode && `state("${metadataName}", ...) must define default values for all the following style substitutions: ${missingSubs.join(', ')}`); +} +function invalidStyleValue(value) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3002 /* RuntimeErrorCode.INVALID_STYLE_VALUE */, ngDevMode && `The provided style string value ${value} is not allowed.`); +} +function invalidProperty(prop) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3009 /* RuntimeErrorCode.INVALID_PROPERTY */, ngDevMode && `The provided animation property "${prop}" is not a supported CSS property for animations`); +} +function invalidParallelAnimation(prop, firstStart, firstEnd, secondStart, secondEnd) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3010 /* RuntimeErrorCode.INVALID_PARALLEL_ANIMATION */, ngDevMode && `The CSS property "${prop}" that exists between the times of "${firstStart}ms" and "${firstEnd}ms" is also being animated in a parallel animation between the times of "${secondStart}ms" and "${secondEnd}ms"`); +} +function invalidKeyframes() { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3011 /* RuntimeErrorCode.INVALID_KEYFRAMES */, ngDevMode && `keyframes() must be placed inside of a call to animate()`); +} +function invalidOffset() { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3012 /* RuntimeErrorCode.INVALID_OFFSET */, ngDevMode && `Please ensure that all keyframe offsets are between 0 and 1`); +} +function keyframeOffsetsOutOfOrder() { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3200 /* RuntimeErrorCode.KEYFRAME_OFFSETS_OUT_OF_ORDER */, ngDevMode && `Please ensure that all keyframe offsets are in order`); +} +function keyframesMissingOffsets() { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3202 /* RuntimeErrorCode.KEYFRAMES_MISSING_OFFSETS */, ngDevMode && `Not all style() steps within the declared keyframes() contain offsets`); +} +function invalidStagger() { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3013 /* RuntimeErrorCode.INVALID_STAGGER */, ngDevMode && `stagger() can only be used inside of query()`); +} +function invalidQuery(selector) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3014 /* RuntimeErrorCode.INVALID_QUERY */, ngDevMode && `\`query("${selector}")\` returned zero elements. (Use \`query("${selector}", { optional: true })\` if you wish to allow this.)`); +} +function invalidExpression(expr) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3015 /* RuntimeErrorCode.INVALID_EXPRESSION */, ngDevMode && `The provided transition expression "${expr}" is not supported`); +} +function invalidTransitionAlias(alias) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3016 /* RuntimeErrorCode.INVALID_TRANSITION_ALIAS */, ngDevMode && `The transition alias value "${alias}" is not supported`); +} +function validationFailed(errors) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3500 /* RuntimeErrorCode.VALIDATION_FAILED */, ngDevMode && `animation validation failed:\n${errors.map(err => err.message).join('\n')}`); +} +function buildingFailed(errors) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3501 /* RuntimeErrorCode.BUILDING_FAILED */, ngDevMode && `animation building failed:\n${errors.map(err => err.message).join('\n')}`); +} +function triggerBuildFailed(name, errors) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3404 /* RuntimeErrorCode.TRIGGER_BUILD_FAILED */, ngDevMode && `The animation trigger "${name}" has failed to build due to the following errors:\n - ${errors.map(err => err.message).join('\n - ')}`); +} +function animationFailed(errors) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3502 /* RuntimeErrorCode.ANIMATION_FAILED */, ngDevMode && `Unable to animate due to the following errors:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`); +} +function registerFailed(errors) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3503 /* RuntimeErrorCode.REGISTRATION_FAILED */, ngDevMode && `Unable to build the animation due to the following errors: ${errors.map(err => err.message).join('\n')}`); +} +function missingOrDestroyedAnimation() { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3300 /* RuntimeErrorCode.MISSING_OR_DESTROYED_ANIMATION */, ngDevMode && "The requested animation doesn't exist or has already been destroyed"); +} +function createAnimationFailed(errors) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3504 /* RuntimeErrorCode.CREATE_ANIMATION_FAILED */, ngDevMode && `Unable to create the animation due to the following errors:${errors.map(err => err.message).join('\n')}`); +} +function missingPlayer(id) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3301 /* RuntimeErrorCode.MISSING_PLAYER */, ngDevMode && `Unable to find the timeline player referenced by ${id}`); +} +function missingTrigger(phase, name) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3302 /* RuntimeErrorCode.MISSING_TRIGGER */, ngDevMode && `Unable to listen on the animation trigger event "${phase}" because the animation trigger "${name}" doesn\'t exist!`); +} +function missingEvent(name) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3303 /* RuntimeErrorCode.MISSING_EVENT */, ngDevMode && `Unable to listen on the animation trigger "${name}" because the provided event is undefined!`); +} +function unsupportedTriggerEvent(phase, name) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3400 /* RuntimeErrorCode.UNSUPPORTED_TRIGGER_EVENT */, ngDevMode && `The provided animation trigger event "${phase}" for the animation trigger "${name}" is not supported!`); +} +function unregisteredTrigger(name) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3401 /* RuntimeErrorCode.UNREGISTERED_TRIGGER */, ngDevMode && `The provided animation trigger "${name}" has not been registered!`); +} +function triggerTransitionsFailed(errors) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3402 /* RuntimeErrorCode.TRIGGER_TRANSITIONS_FAILED */, ngDevMode && `Unable to process animations due to the following failed trigger transitions\n ${errors.map(err => err.message).join('\n')}`); +} +function triggerParsingFailed(name, errors) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3403 /* RuntimeErrorCode.TRIGGER_PARSING_FAILED */, ngDevMode && `Animation parsing for the ${name} trigger have failed:${LINE_START}${errors.map(err => err.message).join(LINE_START)}`); +} +function transitionFailed(name, errors) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](3505 /* RuntimeErrorCode.TRANSITION_FAILED */, ngDevMode && `@${name} has failed due to:\n ${errors.map(err => err.message).join('\n- ')}`); +} + +/** + * Set of all animatable CSS properties + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties + */ +const ANIMATABLE_PROP_SET = new Set(['-moz-outline-radius', '-moz-outline-radius-bottomleft', '-moz-outline-radius-bottomright', '-moz-outline-radius-topleft', '-moz-outline-radius-topright', '-ms-grid-columns', '-ms-grid-rows', '-webkit-line-clamp', '-webkit-text-fill-color', '-webkit-text-stroke', '-webkit-text-stroke-color', 'accent-color', 'all', 'backdrop-filter', 'background', 'background-color', 'background-position', 'background-size', 'block-size', 'border', 'border-block-end', 'border-block-end-color', 'border-block-end-width', 'border-block-start', 'border-block-start-color', 'border-block-start-width', 'border-bottom', 'border-bottom-color', 'border-bottom-left-radius', 'border-bottom-right-radius', 'border-bottom-width', 'border-color', 'border-end-end-radius', 'border-end-start-radius', 'border-image-outset', 'border-image-slice', 'border-image-width', 'border-inline-end', 'border-inline-end-color', 'border-inline-end-width', 'border-inline-start', 'border-inline-start-color', 'border-inline-start-width', 'border-left', 'border-left-color', 'border-left-width', 'border-radius', 'border-right', 'border-right-color', 'border-right-width', 'border-start-end-radius', 'border-start-start-radius', 'border-top', 'border-top-color', 'border-top-left-radius', 'border-top-right-radius', 'border-top-width', 'border-width', 'bottom', 'box-shadow', 'caret-color', 'clip', 'clip-path', 'color', 'column-count', 'column-gap', 'column-rule', 'column-rule-color', 'column-rule-width', 'column-width', 'columns', 'filter', 'flex', 'flex-basis', 'flex-grow', 'flex-shrink', 'font', 'font-size', 'font-size-adjust', 'font-stretch', 'font-variation-settings', 'font-weight', 'gap', 'grid-column-gap', 'grid-gap', 'grid-row-gap', 'grid-template-columns', 'grid-template-rows', 'height', 'inline-size', 'input-security', 'inset', 'inset-block', 'inset-block-end', 'inset-block-start', 'inset-inline', 'inset-inline-end', 'inset-inline-start', 'left', 'letter-spacing', 'line-clamp', 'line-height', 'margin', 'margin-block-end', 'margin-block-start', 'margin-bottom', 'margin-inline-end', 'margin-inline-start', 'margin-left', 'margin-right', 'margin-top', 'mask', 'mask-border', 'mask-position', 'mask-size', 'max-block-size', 'max-height', 'max-inline-size', 'max-lines', 'max-width', 'min-block-size', 'min-height', 'min-inline-size', 'min-width', 'object-position', 'offset', 'offset-anchor', 'offset-distance', 'offset-path', 'offset-position', 'offset-rotate', 'opacity', 'order', 'outline', 'outline-color', 'outline-offset', 'outline-width', 'padding', 'padding-block-end', 'padding-block-start', 'padding-bottom', 'padding-inline-end', 'padding-inline-start', 'padding-left', 'padding-right', 'padding-top', 'perspective', 'perspective-origin', 'right', 'rotate', 'row-gap', 'scale', 'scroll-margin', 'scroll-margin-block', 'scroll-margin-block-end', 'scroll-margin-block-start', 'scroll-margin-bottom', 'scroll-margin-inline', 'scroll-margin-inline-end', 'scroll-margin-inline-start', 'scroll-margin-left', 'scroll-margin-right', 'scroll-margin-top', 'scroll-padding', 'scroll-padding-block', 'scroll-padding-block-end', 'scroll-padding-block-start', 'scroll-padding-bottom', 'scroll-padding-inline', 'scroll-padding-inline-end', 'scroll-padding-inline-start', 'scroll-padding-left', 'scroll-padding-right', 'scroll-padding-top', 'scroll-snap-coordinate', 'scroll-snap-destination', 'scrollbar-color', 'shape-image-threshold', 'shape-margin', 'shape-outside', 'tab-size', 'text-decoration', 'text-decoration-color', 'text-decoration-thickness', 'text-emphasis', 'text-emphasis-color', 'text-indent', 'text-shadow', 'text-underline-offset', 'top', 'transform', 'transform-origin', 'translate', 'vertical-align', 'visibility', 'width', 'word-spacing', 'z-index', 'zoom']); +function optimizeGroupPlayer(players) { + switch (players.length) { + case 0: + return new _angular_animations__WEBPACK_IMPORTED_MODULE_1__.NoopAnimationPlayer(); + case 1: + return players[0]; + default: + return new _angular_animations__WEBPACK_IMPORTED_MODULE_1__["ɵAnimationGroupPlayer"](players); + } +} +function normalizeKeyframes$1(normalizer, keyframes, preStyles = new Map(), postStyles = new Map()) { + const errors = []; + const normalizedKeyframes = []; + let previousOffset = -1; + let previousKeyframe = null; + keyframes.forEach(kf => { + const offset = kf.get('offset'); + const isSameOffset = offset == previousOffset; + const normalizedKeyframe = isSameOffset && previousKeyframe || new Map(); + kf.forEach((val, prop) => { + let normalizedProp = prop; + let normalizedValue = val; + if (prop !== 'offset') { + normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors); + switch (normalizedValue) { + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__["ɵPRE_STYLE"]: + normalizedValue = preStyles.get(prop); + break; + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AUTO_STYLE: + normalizedValue = postStyles.get(prop); + break; + default: + normalizedValue = normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors); + break; + } + } + normalizedKeyframe.set(normalizedProp, normalizedValue); + }); + if (!isSameOffset) { + normalizedKeyframes.push(normalizedKeyframe); + } + previousKeyframe = normalizedKeyframe; + previousOffset = offset; + }); + if (errors.length) { + throw animationFailed(errors); + } + return normalizedKeyframes; +} +function listenOnPlayer(player, eventName, event, callback) { + switch (eventName) { + case 'start': + player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player))); + break; + case 'done': + player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player))); + break; + case 'destroy': + player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player))); + break; + } +} +function copyAnimationEvent(e, phaseName, player) { + const totalTime = player.totalTime; + const disabled = player.disabled ? true : false; + const event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled); + const data = e['_data']; + if (data != null) { + event['_data'] = data; + } + return event; +} +function makeAnimationEvent(element, triggerName, fromState, toState, phaseName = '', totalTime = 0, disabled) { + return { + element, + triggerName, + fromState, + toState, + phaseName, + totalTime, + disabled: !!disabled + }; +} +function getOrSetDefaultValue(map, key, defaultValue) { + let value = map.get(key); + if (!value) { + map.set(key, value = defaultValue); + } + return value; +} +function parseTimelineCommand(command) { + const separatorPos = command.indexOf(':'); + const id = command.substring(1, separatorPos); + const action = command.slice(separatorPos + 1); + return [id, action]; +} +const documentElement = /* @__PURE__ */(() => typeof document === 'undefined' ? null : document.documentElement)(); +function getParentElement(element) { + const parent = element.parentNode || element.host || null; // consider host to support shadow DOM + if (parent === documentElement) { + return null; + } + return parent; +} +function containsVendorPrefix(prop) { + // Webkit is the only real popular vendor prefix nowadays + // cc: http://shouldiprefix.com/ + return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit +} + +let _CACHED_BODY = null; +let _IS_WEBKIT = false; +function validateStyleProperty(prop) { + if (!_CACHED_BODY) { + _CACHED_BODY = getBodyNode() || {}; + _IS_WEBKIT = _CACHED_BODY.style ? 'WebkitAppearance' in _CACHED_BODY.style : false; + } + let result = true; + if (_CACHED_BODY.style && !containsVendorPrefix(prop)) { + result = prop in _CACHED_BODY.style; + if (!result && _IS_WEBKIT) { + const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.slice(1); + result = camelProp in _CACHED_BODY.style; + } + } + return result; +} +function validateWebAnimatableStyleProperty(prop) { + return ANIMATABLE_PROP_SET.has(prop); +} +function getBodyNode() { + if (typeof document != 'undefined') { + return document.body; + } + return null; +} +function containsElement(elm1, elm2) { + while (elm2) { + if (elm2 === elm1) { + return true; + } + elm2 = getParentElement(elm2); + } + return false; +} +function invokeQuery(element, selector, multi) { + if (multi) { + return Array.from(element.querySelectorAll(selector)); + } + const elem = element.querySelector(selector); + return elem ? [elem] : []; +} +function hypenatePropsKeys(original) { + const newMap = new Map(); + original.forEach((val, prop) => { + const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2'); + newMap.set(newProp, val); + }); + return newMap; +} + +/** + * @publicApi + * + * `AnimationDriver` implentation for Noop animations + */ +class NoopAnimationDriver { + /** + * @returns Whether `prop` is a valid CSS property + */ + validateStyleProperty(prop) { + return validateStyleProperty(prop); + } + /** + * @deprecated unused + */ + matchesElement(_element, _selector) { + // This method is deprecated and no longer in use so we return false. + return false; + } + /** + * + * @returns Whether elm1 contains elm2. + */ + containsElement(elm1, elm2) { + return containsElement(elm1, elm2); + } + /** + * @returns Rhe parent of the given element or `null` if the element is the `document` + */ + getParentElement(element) { + return getParentElement(element); + } + /** + * @returns The result of the query selector on the element. The array will contain up to 1 item + * if `multi` is `false`. + */ + query(element, selector, multi) { + return invokeQuery(element, selector, multi); + } + /** + * @returns The `defaultValue` or empty string + */ + computeStyle(element, prop, defaultValue) { + return defaultValue || ''; + } + /** + * @returns An `NoopAnimationPlayer` + */ + animate(element, keyframes, duration, delay, easing, previousPlayers = [], scrubberAccessRequested) { + return new _angular_animations__WEBPACK_IMPORTED_MODULE_1__.NoopAnimationPlayer(duration, delay); + } + static #_ = this.ɵfac = function NoopAnimationDriver_Factory(t) { + return new (t || NoopAnimationDriver)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: NoopAnimationDriver, + factory: NoopAnimationDriver.ɵfac + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NoopAnimationDriver, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable + }], null, null); +})(); +/** + * @publicApi + */ +class AnimationDriver { + /** + * @deprecated Use the NoopAnimationDriver class. + */ + static #_ = this.NOOP = new NoopAnimationDriver(); +} +class AnimationStyleNormalizer {} +class NoopAnimationStyleNormalizer { + normalizePropertyName(propertyName, errors) { + return propertyName; + } + normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) { + return value; + } +} +const ONE_SECOND = 1000; +const SUBSTITUTION_EXPR_START = '{{'; +const SUBSTITUTION_EXPR_END = '}}'; +const ENTER_CLASSNAME = 'ng-enter'; +const LEAVE_CLASSNAME = 'ng-leave'; +const NG_TRIGGER_CLASSNAME = 'ng-trigger'; +const NG_TRIGGER_SELECTOR = '.ng-trigger'; +const NG_ANIMATING_CLASSNAME = 'ng-animating'; +const NG_ANIMATING_SELECTOR = '.ng-animating'; +function resolveTimingValue(value) { + if (typeof value == 'number') return value; + const matches = value.match(/^(-?[\.\d]+)(m?s)/); + if (!matches || matches.length < 2) return 0; + return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]); +} +function _convertTimeValueToMS(value, unit) { + switch (unit) { + case 's': + return value * ONE_SECOND; + default: + // ms or something else + return value; + } +} +function resolveTiming(timings, errors, allowNegativeValues) { + return timings.hasOwnProperty('duration') ? timings : parseTimeExpression(timings, errors, allowNegativeValues); +} +function parseTimeExpression(exp, errors, allowNegativeValues) { + const regex = /^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i; + let duration; + let delay = 0; + let easing = ''; + if (typeof exp === 'string') { + const matches = exp.match(regex); + if (matches === null) { + errors.push(invalidTimingValue(exp)); + return { + duration: 0, + delay: 0, + easing: '' + }; + } + duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]); + const delayMatch = matches[3]; + if (delayMatch != null) { + delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]); + } + const easingVal = matches[5]; + if (easingVal) { + easing = easingVal; + } + } else { + duration = exp; + } + if (!allowNegativeValues) { + let containsErrors = false; + let startIndex = errors.length; + if (duration < 0) { + errors.push(negativeStepValue()); + containsErrors = true; + } + if (delay < 0) { + errors.push(negativeDelayValue()); + containsErrors = true; + } + if (containsErrors) { + errors.splice(startIndex, 0, invalidTimingValue(exp)); + } + } + return { + duration, + delay, + easing + }; +} +function normalizeKeyframes(keyframes) { + if (!keyframes.length) { + return []; + } + if (keyframes[0] instanceof Map) { + return keyframes; + } + return keyframes.map(kf => new Map(Object.entries(kf))); +} +function normalizeStyles(styles) { + return Array.isArray(styles) ? new Map(...styles) : new Map(styles); +} +function setStyles(element, styles, formerStyles) { + styles.forEach((val, prop) => { + const camelProp = dashCaseToCamelCase(prop); + if (formerStyles && !formerStyles.has(prop)) { + formerStyles.set(prop, element.style[camelProp]); + } + element.style[camelProp] = val; + }); +} +function eraseStyles(element, styles) { + styles.forEach((_, prop) => { + const camelProp = dashCaseToCamelCase(prop); + element.style[camelProp] = ''; + }); +} +function normalizeAnimationEntry(steps) { + if (Array.isArray(steps)) { + if (steps.length == 1) return steps[0]; + return (0,_angular_animations__WEBPACK_IMPORTED_MODULE_1__.sequence)(steps); + } + return steps; +} +function validateStyleParams(value, options, errors) { + const params = options.params || {}; + const matches = extractStyleParams(value); + if (matches.length) { + matches.forEach(varName => { + if (!params.hasOwnProperty(varName)) { + errors.push(invalidStyleParams(varName)); + } + }); + } +} +const PARAM_REGEX = new RegExp(`${SUBSTITUTION_EXPR_START}\\s*(.+?)\\s*${SUBSTITUTION_EXPR_END}`, 'g'); +function extractStyleParams(value) { + let params = []; + if (typeof value === 'string') { + let match; + while (match = PARAM_REGEX.exec(value)) { + params.push(match[1]); + } + PARAM_REGEX.lastIndex = 0; + } + return params; +} +function interpolateParams(value, params, errors) { + const original = `${value}`; + const str = original.replace(PARAM_REGEX, (_, varName) => { + let localVal = params[varName]; + // this means that the value was never overridden by the data passed in by the user + if (localVal == null) { + errors.push(invalidParamValue(varName)); + localVal = ''; + } + return localVal.toString(); + }); + // we do this to assert that numeric values stay as they are + return str == original ? value : str; +} +const DASH_CASE_REGEXP = /-+([a-z0-9])/g; +function dashCaseToCamelCase(input) { + return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase()); +} +function camelCaseToDashCase(input) { + return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); +} +function allowPreviousPlayerStylesMerge(duration, delay) { + return duration === 0 || delay === 0; +} +function balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) { + if (previousStyles.size && keyframes.length) { + let startingKeyframe = keyframes[0]; + let missingStyleProps = []; + previousStyles.forEach((val, prop) => { + if (!startingKeyframe.has(prop)) { + missingStyleProps.push(prop); + } + startingKeyframe.set(prop, val); + }); + if (missingStyleProps.length) { + for (let i = 1; i < keyframes.length; i++) { + let kf = keyframes[i]; + missingStyleProps.forEach(prop => kf.set(prop, computeStyle(element, prop))); + } + } + } + return keyframes; +} +function visitDslNode(visitor, node, context) { + switch (node.type) { + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Trigger: + return visitor.visitTrigger(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.State: + return visitor.visitState(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Transition: + return visitor.visitTransition(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Sequence: + return visitor.visitSequence(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Group: + return visitor.visitGroup(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Animate: + return visitor.visitAnimate(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Keyframes: + return visitor.visitKeyframes(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Style: + return visitor.visitStyle(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Reference: + return visitor.visitReference(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.AnimateChild: + return visitor.visitAnimateChild(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.AnimateRef: + return visitor.visitAnimateRef(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Query: + return visitor.visitQuery(node, context); + case _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Stagger: + return visitor.visitStagger(node, context); + default: + throw invalidNodeType(node.type); + } +} +function computeStyle(element, prop) { + return window.getComputedStyle(element)[prop]; +} +const DIMENSIONAL_PROP_SET = new Set(['width', 'height', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight', 'left', 'top', 'bottom', 'right', 'fontSize', 'outlineWidth', 'outlineOffset', 'paddingTop', 'paddingLeft', 'paddingBottom', 'paddingRight', 'marginTop', 'marginLeft', 'marginBottom', 'marginRight', 'borderRadius', 'borderWidth', 'borderTopWidth', 'borderLeftWidth', 'borderRightWidth', 'borderBottomWidth', 'textIndent', 'perspective']); +class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer { + normalizePropertyName(propertyName, errors) { + return dashCaseToCamelCase(propertyName); + } + normalizeStyleValue(userProvidedProperty, normalizedProperty, value, errors) { + let unit = ''; + const strVal = value.toString().trim(); + if (DIMENSIONAL_PROP_SET.has(normalizedProperty) && value !== 0 && value !== '0') { + if (typeof value === 'number') { + unit = 'px'; + } else { + const valAndSuffixMatch = value.match(/^[+-]?[\d\.]+([a-z]*)$/); + if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) { + errors.push(invalidCssUnitValue(userProvidedProperty, value)); + } + } + } + return strVal + unit; + } +} +function createListOfWarnings(warnings) { + const LINE_START = '\n - '; + return `${LINE_START}${warnings.filter(Boolean).map(warning => warning).join(LINE_START)}`; +} +function warnValidation(warnings) { + (typeof ngDevMode === 'undefined' || ngDevMode) && console.warn(`animation validation warnings:${createListOfWarnings(warnings)}`); +} +function warnTriggerBuild(name, warnings) { + (typeof ngDevMode === 'undefined' || ngDevMode) && console.warn(`The animation trigger "${name}" has built with the following warnings:${createListOfWarnings(warnings)}`); +} +function warnRegister(warnings) { + (typeof ngDevMode === 'undefined' || ngDevMode) && console.warn(`Animation built with the following warnings:${createListOfWarnings(warnings)}`); +} +function triggerParsingWarnings(name, warnings) { + (typeof ngDevMode === 'undefined' || ngDevMode) && console.warn(`Animation parsing for the ${name} trigger presents the following warnings:${createListOfWarnings(warnings)}`); +} +function pushUnrecognizedPropertiesWarning(warnings, props) { + if (props.length) { + warnings.push(`The following provided properties are not recognized: ${props.join(', ')}`); + } +} +const ANY_STATE = '*'; +function parseTransitionExpr(transitionValue, errors) { + const expressions = []; + if (typeof transitionValue == 'string') { + transitionValue.split(/\s*,\s*/).forEach(str => parseInnerTransitionStr(str, expressions, errors)); + } else { + expressions.push(transitionValue); + } + return expressions; +} +function parseInnerTransitionStr(eventStr, expressions, errors) { + if (eventStr[0] == ':') { + const result = parseAnimationAlias(eventStr, errors); + if (typeof result == 'function') { + expressions.push(result); + return; + } + eventStr = result; + } + const match = eventStr.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/); + if (match == null || match.length < 4) { + errors.push(invalidExpression(eventStr)); + return expressions; + } + const fromState = match[1]; + const separator = match[2]; + const toState = match[3]; + expressions.push(makeLambdaFromStates(fromState, toState)); + const isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE; + if (separator[0] == '<' && !isFullAnyStateExpr) { + expressions.push(makeLambdaFromStates(toState, fromState)); + } + return; +} +function parseAnimationAlias(alias, errors) { + switch (alias) { + case ':enter': + return 'void => *'; + case ':leave': + return '* => void'; + case ':increment': + return (fromState, toState) => parseFloat(toState) > parseFloat(fromState); + case ':decrement': + return (fromState, toState) => parseFloat(toState) < parseFloat(fromState); + default: + errors.push(invalidTransitionAlias(alias)); + return '* => *'; + } +} +// DO NOT REFACTOR ... keep the follow set instantiations +// with the values intact (closure compiler for some reason +// removes follow-up lines that add the values outside of +// the constructor... +const TRUE_BOOLEAN_VALUES = new Set(['true', '1']); +const FALSE_BOOLEAN_VALUES = new Set(['false', '0']); +function makeLambdaFromStates(lhs, rhs) { + const LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs); + const RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs); + return (fromState, toState) => { + let lhsMatch = lhs == ANY_STATE || lhs == fromState; + let rhsMatch = rhs == ANY_STATE || rhs == toState; + if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') { + lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs); + } + if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') { + rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs); + } + return lhsMatch && rhsMatch; + }; +} +const SELF_TOKEN = ':self'; +const SELF_TOKEN_REGEX = new RegExp(`s*${SELF_TOKEN}s*,?`, 'g'); +/* + * [Validation] + * The visitor code below will traverse the animation AST generated by the animation verb functions + * (the output is a tree of objects) and attempt to perform a series of validations on the data. The + * following corner-cases will be validated: + * + * 1. Overlap of animations + * Given that a CSS property cannot be animated in more than one place at the same time, it's + * important that this behavior is detected and validated. The way in which this occurs is that + * each time a style property is examined, a string-map containing the property will be updated with + * the start and end times for when the property is used within an animation step. + * + * If there are two or more parallel animations that are currently running (these are invoked by the + * group()) on the same element then the validator will throw an error. Since the start/end timing + * values are collected for each property then if the current animation step is animating the same + * property and its timing values fall anywhere into the window of time that the property is + * currently being animated within then this is what causes an error. + * + * 2. Timing values + * The validator will validate to see if a timing value of `duration delay easing` or + * `durationNumber` is valid or not. + * + * (note that upon validation the code below will replace the timing data with an object containing + * {duration,delay,easing}. + * + * 3. Offset Validation + * Each of the style() calls are allowed to have an offset value when placed inside of keyframes(). + * Offsets within keyframes() are considered valid when: + * + * - No offsets are used at all + * - Each style() entry contains an offset value + * - Each offset is between 0 and 1 + * - Each offset is greater to or equal than the previous one + * + * Otherwise an error will be thrown. + */ +function buildAnimationAst(driver, metadata, errors, warnings) { + return new AnimationAstBuilderVisitor(driver).build(metadata, errors, warnings); +} +const ROOT_SELECTOR = ''; +class AnimationAstBuilderVisitor { + constructor(_driver) { + this._driver = _driver; + } + build(metadata, errors, warnings) { + const context = new AnimationAstBuilderContext(errors); + this._resetContextStyleTimingState(context); + const ast = visitDslNode(this, normalizeAnimationEntry(metadata), context); + if (typeof ngDevMode === 'undefined' || ngDevMode) { + if (context.unsupportedCSSPropertiesFound.size) { + pushUnrecognizedPropertiesWarning(warnings, [...context.unsupportedCSSPropertiesFound.keys()]); + } + } + return ast; + } + _resetContextStyleTimingState(context) { + context.currentQuerySelector = ROOT_SELECTOR; + context.collectedStyles = new Map(); + context.collectedStyles.set(ROOT_SELECTOR, new Map()); + context.currentTime = 0; + } + visitTrigger(metadata, context) { + let queryCount = context.queryCount = 0; + let depCount = context.depCount = 0; + const states = []; + const transitions = []; + if (metadata.name.charAt(0) == '@') { + context.errors.push(invalidTrigger()); + } + metadata.definitions.forEach(def => { + this._resetContextStyleTimingState(context); + if (def.type == _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.State) { + const stateDef = def; + const name = stateDef.name; + name.toString().split(/\s*,\s*/).forEach(n => { + stateDef.name = n; + states.push(this.visitState(stateDef, context)); + }); + stateDef.name = name; + } else if (def.type == _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Transition) { + const transition = this.visitTransition(def, context); + queryCount += transition.queryCount; + depCount += transition.depCount; + transitions.push(transition); + } else { + context.errors.push(invalidDefinition()); + } + }); + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Trigger, + name: metadata.name, + states, + transitions, + queryCount, + depCount, + options: null + }; + } + visitState(metadata, context) { + const styleAst = this.visitStyle(metadata.styles, context); + const astParams = metadata.options && metadata.options.params || null; + if (styleAst.containsDynamicStyles) { + const missingSubs = new Set(); + const params = astParams || {}; + styleAst.styles.forEach(style => { + if (style instanceof Map) { + style.forEach(value => { + extractStyleParams(value).forEach(sub => { + if (!params.hasOwnProperty(sub)) { + missingSubs.add(sub); + } + }); + }); + } + }); + if (missingSubs.size) { + context.errors.push(invalidState(metadata.name, [...missingSubs.values()])); + } + } + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.State, + name: metadata.name, + style: styleAst, + options: astParams ? { + params: astParams + } : null + }; + } + visitTransition(metadata, context) { + context.queryCount = 0; + context.depCount = 0; + const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context); + const matchers = parseTransitionExpr(metadata.expr, context.errors); + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Transition, + matchers, + animation, + queryCount: context.queryCount, + depCount: context.depCount, + options: normalizeAnimationOptions(metadata.options) + }; + } + visitSequence(metadata, context) { + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Sequence, + steps: metadata.steps.map(s => visitDslNode(this, s, context)), + options: normalizeAnimationOptions(metadata.options) + }; + } + visitGroup(metadata, context) { + const currentTime = context.currentTime; + let furthestTime = 0; + const steps = metadata.steps.map(step => { + context.currentTime = currentTime; + const innerAst = visitDslNode(this, step, context); + furthestTime = Math.max(furthestTime, context.currentTime); + return innerAst; + }); + context.currentTime = furthestTime; + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Group, + steps, + options: normalizeAnimationOptions(metadata.options) + }; + } + visitAnimate(metadata, context) { + const timingAst = constructTimingAst(metadata.timings, context.errors); + context.currentAnimateTimings = timingAst; + let styleAst; + let styleMetadata = metadata.styles ? metadata.styles : (0,_angular_animations__WEBPACK_IMPORTED_MODULE_1__.style)({}); + if (styleMetadata.type == _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Keyframes) { + styleAst = this.visitKeyframes(styleMetadata, context); + } else { + let styleMetadata = metadata.styles; + let isEmpty = false; + if (!styleMetadata) { + isEmpty = true; + const newStyleData = {}; + if (timingAst.easing) { + newStyleData['easing'] = timingAst.easing; + } + styleMetadata = (0,_angular_animations__WEBPACK_IMPORTED_MODULE_1__.style)(newStyleData); + } + context.currentTime += timingAst.duration + timingAst.delay; + const _styleAst = this.visitStyle(styleMetadata, context); + _styleAst.isEmptyStep = isEmpty; + styleAst = _styleAst; + } + context.currentAnimateTimings = null; + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Animate, + timings: timingAst, + style: styleAst, + options: null + }; + } + visitStyle(metadata, context) { + const ast = this._makeStyleAst(metadata, context); + this._validateStyleAst(ast, context); + return ast; + } + _makeStyleAst(metadata, context) { + const styles = []; + const metadataStyles = Array.isArray(metadata.styles) ? metadata.styles : [metadata.styles]; + for (let styleTuple of metadataStyles) { + if (typeof styleTuple === 'string') { + if (styleTuple === _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AUTO_STYLE) { + styles.push(styleTuple); + } else { + context.errors.push(invalidStyleValue(styleTuple)); + } + } else { + styles.push(new Map(Object.entries(styleTuple))); + } + } + let containsDynamicStyles = false; + let collectedEasing = null; + styles.forEach(styleData => { + if (styleData instanceof Map) { + if (styleData.has('easing')) { + collectedEasing = styleData.get('easing'); + styleData.delete('easing'); + } + if (!containsDynamicStyles) { + for (let value of styleData.values()) { + if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) { + containsDynamicStyles = true; + break; + } + } + } + } + }); + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Style, + styles, + easing: collectedEasing, + offset: metadata.offset, + containsDynamicStyles, + options: null + }; + } + _validateStyleAst(ast, context) { + const timings = context.currentAnimateTimings; + let endTime = context.currentTime; + let startTime = context.currentTime; + if (timings && startTime > 0) { + startTime -= timings.duration + timings.delay; + } + ast.styles.forEach(tuple => { + if (typeof tuple === 'string') return; + tuple.forEach((value, prop) => { + if (typeof ngDevMode === 'undefined' || ngDevMode) { + if (!this._driver.validateStyleProperty(prop)) { + tuple.delete(prop); + context.unsupportedCSSPropertiesFound.add(prop); + return; + } + } + // This is guaranteed to have a defined Map at this querySelector location making it + // safe to add the assertion here. It is set as a default empty map in prior methods. + const collectedStyles = context.collectedStyles.get(context.currentQuerySelector); + const collectedEntry = collectedStyles.get(prop); + let updateCollectedStyle = true; + if (collectedEntry) { + if (startTime != endTime && startTime >= collectedEntry.startTime && endTime <= collectedEntry.endTime) { + context.errors.push(invalidParallelAnimation(prop, collectedEntry.startTime, collectedEntry.endTime, startTime, endTime)); + updateCollectedStyle = false; + } + // we always choose the smaller start time value since we + // want to have a record of the entire animation window where + // the style property is being animated in between + startTime = collectedEntry.startTime; + } + if (updateCollectedStyle) { + collectedStyles.set(prop, { + startTime, + endTime + }); + } + if (context.options) { + validateStyleParams(value, context.options, context.errors); + } + }); + }); + } + visitKeyframes(metadata, context) { + const ast = { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Keyframes, + styles: [], + options: null + }; + if (!context.currentAnimateTimings) { + context.errors.push(invalidKeyframes()); + return ast; + } + const MAX_KEYFRAME_OFFSET = 1; + let totalKeyframesWithOffsets = 0; + const offsets = []; + let offsetsOutOfOrder = false; + let keyframesOutOfRange = false; + let previousOffset = 0; + const keyframes = metadata.steps.map(styles => { + const style = this._makeStyleAst(styles, context); + let offsetVal = style.offset != null ? style.offset : consumeOffset(style.styles); + let offset = 0; + if (offsetVal != null) { + totalKeyframesWithOffsets++; + offset = style.offset = offsetVal; + } + keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1; + offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset; + previousOffset = offset; + offsets.push(offset); + return style; + }); + if (keyframesOutOfRange) { + context.errors.push(invalidOffset()); + } + if (offsetsOutOfOrder) { + context.errors.push(keyframeOffsetsOutOfOrder()); + } + const length = metadata.steps.length; + let generatedOffset = 0; + if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) { + context.errors.push(keyframesMissingOffsets()); + } else if (totalKeyframesWithOffsets == 0) { + generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1); + } + const limit = length - 1; + const currentTime = context.currentTime; + const currentAnimateTimings = context.currentAnimateTimings; + const animateDuration = currentAnimateTimings.duration; + keyframes.forEach((kf, i) => { + const offset = generatedOffset > 0 ? i == limit ? 1 : generatedOffset * i : offsets[i]; + const durationUpToThisFrame = offset * animateDuration; + context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame; + currentAnimateTimings.duration = durationUpToThisFrame; + this._validateStyleAst(kf, context); + kf.offset = offset; + ast.styles.push(kf); + }); + return ast; + } + visitReference(metadata, context) { + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Reference, + animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), + options: normalizeAnimationOptions(metadata.options) + }; + } + visitAnimateChild(metadata, context) { + context.depCount++; + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.AnimateChild, + options: normalizeAnimationOptions(metadata.options) + }; + } + visitAnimateRef(metadata, context) { + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.AnimateRef, + animation: this.visitReference(metadata.animation, context), + options: normalizeAnimationOptions(metadata.options) + }; + } + visitQuery(metadata, context) { + const parentSelector = context.currentQuerySelector; + const options = metadata.options || {}; + context.queryCount++; + context.currentQuery = metadata; + const [selector, includeSelf] = normalizeSelector(metadata.selector); + context.currentQuerySelector = parentSelector.length ? parentSelector + ' ' + selector : selector; + getOrSetDefaultValue(context.collectedStyles, context.currentQuerySelector, new Map()); + const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context); + context.currentQuery = null; + context.currentQuerySelector = parentSelector; + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Query, + selector, + limit: options.limit || 0, + optional: !!options.optional, + includeSelf, + animation, + originalSelector: metadata.selector, + options: normalizeAnimationOptions(metadata.options) + }; + } + visitStagger(metadata, context) { + if (!context.currentQuery) { + context.errors.push(invalidStagger()); + } + const timings = metadata.timings === 'full' ? { + duration: 0, + delay: 0, + easing: 'full' + } : resolveTiming(metadata.timings, context.errors, true); + return { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Stagger, + animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), + timings, + options: null + }; + } +} +function normalizeSelector(selector) { + const hasAmpersand = selector.split(/\s*,\s*/).find(token => token == SELF_TOKEN) ? true : false; + if (hasAmpersand) { + selector = selector.replace(SELF_TOKEN_REGEX, ''); + } + // Note: the :enter and :leave aren't normalized here since those + // selectors are filled in at runtime during timeline building + selector = selector.replace(/@\*/g, NG_TRIGGER_SELECTOR).replace(/@\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.slice(1)).replace(/:animating/g, NG_ANIMATING_SELECTOR); + return [selector, hasAmpersand]; +} +function normalizeParams(obj) { + return obj ? { + ...obj + } : null; +} +class AnimationAstBuilderContext { + constructor(errors) { + this.errors = errors; + this.queryCount = 0; + this.depCount = 0; + this.currentTransition = null; + this.currentQuery = null; + this.currentQuerySelector = null; + this.currentAnimateTimings = null; + this.currentTime = 0; + this.collectedStyles = new Map(); + this.options = null; + this.unsupportedCSSPropertiesFound = new Set(); + } +} +function consumeOffset(styles) { + if (typeof styles == 'string') return null; + let offset = null; + if (Array.isArray(styles)) { + styles.forEach(styleTuple => { + if (styleTuple instanceof Map && styleTuple.has('offset')) { + const obj = styleTuple; + offset = parseFloat(obj.get('offset')); + obj.delete('offset'); + } + }); + } else if (styles instanceof Map && styles.has('offset')) { + const obj = styles; + offset = parseFloat(obj.get('offset')); + obj.delete('offset'); + } + return offset; +} +function constructTimingAst(value, errors) { + if (value.hasOwnProperty('duration')) { + return value; + } + if (typeof value == 'number') { + const duration = resolveTiming(value, errors).duration; + return makeTimingAst(duration, 0, ''); + } + const strValue = value; + const isDynamic = strValue.split(/\s+/).some(v => v.charAt(0) == '{' && v.charAt(1) == '{'); + if (isDynamic) { + const ast = makeTimingAst(0, 0, ''); + ast.dynamic = true; + ast.strValue = strValue; + return ast; + } + const timings = resolveTiming(strValue, errors); + return makeTimingAst(timings.duration, timings.delay, timings.easing); +} +function normalizeAnimationOptions(options) { + if (options) { + options = { + ...options + }; + if (options['params']) { + options['params'] = normalizeParams(options['params']); + } + } else { + options = {}; + } + return options; +} +function makeTimingAst(duration, delay, easing) { + return { + duration, + delay, + easing + }; +} +function createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing = null, subTimeline = false) { + return { + type: 1 /* AnimationTransitionInstructionType.TimelineAnimation */, + element, + keyframes, + preStyleProps, + postStyleProps, + duration, + delay, + totalTime: duration + delay, + easing, + subTimeline + }; +} +class ElementInstructionMap { + constructor() { + this._map = new Map(); + } + get(element) { + return this._map.get(element) || []; + } + append(element, instructions) { + let existingInstructions = this._map.get(element); + if (!existingInstructions) { + this._map.set(element, existingInstructions = []); + } + existingInstructions.push(...instructions); + } + has(element) { + return this._map.has(element); + } + clear() { + this._map.clear(); + } +} +const ONE_FRAME_IN_MILLISECONDS = 1; +const ENTER_TOKEN = ':enter'; +const ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g'); +const LEAVE_TOKEN = ':leave'; +const LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g'); +/* + * The code within this file aims to generate web-animations-compatible keyframes from Angular's + * animation DSL code. + * + * The code below will be converted from: + * + * ``` + * sequence([ + * style({ opacity: 0 }), + * animate(1000, style({ opacity: 0 })) + * ]) + * ``` + * + * To: + * ``` + * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }] + * duration = 1000 + * delay = 0 + * easing = '' + * ``` + * + * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a + * combination of AST traversal and merge-sort-like algorithms are used. + * + * [AST Traversal] + * Each of the animation verbs, when executed, will return an string-map object representing what + * type of action it is (style, animate, group, etc...) and the data associated with it. This means + * that when functional composition mix of these functions is evaluated (like in the example above) + * then it will end up producing a tree of objects representing the animation itself. + * + * When this animation object tree is processed by the visitor code below it will visit each of the + * verb statements within the visitor. And during each visit it will build the context of the + * animation keyframes by interacting with the `TimelineBuilder`. + * + * [TimelineBuilder] + * This class is responsible for tracking the styles and building a series of keyframe objects for a + * timeline between a start and end time. The builder starts off with an initial timeline and each + * time the AST comes across a `group()`, `keyframes()` or a combination of the two within a + * `sequence()` then it will generate a sub timeline for each step as well as a new one after + * they are complete. + * + * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub + * timeline was created (based on one of the cases above) then the parent timeline will attempt to + * merge the styles used within the sub timelines into itself (only with group() this will happen). + * This happens with a merge operation (much like how the merge works in mergeSort) and it will only + * copy the most recently used styles from the sub timelines into the parent timeline. This ensures + * that if the styles are used later on in another phase of the animation then they will be the most + * up-to-date values. + * + * [How Missing Styles Are Updated] + * Each timeline has a `backFill` property which is responsible for filling in new styles into + * already processed keyframes if a new style shows up later within the animation sequence. + * + * ``` + * sequence([ + * style({ width: 0 }), + * animate(1000, style({ width: 100 })), + * animate(1000, style({ width: 200 })), + * animate(1000, style({ width: 300 })) + * animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere + * else + * ]) + * ``` + * + * What is happening here is that the `height` value is added later in the sequence, but is missing + * from all previous animation steps. Therefore when a keyframe is created it would also be missing + * from all previous keyframes up until where it is first used. For the timeline keyframe generation + * to properly fill in the style it will place the previous value (the value from the parent + * timeline) or a default value of `*` into the backFill map. + * + * When a sub-timeline is created it will have its own backFill property. This is done so that + * styles present within the sub-timeline do not accidentally seep into the previous/future timeline + * keyframes + * + * [Validation] + * The code in this file is not responsible for validation. That functionality happens with within + * the `AnimationValidatorVisitor` code. + */ +function buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles = new Map(), finalStyles = new Map(), options, subInstructions, errors = []) { + return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors); +} +class AnimationTimelineBuilderVisitor { + buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors = []) { + subInstructions = subInstructions || new ElementInstructionMap(); + const context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []); + context.options = options; + const delay = options.delay ? resolveTimingValue(options.delay) : 0; + context.currentTimeline.delayNextStep(delay); + context.currentTimeline.setStyles([startingStyles], null, context.errors, options); + visitDslNode(this, ast, context); + // this checks to see if an actual animation happened + const timelines = context.timelines.filter(timeline => timeline.containsAnimation()); + // note: we just want to apply the final styles for the rootElement, so we do not + // just apply the styles to the last timeline but the last timeline which + // element is the root one (basically `*`-styles are replaced with the actual + // state style values only for the root element) + if (timelines.length && finalStyles.size) { + let lastRootTimeline; + for (let i = timelines.length - 1; i >= 0; i--) { + const timeline = timelines[i]; + if (timeline.element === rootElement) { + lastRootTimeline = timeline; + break; + } + } + if (lastRootTimeline && !lastRootTimeline.allowOnlyTimelineStyles()) { + lastRootTimeline.setStyles([finalStyles], null, context.errors, options); + } + } + return timelines.length ? timelines.map(timeline => timeline.buildKeyframes()) : [createTimelineInstruction(rootElement, [], [], [], 0, delay, '', false)]; + } + visitTrigger(ast, context) { + // these values are not visited in this AST + } + visitState(ast, context) { + // these values are not visited in this AST + } + visitTransition(ast, context) { + // these values are not visited in this AST + } + visitAnimateChild(ast, context) { + const elementInstructions = context.subInstructions.get(context.element); + if (elementInstructions) { + const innerContext = context.createSubContext(ast.options); + const startTime = context.currentTimeline.currentTime; + const endTime = this._visitSubInstructions(elementInstructions, innerContext, innerContext.options); + if (startTime != endTime) { + // we do this on the upper context because we created a sub context for + // the sub child animations + context.transformIntoNewTimeline(endTime); + } + } + context.previousNode = ast; + } + visitAnimateRef(ast, context) { + const innerContext = context.createSubContext(ast.options); + innerContext.transformIntoNewTimeline(); + this._applyAnimationRefDelays([ast.options, ast.animation.options], context, innerContext); + this.visitReference(ast.animation, innerContext); + context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime); + context.previousNode = ast; + } + _applyAnimationRefDelays(animationsRefsOptions, context, innerContext) { + for (const animationRefOptions of animationsRefsOptions) { + const animationDelay = animationRefOptions?.delay; + if (animationDelay) { + const animationDelayValue = typeof animationDelay === 'number' ? animationDelay : resolveTimingValue(interpolateParams(animationDelay, animationRefOptions?.params ?? {}, context.errors)); + innerContext.delayNextStep(animationDelayValue); + } + } + } + _visitSubInstructions(instructions, context, options) { + const startTime = context.currentTimeline.currentTime; + let furthestTime = startTime; + // this is a special-case for when a user wants to skip a sub + // animation from being fired entirely. + const duration = options.duration != null ? resolveTimingValue(options.duration) : null; + const delay = options.delay != null ? resolveTimingValue(options.delay) : null; + if (duration !== 0) { + instructions.forEach(instruction => { + const instructionTimings = context.appendInstructionToTimeline(instruction, duration, delay); + furthestTime = Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay); + }); + } + return furthestTime; + } + visitReference(ast, context) { + context.updateOptions(ast.options, true); + visitDslNode(this, ast.animation, context); + context.previousNode = ast; + } + visitSequence(ast, context) { + const subContextCount = context.subContextCount; + let ctx = context; + const options = ast.options; + if (options && (options.params || options.delay)) { + ctx = context.createSubContext(options); + ctx.transformIntoNewTimeline(); + if (options.delay != null) { + if (ctx.previousNode.type == _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Style) { + ctx.currentTimeline.snapshotCurrentStyles(); + ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE; + } + const delay = resolveTimingValue(options.delay); + ctx.delayNextStep(delay); + } + } + if (ast.steps.length) { + ast.steps.forEach(s => visitDslNode(this, s, ctx)); + // this is here just in case the inner steps only contain or end with a style() call + ctx.currentTimeline.applyStylesToKeyframe(); + // this means that some animation function within the sequence + // ended up creating a sub timeline (which means the current + // timeline cannot overlap with the contents of the sequence) + if (ctx.subContextCount > subContextCount) { + ctx.transformIntoNewTimeline(); + } + } + context.previousNode = ast; + } + visitGroup(ast, context) { + const innerTimelines = []; + let furthestTime = context.currentTimeline.currentTime; + const delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0; + ast.steps.forEach(s => { + const innerContext = context.createSubContext(ast.options); + if (delay) { + innerContext.delayNextStep(delay); + } + visitDslNode(this, s, innerContext); + furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime); + innerTimelines.push(innerContext.currentTimeline); + }); + // this operation is run after the AST loop because otherwise + // if the parent timeline's collected styles were updated then + // it would pass in invalid data into the new-to-be forked items + innerTimelines.forEach(timeline => context.currentTimeline.mergeTimelineCollectedStyles(timeline)); + context.transformIntoNewTimeline(furthestTime); + context.previousNode = ast; + } + _visitTiming(ast, context) { + if (ast.dynamic) { + const strValue = ast.strValue; + const timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue; + return resolveTiming(timingValue, context.errors); + } else { + return { + duration: ast.duration, + delay: ast.delay, + easing: ast.easing + }; + } + } + visitAnimate(ast, context) { + const timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context); + const timeline = context.currentTimeline; + if (timings.delay) { + context.incrementTime(timings.delay); + timeline.snapshotCurrentStyles(); + } + const style = ast.style; + if (style.type == _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Keyframes) { + this.visitKeyframes(style, context); + } else { + context.incrementTime(timings.duration); + this.visitStyle(style, context); + timeline.applyStylesToKeyframe(); + } + context.currentAnimateTimings = null; + context.previousNode = ast; + } + visitStyle(ast, context) { + const timeline = context.currentTimeline; + const timings = context.currentAnimateTimings; + // this is a special case for when a style() call + // directly follows an animate() call (but not inside of an animate() call) + if (!timings && timeline.hasCurrentStyleProperties()) { + timeline.forwardFrame(); + } + const easing = timings && timings.easing || ast.easing; + if (ast.isEmptyStep) { + timeline.applyEmptyStep(easing); + } else { + timeline.setStyles(ast.styles, easing, context.errors, context.options); + } + context.previousNode = ast; + } + visitKeyframes(ast, context) { + const currentAnimateTimings = context.currentAnimateTimings; + const startTime = context.currentTimeline.duration; + const duration = currentAnimateTimings.duration; + const innerContext = context.createSubContext(); + const innerTimeline = innerContext.currentTimeline; + innerTimeline.easing = currentAnimateTimings.easing; + ast.styles.forEach(step => { + const offset = step.offset || 0; + innerTimeline.forwardTime(offset * duration); + innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options); + innerTimeline.applyStylesToKeyframe(); + }); + // this will ensure that the parent timeline gets all the styles from + // the child even if the new timeline below is not used + context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline); + // we do this because the window between this timeline and the sub timeline + // should ensure that the styles within are exactly the same as they were before + context.transformIntoNewTimeline(startTime + duration); + context.previousNode = ast; + } + visitQuery(ast, context) { + // in the event that the first step before this is a style step we need + // to ensure the styles are applied before the children are animated + const startTime = context.currentTimeline.currentTime; + const options = ast.options || {}; + const delay = options.delay ? resolveTimingValue(options.delay) : 0; + if (delay && (context.previousNode.type === _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Style || startTime == 0 && context.currentTimeline.hasCurrentStyleProperties())) { + context.currentTimeline.snapshotCurrentStyles(); + context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE; + } + let furthestTime = startTime; + const elms = context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast.includeSelf, options.optional ? true : false, context.errors); + context.currentQueryTotal = elms.length; + let sameElementTimeline = null; + elms.forEach((element, i) => { + context.currentQueryIndex = i; + const innerContext = context.createSubContext(ast.options, element); + if (delay) { + innerContext.delayNextStep(delay); + } + if (element === context.element) { + sameElementTimeline = innerContext.currentTimeline; + } + visitDslNode(this, ast.animation, innerContext); + // this is here just incase the inner steps only contain or end + // with a style() call (which is here to signal that this is a preparatory + // call to style an element before it is animated again) + innerContext.currentTimeline.applyStylesToKeyframe(); + const endTime = innerContext.currentTimeline.currentTime; + furthestTime = Math.max(furthestTime, endTime); + }); + context.currentQueryIndex = 0; + context.currentQueryTotal = 0; + context.transformIntoNewTimeline(furthestTime); + if (sameElementTimeline) { + context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline); + context.currentTimeline.snapshotCurrentStyles(); + } + context.previousNode = ast; + } + visitStagger(ast, context) { + const parentContext = context.parentContext; + const tl = context.currentTimeline; + const timings = ast.timings; + const duration = Math.abs(timings.duration); + const maxTime = duration * (context.currentQueryTotal - 1); + let delay = duration * context.currentQueryIndex; + let staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing; + switch (staggerTransformer) { + case 'reverse': + delay = maxTime - delay; + break; + case 'full': + delay = parentContext.currentStaggerTime; + break; + } + const timeline = context.currentTimeline; + if (delay) { + timeline.delayNextStep(delay); + } + const startingTime = timeline.currentTime; + visitDslNode(this, ast.animation, context); + context.previousNode = ast; + // time = duration + delay + // the reason why this computation is so complex is because + // the inner timeline may either have a delay value or a stretched + // keyframe depending on if a subtimeline is not used or is used. + parentContext.currentStaggerTime = tl.currentTime - startingTime + (tl.startTime - parentContext.currentTimeline.startTime); + } +} +const DEFAULT_NOOP_PREVIOUS_NODE = {}; +class AnimationTimelineContext { + constructor(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) { + this._driver = _driver; + this.element = element; + this.subInstructions = subInstructions; + this._enterClassName = _enterClassName; + this._leaveClassName = _leaveClassName; + this.errors = errors; + this.timelines = timelines; + this.parentContext = null; + this.currentAnimateTimings = null; + this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE; + this.subContextCount = 0; + this.options = {}; + this.currentQueryIndex = 0; + this.currentQueryTotal = 0; + this.currentStaggerTime = 0; + this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0); + timelines.push(this.currentTimeline); + } + get params() { + return this.options.params; + } + updateOptions(options, skipIfExists) { + if (!options) return; + const newOptions = options; + let optionsToUpdate = this.options; + // NOTE: this will get patched up when other animation methods support duration overrides + if (newOptions.duration != null) { + optionsToUpdate.duration = resolveTimingValue(newOptions.duration); + } + if (newOptions.delay != null) { + optionsToUpdate.delay = resolveTimingValue(newOptions.delay); + } + const newParams = newOptions.params; + if (newParams) { + let paramsToUpdate = optionsToUpdate.params; + if (!paramsToUpdate) { + paramsToUpdate = this.options.params = {}; + } + Object.keys(newParams).forEach(name => { + if (!skipIfExists || !paramsToUpdate.hasOwnProperty(name)) { + paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, this.errors); + } + }); + } + } + _copyOptions() { + const options = {}; + if (this.options) { + const oldParams = this.options.params; + if (oldParams) { + const params = options['params'] = {}; + Object.keys(oldParams).forEach(name => { + params[name] = oldParams[name]; + }); + } + } + return options; + } + createSubContext(options = null, element, newTime) { + const target = element || this.element; + const context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0)); + context.previousNode = this.previousNode; + context.currentAnimateTimings = this.currentAnimateTimings; + context.options = this._copyOptions(); + context.updateOptions(options); + context.currentQueryIndex = this.currentQueryIndex; + context.currentQueryTotal = this.currentQueryTotal; + context.parentContext = this; + this.subContextCount++; + return context; + } + transformIntoNewTimeline(newTime) { + this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE; + this.currentTimeline = this.currentTimeline.fork(this.element, newTime); + this.timelines.push(this.currentTimeline); + return this.currentTimeline; + } + appendInstructionToTimeline(instruction, duration, delay) { + const updatedTimings = { + duration: duration != null ? duration : instruction.duration, + delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay, + easing: '' + }; + const builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe); + this.timelines.push(builder); + return updatedTimings; + } + incrementTime(time) { + this.currentTimeline.forwardTime(this.currentTimeline.duration + time); + } + delayNextStep(delay) { + // negative delays are not yet supported + if (delay > 0) { + this.currentTimeline.delayNextStep(delay); + } + } + invokeQuery(selector, originalSelector, limit, includeSelf, optional, errors) { + let results = []; + if (includeSelf) { + results.push(this.element); + } + if (selector.length > 0) { + // only if :self is used then the selector can be empty + selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName); + selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName); + const multi = limit != 1; + let elements = this._driver.query(this.element, selector, multi); + if (limit !== 0) { + elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) : elements.slice(0, limit); + } + results.push(...elements); + } + if (!optional && results.length == 0) { + errors.push(invalidQuery(originalSelector)); + } + return results; + } +} +class TimelineBuilder { + constructor(_driver, element, startTime, _elementTimelineStylesLookup) { + this._driver = _driver; + this.element = element; + this.startTime = startTime; + this._elementTimelineStylesLookup = _elementTimelineStylesLookup; + this.duration = 0; + this.easing = null; + this._previousKeyframe = new Map(); + this._currentKeyframe = new Map(); + this._keyframes = new Map(); + this._styleSummary = new Map(); + this._localTimelineStyles = new Map(); + this._pendingStyles = new Map(); + this._backFill = new Map(); + this._currentEmptyStepKeyframe = null; + if (!this._elementTimelineStylesLookup) { + this._elementTimelineStylesLookup = new Map(); + } + this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element); + if (!this._globalTimelineStyles) { + this._globalTimelineStyles = this._localTimelineStyles; + this._elementTimelineStylesLookup.set(element, this._localTimelineStyles); + } + this._loadKeyframe(); + } + containsAnimation() { + switch (this._keyframes.size) { + case 0: + return false; + case 1: + return this.hasCurrentStyleProperties(); + default: + return true; + } + } + hasCurrentStyleProperties() { + return this._currentKeyframe.size > 0; + } + get currentTime() { + return this.startTime + this.duration; + } + delayNextStep(delay) { + // in the event that a style() step is placed right before a stagger() + // and that style() step is the very first style() value in the animation + // then we need to make a copy of the keyframe [0, copy, 1] so that the delay + // properly applies the style() values to work with the stagger... + const hasPreStyleStep = this._keyframes.size === 1 && this._pendingStyles.size; + if (this.duration || hasPreStyleStep) { + this.forwardTime(this.currentTime + delay); + if (hasPreStyleStep) { + this.snapshotCurrentStyles(); + } + } else { + this.startTime += delay; + } + } + fork(element, currentTime) { + this.applyStylesToKeyframe(); + return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup); + } + _loadKeyframe() { + if (this._currentKeyframe) { + this._previousKeyframe = this._currentKeyframe; + } + this._currentKeyframe = this._keyframes.get(this.duration); + if (!this._currentKeyframe) { + this._currentKeyframe = new Map(); + this._keyframes.set(this.duration, this._currentKeyframe); + } + } + forwardFrame() { + this.duration += ONE_FRAME_IN_MILLISECONDS; + this._loadKeyframe(); + } + forwardTime(time) { + this.applyStylesToKeyframe(); + this.duration = time; + this._loadKeyframe(); + } + _updateStyle(prop, value) { + this._localTimelineStyles.set(prop, value); + this._globalTimelineStyles.set(prop, value); + this._styleSummary.set(prop, { + time: this.currentTime, + value + }); + } + allowOnlyTimelineStyles() { + return this._currentEmptyStepKeyframe !== this._currentKeyframe; + } + applyEmptyStep(easing) { + if (easing) { + this._previousKeyframe.set('easing', easing); + } + // special case for animate(duration): + // all missing styles are filled with a `*` value then + // if any destination styles are filled in later on the same + // keyframe then they will override the overridden styles + // We use `_globalTimelineStyles` here because there may be + // styles in previous keyframes that are not present in this timeline + for (let [prop, value] of this._globalTimelineStyles) { + this._backFill.set(prop, value || _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AUTO_STYLE); + this._currentKeyframe.set(prop, _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AUTO_STYLE); + } + this._currentEmptyStepKeyframe = this._currentKeyframe; + } + setStyles(input, easing, errors, options) { + if (easing) { + this._previousKeyframe.set('easing', easing); + } + const params = options && options.params || {}; + const styles = flattenStyles(input, this._globalTimelineStyles); + for (let [prop, value] of styles) { + const val = interpolateParams(value, params, errors); + this._pendingStyles.set(prop, val); + if (!this._localTimelineStyles.has(prop)) { + this._backFill.set(prop, this._globalTimelineStyles.get(prop) ?? _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AUTO_STYLE); + } + this._updateStyle(prop, val); + } + } + applyStylesToKeyframe() { + if (this._pendingStyles.size == 0) return; + this._pendingStyles.forEach((val, prop) => { + this._currentKeyframe.set(prop, val); + }); + this._pendingStyles.clear(); + this._localTimelineStyles.forEach((val, prop) => { + if (!this._currentKeyframe.has(prop)) { + this._currentKeyframe.set(prop, val); + } + }); + } + snapshotCurrentStyles() { + for (let [prop, val] of this._localTimelineStyles) { + this._pendingStyles.set(prop, val); + this._updateStyle(prop, val); + } + } + getFinalKeyframe() { + return this._keyframes.get(this.duration); + } + get properties() { + const properties = []; + for (let prop in this._currentKeyframe) { + properties.push(prop); + } + return properties; + } + mergeTimelineCollectedStyles(timeline) { + timeline._styleSummary.forEach((details1, prop) => { + const details0 = this._styleSummary.get(prop); + if (!details0 || details1.time > details0.time) { + this._updateStyle(prop, details1.value); + } + }); + } + buildKeyframes() { + this.applyStylesToKeyframe(); + const preStyleProps = new Set(); + const postStyleProps = new Set(); + const isEmpty = this._keyframes.size === 1 && this.duration === 0; + let finalKeyframes = []; + this._keyframes.forEach((keyframe, time) => { + const finalKeyframe = new Map([...this._backFill, ...keyframe]); + finalKeyframe.forEach((value, prop) => { + if (value === _angular_animations__WEBPACK_IMPORTED_MODULE_1__["ɵPRE_STYLE"]) { + preStyleProps.add(prop); + } else if (value === _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AUTO_STYLE) { + postStyleProps.add(prop); + } + }); + if (!isEmpty) { + finalKeyframe.set('offset', time / this.duration); + } + finalKeyframes.push(finalKeyframe); + }); + const preProps = [...preStyleProps.values()]; + const postProps = [...postStyleProps.values()]; + // special case for a 0-second animation (which is designed just to place styles onscreen) + if (isEmpty) { + const kf0 = finalKeyframes[0]; + const kf1 = new Map(kf0); + kf0.set('offset', 0); + kf1.set('offset', 1); + finalKeyframes = [kf0, kf1]; + } + return createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime, this.easing, false); + } +} +class SubTimelineBuilder extends TimelineBuilder { + constructor(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe = false) { + super(driver, element, timings.delay); + this.keyframes = keyframes; + this.preStyleProps = preStyleProps; + this.postStyleProps = postStyleProps; + this._stretchStartingKeyframe = _stretchStartingKeyframe; + this.timings = { + duration: timings.duration, + delay: timings.delay, + easing: timings.easing + }; + } + containsAnimation() { + return this.keyframes.length > 1; + } + buildKeyframes() { + let keyframes = this.keyframes; + let { + delay, + duration, + easing + } = this.timings; + if (this._stretchStartingKeyframe && delay) { + const newKeyframes = []; + const totalTime = duration + delay; + const startingGap = delay / totalTime; + // the original starting keyframe now starts once the delay is done + const newFirstKeyframe = new Map(keyframes[0]); + newFirstKeyframe.set('offset', 0); + newKeyframes.push(newFirstKeyframe); + const oldFirstKeyframe = new Map(keyframes[0]); + oldFirstKeyframe.set('offset', roundOffset(startingGap)); + newKeyframes.push(oldFirstKeyframe); + /* + When the keyframe is stretched then it means that the delay before the animation + starts is gone. Instead the first keyframe is placed at the start of the animation + and it is then copied to where it starts when the original delay is over. This basically + means nothing animates during that delay, but the styles are still rendered. For this + to work the original offset values that exist in the original keyframes must be "warped" + so that they can take the new keyframe + delay into account. + delay=1000, duration=1000, keyframes = 0 .5 1 + turns into + delay=0, duration=2000, keyframes = 0 .33 .66 1 + */ + // offsets between 1 ... n -1 are all warped by the keyframe stretch + const limit = keyframes.length - 1; + for (let i = 1; i <= limit; i++) { + let kf = new Map(keyframes[i]); + const oldOffset = kf.get('offset'); + const timeAtKeyframe = delay + oldOffset * duration; + kf.set('offset', roundOffset(timeAtKeyframe / totalTime)); + newKeyframes.push(kf); + } + // the new starting keyframe should be added at the start + duration = totalTime; + delay = 0; + easing = ''; + keyframes = newKeyframes; + } + return createTimelineInstruction(this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing, true); + } +} +function roundOffset(offset, decimalPoints = 3) { + const mult = Math.pow(10, decimalPoints - 1); + return Math.round(offset * mult) / mult; +} +function flattenStyles(input, allStyles) { + const styles = new Map(); + let allProperties; + input.forEach(token => { + if (token === '*') { + allProperties ??= allStyles.keys(); + for (let prop of allProperties) { + styles.set(prop, _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AUTO_STYLE); + } + } else { + for (let [prop, val] of token) { + styles.set(prop, val); + } + } + }); + return styles; +} +function createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) { + return { + type: 0 /* AnimationTransitionInstructionType.TransitionAnimation */, + element, + triggerName, + isRemovalTransition, + fromState, + fromStyles, + toState, + toStyles, + timelines, + queriedElements, + preStyleProps, + postStyleProps, + totalTime, + errors + }; +} +const EMPTY_OBJECT = {}; +class AnimationTransitionFactory { + constructor(_triggerName, ast, _stateStyles) { + this._triggerName = _triggerName; + this.ast = ast; + this._stateStyles = _stateStyles; + } + match(currentState, nextState, element, params) { + return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params); + } + buildStyles(stateName, params, errors) { + let styler = this._stateStyles.get('*'); + if (stateName !== undefined) { + styler = this._stateStyles.get(stateName?.toString()) || styler; + } + return styler ? styler.buildStyles(params, errors) : new Map(); + } + build(driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions, skipAstBuild) { + const errors = []; + const transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT; + const currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT; + const currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors); + const nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT; + const nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors); + const queriedElements = new Set(); + const preStyleMap = new Map(); + const postStyleMap = new Map(); + const isRemoval = nextState === 'void'; + const animationOptions = { + params: applyParamDefaults(nextAnimationParams, transitionAnimationParams), + delay: this.ast.options?.delay + }; + const timelines = skipAstBuild ? [] : buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors); + let totalTime = 0; + timelines.forEach(tl => { + totalTime = Math.max(tl.duration + tl.delay, totalTime); + }); + if (errors.length) { + return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors); + } + timelines.forEach(tl => { + const elm = tl.element; + const preProps = getOrSetDefaultValue(preStyleMap, elm, new Set()); + tl.preStyleProps.forEach(prop => preProps.add(prop)); + const postProps = getOrSetDefaultValue(postStyleMap, elm, new Set()); + tl.postStyleProps.forEach(prop => postProps.add(prop)); + if (elm !== element) { + queriedElements.add(elm); + } + }); + if (typeof ngDevMode === 'undefined' || ngDevMode) { + checkNonAnimatableInTimelines(timelines, this._triggerName, driver); + } + return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, timelines, [...queriedElements.values()], preStyleMap, postStyleMap, totalTime); + } +} +/** + * Checks inside a set of timelines if they try to animate a css property which is not considered + * animatable, in that case it prints a warning on the console. + * Besides that the function doesn't have any other effect. + * + * Note: this check is done here after the timelines are built instead of doing on a lower level so + * that we can make sure that the warning appears only once per instruction (we can aggregate here + * all the issues instead of finding them separately). + * + * @param timelines The built timelines for the current instruction. + * @param triggerName The name of the trigger for the current instruction. + * @param driver Animation driver used to perform the check. + * + */ +function checkNonAnimatableInTimelines(timelines, triggerName, driver) { + if (!driver.validateAnimatableStyleProperty) { + return; + } + const allowedNonAnimatableProps = new Set([ + // 'easing' is a utility/synthetic prop we use to represent + // easing functions, it represents a property of the animation + // which is not animatable but different values can be used + // in different steps + 'easing']); + const invalidNonAnimatableProps = new Set(); + timelines.forEach(({ + keyframes + }) => { + const nonAnimatablePropsInitialValues = new Map(); + keyframes.forEach(keyframe => { + const entriesToCheck = Array.from(keyframe.entries()).filter(([prop]) => !allowedNonAnimatableProps.has(prop)); + for (const [prop, value] of entriesToCheck) { + if (!driver.validateAnimatableStyleProperty(prop)) { + if (nonAnimatablePropsInitialValues.has(prop) && !invalidNonAnimatableProps.has(prop)) { + const propInitialValue = nonAnimatablePropsInitialValues.get(prop); + if (propInitialValue !== value) { + invalidNonAnimatableProps.add(prop); + } + } else { + nonAnimatablePropsInitialValues.set(prop, value); + } + } + } + }); + }); + if (invalidNonAnimatableProps.size > 0) { + console.warn(`Warning: The animation trigger "${triggerName}" is attempting to animate the following` + ' not animatable properties: ' + Array.from(invalidNonAnimatableProps).join(', ') + '\n' + '(to check the list of all animatable properties visit https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties)'); + } +} +function oneOrMoreTransitionsMatch(matchFns, currentState, nextState, element, params) { + return matchFns.some(fn => fn(currentState, nextState, element, params)); +} +function applyParamDefaults(userParams, defaults) { + const result = { + ...defaults + }; + Object.entries(userParams).forEach(([key, value]) => { + if (value != null) { + result[key] = value; + } + }); + return result; +} +class AnimationStateStyles { + constructor(styles, defaultParams, normalizer) { + this.styles = styles; + this.defaultParams = defaultParams; + this.normalizer = normalizer; + } + buildStyles(params, errors) { + const finalStyles = new Map(); + const combinedParams = applyParamDefaults(params, this.defaultParams); + this.styles.styles.forEach(value => { + if (typeof value !== 'string') { + value.forEach((val, prop) => { + if (val) { + val = interpolateParams(val, combinedParams, errors); + } + const normalizedProp = this.normalizer.normalizePropertyName(prop, errors); + val = this.normalizer.normalizeStyleValue(prop, normalizedProp, val, errors); + finalStyles.set(prop, val); + }); + } + }); + return finalStyles; + } +} +function buildTrigger(name, ast, normalizer) { + return new AnimationTrigger(name, ast, normalizer); +} +class AnimationTrigger { + constructor(name, ast, _normalizer) { + this.name = name; + this.ast = ast; + this._normalizer = _normalizer; + this.transitionFactories = []; + this.states = new Map(); + ast.states.forEach(ast => { + const defaultParams = ast.options && ast.options.params || {}; + this.states.set(ast.name, new AnimationStateStyles(ast.style, defaultParams, _normalizer)); + }); + balanceProperties(this.states, 'true', '1'); + balanceProperties(this.states, 'false', '0'); + ast.transitions.forEach(ast => { + this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states)); + }); + this.fallbackTransition = createFallbackTransition(name, this.states, this._normalizer); + } + get containsQueries() { + return this.ast.queryCount > 0; + } + matchTransition(currentState, nextState, element, params) { + const entry = this.transitionFactories.find(f => f.match(currentState, nextState, element, params)); + return entry || null; + } + matchStyles(currentState, params, errors) { + return this.fallbackTransition.buildStyles(currentState, params, errors); + } +} +function createFallbackTransition(triggerName, states, normalizer) { + const matchers = [(fromState, toState) => true]; + const animation = { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Sequence, + steps: [], + options: null + }; + const transition = { + type: _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AnimationMetadataType.Transition, + animation, + matchers, + options: null, + queryCount: 0, + depCount: 0 + }; + return new AnimationTransitionFactory(triggerName, transition, states); +} +function balanceProperties(stateMap, key1, key2) { + if (stateMap.has(key1)) { + if (!stateMap.has(key2)) { + stateMap.set(key2, stateMap.get(key1)); + } + } else if (stateMap.has(key2)) { + stateMap.set(key1, stateMap.get(key2)); + } +} +const EMPTY_INSTRUCTION_MAP = new ElementInstructionMap(); +class TimelineAnimationEngine { + constructor(bodyNode, _driver, _normalizer) { + this.bodyNode = bodyNode; + this._driver = _driver; + this._normalizer = _normalizer; + this._animations = new Map(); + this._playersById = new Map(); + this.players = []; + } + register(id, metadata) { + const errors = []; + const warnings = []; + const ast = buildAnimationAst(this._driver, metadata, errors, warnings); + if (errors.length) { + throw registerFailed(errors); + } else { + if (warnings.length) { + warnRegister(warnings); + } + this._animations.set(id, ast); + } + } + _buildPlayer(i, preStyles, postStyles) { + const element = i.element; + const keyframes = normalizeKeyframes$1(this._normalizer, i.keyframes, preStyles, postStyles); + return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true); + } + create(id, element, options = {}) { + const errors = []; + const ast = this._animations.get(id); + let instructions; + const autoStylesMap = new Map(); + if (ast) { + instructions = buildAnimationTimelines(this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, new Map(), new Map(), options, EMPTY_INSTRUCTION_MAP, errors); + instructions.forEach(inst => { + const styles = getOrSetDefaultValue(autoStylesMap, inst.element, new Map()); + inst.postStyleProps.forEach(prop => styles.set(prop, null)); + }); + } else { + errors.push(missingOrDestroyedAnimation()); + instructions = []; + } + if (errors.length) { + throw createAnimationFailed(errors); + } + autoStylesMap.forEach((styles, element) => { + styles.forEach((_, prop) => { + styles.set(prop, this._driver.computeStyle(element, prop, _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AUTO_STYLE)); + }); + }); + const players = instructions.map(i => { + const styles = autoStylesMap.get(i.element); + return this._buildPlayer(i, new Map(), styles); + }); + const player = optimizeGroupPlayer(players); + this._playersById.set(id, player); + player.onDestroy(() => this.destroy(id)); + this.players.push(player); + return player; + } + destroy(id) { + const player = this._getPlayer(id); + player.destroy(); + this._playersById.delete(id); + const index = this.players.indexOf(player); + if (index >= 0) { + this.players.splice(index, 1); + } + } + _getPlayer(id) { + const player = this._playersById.get(id); + if (!player) { + throw missingPlayer(id); + } + return player; + } + listen(id, element, eventName, callback) { + // triggerName, fromState, toState are all ignored for timeline animations + const baseEvent = makeAnimationEvent(element, '', '', ''); + listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback); + return () => {}; + } + command(id, element, command, args) { + if (command == 'register') { + this.register(id, args[0]); + return; + } + if (command == 'create') { + const options = args[0] || {}; + this.create(id, element, options); + return; + } + const player = this._getPlayer(id); + switch (command) { + case 'play': + player.play(); + break; + case 'pause': + player.pause(); + break; + case 'reset': + player.reset(); + break; + case 'restart': + player.restart(); + break; + case 'finish': + player.finish(); + break; + case 'init': + player.init(); + break; + case 'setPosition': + player.setPosition(parseFloat(args[0])); + break; + case 'destroy': + this.destroy(id); + break; + } + } +} +const QUEUED_CLASSNAME = 'ng-animate-queued'; +const QUEUED_SELECTOR = '.ng-animate-queued'; +const DISABLED_CLASSNAME = 'ng-animate-disabled'; +const DISABLED_SELECTOR = '.ng-animate-disabled'; +const STAR_CLASSNAME = 'ng-star-inserted'; +const STAR_SELECTOR = '.ng-star-inserted'; +const EMPTY_PLAYER_ARRAY = []; +const NULL_REMOVAL_STATE = { + namespaceId: '', + setForRemoval: false, + setForMove: false, + hasAnimation: false, + removedBeforeQueried: false +}; +const NULL_REMOVED_QUERIED_STATE = { + namespaceId: '', + setForMove: false, + setForRemoval: false, + hasAnimation: false, + removedBeforeQueried: true +}; +const REMOVAL_FLAG = '__ng_removed'; +class StateValue { + get params() { + return this.options.params; + } + constructor(input, namespaceId = '') { + this.namespaceId = namespaceId; + const isObj = input && input.hasOwnProperty('value'); + const value = isObj ? input['value'] : input; + this.value = normalizeTriggerValue(value); + if (isObj) { + // we drop the value property from options. + const { + value, + ...options + } = input; + this.options = options; + } else { + this.options = {}; + } + if (!this.options.params) { + this.options.params = {}; + } + } + absorbOptions(options) { + const newParams = options.params; + if (newParams) { + const oldParams = this.options.params; + Object.keys(newParams).forEach(prop => { + if (oldParams[prop] == null) { + oldParams[prop] = newParams[prop]; + } + }); + } + } +} +const VOID_VALUE = 'void'; +const DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE); +class AnimationTransitionNamespace { + constructor(id, hostElement, _engine) { + this.id = id; + this.hostElement = hostElement; + this._engine = _engine; + this.players = []; + this._triggers = new Map(); + this._queue = []; + this._elementListeners = new Map(); + this._hostClassName = 'ng-tns-' + id; + addClass(hostElement, this._hostClassName); + } + listen(element, name, phase, callback) { + if (!this._triggers.has(name)) { + throw missingTrigger(phase, name); + } + if (phase == null || phase.length == 0) { + throw missingEvent(name); + } + if (!isTriggerEventValid(phase)) { + throw unsupportedTriggerEvent(phase, name); + } + const listeners = getOrSetDefaultValue(this._elementListeners, element, []); + const data = { + name, + phase, + callback + }; + listeners.push(data); + const triggersWithStates = getOrSetDefaultValue(this._engine.statesByElement, element, new Map()); + if (!triggersWithStates.has(name)) { + addClass(element, NG_TRIGGER_CLASSNAME); + addClass(element, NG_TRIGGER_CLASSNAME + '-' + name); + triggersWithStates.set(name, DEFAULT_STATE_VALUE); + } + return () => { + // the event listener is removed AFTER the flush has occurred such + // that leave animations callbacks can fire (otherwise if the node + // is removed in between then the listeners would be deregistered) + this._engine.afterFlush(() => { + const index = listeners.indexOf(data); + if (index >= 0) { + listeners.splice(index, 1); + } + if (!this._triggers.has(name)) { + triggersWithStates.delete(name); + } + }); + }; + } + register(name, ast) { + if (this._triggers.has(name)) { + // throw + return false; + } else { + this._triggers.set(name, ast); + return true; + } + } + _getTrigger(name) { + const trigger = this._triggers.get(name); + if (!trigger) { + throw unregisteredTrigger(name); + } + return trigger; + } + trigger(element, triggerName, value, defaultToFallback = true) { + const trigger = this._getTrigger(triggerName); + const player = new TransitionAnimationPlayer(this.id, triggerName, element); + let triggersWithStates = this._engine.statesByElement.get(element); + if (!triggersWithStates) { + addClass(element, NG_TRIGGER_CLASSNAME); + addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName); + this._engine.statesByElement.set(element, triggersWithStates = new Map()); + } + let fromState = triggersWithStates.get(triggerName); + const toState = new StateValue(value, this.id); + const isObj = value && value.hasOwnProperty('value'); + if (!isObj && fromState) { + toState.absorbOptions(fromState.options); + } + triggersWithStates.set(triggerName, toState); + if (!fromState) { + fromState = DEFAULT_STATE_VALUE; + } + const isRemoval = toState.value === VOID_VALUE; + // normally this isn't reached by here, however, if an object expression + // is passed in then it may be a new object each time. Comparing the value + // is important since that will stay the same despite there being a new object. + // The removal arc here is special cased because the same element is triggered + // twice in the event that it contains animations on the outer/inner portions + // of the host container + if (!isRemoval && fromState.value === toState.value) { + // this means that despite the value not changing, some inner params + // have changed which means that the animation final styles need to be applied + if (!objEquals(fromState.params, toState.params)) { + const errors = []; + const fromStyles = trigger.matchStyles(fromState.value, fromState.params, errors); + const toStyles = trigger.matchStyles(toState.value, toState.params, errors); + if (errors.length) { + this._engine.reportError(errors); + } else { + this._engine.afterFlush(() => { + eraseStyles(element, fromStyles); + setStyles(element, toStyles); + }); + } + } + return; + } + const playersOnElement = getOrSetDefaultValue(this._engine.playersByElement, element, []); + playersOnElement.forEach(player => { + // only remove the player if it is queued on the EXACT same trigger/namespace + // we only also deal with queued players here because if the animation has + // started then we want to keep the player alive until the flush happens + // (which is where the previousPlayers are passed into the new player) + if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) { + player.destroy(); + } + }); + let transition = trigger.matchTransition(fromState.value, toState.value, element, toState.params); + let isFallbackTransition = false; + if (!transition) { + if (!defaultToFallback) return; + transition = trigger.fallbackTransition; + isFallbackTransition = true; + } + this._engine.totalQueuedPlayers++; + this._queue.push({ + element, + triggerName, + transition, + fromState, + toState, + player, + isFallbackTransition + }); + if (!isFallbackTransition) { + addClass(element, QUEUED_CLASSNAME); + player.onStart(() => { + removeClass(element, QUEUED_CLASSNAME); + }); + } + player.onDone(() => { + let index = this.players.indexOf(player); + if (index >= 0) { + this.players.splice(index, 1); + } + const players = this._engine.playersByElement.get(element); + if (players) { + let index = players.indexOf(player); + if (index >= 0) { + players.splice(index, 1); + } + } + }); + this.players.push(player); + playersOnElement.push(player); + return player; + } + deregister(name) { + this._triggers.delete(name); + this._engine.statesByElement.forEach(stateMap => stateMap.delete(name)); + this._elementListeners.forEach((listeners, element) => { + this._elementListeners.set(element, listeners.filter(entry => { + return entry.name != name; + })); + }); + } + clearElementCache(element) { + this._engine.statesByElement.delete(element); + this._elementListeners.delete(element); + const elementPlayers = this._engine.playersByElement.get(element); + if (elementPlayers) { + elementPlayers.forEach(player => player.destroy()); + this._engine.playersByElement.delete(element); + } + } + _signalRemovalForInnerTriggers(rootElement, context) { + const elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true); + // emulate a leave animation for all inner nodes within this node. + // If there are no animations found for any of the nodes then clear the cache + // for the element. + elements.forEach(elm => { + // this means that an inner remove() operation has already kicked off + // the animation on this element... + if (elm[REMOVAL_FLAG]) return; + const namespaces = this._engine.fetchNamespacesByElement(elm); + if (namespaces.size) { + namespaces.forEach(ns => ns.triggerLeaveAnimation(elm, context, false, true)); + } else { + this.clearElementCache(elm); + } + }); + // If the child elements were removed along with the parent, their animations might not + // have completed. Clear all the elements from the cache so we don't end up with a memory leak. + this._engine.afterFlushAnimationsDone(() => elements.forEach(elm => this.clearElementCache(elm))); + } + triggerLeaveAnimation(element, context, destroyAfterComplete, defaultToFallback) { + const triggerStates = this._engine.statesByElement.get(element); + const previousTriggersValues = new Map(); + if (triggerStates) { + const players = []; + triggerStates.forEach((state, triggerName) => { + previousTriggersValues.set(triggerName, state.value); + // this check is here in the event that an element is removed + // twice (both on the host level and the component level) + if (this._triggers.has(triggerName)) { + const player = this.trigger(element, triggerName, VOID_VALUE, defaultToFallback); + if (player) { + players.push(player); + } + } + }); + if (players.length) { + this._engine.markElementAsRemoved(this.id, element, true, context, previousTriggersValues); + if (destroyAfterComplete) { + optimizeGroupPlayer(players).onDone(() => this._engine.processLeaveNode(element)); + } + return true; + } + } + return false; + } + prepareLeaveAnimationListeners(element) { + const listeners = this._elementListeners.get(element); + const elementStates = this._engine.statesByElement.get(element); + // if this statement fails then it means that the element was picked up + // by an earlier flush (or there are no listeners at all to track the leave). + if (listeners && elementStates) { + const visitedTriggers = new Set(); + listeners.forEach(listener => { + const triggerName = listener.name; + if (visitedTriggers.has(triggerName)) return; + visitedTriggers.add(triggerName); + const trigger = this._triggers.get(triggerName); + const transition = trigger.fallbackTransition; + const fromState = elementStates.get(triggerName) || DEFAULT_STATE_VALUE; + const toState = new StateValue(VOID_VALUE); + const player = new TransitionAnimationPlayer(this.id, triggerName, element); + this._engine.totalQueuedPlayers++; + this._queue.push({ + element, + triggerName, + transition, + fromState, + toState, + player, + isFallbackTransition: true + }); + }); + } + } + removeNode(element, context) { + const engine = this._engine; + if (element.childElementCount) { + this._signalRemovalForInnerTriggers(element, context); + } + // this means that a * => VOID animation was detected and kicked off + if (this.triggerLeaveAnimation(element, context, true)) return; + // find the player that is animating and make sure that the + // removal is delayed until that player has completed + let containsPotentialParentTransition = false; + if (engine.totalAnimations) { + const currentPlayers = engine.players.length ? engine.playersByQueriedElement.get(element) : []; + // when this `if statement` does not continue forward it means that + // a previous animation query has selected the current element and + // is animating it. In this situation want to continue forwards and + // allow the element to be queued up for animation later. + if (currentPlayers && currentPlayers.length) { + containsPotentialParentTransition = true; + } else { + let parent = element; + while (parent = parent.parentNode) { + const triggers = engine.statesByElement.get(parent); + if (triggers) { + containsPotentialParentTransition = true; + break; + } + } + } + } + // at this stage we know that the element will either get removed + // during flush or will be picked up by a parent query. Either way + // we need to fire the listeners for this element when it DOES get + // removed (once the query parent animation is done or after flush) + this.prepareLeaveAnimationListeners(element); + // whether or not a parent has an animation we need to delay the deferral of the leave + // operation until we have more information (which we do after flush() has been called) + if (containsPotentialParentTransition) { + engine.markElementAsRemoved(this.id, element, false, context); + } else { + const removalFlag = element[REMOVAL_FLAG]; + if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) { + // we do this after the flush has occurred such + // that the callbacks can be fired + engine.afterFlush(() => this.clearElementCache(element)); + engine.destroyInnerAnimations(element); + engine._onRemovalComplete(element, context); + } + } + } + insertNode(element, parent) { + addClass(element, this._hostClassName); + } + drainQueuedTransitions(microtaskId) { + const instructions = []; + this._queue.forEach(entry => { + const player = entry.player; + if (player.destroyed) return; + const element = entry.element; + const listeners = this._elementListeners.get(element); + if (listeners) { + listeners.forEach(listener => { + if (listener.name == entry.triggerName) { + const baseEvent = makeAnimationEvent(element, entry.triggerName, entry.fromState.value, entry.toState.value); + baseEvent['_data'] = microtaskId; + listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback); + } + }); + } + if (player.markedForDestroy) { + this._engine.afterFlush(() => { + // now we can destroy the element properly since the event listeners have + // been bound to the player + player.destroy(); + }); + } else { + instructions.push(entry); + } + }); + this._queue = []; + return instructions.sort((a, b) => { + // if depCount == 0 them move to front + // otherwise if a contains b then move back + const d0 = a.transition.ast.depCount; + const d1 = b.transition.ast.depCount; + if (d0 == 0 || d1 == 0) { + return d0 - d1; + } + return this._engine.driver.containsElement(a.element, b.element) ? 1 : -1; + }); + } + destroy(context) { + this.players.forEach(p => p.destroy()); + this._signalRemovalForInnerTriggers(this.hostElement, context); + } +} +class TransitionAnimationEngine { + /** @internal */ + _onRemovalComplete(element, context) { + this.onRemovalComplete(element, context); + } + constructor(bodyNode, driver, _normalizer, scheduler) { + this.bodyNode = bodyNode; + this.driver = driver; + this._normalizer = _normalizer; + this.scheduler = scheduler; + this.players = []; + this.newHostElements = new Map(); + this.playersByElement = new Map(); + this.playersByQueriedElement = new Map(); + this.statesByElement = new Map(); + this.disabledNodes = new Set(); + this.totalAnimations = 0; + this.totalQueuedPlayers = 0; + this._namespaceLookup = {}; + this._namespaceList = []; + this._flushFns = []; + this._whenQuietFns = []; + this.namespacesByHostElement = new Map(); + this.collectedEnterElements = []; + this.collectedLeaveElements = []; + // this method is designed to be overridden by the code that uses this engine + this.onRemovalComplete = (element, context) => {}; + } + get queuedPlayers() { + const players = []; + this._namespaceList.forEach(ns => { + ns.players.forEach(player => { + if (player.queued) { + players.push(player); + } + }); + }); + return players; + } + createNamespace(namespaceId, hostElement) { + const ns = new AnimationTransitionNamespace(namespaceId, hostElement, this); + if (this.bodyNode && this.driver.containsElement(this.bodyNode, hostElement)) { + this._balanceNamespaceList(ns, hostElement); + } else { + // defer this later until flush during when the host element has + // been inserted so that we know exactly where to place it in + // the namespace list + this.newHostElements.set(hostElement, ns); + // given that this host element is a part of the animation code, it + // may or may not be inserted by a parent node that is of an + // animation renderer type. If this happens then we can still have + // access to this item when we query for :enter nodes. If the parent + // is a renderer then the set data-structure will normalize the entry + this.collectEnterElement(hostElement); + } + return this._namespaceLookup[namespaceId] = ns; + } + _balanceNamespaceList(ns, hostElement) { + const namespaceList = this._namespaceList; + const namespacesByHostElement = this.namespacesByHostElement; + const limit = namespaceList.length - 1; + if (limit >= 0) { + let found = false; + // Find the closest ancestor with an existing namespace so we can then insert `ns` after it, + // establishing a top-down ordering of namespaces in `this._namespaceList`. + let ancestor = this.driver.getParentElement(hostElement); + while (ancestor) { + const ancestorNs = namespacesByHostElement.get(ancestor); + if (ancestorNs) { + // An animation namespace has been registered for this ancestor, so we insert `ns` + // right after it to establish top-down ordering of animation namespaces. + const index = namespaceList.indexOf(ancestorNs); + namespaceList.splice(index + 1, 0, ns); + found = true; + break; + } + ancestor = this.driver.getParentElement(ancestor); + } + if (!found) { + // No namespace exists that is an ancestor of `ns`, so `ns` is inserted at the front to + // ensure that any existing descendants are ordered after `ns`, retaining the desired + // top-down ordering. + namespaceList.unshift(ns); + } + } else { + namespaceList.push(ns); + } + namespacesByHostElement.set(hostElement, ns); + return ns; + } + register(namespaceId, hostElement) { + let ns = this._namespaceLookup[namespaceId]; + if (!ns) { + ns = this.createNamespace(namespaceId, hostElement); + } + return ns; + } + registerTrigger(namespaceId, name, trigger) { + let ns = this._namespaceLookup[namespaceId]; + if (ns && ns.register(name, trigger)) { + this.totalAnimations++; + } + } + destroy(namespaceId, context) { + if (!namespaceId) return; + this.afterFlush(() => {}); + this.afterFlushAnimationsDone(() => { + const ns = this._fetchNamespace(namespaceId); + this.namespacesByHostElement.delete(ns.hostElement); + const index = this._namespaceList.indexOf(ns); + if (index >= 0) { + this._namespaceList.splice(index, 1); + } + ns.destroy(context); + delete this._namespaceLookup[namespaceId]; + }); + } + _fetchNamespace(id) { + return this._namespaceLookup[id]; + } + fetchNamespacesByElement(element) { + // normally there should only be one namespace per element, however + // if @triggers are placed on both the component element and then + // its host element (within the component code) then there will be + // two namespaces returned. We use a set here to simply deduplicate + // the namespaces in case (for the reason described above) there are multiple triggers + const namespaces = new Set(); + const elementStates = this.statesByElement.get(element); + if (elementStates) { + for (let stateValue of elementStates.values()) { + if (stateValue.namespaceId) { + const ns = this._fetchNamespace(stateValue.namespaceId); + if (ns) { + namespaces.add(ns); + } + } + } + } + return namespaces; + } + trigger(namespaceId, element, name, value) { + if (isElementNode(element)) { + const ns = this._fetchNamespace(namespaceId); + if (ns) { + ns.trigger(element, name, value); + return true; + } + } + return false; + } + insertNode(namespaceId, element, parent, insertBefore) { + if (!isElementNode(element)) return; + // special case for when an element is removed and reinserted (move operation) + // when this occurs we do not want to use the element for deletion later + const details = element[REMOVAL_FLAG]; + if (details && details.setForRemoval) { + details.setForRemoval = false; + details.setForMove = true; + const index = this.collectedLeaveElements.indexOf(element); + if (index >= 0) { + this.collectedLeaveElements.splice(index, 1); + } + } + // in the event that the namespaceId is blank then the caller + // code does not contain any animation code in it, but it is + // just being called so that the node is marked as being inserted + if (namespaceId) { + const ns = this._fetchNamespace(namespaceId); + // This if-statement is a workaround for router issue #21947. + // The router sometimes hits a race condition where while a route + // is being instantiated a new navigation arrives, triggering leave + // animation of DOM that has not been fully initialized, until this + // is resolved, we need to handle the scenario when DOM is not in a + // consistent state during the animation. + if (ns) { + ns.insertNode(element, parent); + } + } + // only *directives and host elements are inserted before + if (insertBefore) { + this.collectEnterElement(element); + } + } + collectEnterElement(element) { + this.collectedEnterElements.push(element); + } + markElementAsDisabled(element, value) { + if (value) { + if (!this.disabledNodes.has(element)) { + this.disabledNodes.add(element); + addClass(element, DISABLED_CLASSNAME); + } + } else if (this.disabledNodes.has(element)) { + this.disabledNodes.delete(element); + removeClass(element, DISABLED_CLASSNAME); + } + } + removeNode(namespaceId, element, context) { + if (isElementNode(element)) { + this.scheduler?.notify(); + const ns = namespaceId ? this._fetchNamespace(namespaceId) : null; + if (ns) { + ns.removeNode(element, context); + } else { + this.markElementAsRemoved(namespaceId, element, false, context); + } + const hostNS = this.namespacesByHostElement.get(element); + if (hostNS && hostNS.id !== namespaceId) { + hostNS.removeNode(element, context); + } + } else { + this._onRemovalComplete(element, context); + } + } + markElementAsRemoved(namespaceId, element, hasAnimation, context, previousTriggersValues) { + this.collectedLeaveElements.push(element); + element[REMOVAL_FLAG] = { + namespaceId, + setForRemoval: context, + hasAnimation, + removedBeforeQueried: false, + previousTriggersValues + }; + } + listen(namespaceId, element, name, phase, callback) { + if (isElementNode(element)) { + return this._fetchNamespace(namespaceId).listen(element, name, phase, callback); + } + return () => {}; + } + _buildInstruction(entry, subTimelines, enterClassName, leaveClassName, skipBuildAst) { + return entry.transition.build(this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName, leaveClassName, entry.fromState.options, entry.toState.options, subTimelines, skipBuildAst); + } + destroyInnerAnimations(containerElement) { + let elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true); + elements.forEach(element => this.destroyActiveAnimationsForElement(element)); + if (this.playersByQueriedElement.size == 0) return; + elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true); + elements.forEach(element => this.finishActiveQueriedAnimationOnElement(element)); + } + destroyActiveAnimationsForElement(element) { + const players = this.playersByElement.get(element); + if (players) { + players.forEach(player => { + // special case for when an element is set for destruction, but hasn't started. + // in this situation we want to delay the destruction until the flush occurs + // so that any event listeners attached to the player are triggered. + if (player.queued) { + player.markedForDestroy = true; + } else { + player.destroy(); + } + }); + } + } + finishActiveQueriedAnimationOnElement(element) { + const players = this.playersByQueriedElement.get(element); + if (players) { + players.forEach(player => player.finish()); + } + } + whenRenderingDone() { + return new Promise(resolve => { + if (this.players.length) { + return optimizeGroupPlayer(this.players).onDone(() => resolve()); + } else { + resolve(); + } + }); + } + processLeaveNode(element) { + const details = element[REMOVAL_FLAG]; + if (details && details.setForRemoval) { + // this will prevent it from removing it twice + element[REMOVAL_FLAG] = NULL_REMOVAL_STATE; + if (details.namespaceId) { + this.destroyInnerAnimations(element); + const ns = this._fetchNamespace(details.namespaceId); + if (ns) { + ns.clearElementCache(element); + } + } + this._onRemovalComplete(element, details.setForRemoval); + } + if (element.classList?.contains(DISABLED_CLASSNAME)) { + this.markElementAsDisabled(element, false); + } + this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => { + this.markElementAsDisabled(node, false); + }); + } + flush(microtaskId = -1) { + let players = []; + if (this.newHostElements.size) { + this.newHostElements.forEach((ns, element) => this._balanceNamespaceList(ns, element)); + this.newHostElements.clear(); + } + if (this.totalAnimations && this.collectedEnterElements.length) { + for (let i = 0; i < this.collectedEnterElements.length; i++) { + const elm = this.collectedEnterElements[i]; + addClass(elm, STAR_CLASSNAME); + } + } + if (this._namespaceList.length && (this.totalQueuedPlayers || this.collectedLeaveElements.length)) { + const cleanupFns = []; + try { + players = this._flushAnimations(cleanupFns, microtaskId); + } finally { + for (let i = 0; i < cleanupFns.length; i++) { + cleanupFns[i](); + } + } + } else { + for (let i = 0; i < this.collectedLeaveElements.length; i++) { + const element = this.collectedLeaveElements[i]; + this.processLeaveNode(element); + } + } + this.totalQueuedPlayers = 0; + this.collectedEnterElements.length = 0; + this.collectedLeaveElements.length = 0; + this._flushFns.forEach(fn => fn()); + this._flushFns = []; + if (this._whenQuietFns.length) { + // we move these over to a variable so that + // if any new callbacks are registered in another + // flush they do not populate the existing set + const quietFns = this._whenQuietFns; + this._whenQuietFns = []; + if (players.length) { + optimizeGroupPlayer(players).onDone(() => { + quietFns.forEach(fn => fn()); + }); + } else { + quietFns.forEach(fn => fn()); + } + } + } + reportError(errors) { + throw triggerTransitionsFailed(errors); + } + _flushAnimations(cleanupFns, microtaskId) { + const subTimelines = new ElementInstructionMap(); + const skippedPlayers = []; + const skippedPlayersMap = new Map(); + const queuedInstructions = []; + const queriedElements = new Map(); + const allPreStyleElements = new Map(); + const allPostStyleElements = new Map(); + const disabledElementsSet = new Set(); + this.disabledNodes.forEach(node => { + disabledElementsSet.add(node); + const nodesThatAreDisabled = this.driver.query(node, QUEUED_SELECTOR, true); + for (let i = 0; i < nodesThatAreDisabled.length; i++) { + disabledElementsSet.add(nodesThatAreDisabled[i]); + } + }); + const bodyNode = this.bodyNode; + const allTriggerElements = Array.from(this.statesByElement.keys()); + const enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements); + // this must occur before the instructions are built below such that + // the :enter queries match the elements (since the timeline queries + // are fired during instruction building). + const enterNodeMapIds = new Map(); + let i = 0; + enterNodeMap.forEach((nodes, root) => { + const className = ENTER_CLASSNAME + i++; + enterNodeMapIds.set(root, className); + nodes.forEach(node => addClass(node, className)); + }); + const allLeaveNodes = []; + const mergedLeaveNodes = new Set(); + const leaveNodesWithoutAnimations = new Set(); + for (let i = 0; i < this.collectedLeaveElements.length; i++) { + const element = this.collectedLeaveElements[i]; + const details = element[REMOVAL_FLAG]; + if (details && details.setForRemoval) { + allLeaveNodes.push(element); + mergedLeaveNodes.add(element); + if (details.hasAnimation) { + this.driver.query(element, STAR_SELECTOR, true).forEach(elm => mergedLeaveNodes.add(elm)); + } else { + leaveNodesWithoutAnimations.add(element); + } + } + } + const leaveNodeMapIds = new Map(); + const leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes)); + leaveNodeMap.forEach((nodes, root) => { + const className = LEAVE_CLASSNAME + i++; + leaveNodeMapIds.set(root, className); + nodes.forEach(node => addClass(node, className)); + }); + cleanupFns.push(() => { + enterNodeMap.forEach((nodes, root) => { + const className = enterNodeMapIds.get(root); + nodes.forEach(node => removeClass(node, className)); + }); + leaveNodeMap.forEach((nodes, root) => { + const className = leaveNodeMapIds.get(root); + nodes.forEach(node => removeClass(node, className)); + }); + allLeaveNodes.forEach(element => { + this.processLeaveNode(element); + }); + }); + const allPlayers = []; + const erroneousTransitions = []; + for (let i = this._namespaceList.length - 1; i >= 0; i--) { + const ns = this._namespaceList[i]; + ns.drainQueuedTransitions(microtaskId).forEach(entry => { + const player = entry.player; + const element = entry.element; + allPlayers.push(player); + if (this.collectedEnterElements.length) { + const details = element[REMOVAL_FLAG]; + // animations for move operations (elements being removed and reinserted, + // e.g. when the order of an *ngFor list changes) are currently not supported + if (details && details.setForMove) { + if (details.previousTriggersValues && details.previousTriggersValues.has(entry.triggerName)) { + const previousValue = details.previousTriggersValues.get(entry.triggerName); + // we need to restore the previous trigger value since the element has + // only been moved and hasn't actually left the DOM + const triggersWithStates = this.statesByElement.get(entry.element); + if (triggersWithStates && triggersWithStates.has(entry.triggerName)) { + const state = triggersWithStates.get(entry.triggerName); + state.value = previousValue; + triggersWithStates.set(entry.triggerName, state); + } + } + player.destroy(); + return; + } + } + const nodeIsOrphaned = !bodyNode || !this.driver.containsElement(bodyNode, element); + const leaveClassName = leaveNodeMapIds.get(element); + const enterClassName = enterNodeMapIds.get(element); + const instruction = this._buildInstruction(entry, subTimelines, enterClassName, leaveClassName, nodeIsOrphaned); + if (instruction.errors && instruction.errors.length) { + erroneousTransitions.push(instruction); + return; + } + // even though the element may not be in the DOM, it may still + // be added at a later point (due to the mechanics of content + // projection and/or dynamic component insertion) therefore it's + // important to still style the element. + if (nodeIsOrphaned) { + player.onStart(() => eraseStyles(element, instruction.fromStyles)); + player.onDestroy(() => setStyles(element, instruction.toStyles)); + skippedPlayers.push(player); + return; + } + // if an unmatched transition is queued and ready to go + // then it SHOULD NOT render an animation and cancel the + // previously running animations. + if (entry.isFallbackTransition) { + player.onStart(() => eraseStyles(element, instruction.fromStyles)); + player.onDestroy(() => setStyles(element, instruction.toStyles)); + skippedPlayers.push(player); + return; + } + // this means that if a parent animation uses this animation as a sub-trigger + // then it will instruct the timeline builder not to add a player delay, but + // instead stretch the first keyframe gap until the animation starts. This is + // important in order to prevent extra initialization styles from being + // required by the user for the animation. + const timelines = []; + instruction.timelines.forEach(tl => { + tl.stretchStartingKeyframe = true; + if (!this.disabledNodes.has(tl.element)) { + timelines.push(tl); + } + }); + instruction.timelines = timelines; + subTimelines.append(element, instruction.timelines); + const tuple = { + instruction, + player, + element + }; + queuedInstructions.push(tuple); + instruction.queriedElements.forEach(element => getOrSetDefaultValue(queriedElements, element, []).push(player)); + instruction.preStyleProps.forEach((stringMap, element) => { + if (stringMap.size) { + let setVal = allPreStyleElements.get(element); + if (!setVal) { + allPreStyleElements.set(element, setVal = new Set()); + } + stringMap.forEach((_, prop) => setVal.add(prop)); + } + }); + instruction.postStyleProps.forEach((stringMap, element) => { + let setVal = allPostStyleElements.get(element); + if (!setVal) { + allPostStyleElements.set(element, setVal = new Set()); + } + stringMap.forEach((_, prop) => setVal.add(prop)); + }); + }); + } + if (erroneousTransitions.length) { + const errors = []; + erroneousTransitions.forEach(instruction => { + errors.push(transitionFailed(instruction.triggerName, instruction.errors)); + }); + allPlayers.forEach(player => player.destroy()); + this.reportError(errors); + } + const allPreviousPlayersMap = new Map(); + // this map tells us which element in the DOM tree is contained by + // which animation. Further down this map will get populated once + // the players are built and in doing so we can use it to efficiently + // figure out if a sub player is skipped due to a parent player having priority. + const animationElementMap = new Map(); + queuedInstructions.forEach(entry => { + const element = entry.element; + if (subTimelines.has(element)) { + animationElementMap.set(element, element); + this._beforeAnimationBuild(entry.player.namespaceId, entry.instruction, allPreviousPlayersMap); + } + }); + skippedPlayers.forEach(player => { + const element = player.element; + const previousPlayers = this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null); + previousPlayers.forEach(prevPlayer => { + getOrSetDefaultValue(allPreviousPlayersMap, element, []).push(prevPlayer); + prevPlayer.destroy(); + }); + }); + // this is a special case for nodes that will be removed either by + // having their own leave animations or by being queried in a container + // that will be removed once a parent animation is complete. The idea + // here is that * styles must be identical to ! styles because of + // backwards compatibility (* is also filled in by default in many places). + // Otherwise * styles will return an empty value or "auto" since the element + // passed to getComputedStyle will not be visible (since * === destination) + const replaceNodes = allLeaveNodes.filter(node => { + return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements); + }); + // POST STAGE: fill the * styles + const postStylesMap = new Map(); + const allLeaveQueriedNodes = cloakAndComputeStyles(postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, _angular_animations__WEBPACK_IMPORTED_MODULE_1__.AUTO_STYLE); + allLeaveQueriedNodes.forEach(node => { + if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) { + replaceNodes.push(node); + } + }); + // PRE STAGE: fill the ! styles + const preStylesMap = new Map(); + enterNodeMap.forEach((nodes, root) => { + cloakAndComputeStyles(preStylesMap, this.driver, new Set(nodes), allPreStyleElements, _angular_animations__WEBPACK_IMPORTED_MODULE_1__["ɵPRE_STYLE"]); + }); + replaceNodes.forEach(node => { + const post = postStylesMap.get(node); + const pre = preStylesMap.get(node); + postStylesMap.set(node, new Map([...(post?.entries() ?? []), ...(pre?.entries() ?? [])])); + }); + const rootPlayers = []; + const subPlayers = []; + const NO_PARENT_ANIMATION_ELEMENT_DETECTED = {}; + queuedInstructions.forEach(entry => { + const { + element, + player, + instruction + } = entry; + // this means that it was never consumed by a parent animation which + // means that it is independent and therefore should be set for animation + if (subTimelines.has(element)) { + if (disabledElementsSet.has(element)) { + player.onDestroy(() => setStyles(element, instruction.toStyles)); + player.disabled = true; + player.overrideTotalTime(instruction.totalTime); + skippedPlayers.push(player); + return; + } + // this will flow up the DOM and query the map to figure out + // if a parent animation has priority over it. In the situation + // that a parent is detected then it will cancel the loop. If + // nothing is detected, or it takes a few hops to find a parent, + // then it will fill in the missing nodes and signal them as having + // a detected parent (or a NO_PARENT value via a special constant). + let parentWithAnimation = NO_PARENT_ANIMATION_ELEMENT_DETECTED; + if (animationElementMap.size > 1) { + let elm = element; + const parentsToAdd = []; + while (elm = elm.parentNode) { + const detectedParent = animationElementMap.get(elm); + if (detectedParent) { + parentWithAnimation = detectedParent; + break; + } + parentsToAdd.push(elm); + } + parentsToAdd.forEach(parent => animationElementMap.set(parent, parentWithAnimation)); + } + const innerPlayer = this._buildAnimation(player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap); + player.setRealPlayer(innerPlayer); + if (parentWithAnimation === NO_PARENT_ANIMATION_ELEMENT_DETECTED) { + rootPlayers.push(player); + } else { + const parentPlayers = this.playersByElement.get(parentWithAnimation); + if (parentPlayers && parentPlayers.length) { + player.parentPlayer = optimizeGroupPlayer(parentPlayers); + } + skippedPlayers.push(player); + } + } else { + eraseStyles(element, instruction.fromStyles); + player.onDestroy(() => setStyles(element, instruction.toStyles)); + // there still might be a ancestor player animating this + // element therefore we will still add it as a sub player + // even if its animation may be disabled + subPlayers.push(player); + if (disabledElementsSet.has(element)) { + skippedPlayers.push(player); + } + } + }); + // find all of the sub players' corresponding inner animation players + subPlayers.forEach(player => { + // even if no players are found for a sub animation it + // will still complete itself after the next tick since it's Noop + const playersForElement = skippedPlayersMap.get(player.element); + if (playersForElement && playersForElement.length) { + const innerPlayer = optimizeGroupPlayer(playersForElement); + player.setRealPlayer(innerPlayer); + } + }); + // the reason why we don't actually play the animation is + // because all that a skipped player is designed to do is to + // fire the start/done transition callback events + skippedPlayers.forEach(player => { + if (player.parentPlayer) { + player.syncPlayerEvents(player.parentPlayer); + } else { + player.destroy(); + } + }); + // run through all of the queued removals and see if they + // were picked up by a query. If not then perform the removal + // operation right away unless a parent animation is ongoing. + for (let i = 0; i < allLeaveNodes.length; i++) { + const element = allLeaveNodes[i]; + const details = element[REMOVAL_FLAG]; + removeClass(element, LEAVE_CLASSNAME); + // this means the element has a removal animation that is being + // taken care of and therefore the inner elements will hang around + // until that animation is over (or the parent queried animation) + if (details && details.hasAnimation) continue; + let players = []; + // if this element is queried or if it contains queried children + // then we want for the element not to be removed from the page + // until the queried animations have finished + if (queriedElements.size) { + let queriedPlayerResults = queriedElements.get(element); + if (queriedPlayerResults && queriedPlayerResults.length) { + players.push(...queriedPlayerResults); + } + let queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true); + for (let j = 0; j < queriedInnerElements.length; j++) { + let queriedPlayers = queriedElements.get(queriedInnerElements[j]); + if (queriedPlayers && queriedPlayers.length) { + players.push(...queriedPlayers); + } + } + } + const activePlayers = players.filter(p => !p.destroyed); + if (activePlayers.length) { + removeNodesAfterAnimationDone(this, element, activePlayers); + } else { + this.processLeaveNode(element); + } + } + // this is required so the cleanup method doesn't remove them + allLeaveNodes.length = 0; + rootPlayers.forEach(player => { + this.players.push(player); + player.onDone(() => { + player.destroy(); + const index = this.players.indexOf(player); + this.players.splice(index, 1); + }); + player.play(); + }); + return rootPlayers; + } + afterFlush(callback) { + this._flushFns.push(callback); + } + afterFlushAnimationsDone(callback) { + this._whenQuietFns.push(callback); + } + _getPreviousPlayers(element, isQueriedElement, namespaceId, triggerName, toStateValue) { + let players = []; + if (isQueriedElement) { + const queriedElementPlayers = this.playersByQueriedElement.get(element); + if (queriedElementPlayers) { + players = queriedElementPlayers; + } + } else { + const elementPlayers = this.playersByElement.get(element); + if (elementPlayers) { + const isRemovalAnimation = !toStateValue || toStateValue == VOID_VALUE; + elementPlayers.forEach(player => { + if (player.queued) return; + if (!isRemovalAnimation && player.triggerName != triggerName) return; + players.push(player); + }); + } + } + if (namespaceId || triggerName) { + players = players.filter(player => { + if (namespaceId && namespaceId != player.namespaceId) return false; + if (triggerName && triggerName != player.triggerName) return false; + return true; + }); + } + return players; + } + _beforeAnimationBuild(namespaceId, instruction, allPreviousPlayersMap) { + const triggerName = instruction.triggerName; + const rootElement = instruction.element; + // when a removal animation occurs, ALL previous players are collected + // and destroyed (even if they are outside of the current namespace) + const targetNameSpaceId = instruction.isRemovalTransition ? undefined : namespaceId; + const targetTriggerName = instruction.isRemovalTransition ? undefined : triggerName; + for (const timelineInstruction of instruction.timelines) { + const element = timelineInstruction.element; + const isQueriedElement = element !== rootElement; + const players = getOrSetDefaultValue(allPreviousPlayersMap, element, []); + const previousPlayers = this._getPreviousPlayers(element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState); + previousPlayers.forEach(player => { + const realPlayer = player.getRealPlayer(); + if (realPlayer.beforeDestroy) { + realPlayer.beforeDestroy(); + } + player.destroy(); + players.push(player); + }); + } + // this needs to be done so that the PRE/POST styles can be + // computed properly without interfering with the previous animation + eraseStyles(rootElement, instruction.fromStyles); + } + _buildAnimation(namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap) { + const triggerName = instruction.triggerName; + const rootElement = instruction.element; + // we first run this so that the previous animation player + // data can be passed into the successive animation players + const allQueriedPlayers = []; + const allConsumedElements = new Set(); + const allSubElements = new Set(); + const allNewPlayers = instruction.timelines.map(timelineInstruction => { + const element = timelineInstruction.element; + allConsumedElements.add(element); + // FIXME (matsko): make sure to-be-removed animations are removed properly + const details = element[REMOVAL_FLAG]; + if (details && details.removedBeforeQueried) return new _angular_animations__WEBPACK_IMPORTED_MODULE_1__.NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay); + const isQueriedElement = element !== rootElement; + const previousPlayers = flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY).map(p => p.getRealPlayer())).filter(p => { + // the `element` is not apart of the AnimationPlayer definition, but + // Mock/WebAnimations + // use the element within their implementation. This will be added in Angular5 to + // AnimationPlayer + const pp = p; + return pp.element ? pp.element === element : false; + }); + const preStyles = preStylesMap.get(element); + const postStyles = postStylesMap.get(element); + const keyframes = normalizeKeyframes$1(this._normalizer, timelineInstruction.keyframes, preStyles, postStyles); + const player = this._buildPlayer(timelineInstruction, keyframes, previousPlayers); + // this means that this particular player belongs to a sub trigger. It is + // important that we match this player up with the corresponding (@trigger.listener) + if (timelineInstruction.subTimeline && skippedPlayersMap) { + allSubElements.add(element); + } + if (isQueriedElement) { + const wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element); + wrappedPlayer.setRealPlayer(player); + allQueriedPlayers.push(wrappedPlayer); + } + return player; + }); + allQueriedPlayers.forEach(player => { + getOrSetDefaultValue(this.playersByQueriedElement, player.element, []).push(player); + player.onDone(() => deleteOrUnsetInMap(this.playersByQueriedElement, player.element, player)); + }); + allConsumedElements.forEach(element => addClass(element, NG_ANIMATING_CLASSNAME)); + const player = optimizeGroupPlayer(allNewPlayers); + player.onDestroy(() => { + allConsumedElements.forEach(element => removeClass(element, NG_ANIMATING_CLASSNAME)); + setStyles(rootElement, instruction.toStyles); + }); + // this basically makes all of the callbacks for sub element animations + // be dependent on the upper players for when they finish + allSubElements.forEach(element => { + getOrSetDefaultValue(skippedPlayersMap, element, []).push(player); + }); + return player; + } + _buildPlayer(instruction, keyframes, previousPlayers) { + if (keyframes.length > 0) { + return this.driver.animate(instruction.element, keyframes, instruction.duration, instruction.delay, instruction.easing, previousPlayers); + } + // special case for when an empty transition|definition is provided + // ... there is no point in rendering an empty animation + return new _angular_animations__WEBPACK_IMPORTED_MODULE_1__.NoopAnimationPlayer(instruction.duration, instruction.delay); + } +} +class TransitionAnimationPlayer { + constructor(namespaceId, triggerName, element) { + this.namespaceId = namespaceId; + this.triggerName = triggerName; + this.element = element; + this._player = new _angular_animations__WEBPACK_IMPORTED_MODULE_1__.NoopAnimationPlayer(); + this._containsRealPlayer = false; + this._queuedCallbacks = new Map(); + this.destroyed = false; + this.parentPlayer = null; + this.markedForDestroy = false; + this.disabled = false; + this.queued = true; + this.totalTime = 0; + } + setRealPlayer(player) { + if (this._containsRealPlayer) return; + this._player = player; + this._queuedCallbacks.forEach((callbacks, phase) => { + callbacks.forEach(callback => listenOnPlayer(player, phase, undefined, callback)); + }); + this._queuedCallbacks.clear(); + this._containsRealPlayer = true; + this.overrideTotalTime(player.totalTime); + this.queued = false; + } + getRealPlayer() { + return this._player; + } + overrideTotalTime(totalTime) { + this.totalTime = totalTime; + } + syncPlayerEvents(player) { + const p = this._player; + if (p.triggerCallback) { + player.onStart(() => p.triggerCallback('start')); + } + player.onDone(() => this.finish()); + player.onDestroy(() => this.destroy()); + } + _queueEvent(name, callback) { + getOrSetDefaultValue(this._queuedCallbacks, name, []).push(callback); + } + onDone(fn) { + if (this.queued) { + this._queueEvent('done', fn); + } + this._player.onDone(fn); + } + onStart(fn) { + if (this.queued) { + this._queueEvent('start', fn); + } + this._player.onStart(fn); + } + onDestroy(fn) { + if (this.queued) { + this._queueEvent('destroy', fn); + } + this._player.onDestroy(fn); + } + init() { + this._player.init(); + } + hasStarted() { + return this.queued ? false : this._player.hasStarted(); + } + play() { + !this.queued && this._player.play(); + } + pause() { + !this.queued && this._player.pause(); + } + restart() { + !this.queued && this._player.restart(); + } + finish() { + this._player.finish(); + } + destroy() { + this.destroyed = true; + this._player.destroy(); + } + reset() { + !this.queued && this._player.reset(); + } + setPosition(p) { + if (!this.queued) { + this._player.setPosition(p); + } + } + getPosition() { + return this.queued ? 0 : this._player.getPosition(); + } + /** @internal */ + triggerCallback(phaseName) { + const p = this._player; + if (p.triggerCallback) { + p.triggerCallback(phaseName); + } + } +} +function deleteOrUnsetInMap(map, key, value) { + let currentValues = map.get(key); + if (currentValues) { + if (currentValues.length) { + const index = currentValues.indexOf(value); + currentValues.splice(index, 1); + } + if (currentValues.length == 0) { + map.delete(key); + } + } + return currentValues; +} +function normalizeTriggerValue(value) { + // we use `!= null` here because it's the most simple + // way to test against a "falsy" value without mixing + // in empty strings or a zero value. DO NOT OPTIMIZE. + return value != null ? value : null; +} +function isElementNode(node) { + return node && node['nodeType'] === 1; +} +function isTriggerEventValid(eventName) { + return eventName == 'start' || eventName == 'done'; +} +function cloakElement(element, value) { + const oldValue = element.style.display; + element.style.display = value != null ? value : 'none'; + return oldValue; +} +function cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) { + const cloakVals = []; + elements.forEach(element => cloakVals.push(cloakElement(element))); + const failedElements = []; + elementPropsMap.forEach((props, element) => { + const styles = new Map(); + props.forEach(prop => { + const value = driver.computeStyle(element, prop, defaultStyle); + styles.set(prop, value); + // there is no easy way to detect this because a sub element could be removed + // by a parent animation element being detached. + if (!value || value.length == 0) { + element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE; + failedElements.push(element); + } + }); + valuesMap.set(element, styles); + }); + // we use a index variable here since Set.forEach(a, i) does not return + // an index value for the closure (but instead just the value) + let i = 0; + elements.forEach(element => cloakElement(element, cloakVals[i++])); + return failedElements; +} +/* +Since the Angular renderer code will return a collection of inserted +nodes in all areas of a DOM tree, it's up to this algorithm to figure +out which nodes are roots for each animation @trigger. + +By placing each inserted node into a Set and traversing upwards, it +is possible to find the @trigger elements and well any direct *star +insertion nodes, if a @trigger root is found then the enter element +is placed into the Map[@trigger] spot. + */ +function buildRootMap(roots, nodes) { + const rootMap = new Map(); + roots.forEach(root => rootMap.set(root, [])); + if (nodes.length == 0) return rootMap; + const NULL_NODE = 1; + const nodeSet = new Set(nodes); + const localRootMap = new Map(); + function getRoot(node) { + if (!node) return NULL_NODE; + let root = localRootMap.get(node); + if (root) return root; + const parent = node.parentNode; + if (rootMap.has(parent)) { + // ngIf inside @trigger + root = parent; + } else if (nodeSet.has(parent)) { + // ngIf inside ngIf + root = NULL_NODE; + } else { + // recurse upwards + root = getRoot(parent); + } + localRootMap.set(node, root); + return root; + } + nodes.forEach(node => { + const root = getRoot(node); + if (root !== NULL_NODE) { + rootMap.get(root).push(node); + } + }); + return rootMap; +} +function addClass(element, className) { + element.classList?.add(className); +} +function removeClass(element, className) { + element.classList?.remove(className); +} +function removeNodesAfterAnimationDone(engine, element, players) { + optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element)); +} +function flattenGroupPlayers(players) { + const finalPlayers = []; + _flattenGroupPlayersRecur(players, finalPlayers); + return finalPlayers; +} +function _flattenGroupPlayersRecur(players, finalPlayers) { + for (let i = 0; i < players.length; i++) { + const player = players[i]; + if (player instanceof _angular_animations__WEBPACK_IMPORTED_MODULE_1__["ɵAnimationGroupPlayer"]) { + _flattenGroupPlayersRecur(player.players, finalPlayers); + } else { + finalPlayers.push(player); + } + } +} +function objEquals(a, b) { + const k1 = Object.keys(a); + const k2 = Object.keys(b); + if (k1.length != k2.length) return false; + for (let i = 0; i < k1.length; i++) { + const prop = k1[i]; + if (!b.hasOwnProperty(prop) || a[prop] !== b[prop]) return false; + } + return true; +} +function replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) { + const postEntry = allPostStyleElements.get(element); + if (!postEntry) return false; + let preEntry = allPreStyleElements.get(element); + if (preEntry) { + postEntry.forEach(data => preEntry.add(data)); + } else { + allPreStyleElements.set(element, postEntry); + } + allPostStyleElements.delete(element); + return true; +} +class AnimationEngine { + constructor(doc, _driver, _normalizer, scheduler) { + this._driver = _driver; + this._normalizer = _normalizer; + this._triggerCache = {}; + // this method is designed to be overridden by the code that uses this engine + this.onRemovalComplete = (element, context) => {}; + this._transitionEngine = new TransitionAnimationEngine(doc.body, _driver, _normalizer, scheduler); + this._timelineEngine = new TimelineAnimationEngine(doc.body, _driver, _normalizer); + this._transitionEngine.onRemovalComplete = (element, context) => this.onRemovalComplete(element, context); + } + registerTrigger(componentId, namespaceId, hostElement, name, metadata) { + const cacheKey = componentId + '-' + name; + let trigger = this._triggerCache[cacheKey]; + if (!trigger) { + const errors = []; + const warnings = []; + const ast = buildAnimationAst(this._driver, metadata, errors, warnings); + if (errors.length) { + throw triggerBuildFailed(name, errors); + } + if (warnings.length) { + warnTriggerBuild(name, warnings); + } + trigger = buildTrigger(name, ast, this._normalizer); + this._triggerCache[cacheKey] = trigger; + } + this._transitionEngine.registerTrigger(namespaceId, name, trigger); + } + register(namespaceId, hostElement) { + this._transitionEngine.register(namespaceId, hostElement); + } + destroy(namespaceId, context) { + this._transitionEngine.destroy(namespaceId, context); + } + onInsert(namespaceId, element, parent, insertBefore) { + this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore); + } + onRemove(namespaceId, element, context) { + this._transitionEngine.removeNode(namespaceId, element, context); + } + disableAnimations(element, disable) { + this._transitionEngine.markElementAsDisabled(element, disable); + } + process(namespaceId, element, property, value) { + if (property.charAt(0) == '@') { + const [id, action] = parseTimelineCommand(property); + const args = value; + this._timelineEngine.command(id, element, action, args); + } else { + this._transitionEngine.trigger(namespaceId, element, property, value); + } + } + listen(namespaceId, element, eventName, eventPhase, callback) { + // @@listen + if (eventName.charAt(0) == '@') { + const [id, action] = parseTimelineCommand(eventName); + return this._timelineEngine.listen(id, element, action, callback); + } + return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback); + } + flush(microtaskId = -1) { + this._transitionEngine.flush(microtaskId); + } + get players() { + return [...this._transitionEngine.players, ...this._timelineEngine.players]; + } + whenRenderingDone() { + return this._transitionEngine.whenRenderingDone(); + } + afterFlushAnimationsDone(cb) { + this._transitionEngine.afterFlushAnimationsDone(cb); + } +} + +/** + * Returns an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are + * detected. + * + * In CSS there exist properties that cannot be animated within a keyframe animation + * (whether it be via CSS keyframes or web-animations) and the animation implementation + * will ignore them. This function is designed to detect those special cased styles and + * return a container that will be executed at the start and end of the animation. + * + * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null` + */ +function packageNonAnimatableStyles(element, styles) { + let startStyles = null; + let endStyles = null; + if (Array.isArray(styles) && styles.length) { + startStyles = filterNonAnimatableStyles(styles[0]); + if (styles.length > 1) { + endStyles = filterNonAnimatableStyles(styles[styles.length - 1]); + } + } else if (styles instanceof Map) { + startStyles = filterNonAnimatableStyles(styles); + } + return startStyles || endStyles ? new SpecialCasedStyles(element, startStyles, endStyles) : null; +} +/** + * Designed to be executed during a keyframe-based animation to apply any special-cased styles. + * + * When started (when the `start()` method is run) then the provided `startStyles` + * will be applied. When finished (when the `finish()` method is called) the + * `endStyles` will be applied as well any any starting styles. Finally when + * `destroy()` is called then all styles will be removed. + */ +class SpecialCasedStyles { + static #_ = this.initialStylesByElement = new WeakMap(); + constructor(_element, _startStyles, _endStyles) { + this._element = _element; + this._startStyles = _startStyles; + this._endStyles = _endStyles; + this._state = 0 /* SpecialCasedStylesState.Pending */; + let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element); + if (!initialStyles) { + SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = new Map()); + } + this._initialStyles = initialStyles; + } + start() { + if (this._state < 1 /* SpecialCasedStylesState.Started */) { + if (this._startStyles) { + setStyles(this._element, this._startStyles, this._initialStyles); + } + this._state = 1 /* SpecialCasedStylesState.Started */; + } + } + + finish() { + this.start(); + if (this._state < 2 /* SpecialCasedStylesState.Finished */) { + setStyles(this._element, this._initialStyles); + if (this._endStyles) { + setStyles(this._element, this._endStyles); + this._endStyles = null; + } + this._state = 1 /* SpecialCasedStylesState.Started */; + } + } + + destroy() { + this.finish(); + if (this._state < 3 /* SpecialCasedStylesState.Destroyed */) { + SpecialCasedStyles.initialStylesByElement.delete(this._element); + if (this._startStyles) { + eraseStyles(this._element, this._startStyles); + this._endStyles = null; + } + if (this._endStyles) { + eraseStyles(this._element, this._endStyles); + this._endStyles = null; + } + setStyles(this._element, this._initialStyles); + this._state = 3 /* SpecialCasedStylesState.Destroyed */; + } + } +} + +function filterNonAnimatableStyles(styles) { + let result = null; + styles.forEach((val, prop) => { + if (isNonAnimatableStyle(prop)) { + result = result || new Map(); + result.set(prop, val); + } + }); + return result; +} +function isNonAnimatableStyle(prop) { + return prop === 'display' || prop === 'position'; +} +class WebAnimationsPlayer { + constructor(element, keyframes, options, _specialStyles) { + this.element = element; + this.keyframes = keyframes; + this.options = options; + this._specialStyles = _specialStyles; + this._onDoneFns = []; + this._onStartFns = []; + this._onDestroyFns = []; + this._initialized = false; + this._finished = false; + this._started = false; + this._destroyed = false; + // the following original fns are persistent copies of the _onStartFns and _onDoneFns + // and are used to reset the fns to their original values upon reset() + // (since the _onStartFns and _onDoneFns get deleted after they are called) + this._originalOnDoneFns = []; + this._originalOnStartFns = []; + this.time = 0; + this.parentPlayer = null; + this.currentSnapshot = new Map(); + this._duration = options['duration']; + this._delay = options['delay'] || 0; + this.time = this._duration + this._delay; + } + _onFinish() { + if (!this._finished) { + this._finished = true; + this._onDoneFns.forEach(fn => fn()); + this._onDoneFns = []; + } + } + init() { + this._buildPlayer(); + this._preparePlayerBeforeStart(); + } + _buildPlayer() { + if (this._initialized) return; + this._initialized = true; + const keyframes = this.keyframes; + // @ts-expect-error overwriting a readonly property + this.domPlayer = this._triggerWebAnimation(this.element, keyframes, this.options); + this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : new Map(); + const onFinish = () => this._onFinish(); + this.domPlayer.addEventListener('finish', onFinish); + this.onDestroy(() => { + // We must remove the `finish` event listener once an animation has completed all its + // iterations. This action is necessary to prevent a memory leak since the listener captures + // `this`, creating a closure that prevents `this` from being garbage collected. + this.domPlayer.removeEventListener('finish', onFinish); + }); + } + _preparePlayerBeforeStart() { + // this is required so that the player doesn't start to animate right away + if (this._delay) { + this._resetDomPlayerState(); + } else { + this.domPlayer.pause(); + } + } + _convertKeyframesToObject(keyframes) { + const kfs = []; + keyframes.forEach(frame => { + kfs.push(Object.fromEntries(frame)); + }); + return kfs; + } + /** @internal */ + _triggerWebAnimation(element, keyframes, options) { + return element.animate(this._convertKeyframesToObject(keyframes), options); + } + onStart(fn) { + this._originalOnStartFns.push(fn); + this._onStartFns.push(fn); + } + onDone(fn) { + this._originalOnDoneFns.push(fn); + this._onDoneFns.push(fn); + } + onDestroy(fn) { + this._onDestroyFns.push(fn); + } + play() { + this._buildPlayer(); + if (!this.hasStarted()) { + this._onStartFns.forEach(fn => fn()); + this._onStartFns = []; + this._started = true; + if (this._specialStyles) { + this._specialStyles.start(); + } + } + this.domPlayer.play(); + } + pause() { + this.init(); + this.domPlayer.pause(); + } + finish() { + this.init(); + if (this._specialStyles) { + this._specialStyles.finish(); + } + this._onFinish(); + this.domPlayer.finish(); + } + reset() { + this._resetDomPlayerState(); + this._destroyed = false; + this._finished = false; + this._started = false; + this._onStartFns = this._originalOnStartFns; + this._onDoneFns = this._originalOnDoneFns; + } + _resetDomPlayerState() { + if (this.domPlayer) { + this.domPlayer.cancel(); + } + } + restart() { + this.reset(); + this.play(); + } + hasStarted() { + return this._started; + } + destroy() { + if (!this._destroyed) { + this._destroyed = true; + this._resetDomPlayerState(); + this._onFinish(); + if (this._specialStyles) { + this._specialStyles.destroy(); + } + this._onDestroyFns.forEach(fn => fn()); + this._onDestroyFns = []; + } + } + setPosition(p) { + if (this.domPlayer === undefined) { + this.init(); + } + this.domPlayer.currentTime = p * this.time; + } + getPosition() { + // tsc is complaining with TS2362 without the conversion to number + return +(this.domPlayer.currentTime ?? 0) / this.time; + } + get totalTime() { + return this._delay + this._duration; + } + beforeDestroy() { + const styles = new Map(); + if (this.hasStarted()) { + // note: this code is invoked only when the `play` function was called prior to this + // (thus `hasStarted` returns true), this implies that the code that initializes + // `_finalKeyframe` has also been executed and the non-null assertion can be safely used here + const finalKeyframe = this._finalKeyframe; + finalKeyframe.forEach((val, prop) => { + if (prop !== 'offset') { + styles.set(prop, this._finished ? val : computeStyle(this.element, prop)); + } + }); + } + this.currentSnapshot = styles; + } + /** @internal */ + triggerCallback(phaseName) { + const methods = phaseName === 'start' ? this._onStartFns : this._onDoneFns; + methods.forEach(fn => fn()); + methods.length = 0; + } +} +class WebAnimationsDriver { + validateStyleProperty(prop) { + // Perform actual validation in dev mode only, in prod mode this check is a noop. + if (typeof ngDevMode === 'undefined' || ngDevMode) { + return validateStyleProperty(prop); + } + return true; + } + validateAnimatableStyleProperty(prop) { + // Perform actual validation in dev mode only, in prod mode this check is a noop. + if (typeof ngDevMode === 'undefined' || ngDevMode) { + const cssProp = camelCaseToDashCase(prop); + return validateWebAnimatableStyleProperty(cssProp); + } + return true; + } + matchesElement(_element, _selector) { + // This method is deprecated and no longer in use so we return false. + return false; + } + containsElement(elm1, elm2) { + return containsElement(elm1, elm2); + } + getParentElement(element) { + return getParentElement(element); + } + query(element, selector, multi) { + return invokeQuery(element, selector, multi); + } + computeStyle(element, prop, defaultValue) { + return computeStyle(element, prop); + } + animate(element, keyframes, duration, delay, easing, previousPlayers = []) { + const fill = delay == 0 ? 'both' : 'forwards'; + const playerOptions = { + duration, + delay, + fill + }; + // we check for this to avoid having a null|undefined value be present + // for the easing (which results in an error for certain browsers #9752) + if (easing) { + playerOptions['easing'] = easing; + } + const previousStyles = new Map(); + const previousWebAnimationPlayers = previousPlayers.filter(player => player instanceof WebAnimationsPlayer); + if (allowPreviousPlayerStylesMerge(duration, delay)) { + previousWebAnimationPlayers.forEach(player => { + player.currentSnapshot.forEach((val, prop) => previousStyles.set(prop, val)); + }); + } + let _keyframes = normalizeKeyframes(keyframes).map(styles => new Map(styles)); + _keyframes = balancePreviousStylesIntoKeyframes(element, _keyframes, previousStyles); + const specialStyles = packageNonAnimatableStyles(element, _keyframes); + return new WebAnimationsPlayer(element, _keyframes, playerOptions, specialStyles); + } +} +function createEngine(type, doc, scheduler) { + // TODO: find a way to make this tree shakable. + if (type === 'noop') { + return new AnimationEngine(doc, new NoopAnimationDriver(), new NoopAnimationStyleNormalizer(), scheduler); + } + return new AnimationEngine(doc, new WebAnimationsDriver(), new WebAnimationsStyleNormalizer(), scheduler); +} +class Animation { + constructor(_driver, input) { + this._driver = _driver; + const errors = []; + const warnings = []; + const ast = buildAnimationAst(_driver, input, errors, warnings); + if (errors.length) { + throw validationFailed(errors); + } + if (warnings.length) { + warnValidation(warnings); + } + this._animationAst = ast; + } + buildTimelines(element, startingStyles, destinationStyles, options, subInstructions) { + const start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) : startingStyles; + const dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) : destinationStyles; + const errors = []; + subInstructions = subInstructions || new ElementInstructionMap(); + const result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors); + if (errors.length) { + throw buildingFailed(errors); + } + return result; + } +} +const ANIMATION_PREFIX = '@'; +const DISABLE_ANIMATIONS_FLAG = '@.disabled'; +class BaseAnimationRenderer { + constructor(namespaceId, delegate, engine, _onDestroy) { + this.namespaceId = namespaceId; + this.delegate = delegate; + this.engine = engine; + this._onDestroy = _onDestroy; + // We need to explicitly type this property because of an api-extractor bug + // See https://github.com/microsoft/rushstack/issues/4390 + this.ɵtype = 0 /* AnimationRendererType.Regular */; + } + + get data() { + return this.delegate.data; + } + destroyNode(node) { + this.delegate.destroyNode?.(node); + } + destroy() { + this.engine.destroy(this.namespaceId, this.delegate); + this.engine.afterFlushAnimationsDone(() => { + // Call the renderer destroy method after the animations has finished as otherwise + // styles will be removed too early which will cause an unstyled animation. + queueMicrotask(() => { + this.delegate.destroy(); + }); + }); + this._onDestroy?.(); + } + createElement(name, namespace) { + return this.delegate.createElement(name, namespace); + } + createComment(value) { + return this.delegate.createComment(value); + } + createText(value) { + return this.delegate.createText(value); + } + appendChild(parent, newChild) { + this.delegate.appendChild(parent, newChild); + this.engine.onInsert(this.namespaceId, newChild, parent, false); + } + insertBefore(parent, newChild, refChild, isMove = true) { + this.delegate.insertBefore(parent, newChild, refChild); + // If `isMove` true than we should animate this insert. + this.engine.onInsert(this.namespaceId, newChild, parent, isMove); + } + removeChild(parent, oldChild, isHostElement) { + this.engine.onRemove(this.namespaceId, oldChild, this.delegate); + } + selectRootElement(selectorOrNode, preserveContent) { + return this.delegate.selectRootElement(selectorOrNode, preserveContent); + } + parentNode(node) { + return this.delegate.parentNode(node); + } + nextSibling(node) { + return this.delegate.nextSibling(node); + } + setAttribute(el, name, value, namespace) { + this.delegate.setAttribute(el, name, value, namespace); + } + removeAttribute(el, name, namespace) { + this.delegate.removeAttribute(el, name, namespace); + } + addClass(el, name) { + this.delegate.addClass(el, name); + } + removeClass(el, name) { + this.delegate.removeClass(el, name); + } + setStyle(el, style, value, flags) { + this.delegate.setStyle(el, style, value, flags); + } + removeStyle(el, style, flags) { + this.delegate.removeStyle(el, style, flags); + } + setProperty(el, name, value) { + if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) { + this.disableAnimations(el, !!value); + } else { + this.delegate.setProperty(el, name, value); + } + } + setValue(node, value) { + this.delegate.setValue(node, value); + } + listen(target, eventName, callback) { + return this.delegate.listen(target, eventName, callback); + } + disableAnimations(element, value) { + this.engine.disableAnimations(element, value); + } +} +class AnimationRenderer extends BaseAnimationRenderer { + constructor(factory, namespaceId, delegate, engine, onDestroy) { + super(namespaceId, delegate, engine, onDestroy); + this.factory = factory; + this.namespaceId = namespaceId; + } + setProperty(el, name, value) { + if (name.charAt(0) == ANIMATION_PREFIX) { + if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) { + value = value === undefined ? true : !!value; + this.disableAnimations(el, value); + } else { + this.engine.process(this.namespaceId, el, name.slice(1), value); + } + } else { + this.delegate.setProperty(el, name, value); + } + } + listen(target, eventName, callback) { + if (eventName.charAt(0) == ANIMATION_PREFIX) { + const element = resolveElementFromTarget(target); + let name = eventName.slice(1); + let phase = ''; + // @listener.phase is for trigger animation callbacks + // @@listener is for animation builder callbacks + if (name.charAt(0) != ANIMATION_PREFIX) { + [name, phase] = parseTriggerCallbackName(name); + } + return this.engine.listen(this.namespaceId, element, name, phase, event => { + const countId = event['_data'] || -1; + this.factory.scheduleListenerCallback(countId, callback, event); + }); + } + return this.delegate.listen(target, eventName, callback); + } +} +function resolveElementFromTarget(target) { + switch (target) { + case 'body': + return document.body; + case 'document': + return document; + case 'window': + return window; + default: + return target; + } +} +function parseTriggerCallbackName(triggerName) { + const dotIndex = triggerName.indexOf('.'); + const trigger = triggerName.substring(0, dotIndex); + const phase = triggerName.slice(dotIndex + 1); + return [trigger, phase]; +} +class AnimationRendererFactory { + constructor(delegate, engine, _zone) { + this.delegate = delegate; + this.engine = engine; + this._zone = _zone; + this._currentId = 0; + this._microtaskId = 1; + this._animationCallbacksBuffer = []; + this._rendererCache = new Map(); + this._cdRecurDepth = 0; + engine.onRemovalComplete = (element, delegate) => { + // Note: if a component element has a leave animation, and a host leave animation, + // the view engine will call `removeChild` for the parent + // component renderer as well as for the child component renderer. + // Therefore, we need to check if we already removed the element. + const parentNode = delegate?.parentNode(element); + if (parentNode) { + delegate.removeChild(parentNode, element); + } + }; + } + createRenderer(hostElement, type) { + const EMPTY_NAMESPACE_ID = ''; + // cache the delegates to find out which cached delegate can + // be used by which cached renderer + const delegate = this.delegate.createRenderer(hostElement, type); + if (!hostElement || !type?.data?.['animation']) { + const cache = this._rendererCache; + let renderer = cache.get(delegate); + if (!renderer) { + // Ensure that the renderer is removed from the cache on destroy + // since it may contain references to detached DOM nodes. + const onRendererDestroy = () => cache.delete(delegate); + renderer = new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine, onRendererDestroy); + // only cache this result when the base renderer is used + cache.set(delegate, renderer); + } + return renderer; + } + const componentId = type.id; + const namespaceId = type.id + '-' + this._currentId; + this._currentId++; + this.engine.register(namespaceId, hostElement); + const registerTrigger = trigger => { + if (Array.isArray(trigger)) { + trigger.forEach(registerTrigger); + } else { + this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger); + } + }; + const animationTriggers = type.data['animation']; + animationTriggers.forEach(registerTrigger); + return new AnimationRenderer(this, namespaceId, delegate, this.engine); + } + begin() { + this._cdRecurDepth++; + if (this.delegate.begin) { + this.delegate.begin(); + } + } + _scheduleCountTask() { + queueMicrotask(() => { + this._microtaskId++; + }); + } + /** @internal */ + scheduleListenerCallback(count, fn, data) { + if (count >= 0 && count < this._microtaskId) { + this._zone.run(() => fn(data)); + return; + } + const animationCallbacksBuffer = this._animationCallbacksBuffer; + if (animationCallbacksBuffer.length == 0) { + queueMicrotask(() => { + this._zone.run(() => { + animationCallbacksBuffer.forEach(tuple => { + const [fn, data] = tuple; + fn(data); + }); + this._animationCallbacksBuffer = []; + }); + }); + } + animationCallbacksBuffer.push([fn, data]); + } + end() { + this._cdRecurDepth--; + // this is to prevent animations from running twice when an inner + // component does CD when a parent component instead has inserted it + if (this._cdRecurDepth == 0) { + this._zone.runOutsideAngular(() => { + this._scheduleCountTask(); + this.engine.flush(this._microtaskId); + }); + } + if (this.delegate.end) { + this.delegate.end(); + } + } + whenRenderingDone() { + return this.engine.whenRenderingDone(); + } +} + +/** + * @module + * @description + * Entry point for all animation APIs of the animation browser package. + */ + +/** + * @module + * @description + * Entry point for all public APIs of this package. + */ + +// This file is not used to build this module. It is only used during editing + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 88627: +/*!*****************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/a11y.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A11yModule: () => (/* binding */ A11yModule), +/* harmony export */ ActiveDescendantKeyManager: () => (/* binding */ ActiveDescendantKeyManager), +/* harmony export */ AriaDescriber: () => (/* binding */ AriaDescriber), +/* harmony export */ CDK_DESCRIBEDBY_HOST_ATTRIBUTE: () => (/* binding */ CDK_DESCRIBEDBY_HOST_ATTRIBUTE), +/* harmony export */ CDK_DESCRIBEDBY_ID_PREFIX: () => (/* binding */ CDK_DESCRIBEDBY_ID_PREFIX), +/* harmony export */ CdkAriaLive: () => (/* binding */ CdkAriaLive), +/* harmony export */ CdkMonitorFocus: () => (/* binding */ CdkMonitorFocus), +/* harmony export */ CdkTrapFocus: () => (/* binding */ CdkTrapFocus), +/* harmony export */ ConfigurableFocusTrap: () => (/* binding */ ConfigurableFocusTrap), +/* harmony export */ ConfigurableFocusTrapFactory: () => (/* binding */ ConfigurableFocusTrapFactory), +/* harmony export */ EventListenerFocusTrapInertStrategy: () => (/* binding */ EventListenerFocusTrapInertStrategy), +/* harmony export */ FOCUS_MONITOR_DEFAULT_OPTIONS: () => (/* binding */ FOCUS_MONITOR_DEFAULT_OPTIONS), +/* harmony export */ FOCUS_TRAP_INERT_STRATEGY: () => (/* binding */ FOCUS_TRAP_INERT_STRATEGY), +/* harmony export */ FocusKeyManager: () => (/* binding */ FocusKeyManager), +/* harmony export */ FocusMonitor: () => (/* binding */ FocusMonitor), +/* harmony export */ FocusMonitorDetectionMode: () => (/* binding */ FocusMonitorDetectionMode), +/* harmony export */ FocusTrap: () => (/* binding */ FocusTrap), +/* harmony export */ FocusTrapFactory: () => (/* binding */ FocusTrapFactory), +/* harmony export */ HighContrastMode: () => (/* binding */ HighContrastMode), +/* harmony export */ HighContrastModeDetector: () => (/* binding */ HighContrastModeDetector), +/* harmony export */ INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS: () => (/* binding */ INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS), +/* harmony export */ INPUT_MODALITY_DETECTOR_OPTIONS: () => (/* binding */ INPUT_MODALITY_DETECTOR_OPTIONS), +/* harmony export */ InputModalityDetector: () => (/* binding */ InputModalityDetector), +/* harmony export */ InteractivityChecker: () => (/* binding */ InteractivityChecker), +/* harmony export */ IsFocusableConfig: () => (/* binding */ IsFocusableConfig), +/* harmony export */ LIVE_ANNOUNCER_DEFAULT_OPTIONS: () => (/* binding */ LIVE_ANNOUNCER_DEFAULT_OPTIONS), +/* harmony export */ LIVE_ANNOUNCER_ELEMENT_TOKEN: () => (/* binding */ LIVE_ANNOUNCER_ELEMENT_TOKEN), +/* harmony export */ LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY: () => (/* binding */ LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY), +/* harmony export */ ListKeyManager: () => (/* binding */ ListKeyManager), +/* harmony export */ LiveAnnouncer: () => (/* binding */ LiveAnnouncer), +/* harmony export */ MESSAGES_CONTAINER_ID: () => (/* binding */ MESSAGES_CONTAINER_ID), +/* harmony export */ addAriaReferencedId: () => (/* binding */ addAriaReferencedId), +/* harmony export */ getAriaReferenceIds: () => (/* binding */ getAriaReferenceIds), +/* harmony export */ isFakeMousedownFromScreenReader: () => (/* binding */ isFakeMousedownFromScreenReader), +/* harmony export */ isFakeTouchstartFromScreenReader: () => (/* binding */ isFakeTouchstartFromScreenReader), +/* harmony export */ removeAriaReferencedId: () => (/* binding */ removeAriaReferencedId) +/* harmony export */ }); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/platform */ 51338); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ 36421); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ 95536); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! rxjs */ 13901); +/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/keycodes */ 64986); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/operators */ 61969); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/operators */ 43396); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ 61856); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs/operators */ 24406); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs/operators */ 75117); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs/operators */ 99473); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! rxjs/operators */ 79746); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! rxjs/operators */ 65213); +/* harmony import */ var _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/cdk/observers */ 98472); +/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @angular/cdk/coercion */ 79663); +/* harmony import */ var _angular_cdk_layout__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/cdk/layout */ 42085); + + + + + + + + + + + + + +/** IDs are delimited by an empty space, as per the spec. */ +const ID_DELIMITER = ' '; +/** + * Adds the given ID to the specified ARIA attribute on an element. + * Used for attributes such as aria-labelledby, aria-owns, etc. + */ +function addAriaReferencedId(el, attr, id) { + const ids = getAriaReferenceIds(el, attr); + id = id.trim(); + if (ids.some(existingId => existingId.trim() === id)) { + return; + } + ids.push(id); + el.setAttribute(attr, ids.join(ID_DELIMITER)); +} +/** + * Removes the given ID from the specified ARIA attribute on an element. + * Used for attributes such as aria-labelledby, aria-owns, etc. + */ +function removeAriaReferencedId(el, attr, id) { + const ids = getAriaReferenceIds(el, attr); + id = id.trim(); + const filteredIds = ids.filter(val => val !== id); + if (filteredIds.length) { + el.setAttribute(attr, filteredIds.join(ID_DELIMITER)); + } else { + el.removeAttribute(attr); + } +} +/** + * Gets the list of IDs referenced by the given ARIA attribute on an element. + * Used for attributes such as aria-labelledby, aria-owns, etc. + */ +function getAriaReferenceIds(el, attr) { + // Get string array of all individual ids (whitespace delimited) in the attribute value + const attrValue = el.getAttribute(attr); + return attrValue?.match(/\S+/g) ?? []; +} + +/** + * ID used for the body container where all messages are appended. + * @deprecated No longer being used. To be removed. + * @breaking-change 14.0.0 + */ +const MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container'; +/** + * ID prefix used for each created message element. + * @deprecated To be turned into a private variable. + * @breaking-change 14.0.0 + */ +const CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message'; +/** + * Attribute given to each host element that is described by a message element. + * @deprecated To be turned into a private variable. + * @breaking-change 14.0.0 + */ +const CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host'; +/** Global incremental identifier for each registered message element. */ +let nextId = 0; +/** + * Utility that creates visually hidden elements with a message content. Useful for elements that + * want to use aria-describedby to further describe themselves without adding additional visual + * content. + */ +class AriaDescriber { + constructor(_document, + /** + * @deprecated To be turned into a required parameter. + * @breaking-change 14.0.0 + */ + _platform) { + this._platform = _platform; + /** Map of all registered message elements that have been placed into the document. */ + this._messageRegistry = new Map(); + /** Container for all registered messages. */ + this._messagesContainer = null; + /** Unique ID for the service. */ + this._id = `${nextId++}`; + this._document = _document; + this._id = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.APP_ID) + '-' + nextId++; + } + describe(hostElement, message, role) { + if (!this._canBeDescribed(hostElement, message)) { + return; + } + const key = getKey(message, role); + if (typeof message !== 'string') { + // We need to ensure that the element has an ID. + setMessageId(message, this._id); + this._messageRegistry.set(key, { + messageElement: message, + referenceCount: 0 + }); + } else if (!this._messageRegistry.has(key)) { + this._createMessageElement(message, role); + } + if (!this._isElementDescribedByMessage(hostElement, key)) { + this._addMessageReference(hostElement, key); + } + } + removeDescription(hostElement, message, role) { + if (!message || !this._isElementNode(hostElement)) { + return; + } + const key = getKey(message, role); + if (this._isElementDescribedByMessage(hostElement, key)) { + this._removeMessageReference(hostElement, key); + } + // If the message is a string, it means that it's one that we created for the + // consumer so we can remove it safely, otherwise we should leave it in place. + if (typeof message === 'string') { + const registeredMessage = this._messageRegistry.get(key); + if (registeredMessage && registeredMessage.referenceCount === 0) { + this._deleteMessageElement(key); + } + } + if (this._messagesContainer?.childNodes.length === 0) { + this._messagesContainer.remove(); + this._messagesContainer = null; + } + } + /** Unregisters all created message elements and removes the message container. */ + ngOnDestroy() { + const describedElements = this._document.querySelectorAll(`[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}="${this._id}"]`); + for (let i = 0; i < describedElements.length; i++) { + this._removeCdkDescribedByReferenceIds(describedElements[i]); + describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE); + } + this._messagesContainer?.remove(); + this._messagesContainer = null; + this._messageRegistry.clear(); + } + /** + * Creates a new element in the visually hidden message container element with the message + * as its content and adds it to the message registry. + */ + _createMessageElement(message, role) { + const messageElement = this._document.createElement('div'); + setMessageId(messageElement, this._id); + messageElement.textContent = message; + if (role) { + messageElement.setAttribute('role', role); + } + this._createMessagesContainer(); + this._messagesContainer.appendChild(messageElement); + this._messageRegistry.set(getKey(message, role), { + messageElement, + referenceCount: 0 + }); + } + /** Deletes the message element from the global messages container. */ + _deleteMessageElement(key) { + this._messageRegistry.get(key)?.messageElement?.remove(); + this._messageRegistry.delete(key); + } + /** Creates the global container for all aria-describedby messages. */ + _createMessagesContainer() { + if (this._messagesContainer) { + return; + } + const containerClassName = 'cdk-describedby-message-container'; + const serverContainers = this._document.querySelectorAll(`.${containerClassName}[platform="server"]`); + for (let i = 0; i < serverContainers.length; i++) { + // When going from the server to the client, we may end up in a situation where there's + // already a container on the page, but we don't have a reference to it. Clear the + // old container so we don't get duplicates. Doing this, instead of emptying the previous + // container, should be slightly faster. + serverContainers[i].remove(); + } + const messagesContainer = this._document.createElement('div'); + // We add `visibility: hidden` in order to prevent text in this container from + // being searchable by the browser's Ctrl + F functionality. + // Screen-readers will still read the description for elements with aria-describedby even + // when the description element is not visible. + messagesContainer.style.visibility = 'hidden'; + // Even though we use `visibility: hidden`, we still apply `cdk-visually-hidden` so that + // the description element doesn't impact page layout. + messagesContainer.classList.add(containerClassName); + messagesContainer.classList.add('cdk-visually-hidden'); + // @breaking-change 14.0.0 Remove null check for `_platform`. + if (this._platform && !this._platform.isBrowser) { + messagesContainer.setAttribute('platform', 'server'); + } + this._document.body.appendChild(messagesContainer); + this._messagesContainer = messagesContainer; + } + /** Removes all cdk-describedby messages that are hosted through the element. */ + _removeCdkDescribedByReferenceIds(element) { + // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX + const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby').filter(id => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0); + element.setAttribute('aria-describedby', originalReferenceIds.join(' ')); + } + /** + * Adds a message reference to the element using aria-describedby and increments the registered + * message's reference count. + */ + _addMessageReference(element, key) { + const registeredMessage = this._messageRegistry.get(key); + // Add the aria-describedby reference and set the + // describedby_host attribute to mark the element. + addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id); + element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, this._id); + registeredMessage.referenceCount++; + } + /** + * Removes a message reference from the element using aria-describedby + * and decrements the registered message's reference count. + */ + _removeMessageReference(element, key) { + const registeredMessage = this._messageRegistry.get(key); + registeredMessage.referenceCount--; + removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id); + element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE); + } + /** Returns true if the element has been described by the provided message ID. */ + _isElementDescribedByMessage(element, key) { + const referenceIds = getAriaReferenceIds(element, 'aria-describedby'); + const registeredMessage = this._messageRegistry.get(key); + const messageId = registeredMessage && registeredMessage.messageElement.id; + return !!messageId && referenceIds.indexOf(messageId) != -1; + } + /** Determines whether a message can be described on a particular element. */ + _canBeDescribed(element, message) { + if (!this._isElementNode(element)) { + return false; + } + if (message && typeof message === 'object') { + // We'd have to make some assumptions about the description element's text, if the consumer + // passed in an element. Assume that if an element is passed in, the consumer has verified + // that it can be used as a description. + return true; + } + const trimmedMessage = message == null ? '' : `${message}`.trim(); + const ariaLabel = element.getAttribute('aria-label'); + // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the + // element, because screen readers will end up reading out the same text twice in a row. + return trimmedMessage ? !ariaLabel || ariaLabel.trim() !== trimmedMessage : false; + } + /** Checks whether a node is an Element node. */ + _isElementNode(element) { + return element.nodeType === this._document.ELEMENT_NODE; + } + static #_ = this.ɵfac = function AriaDescriber_Factory(t) { + return new (t || AriaDescriber)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: AriaDescriber, + factory: AriaDescriber.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AriaDescriber, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT] + }] + }, { + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform + }], null); +})(); +/** Gets a key that can be used to look messages up in the registry. */ +function getKey(message, role) { + return typeof message === 'string' ? `${role || ''}/${message}` : message; +} +/** Assigns a unique ID to an element, if it doesn't have one already. */ +function setMessageId(element, serviceId) { + if (!element.id) { + element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${serviceId}-${nextId++}`; + } +} + +/** + * This class manages keyboard events for selectable lists. If you pass it a query list + * of items, it will set the active item correctly when arrow events occur. + */ +class ListKeyManager { + constructor(_items, injector) { + this._items = _items; + this._activeItemIndex = -1; + this._activeItem = null; + this._wrap = false; + this._letterKeyStream = new rxjs__WEBPACK_IMPORTED_MODULE_3__.Subject(); + this._typeaheadSubscription = rxjs__WEBPACK_IMPORTED_MODULE_4__.Subscription.EMPTY; + this._vertical = true; + this._allowedModifierKeys = []; + this._homeAndEnd = false; + this._pageUpAndDown = { + enabled: false, + delta: 10 + }; + /** + * Predicate function that can be used to check whether an item should be skipped + * by the key manager. By default, disabled items are skipped. + */ + this._skipPredicateFn = item => item.disabled; + // Buffer for the letters that the user has pressed when the typeahead option is turned on. + this._pressedLetters = []; + /** + * Stream that emits any time the TAB key is pressed, so components can react + * when focus is shifted off of the list. + */ + this.tabOut = new rxjs__WEBPACK_IMPORTED_MODULE_3__.Subject(); + /** Stream that emits whenever the active item of the list manager changes. */ + this.change = new rxjs__WEBPACK_IMPORTED_MODULE_3__.Subject(); + // We allow for the items to be an array because, in some cases, the consumer may + // not have access to a QueryList of the items they want to manage (e.g. when the + // items aren't being collected via `ViewChildren` or `ContentChildren`). + if (_items instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__.QueryList) { + this._itemChangesSubscription = _items.changes.subscribe(newItems => this._itemsChanged(newItems.toArray())); + } else if ((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.isSignal)(_items)) { + if (!injector && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw new Error('ListKeyManager constructed with a signal must receive an injector'); + } + this._effectRef = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.effect)(() => this._itemsChanged(_items()), { + injector + }); + } + } + /** + * Sets the predicate function that determines which items should be skipped by the + * list key manager. + * @param predicate Function that determines whether the given item should be skipped. + */ + skipPredicate(predicate) { + this._skipPredicateFn = predicate; + return this; + } + /** + * Configures wrapping mode, which determines whether the active item will wrap to + * the other end of list when there are no more items in the given direction. + * @param shouldWrap Whether the list should wrap when reaching the end. + */ + withWrap(shouldWrap = true) { + this._wrap = shouldWrap; + return this; + } + /** + * Configures whether the key manager should be able to move the selection vertically. + * @param enabled Whether vertical selection should be enabled. + */ + withVerticalOrientation(enabled = true) { + this._vertical = enabled; + return this; + } + /** + * Configures the key manager to move the selection horizontally. + * Passing in `null` will disable horizontal movement. + * @param direction Direction in which the selection can be moved. + */ + withHorizontalOrientation(direction) { + this._horizontal = direction; + return this; + } + /** + * Modifier keys which are allowed to be held down and whose default actions will be prevented + * as the user is pressing the arrow keys. Defaults to not allowing any modifier keys. + */ + withAllowedModifierKeys(keys) { + this._allowedModifierKeys = keys; + return this; + } + /** + * Turns on typeahead mode which allows users to set the active item by typing. + * @param debounceInterval Time to wait after the last keystroke before setting the active item. + */ + withTypeAhead(debounceInterval = 200) { + if (typeof ngDevMode === 'undefined' || ngDevMode) { + const items = this._getItemsArray(); + if (items.length > 0 && items.some(item => typeof item.getLabel !== 'function')) { + throw Error('ListKeyManager items in typeahead mode must implement the `getLabel` method.'); + } + } + this._typeaheadSubscription.unsubscribe(); + // Debounce the presses of non-navigational keys, collect the ones that correspond to letters + // and convert those letters back into a string. Afterwards find the first item that starts + // with that string and select it. + this._typeaheadSubscription = this._letterKeyStream.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_5__.tap)(letter => this._pressedLetters.push(letter)), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.debounceTime)(debounceInterval), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.filter)(() => this._pressedLetters.length > 0), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_8__.map)(() => this._pressedLetters.join(''))).subscribe(inputString => { + const items = this._getItemsArray(); + // Start at 1 because we want to start searching at the item immediately + // following the current active item. + for (let i = 1; i < items.length + 1; i++) { + const index = (this._activeItemIndex + i) % items.length; + const item = items[index]; + if (!this._skipPredicateFn(item) && item.getLabel().toUpperCase().trim().indexOf(inputString) === 0) { + this.setActiveItem(index); + break; + } + } + this._pressedLetters = []; + }); + return this; + } + /** Cancels the current typeahead sequence. */ + cancelTypeahead() { + this._pressedLetters = []; + return this; + } + /** + * Configures the key manager to activate the first and last items + * respectively when the Home or End key is pressed. + * @param enabled Whether pressing the Home or End key activates the first/last item. + */ + withHomeAndEnd(enabled = true) { + this._homeAndEnd = enabled; + return this; + } + /** + * Configures the key manager to activate every 10th, configured or first/last element in up/down direction + * respectively when the Page-Up or Page-Down key is pressed. + * @param enabled Whether pressing the Page-Up or Page-Down key activates the first/last item. + * @param delta Whether pressing the Home or End key activates the first/last item. + */ + withPageUpDown(enabled = true, delta = 10) { + this._pageUpAndDown = { + enabled, + delta + }; + return this; + } + setActiveItem(item) { + const previousActiveItem = this._activeItem; + this.updateActiveItem(item); + if (this._activeItem !== previousActiveItem) { + this.change.next(this._activeItemIndex); + } + } + /** + * Sets the active item depending on the key event passed in. + * @param event Keyboard event to be used for determining which element should be active. + */ + onKeydown(event) { + const keyCode = event.keyCode; + const modifiers = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey']; + const isModifierAllowed = modifiers.every(modifier => { + return !event[modifier] || this._allowedModifierKeys.indexOf(modifier) > -1; + }); + switch (keyCode) { + case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.TAB: + this.tabOut.next(); + return; + case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.DOWN_ARROW: + if (this._vertical && isModifierAllowed) { + this.setNextItemActive(); + break; + } else { + return; + } + case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.UP_ARROW: + if (this._vertical && isModifierAllowed) { + this.setPreviousItemActive(); + break; + } else { + return; + } + case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.RIGHT_ARROW: + if (this._horizontal && isModifierAllowed) { + this._horizontal === 'rtl' ? this.setPreviousItemActive() : this.setNextItemActive(); + break; + } else { + return; + } + case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.LEFT_ARROW: + if (this._horizontal && isModifierAllowed) { + this._horizontal === 'rtl' ? this.setNextItemActive() : this.setPreviousItemActive(); + break; + } else { + return; + } + case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.HOME: + if (this._homeAndEnd && isModifierAllowed) { + this.setFirstItemActive(); + break; + } else { + return; + } + case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.END: + if (this._homeAndEnd && isModifierAllowed) { + this.setLastItemActive(); + break; + } else { + return; + } + case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.PAGE_UP: + if (this._pageUpAndDown.enabled && isModifierAllowed) { + const targetIndex = this._activeItemIndex - this._pageUpAndDown.delta; + this._setActiveItemByIndex(targetIndex > 0 ? targetIndex : 0, 1); + break; + } else { + return; + } + case _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.PAGE_DOWN: + if (this._pageUpAndDown.enabled && isModifierAllowed) { + const targetIndex = this._activeItemIndex + this._pageUpAndDown.delta; + const itemsLength = this._getItemsArray().length; + this._setActiveItemByIndex(targetIndex < itemsLength ? targetIndex : itemsLength - 1, -1); + break; + } else { + return; + } + default: + if (isModifierAllowed || (0,_angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.hasModifierKey)(event, 'shiftKey')) { + // Attempt to use the `event.key` which also maps it to the user's keyboard language, + // otherwise fall back to resolving alphanumeric characters via the keyCode. + if (event.key && event.key.length === 1) { + this._letterKeyStream.next(event.key.toLocaleUpperCase()); + } else if (keyCode >= _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.A && keyCode <= _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.Z || keyCode >= _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.ZERO && keyCode <= _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.NINE) { + this._letterKeyStream.next(String.fromCharCode(keyCode)); + } + } + // Note that we return here, in order to avoid preventing + // the default action of non-navigational keys. + return; + } + this._pressedLetters = []; + event.preventDefault(); + } + /** Index of the currently active item. */ + get activeItemIndex() { + return this._activeItemIndex; + } + /** The active item. */ + get activeItem() { + return this._activeItem; + } + /** Gets whether the user is currently typing into the manager using the typeahead feature. */ + isTyping() { + return this._pressedLetters.length > 0; + } + /** Sets the active item to the first enabled item in the list. */ + setFirstItemActive() { + this._setActiveItemByIndex(0, 1); + } + /** Sets the active item to the last enabled item in the list. */ + setLastItemActive() { + this._setActiveItemByIndex(this._items.length - 1, -1); + } + /** Sets the active item to the next enabled item in the list. */ + setNextItemActive() { + this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1); + } + /** Sets the active item to a previous enabled item in the list. */ + setPreviousItemActive() { + this._activeItemIndex < 0 && this._wrap ? this.setLastItemActive() : this._setActiveItemByDelta(-1); + } + updateActiveItem(item) { + const itemArray = this._getItemsArray(); + const index = typeof item === 'number' ? item : itemArray.indexOf(item); + const activeItem = itemArray[index]; + // Explicitly check for `null` and `undefined` because other falsy values are valid. + this._activeItem = activeItem == null ? null : activeItem; + this._activeItemIndex = index; + } + /** Cleans up the key manager. */ + destroy() { + this._typeaheadSubscription.unsubscribe(); + this._itemChangesSubscription?.unsubscribe(); + this._effectRef?.destroy(); + this._letterKeyStream.complete(); + this.tabOut.complete(); + this.change.complete(); + this._pressedLetters = []; + } + /** + * This method sets the active item, given a list of items and the delta between the + * currently active item and the new active item. It will calculate differently + * depending on whether wrap mode is turned on. + */ + _setActiveItemByDelta(delta) { + this._wrap ? this._setActiveInWrapMode(delta) : this._setActiveInDefaultMode(delta); + } + /** + * Sets the active item properly given "wrap" mode. In other words, it will continue to move + * down the list until it finds an item that is not disabled, and it will wrap if it + * encounters either end of the list. + */ + _setActiveInWrapMode(delta) { + const items = this._getItemsArray(); + for (let i = 1; i <= items.length; i++) { + const index = (this._activeItemIndex + delta * i + items.length) % items.length; + const item = items[index]; + if (!this._skipPredicateFn(item)) { + this.setActiveItem(index); + return; + } + } + } + /** + * Sets the active item properly given the default mode. In other words, it will + * continue to move down the list until it finds an item that is not disabled. If + * it encounters either end of the list, it will stop and not wrap. + */ + _setActiveInDefaultMode(delta) { + this._setActiveItemByIndex(this._activeItemIndex + delta, delta); + } + /** + * Sets the active item to the first enabled item starting at the index specified. If the + * item is disabled, it will move in the fallbackDelta direction until it either + * finds an enabled item or encounters the end of the list. + */ + _setActiveItemByIndex(index, fallbackDelta) { + const items = this._getItemsArray(); + if (!items[index]) { + return; + } + while (this._skipPredicateFn(items[index])) { + index += fallbackDelta; + if (!items[index]) { + return; + } + } + this.setActiveItem(index); + } + /** Returns the items as an array. */ + _getItemsArray() { + if ((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.isSignal)(this._items)) { + return this._items(); + } + return this._items instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__.QueryList ? this._items.toArray() : this._items; + } + /** Callback for when the items have changed. */ + _itemsChanged(newItems) { + if (this._activeItem) { + const newIndex = newItems.indexOf(this._activeItem); + if (newIndex > -1 && newIndex !== this._activeItemIndex) { + this._activeItemIndex = newIndex; + } + } + } +} +class ActiveDescendantKeyManager extends ListKeyManager { + setActiveItem(index) { + if (this.activeItem) { + this.activeItem.setInactiveStyles(); + } + super.setActiveItem(index); + if (this.activeItem) { + this.activeItem.setActiveStyles(); + } + } +} +class FocusKeyManager extends ListKeyManager { + constructor() { + super(...arguments); + this._origin = 'program'; + } + /** + * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls. + * @param origin Focus origin to be used when focusing items. + */ + setFocusOrigin(origin) { + this._origin = origin; + return this; + } + setActiveItem(item) { + super.setActiveItem(item); + if (this.activeItem) { + this.activeItem.focus(this._origin); + } + } +} + +/** + * Configuration for the isFocusable method. + */ +class IsFocusableConfig { + constructor() { + /** + * Whether to count an element as focusable even if it is not currently visible. + */ + this.ignoreVisibility = false; + } +} +// The InteractivityChecker leans heavily on the ally.js accessibility utilities. +// Methods like `isTabbable` are only covering specific edge-cases for the browsers which are +// supported. +/** + * Utility for checking the interactivity of an element, such as whether it is focusable or + * tabbable. + */ +class InteractivityChecker { + constructor(_platform) { + this._platform = _platform; + } + /** + * Gets whether an element is disabled. + * + * @param element Element to be checked. + * @returns Whether the element is disabled. + */ + isDisabled(element) { + // This does not capture some cases, such as a non-form control with a disabled attribute or + // a form control inside of a disabled form, but should capture the most common cases. + return element.hasAttribute('disabled'); + } + /** + * Gets whether an element is visible for the purposes of interactivity. + * + * This will capture states like `display: none` and `visibility: hidden`, but not things like + * being clipped by an `overflow: hidden` parent or being outside the viewport. + * + * @returns Whether the element is visible. + */ + isVisible(element) { + return hasGeometry(element) && getComputedStyle(element).visibility === 'visible'; + } + /** + * Gets whether an element can be reached via Tab key. + * Assumes that the element has already been checked with isFocusable. + * + * @param element Element to be checked. + * @returns Whether the element is tabbable. + */ + isTabbable(element) { + // Nothing is tabbable on the server 😎 + if (!this._platform.isBrowser) { + return false; + } + const frameElement = getFrameElement(getWindow(element)); + if (frameElement) { + // Frame elements inherit their tabindex onto all child elements. + if (getTabIndexValue(frameElement) === -1) { + return false; + } + // Browsers disable tabbing to an element inside of an invisible frame. + if (!this.isVisible(frameElement)) { + return false; + } + } + let nodeName = element.nodeName.toLowerCase(); + let tabIndexValue = getTabIndexValue(element); + if (element.hasAttribute('contenteditable')) { + return tabIndexValue !== -1; + } + if (nodeName === 'iframe' || nodeName === 'object') { + // The frame or object's content may be tabbable depending on the content, but it's + // not possibly to reliably detect the content of the frames. We always consider such + // elements as non-tabbable. + return false; + } + // In iOS, the browser only considers some specific elements as tabbable. + if (this._platform.WEBKIT && this._platform.IOS && !isPotentiallyTabbableIOS(element)) { + return false; + } + if (nodeName === 'audio') { + // Audio elements without controls enabled are never tabbable, regardless + // of the tabindex attribute explicitly being set. + if (!element.hasAttribute('controls')) { + return false; + } + // Audio elements with controls are by default tabbable unless the + // tabindex attribute is set to `-1` explicitly. + return tabIndexValue !== -1; + } + if (nodeName === 'video') { + // For all video elements, if the tabindex attribute is set to `-1`, the video + // is not tabbable. Note: We cannot rely on the default `HTMLElement.tabIndex` + // property as that one is set to `-1` in Chrome, Edge and Safari v13.1. The + // tabindex attribute is the source of truth here. + if (tabIndexValue === -1) { + return false; + } + // If the tabindex is explicitly set, and not `-1` (as per check before), the + // video element is always tabbable (regardless of whether it has controls or not). + if (tabIndexValue !== null) { + return true; + } + // Otherwise (when no explicit tabindex is set), a video is only tabbable if it + // has controls enabled. Firefox is special as videos are always tabbable regardless + // of whether there are controls or not. + return this._platform.FIREFOX || element.hasAttribute('controls'); + } + return element.tabIndex >= 0; + } + /** + * Gets whether an element can be focused by the user. + * + * @param element Element to be checked. + * @param config The config object with options to customize this method's behavior + * @returns Whether the element is focusable. + */ + isFocusable(element, config) { + // Perform checks in order of left to most expensive. + // Again, naive approach that does not capture many edge cases and browser quirks. + return isPotentiallyFocusable(element) && !this.isDisabled(element) && (config?.ignoreVisibility || this.isVisible(element)); + } + static #_ = this.ɵfac = function InteractivityChecker_Factory(t) { + return new (t || InteractivityChecker)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: InteractivityChecker, + factory: InteractivityChecker.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](InteractivityChecker, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform + }], null); +})(); +/** + * Returns the frame element from a window object. Since browsers like MS Edge throw errors if + * the frameElement property is being accessed from a different host address, this property + * should be accessed carefully. + */ +function getFrameElement(window) { + try { + return window.frameElement; + } catch { + return null; + } +} +/** Checks whether the specified element has any geometry / rectangles. */ +function hasGeometry(element) { + // Use logic from jQuery to check for an invisible element. + // See https://github.com/jquery/jquery/blob/master/src/css/hiddenVisibleSelectors.js#L12 + return !!(element.offsetWidth || element.offsetHeight || typeof element.getClientRects === 'function' && element.getClientRects().length); +} +/** Gets whether an element's */ +function isNativeFormElement(element) { + let nodeName = element.nodeName.toLowerCase(); + return nodeName === 'input' || nodeName === 'select' || nodeName === 'button' || nodeName === 'textarea'; +} +/** Gets whether an element is an ``. */ +function isHiddenInput(element) { + return isInputElement(element) && element.type == 'hidden'; +} +/** Gets whether an element is an anchor that has an href attribute. */ +function isAnchorWithHref(element) { + return isAnchorElement(element) && element.hasAttribute('href'); +} +/** Gets whether an element is an input element. */ +function isInputElement(element) { + return element.nodeName.toLowerCase() == 'input'; +} +/** Gets whether an element is an anchor element. */ +function isAnchorElement(element) { + return element.nodeName.toLowerCase() == 'a'; +} +/** Gets whether an element has a valid tabindex. */ +function hasValidTabIndex(element) { + if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) { + return false; + } + let tabIndex = element.getAttribute('tabindex'); + return !!(tabIndex && !isNaN(parseInt(tabIndex, 10))); +} +/** + * Returns the parsed tabindex from the element attributes instead of returning the + * evaluated tabindex from the browsers defaults. + */ +function getTabIndexValue(element) { + if (!hasValidTabIndex(element)) { + return null; + } + // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054 + const tabIndex = parseInt(element.getAttribute('tabindex') || '', 10); + return isNaN(tabIndex) ? -1 : tabIndex; +} +/** Checks whether the specified element is potentially tabbable on iOS */ +function isPotentiallyTabbableIOS(element) { + let nodeName = element.nodeName.toLowerCase(); + let inputType = nodeName === 'input' && element.type; + return inputType === 'text' || inputType === 'password' || nodeName === 'select' || nodeName === 'textarea'; +} +/** + * Gets whether an element is potentially focusable without taking current visible/disabled state + * into account. + */ +function isPotentiallyFocusable(element) { + // Inputs are potentially focusable *unless* they're type="hidden". + if (isHiddenInput(element)) { + return false; + } + return isNativeFormElement(element) || isAnchorWithHref(element) || element.hasAttribute('contenteditable') || hasValidTabIndex(element); +} +/** Gets the parent window of a DOM node with regards of being inside of an iframe. */ +function getWindow(node) { + // ownerDocument is null if `node` itself *is* a document. + return node.ownerDocument && node.ownerDocument.defaultView || window; +} + +/** + * Class that allows for trapping focus within a DOM element. + * + * This class currently uses a relatively simple approach to focus trapping. + * It assumes that the tab order is the same as DOM order, which is not necessarily true. + * Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to be misaligned. + */ +class FocusTrap { + /** Whether the focus trap is active. */ + get enabled() { + return this._enabled; + } + set enabled(value) { + this._enabled = value; + if (this._startAnchor && this._endAnchor) { + this._toggleAnchorTabIndex(value, this._startAnchor); + this._toggleAnchorTabIndex(value, this._endAnchor); + } + } + constructor(_element, _checker, _ngZone, _document, deferAnchors = false) { + this._element = _element; + this._checker = _checker; + this._ngZone = _ngZone; + this._document = _document; + this._hasAttached = false; + // Event listeners for the anchors. Need to be regular functions so that we can unbind them later. + this.startAnchorListener = () => this.focusLastTabbableElement(); + this.endAnchorListener = () => this.focusFirstTabbableElement(); + this._enabled = true; + if (!deferAnchors) { + this.attachAnchors(); + } + } + /** Destroys the focus trap by cleaning up the anchors. */ + destroy() { + const startAnchor = this._startAnchor; + const endAnchor = this._endAnchor; + if (startAnchor) { + startAnchor.removeEventListener('focus', this.startAnchorListener); + startAnchor.remove(); + } + if (endAnchor) { + endAnchor.removeEventListener('focus', this.endAnchorListener); + endAnchor.remove(); + } + this._startAnchor = this._endAnchor = null; + this._hasAttached = false; + } + /** + * Inserts the anchors into the DOM. This is usually done automatically + * in the constructor, but can be deferred for cases like directives with `*ngIf`. + * @returns Whether the focus trap managed to attach successfully. This may not be the case + * if the target element isn't currently in the DOM. + */ + attachAnchors() { + // If we're not on the browser, there can be no focus to trap. + if (this._hasAttached) { + return true; + } + this._ngZone.runOutsideAngular(() => { + if (!this._startAnchor) { + this._startAnchor = this._createAnchor(); + this._startAnchor.addEventListener('focus', this.startAnchorListener); + } + if (!this._endAnchor) { + this._endAnchor = this._createAnchor(); + this._endAnchor.addEventListener('focus', this.endAnchorListener); + } + }); + if (this._element.parentNode) { + this._element.parentNode.insertBefore(this._startAnchor, this._element); + this._element.parentNode.insertBefore(this._endAnchor, this._element.nextSibling); + this._hasAttached = true; + } + return this._hasAttached; + } + /** + * Waits for the zone to stabilize, then focuses the first tabbable element. + * @returns Returns a promise that resolves with a boolean, depending + * on whether focus was moved successfully. + */ + focusInitialElementWhenReady(options) { + return new Promise(resolve => { + this._executeOnStable(() => resolve(this.focusInitialElement(options))); + }); + } + /** + * Waits for the zone to stabilize, then focuses + * the first tabbable element within the focus trap region. + * @returns Returns a promise that resolves with a boolean, depending + * on whether focus was moved successfully. + */ + focusFirstTabbableElementWhenReady(options) { + return new Promise(resolve => { + this._executeOnStable(() => resolve(this.focusFirstTabbableElement(options))); + }); + } + /** + * Waits for the zone to stabilize, then focuses + * the last tabbable element within the focus trap region. + * @returns Returns a promise that resolves with a boolean, depending + * on whether focus was moved successfully. + */ + focusLastTabbableElementWhenReady(options) { + return new Promise(resolve => { + this._executeOnStable(() => resolve(this.focusLastTabbableElement(options))); + }); + } + /** + * Get the specified boundary element of the trapped region. + * @param bound The boundary to get (start or end of trapped region). + * @returns The boundary element. + */ + _getRegionBoundary(bound) { + // Contains the deprecated version of selector, for temporary backwards comparability. + const markers = this._element.querySelectorAll(`[cdk-focus-region-${bound}], ` + `[cdkFocusRegion${bound}], ` + `[cdk-focus-${bound}]`); + if (typeof ngDevMode === 'undefined' || ngDevMode) { + for (let i = 0; i < markers.length; i++) { + // @breaking-change 8.0.0 + if (markers[i].hasAttribute(`cdk-focus-${bound}`)) { + 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]); + } else if (markers[i].hasAttribute(`cdk-focus-region-${bound}`)) { + 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]); + } + } + } + if (bound == 'start') { + return markers.length ? markers[0] : this._getFirstTabbableElement(this._element); + } + return markers.length ? markers[markers.length - 1] : this._getLastTabbableElement(this._element); + } + /** + * Focuses the element that should be focused when the focus trap is initialized. + * @returns Whether focus was moved successfully. + */ + focusInitialElement(options) { + // Contains the deprecated version of selector, for temporary backwards comparability. + const redirectToElement = this._element.querySelector(`[cdk-focus-initial], ` + `[cdkFocusInitial]`); + if (redirectToElement) { + // @breaking-change 8.0.0 + if ((typeof ngDevMode === 'undefined' || ngDevMode) && redirectToElement.hasAttribute(`cdk-focus-initial`)) { + console.warn(`Found use of deprecated attribute 'cdk-focus-initial', ` + `use 'cdkFocusInitial' instead. The deprecated attribute ` + `will be removed in 8.0.0`, redirectToElement); + } + // Warn the consumer if the element they've pointed to + // isn't focusable, when not in production mode. + if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._checker.isFocusable(redirectToElement)) { + console.warn(`Element matching '[cdkFocusInitial]' is not focusable.`, redirectToElement); + } + if (!this._checker.isFocusable(redirectToElement)) { + const focusableChild = this._getFirstTabbableElement(redirectToElement); + focusableChild?.focus(options); + return !!focusableChild; + } + redirectToElement.focus(options); + return true; + } + return this.focusFirstTabbableElement(options); + } + /** + * Focuses the first tabbable element within the focus trap region. + * @returns Whether focus was moved successfully. + */ + focusFirstTabbableElement(options) { + const redirectToElement = this._getRegionBoundary('start'); + if (redirectToElement) { + redirectToElement.focus(options); + } + return !!redirectToElement; + } + /** + * Focuses the last tabbable element within the focus trap region. + * @returns Whether focus was moved successfully. + */ + focusLastTabbableElement(options) { + const redirectToElement = this._getRegionBoundary('end'); + if (redirectToElement) { + redirectToElement.focus(options); + } + return !!redirectToElement; + } + /** + * Checks whether the focus trap has successfully been attached. + */ + hasAttached() { + return this._hasAttached; + } + /** Get the first tabbable element from a DOM subtree (inclusive). */ + _getFirstTabbableElement(root) { + if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) { + return root; + } + const children = root.children; + for (let i = 0; i < children.length; i++) { + const tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE ? this._getFirstTabbableElement(children[i]) : null; + if (tabbableChild) { + return tabbableChild; + } + } + return null; + } + /** Get the last tabbable element from a DOM subtree (inclusive). */ + _getLastTabbableElement(root) { + if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) { + return root; + } + // Iterate in reverse DOM order. + const children = root.children; + for (let i = children.length - 1; i >= 0; i--) { + const tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE ? this._getLastTabbableElement(children[i]) : null; + if (tabbableChild) { + return tabbableChild; + } + } + return null; + } + /** Creates an anchor element. */ + _createAnchor() { + const anchor = this._document.createElement('div'); + this._toggleAnchorTabIndex(this._enabled, anchor); + anchor.classList.add('cdk-visually-hidden'); + anchor.classList.add('cdk-focus-trap-anchor'); + anchor.setAttribute('aria-hidden', 'true'); + return anchor; + } + /** + * Toggles the `tabindex` of an anchor, based on the enabled state of the focus trap. + * @param isEnabled Whether the focus trap is enabled. + * @param anchor Anchor on which to toggle the tabindex. + */ + _toggleAnchorTabIndex(isEnabled, anchor) { + // Remove the tabindex completely, rather than setting it to -1, because if the + // element has a tabindex, the user might still hit it when navigating with the arrow keys. + isEnabled ? anchor.setAttribute('tabindex', '0') : anchor.removeAttribute('tabindex'); + } + /** + * Toggles the`tabindex` of both anchors to either trap Tab focus or allow it to escape. + * @param enabled: Whether the anchors should trap Tab. + */ + toggleAnchors(enabled) { + if (this._startAnchor && this._endAnchor) { + this._toggleAnchorTabIndex(enabled, this._startAnchor); + this._toggleAnchorTabIndex(enabled, this._endAnchor); + } + } + /** Executes a function when the zone is stable. */ + _executeOnStable(fn) { + if (this._ngZone.isStable) { + fn(); + } else { + this._ngZone.onStable.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_10__.take)(1)).subscribe(fn); + } + } +} +/** + * Factory that allows easy instantiation of focus traps. + */ +class FocusTrapFactory { + constructor(_checker, _ngZone, _document) { + this._checker = _checker; + this._ngZone = _ngZone; + this._document = _document; + } + /** + * Creates a focus-trapped region around the given element. + * @param element The element around which focus will be trapped. + * @param deferCaptureElements Defers the creation of focus-capturing elements to be done + * manually by the user. + * @returns The created focus trap instance. + */ + create(element, deferCaptureElements = false) { + return new FocusTrap(element, this._checker, this._ngZone, this._document, deferCaptureElements); + } + static #_ = this.ɵfac = function FocusTrapFactory_Factory(t) { + return new (t || FocusTrapFactory)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](InteractivityChecker), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: FocusTrapFactory, + factory: FocusTrapFactory.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FocusTrapFactory, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: InteractivityChecker + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT] + }] + }], null); +})(); +/** Directive for trapping focus within a region. */ +class CdkTrapFocus { + /** Whether the focus trap is active. */ + get enabled() { + return this.focusTrap?.enabled || false; + } + set enabled(value) { + if (this.focusTrap) { + this.focusTrap.enabled = value; + } + } + constructor(_elementRef, _focusTrapFactory, + /** + * @deprecated No longer being used. To be removed. + * @breaking-change 13.0.0 + */ + _document) { + this._elementRef = _elementRef; + this._focusTrapFactory = _focusTrapFactory; + /** Previously focused element to restore focus to upon destroy when using autoCapture. */ + this._previouslyFocusedElement = null; + const platform = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform); + if (platform.isBrowser) { + this.focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement, true); + } + } + ngOnDestroy() { + this.focusTrap?.destroy(); + // If we stored a previously focused element when using autoCapture, return focus to that + // element now that the trapped region is being destroyed. + if (this._previouslyFocusedElement) { + this._previouslyFocusedElement.focus(); + this._previouslyFocusedElement = null; + } + } + ngAfterContentInit() { + this.focusTrap?.attachAnchors(); + if (this.autoCapture) { + this._captureFocus(); + } + } + ngDoCheck() { + if (this.focusTrap && !this.focusTrap.hasAttached()) { + this.focusTrap.attachAnchors(); + } + } + ngOnChanges(changes) { + const autoCaptureChange = changes['autoCapture']; + if (autoCaptureChange && !autoCaptureChange.firstChange && this.autoCapture && this.focusTrap?.hasAttached()) { + this._captureFocus(); + } + } + _captureFocus() { + this._previouslyFocusedElement = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__._getFocusedElementPierceShadowDom)(); + this.focusTrap?.focusInitialElementWhenReady(); + } + static #_ = this.ɵfac = function CdkTrapFocus_Factory(t) { + return new (t || CdkTrapFocus)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](FocusTrapFactory), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkTrapFocus, + selectors: [["", "cdkTrapFocus", ""]], + inputs: { + enabled: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "cdkTrapFocus", "enabled", _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute], + autoCapture: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "cdkTrapFocusAutoCapture", "autoCapture", _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute] + }, + exportAs: ["cdkTrapFocus"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputTransformsFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkTrapFocus, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdkTrapFocus]', + exportAs: 'cdkTrapFocus', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef + }, { + type: FocusTrapFactory + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT] + }] + }], { + enabled: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + alias: 'cdkTrapFocus', + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute + }] + }], + autoCapture: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + alias: 'cdkTrapFocusAutoCapture', + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute + }] + }] + }); +})(); + +/** + * Class that allows for trapping focus within a DOM element. + * + * This class uses a strategy pattern that determines how it traps focus. + * See FocusTrapInertStrategy. + */ +class ConfigurableFocusTrap extends FocusTrap { + /** Whether the FocusTrap is enabled. */ + get enabled() { + return this._enabled; + } + set enabled(value) { + this._enabled = value; + if (this._enabled) { + this._focusTrapManager.register(this); + } else { + this._focusTrapManager.deregister(this); + } + } + constructor(_element, _checker, _ngZone, _document, _focusTrapManager, _inertStrategy, config) { + super(_element, _checker, _ngZone, _document, config.defer); + this._focusTrapManager = _focusTrapManager; + this._inertStrategy = _inertStrategy; + this._focusTrapManager.register(this); + } + /** Notifies the FocusTrapManager that this FocusTrap will be destroyed. */ + destroy() { + this._focusTrapManager.deregister(this); + super.destroy(); + } + /** @docs-private Implemented as part of ManagedFocusTrap. */ + _enable() { + this._inertStrategy.preventFocus(this); + this.toggleAnchors(true); + } + /** @docs-private Implemented as part of ManagedFocusTrap. */ + _disable() { + this._inertStrategy.allowFocus(this); + this.toggleAnchors(false); + } +} + +/** The injection token used to specify the inert strategy. */ +const FOCUS_TRAP_INERT_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('FOCUS_TRAP_INERT_STRATEGY'); + +/** + * Lightweight FocusTrapInertStrategy that adds a document focus event + * listener to redirect focus back inside the FocusTrap. + */ +class EventListenerFocusTrapInertStrategy { + constructor() { + /** Focus event handler. */ + this._listener = null; + } + /** Adds a document event listener that keeps focus inside the FocusTrap. */ + preventFocus(focusTrap) { + // Ensure there's only one listener per document + if (this._listener) { + focusTrap._document.removeEventListener('focus', this._listener, true); + } + this._listener = e => this._trapFocus(focusTrap, e); + focusTrap._ngZone.runOutsideAngular(() => { + focusTrap._document.addEventListener('focus', this._listener, true); + }); + } + /** Removes the event listener added in preventFocus. */ + allowFocus(focusTrap) { + if (!this._listener) { + return; + } + focusTrap._document.removeEventListener('focus', this._listener, true); + this._listener = null; + } + /** + * Refocuses the first element in the FocusTrap if the focus event target was outside + * the FocusTrap. + * + * This is an event listener callback. The event listener is added in runOutsideAngular, + * so all this code runs outside Angular as well. + */ + _trapFocus(focusTrap, event) { + const target = event.target; + const focusTrapRoot = focusTrap._element; + // Don't refocus if target was in an overlay, because the overlay might be associated + // with an element inside the FocusTrap, ex. mat-select. + if (target && !focusTrapRoot.contains(target) && !target.closest?.('div.cdk-overlay-pane')) { + // Some legacy FocusTrap usages have logic that focuses some element on the page + // just before FocusTrap is destroyed. For backwards compatibility, wait + // to be sure FocusTrap is still enabled before refocusing. + setTimeout(() => { + // Check whether focus wasn't put back into the focus trap while the timeout was pending. + if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) { + focusTrap.focusFirstTabbableElement(); + } + }); + } + } +} + +/** Injectable that ensures only the most recently enabled FocusTrap is active. */ +class FocusTrapManager { + constructor() { + // A stack of the FocusTraps on the page. Only the FocusTrap at the + // top of the stack is active. + this._focusTrapStack = []; + } + /** + * Disables the FocusTrap at the top of the stack, and then pushes + * the new FocusTrap onto the stack. + */ + register(focusTrap) { + // Dedupe focusTraps that register multiple times. + this._focusTrapStack = this._focusTrapStack.filter(ft => ft !== focusTrap); + let stack = this._focusTrapStack; + if (stack.length) { + stack[stack.length - 1]._disable(); + } + stack.push(focusTrap); + focusTrap._enable(); + } + /** + * Removes the FocusTrap from the stack, and activates the + * FocusTrap that is the new top of the stack. + */ + deregister(focusTrap) { + focusTrap._disable(); + const stack = this._focusTrapStack; + const i = stack.indexOf(focusTrap); + if (i !== -1) { + stack.splice(i, 1); + if (stack.length) { + stack[stack.length - 1]._enable(); + } + } + } + static #_ = this.ɵfac = function FocusTrapManager_Factory(t) { + return new (t || FocusTrapManager)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: FocusTrapManager, + factory: FocusTrapManager.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FocusTrapManager, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], null, null); +})(); + +/** Factory that allows easy instantiation of configurable focus traps. */ +class ConfigurableFocusTrapFactory { + constructor(_checker, _ngZone, _focusTrapManager, _document, _inertStrategy) { + this._checker = _checker; + this._ngZone = _ngZone; + this._focusTrapManager = _focusTrapManager; + this._document = _document; + // TODO split up the strategies into different modules, similar to DateAdapter. + this._inertStrategy = _inertStrategy || new EventListenerFocusTrapInertStrategy(); + } + create(element, config = { + defer: false + }) { + let configObject; + if (typeof config === 'boolean') { + configObject = { + defer: config + }; + } else { + configObject = config; + } + return new ConfigurableFocusTrap(element, this._checker, this._ngZone, this._document, this._focusTrapManager, this._inertStrategy, configObject); + } + static #_ = this.ɵfac = function ConfigurableFocusTrapFactory_Factory(t) { + return new (t || ConfigurableFocusTrapFactory)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](InteractivityChecker), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](FocusTrapManager), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](FOCUS_TRAP_INERT_STRATEGY, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: ConfigurableFocusTrapFactory, + factory: ConfigurableFocusTrapFactory.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ConfigurableFocusTrapFactory, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: InteractivityChecker + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: FocusTrapManager + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT] + }] + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [FOCUS_TRAP_INERT_STRATEGY] + }] + }], null); +})(); + +/** Gets whether an event could be a faked `mousedown` event dispatched by a screen reader. */ +function isFakeMousedownFromScreenReader(event) { + // Some screen readers will dispatch a fake `mousedown` event when pressing enter or space on + // a clickable element. We can distinguish these events when `event.buttons` is zero, or + // `event.detail` is zero depending on the browser: + // - `event.buttons` works on Firefox, but fails on Chrome. + // - `detail` works on Chrome, but fails on Firefox. + return event.buttons === 0 || event.detail === 0; +} +/** Gets whether an event could be a faked `touchstart` event dispatched by a screen reader. */ +function isFakeTouchstartFromScreenReader(event) { + const touch = event.touches && event.touches[0] || event.changedTouches && event.changedTouches[0]; + // A fake `touchstart` can be distinguished from a real one by looking at the `identifier` + // which is typically >= 0 on a real device versus -1 from a screen reader. Just to be safe, + // we can also look at `radiusX` and `radiusY`. This behavior was observed against a Windows 10 + // device with a touch screen running NVDA v2020.4 and Firefox 85 or Chrome 88. + return !!touch && touch.identifier === -1 && (touch.radiusX == null || touch.radiusX === 1) && (touch.radiusY == null || touch.radiusY === 1); +} + +/** + * Injectable options for the InputModalityDetector. These are shallowly merged with the default + * options. + */ +const INPUT_MODALITY_DETECTOR_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('cdk-input-modality-detector-options'); +/** + * Default options for the InputModalityDetector. + * + * Modifier keys are ignored by default (i.e. when pressed won't cause the service to detect + * keyboard input modality) for two reasons: + * + * 1. Modifier keys are commonly used with mouse to perform actions such as 'right click' or 'open + * in new tab', and are thus less representative of actual keyboard interaction. + * 2. VoiceOver triggers some keyboard events when linearly navigating with Control + Option (but + * confusingly not with Caps Lock). Thus, to have parity with other screen readers, we ignore + * these keys so as to not update the input modality. + * + * Note that we do not by default ignore the right Meta key on Safari because it has the same key + * code as the ContextMenu key on other browsers. When we switch to using event.key, we can + * distinguish between the two. + */ +const INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS = { + ignoreKeys: [_angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.ALT, _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.CONTROL, _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.MAC_META, _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.META, _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_9__.SHIFT] +}; +/** + * The amount of time needed to pass after a touchstart event in order for a subsequent mousedown + * event to be attributed as mouse and not touch. + * + * This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found + * that a value of around 650ms seems appropriate. + */ +const TOUCH_BUFFER_MS = 650; +/** + * Event listener options that enable capturing and also mark the listener as passive if the browser + * supports it. + */ +const modalityEventListenerOptions = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.normalizePassiveListenerOptions)({ + passive: true, + capture: true +}); +/** + * Service that detects the user's input modality. + * + * This service does not update the input modality when a user navigates with a screen reader + * (e.g. linear navigation with VoiceOver, object navigation / browse mode with NVDA, virtual PC + * cursor mode with JAWS). This is in part due to technical limitations (i.e. keyboard events do not + * fire as expected in these modes) but is also arguably the correct behavior. Navigating with a + * screen reader is akin to visually scanning a page, and should not be interpreted as actual user + * input interaction. + * + * When a user is not navigating but *interacting* with a screen reader, this service attempts to + * update the input modality to keyboard, but in general this service's behavior is largely + * undefined. + */ +class InputModalityDetector { + /** The most recently detected input modality. */ + get mostRecentModality() { + return this._modality.value; + } + constructor(_platform, ngZone, document, options) { + this._platform = _platform; + /** + * The most recently detected input modality event target. Is null if no input modality has been + * detected or if the associated event target is null for some unknown reason. + */ + this._mostRecentTarget = null; + /** The underlying BehaviorSubject that emits whenever an input modality is detected. */ + this._modality = new rxjs__WEBPACK_IMPORTED_MODULE_11__.BehaviorSubject(null); + /** + * The timestamp of the last touch input modality. Used to determine whether mousedown events + * should be attributed to mouse or touch. + */ + this._lastTouchMs = 0; + /** + * Handles keydown events. Must be an arrow function in order to preserve the context when it gets + * bound. + */ + this._onKeydown = event => { + // If this is one of the keys we should ignore, then ignore it and don't update the input + // modality to keyboard. + if (this._options?.ignoreKeys?.some(keyCode => keyCode === event.keyCode)) { + return; + } + this._modality.next('keyboard'); + this._mostRecentTarget = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__._getEventTarget)(event); + }; + /** + * Handles mousedown events. Must be an arrow function in order to preserve the context when it + * gets bound. + */ + this._onMousedown = event => { + // Touches trigger both touch and mouse events, so we need to distinguish between mouse events + // that were triggered via mouse vs touch. To do so, check if the mouse event occurs closely + // after the previous touch event. + if (Date.now() - this._lastTouchMs < TOUCH_BUFFER_MS) { + return; + } + // Fake mousedown events are fired by some screen readers when controls are activated by the + // screen reader. Attribute them to keyboard input modality. + this._modality.next(isFakeMousedownFromScreenReader(event) ? 'keyboard' : 'mouse'); + this._mostRecentTarget = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__._getEventTarget)(event); + }; + /** + * Handles touchstart events. Must be an arrow function in order to preserve the context when it + * gets bound. + */ + this._onTouchstart = event => { + // Same scenario as mentioned in _onMousedown, but on touch screen devices, fake touchstart + // events are fired. Again, attribute to keyboard input modality. + if (isFakeTouchstartFromScreenReader(event)) { + this._modality.next('keyboard'); + return; + } + // Store the timestamp of this touch event, as it's used to distinguish between mouse events + // triggered via mouse vs touch. + this._lastTouchMs = Date.now(); + this._modality.next('touch'); + this._mostRecentTarget = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__._getEventTarget)(event); + }; + this._options = { + ...INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS, + ...options + }; + // Skip the first emission as it's null. + this.modalityDetected = this._modality.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_12__.skip)(1)); + this.modalityChanged = this.modalityDetected.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_13__.distinctUntilChanged)()); + // If we're not in a browser, this service should do nothing, as there's no relevant input + // modality to detect. + if (_platform.isBrowser) { + ngZone.runOutsideAngular(() => { + document.addEventListener('keydown', this._onKeydown, modalityEventListenerOptions); + document.addEventListener('mousedown', this._onMousedown, modalityEventListenerOptions); + document.addEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions); + }); + } + } + ngOnDestroy() { + this._modality.complete(); + if (this._platform.isBrowser) { + document.removeEventListener('keydown', this._onKeydown, modalityEventListenerOptions); + document.removeEventListener('mousedown', this._onMousedown, modalityEventListenerOptions); + document.removeEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions); + } + } + static #_ = this.ɵfac = function InputModalityDetector_Factory(t) { + return new (t || InputModalityDetector)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](INPUT_MODALITY_DETECTOR_OPTIONS, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: InputModalityDetector, + factory: InputModalityDetector.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](InputModalityDetector, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: Document, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT] + }] + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [INPUT_MODALITY_DETECTOR_OPTIONS] + }] + }], null); +})(); +const LIVE_ANNOUNCER_ELEMENT_TOKEN = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('liveAnnouncerElement', { + providedIn: 'root', + factory: LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY +}); +/** @docs-private */ +function LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY() { + return null; +} +/** Injection token that can be used to configure the default options for the LiveAnnouncer. */ +const LIVE_ANNOUNCER_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('LIVE_ANNOUNCER_DEFAULT_OPTIONS'); +let uniqueIds = 0; +class LiveAnnouncer { + constructor(elementToken, _ngZone, _document, _defaultOptions) { + this._ngZone = _ngZone; + this._defaultOptions = _defaultOptions; + // We inject the live element and document as `any` because the constructor signature cannot + // reference browser globals (HTMLElement, Document) on non-browser environments, since having + // a class decorator causes TypeScript to preserve the constructor signature types. + this._document = _document; + this._liveElement = elementToken || this._createLiveElement(); + } + announce(message, ...args) { + const defaultOptions = this._defaultOptions; + let politeness; + let duration; + if (args.length === 1 && typeof args[0] === 'number') { + duration = args[0]; + } else { + [politeness, duration] = args; + } + this.clear(); + clearTimeout(this._previousTimeout); + if (!politeness) { + politeness = defaultOptions && defaultOptions.politeness ? defaultOptions.politeness : 'polite'; + } + if (duration == null && defaultOptions) { + duration = defaultOptions.duration; + } + // TODO: ensure changing the politeness works on all environments we support. + this._liveElement.setAttribute('aria-live', politeness); + if (this._liveElement.id) { + this._exposeAnnouncerToModals(this._liveElement.id); + } + // This 100ms timeout is necessary for some browser + screen-reader combinations: + // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout. + // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a + // second time without clearing and then using a non-zero delay. + // (using JAWS 17 at time of this writing). + return this._ngZone.runOutsideAngular(() => { + if (!this._currentPromise) { + this._currentPromise = new Promise(resolve => this._currentResolve = resolve); + } + clearTimeout(this._previousTimeout); + this._previousTimeout = setTimeout(() => { + this._liveElement.textContent = message; + if (typeof duration === 'number') { + this._previousTimeout = setTimeout(() => this.clear(), duration); + } + // For some reason in tests this can be undefined + // Probably related to ZoneJS and every other thing that patches browser APIs in tests + this._currentResolve?.(); + this._currentPromise = this._currentResolve = undefined; + }, 100); + return this._currentPromise; + }); + } + /** + * Clears the current text from the announcer element. Can be used to prevent + * screen readers from reading the text out again while the user is going + * through the page landmarks. + */ + clear() { + if (this._liveElement) { + this._liveElement.textContent = ''; + } + } + ngOnDestroy() { + clearTimeout(this._previousTimeout); + this._liveElement?.remove(); + this._liveElement = null; + this._currentResolve?.(); + this._currentPromise = this._currentResolve = undefined; + } + _createLiveElement() { + const elementClass = 'cdk-live-announcer-element'; + const previousElements = this._document.getElementsByClassName(elementClass); + const liveEl = this._document.createElement('div'); + // Remove any old containers. This can happen when coming in from a server-side-rendered page. + for (let i = 0; i < previousElements.length; i++) { + previousElements[i].remove(); + } + liveEl.classList.add(elementClass); + liveEl.classList.add('cdk-visually-hidden'); + liveEl.setAttribute('aria-atomic', 'true'); + liveEl.setAttribute('aria-live', 'polite'); + liveEl.id = `cdk-live-announcer-${uniqueIds++}`; + this._document.body.appendChild(liveEl); + return liveEl; + } + /** + * Some browsers won't expose the accessibility node of the live announcer element if there is an + * `aria-modal` and the live announcer is outside of it. This method works around the issue by + * pointing the `aria-owns` of all modals to the live announcer element. + */ + _exposeAnnouncerToModals(id) { + // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with + // the `SnakBarContainer` and other usages. + // + // Note that the selector here is limited to CDK overlays at the moment in order to reduce the + // section of the DOM we need to look through. This should cover all the cases we support, but + // the selector can be expanded if it turns out to be too narrow. + const modals = this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]'); + for (let i = 0; i < modals.length; i++) { + const modal = modals[i]; + const ariaOwns = modal.getAttribute('aria-owns'); + if (!ariaOwns) { + modal.setAttribute('aria-owns', id); + } else if (ariaOwns.indexOf(id) === -1) { + modal.setAttribute('aria-owns', ariaOwns + ' ' + id); + } + } + } + static #_ = this.ɵfac = function LiveAnnouncer_Factory(t) { + return new (t || LiveAnnouncer)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](LIVE_ANNOUNCER_ELEMENT_TOKEN, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](LIVE_ANNOUNCER_DEFAULT_OPTIONS, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: LiveAnnouncer, + factory: LiveAnnouncer.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LiveAnnouncer, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [LIVE_ANNOUNCER_ELEMENT_TOKEN] + }] + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT] + }] + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [LIVE_ANNOUNCER_DEFAULT_OPTIONS] + }] + }], null); +})(); +/** + * A directive that works similarly to aria-live, but uses the LiveAnnouncer to ensure compatibility + * with a wider range of browsers and screen readers. + */ +class CdkAriaLive { + /** The aria-live politeness level to use when announcing messages. */ + get politeness() { + return this._politeness; + } + set politeness(value) { + this._politeness = value === 'off' || value === 'assertive' ? value : 'polite'; + if (this._politeness === 'off') { + if (this._subscription) { + this._subscription.unsubscribe(); + this._subscription = null; + } + } else if (!this._subscription) { + this._subscription = this._ngZone.runOutsideAngular(() => { + return this._contentObserver.observe(this._elementRef).subscribe(() => { + // Note that we use textContent here, rather than innerText, in order to avoid a reflow. + const elementText = this._elementRef.nativeElement.textContent; + // The `MutationObserver` fires also for attribute + // changes which we don't want to announce. + if (elementText !== this._previousAnnouncedText) { + this._liveAnnouncer.announce(elementText, this._politeness, this.duration); + this._previousAnnouncedText = elementText; + } + }); + }); + } + } + constructor(_elementRef, _liveAnnouncer, _contentObserver, _ngZone) { + this._elementRef = _elementRef; + this._liveAnnouncer = _liveAnnouncer; + this._contentObserver = _contentObserver; + this._ngZone = _ngZone; + this._politeness = 'polite'; + } + ngOnDestroy() { + if (this._subscription) { + this._subscription.unsubscribe(); + } + } + static #_ = this.ɵfac = function CdkAriaLive_Factory(t) { + return new (t || CdkAriaLive)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](LiveAnnouncer), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_cdk_observers__WEBPACK_IMPORTED_MODULE_14__.ContentObserver), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkAriaLive, + selectors: [["", "cdkAriaLive", ""]], + inputs: { + politeness: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].None, "cdkAriaLive", "politeness"], + duration: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].None, "cdkAriaLiveDuration", "duration"] + }, + exportAs: ["cdkAriaLive"], + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkAriaLive, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdkAriaLive]', + exportAs: 'cdkAriaLive', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef + }, { + type: LiveAnnouncer + }, { + type: _angular_cdk_observers__WEBPACK_IMPORTED_MODULE_14__.ContentObserver + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }], { + politeness: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: ['cdkAriaLive'] + }], + duration: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: ['cdkAriaLiveDuration'] + }] + }); +})(); + +/** Detection mode used for attributing the origin of a focus event. */ +var FocusMonitorDetectionMode; +(function (FocusMonitorDetectionMode) { + /** + * Any mousedown, keydown, or touchstart event that happened in the previous + * tick or the current tick will be used to assign a focus event's origin (to + * either mouse, keyboard, or touch). This is the default option. + */ + FocusMonitorDetectionMode[FocusMonitorDetectionMode["IMMEDIATE"] = 0] = "IMMEDIATE"; + /** + * A focus event's origin is always attributed to the last corresponding + * mousedown, keydown, or touchstart event, no matter how long ago it occurred. + */ + FocusMonitorDetectionMode[FocusMonitorDetectionMode["EVENTUAL"] = 1] = "EVENTUAL"; +})(FocusMonitorDetectionMode || (FocusMonitorDetectionMode = {})); +/** InjectionToken for FocusMonitorOptions. */ +const FOCUS_MONITOR_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('cdk-focus-monitor-default-options'); +/** + * Event listener options that enable capturing and also + * mark the listener as passive if the browser supports it. + */ +const captureEventListenerOptions = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.normalizePassiveListenerOptions)({ + passive: true, + capture: true +}); +/** Monitors mouse and keyboard events to determine the cause of focus events. */ +class FocusMonitor { + constructor(_ngZone, _platform, _inputModalityDetector, /** @breaking-change 11.0.0 make document required */ + document, options) { + this._ngZone = _ngZone; + this._platform = _platform; + this._inputModalityDetector = _inputModalityDetector; + /** The focus origin that the next focus event is a result of. */ + this._origin = null; + /** Whether the window has just been focused. */ + this._windowFocused = false; + /** + * Whether the origin was determined via a touch interaction. Necessary as properly attributing + * focus events to touch interactions requires special logic. + */ + this._originFromTouchInteraction = false; + /** Map of elements being monitored to their info. */ + this._elementInfo = new Map(); + /** The number of elements currently being monitored. */ + this._monitoredElementCount = 0; + /** + * Keeps track of the root nodes to which we've currently bound a focus/blur handler, + * as well as the number of monitored elements that they contain. We have to treat focus/blur + * handlers differently from the rest of the events, because the browser won't emit events + * to the document when focus moves inside of a shadow root. + */ + this._rootNodeFocusListenerCount = new Map(); + /** + * Event listener for `focus` events on the window. + * Needs to be an arrow function in order to preserve the context when it gets bound. + */ + this._windowFocusListener = () => { + // Make a note of when the window regains focus, so we can + // restore the origin info for the focused element. + this._windowFocused = true; + this._windowFocusTimeoutId = window.setTimeout(() => this._windowFocused = false); + }; + /** Subject for stopping our InputModalityDetector subscription. */ + this._stopInputModalityDetector = new rxjs__WEBPACK_IMPORTED_MODULE_3__.Subject(); + /** + * Event listener for `focus` and 'blur' events on the document. + * Needs to be an arrow function in order to preserve the context when it gets bound. + */ + this._rootNodeFocusAndBlurListener = event => { + const target = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__._getEventTarget)(event); + // We need to walk up the ancestor chain in order to support `checkChildren`. + for (let element = target; element; element = element.parentElement) { + if (event.type === 'focus') { + this._onFocus(event, element); + } else { + this._onBlur(event, element); + } + } + }; + this._document = document; + this._detectionMode = options?.detectionMode || FocusMonitorDetectionMode.IMMEDIATE; + } + monitor(element, checkChildren = false) { + const nativeElement = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_15__.coerceElement)(element); + // Do nothing if we're not on the browser platform or the passed in node isn't an element. + if (!this._platform.isBrowser || nativeElement.nodeType !== 1) { + // Note: we don't want the observable to emit at all so we don't pass any parameters. + return (0,rxjs__WEBPACK_IMPORTED_MODULE_16__.of)(); + } + // If the element is inside the shadow DOM, we need to bind our focus/blur listeners to + // the shadow root, rather than the `document`, because the browser won't emit focus events + // to the `document`, if focus is moving within the same shadow root. + const rootNode = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__._getShadowRoot)(nativeElement) || this._getDocument(); + const cachedInfo = this._elementInfo.get(nativeElement); + // Check if we're already monitoring this element. + if (cachedInfo) { + if (checkChildren) { + // TODO(COMP-318): this can be problematic, because it'll turn all non-checkChildren + // observers into ones that behave as if `checkChildren` was turned on. We need a more + // robust solution. + cachedInfo.checkChildren = true; + } + return cachedInfo.subject; + } + // Create monitored element info. + const info = { + checkChildren: checkChildren, + subject: new rxjs__WEBPACK_IMPORTED_MODULE_3__.Subject(), + rootNode + }; + this._elementInfo.set(nativeElement, info); + this._registerGlobalListeners(info); + return info.subject; + } + stopMonitoring(element) { + const nativeElement = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_15__.coerceElement)(element); + const elementInfo = this._elementInfo.get(nativeElement); + if (elementInfo) { + elementInfo.subject.complete(); + this._setClasses(nativeElement); + this._elementInfo.delete(nativeElement); + this._removeGlobalListeners(elementInfo); + } + } + focusVia(element, origin, options) { + const nativeElement = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_15__.coerceElement)(element); + const focusedElement = this._getDocument().activeElement; + // If the element is focused already, calling `focus` again won't trigger the event listener + // which means that the focus classes won't be updated. If that's the case, update the classes + // directly without waiting for an event. + if (nativeElement === focusedElement) { + this._getClosestElementsInfo(nativeElement).forEach(([currentElement, info]) => this._originChanged(currentElement, origin, info)); + } else { + this._setOrigin(origin); + // `focus` isn't available on the server + if (typeof nativeElement.focus === 'function') { + nativeElement.focus(options); + } + } + } + ngOnDestroy() { + this._elementInfo.forEach((_info, element) => this.stopMonitoring(element)); + } + /** Access injected document if available or fallback to global document reference */ + _getDocument() { + return this._document || document; + } + /** Use defaultView of injected document if available or fallback to global window reference */ + _getWindow() { + const doc = this._getDocument(); + return doc.defaultView || window; + } + _getFocusOrigin(focusEventTarget) { + if (this._origin) { + // If the origin was realized via a touch interaction, we need to perform additional checks + // to determine whether the focus origin should be attributed to touch or program. + if (this._originFromTouchInteraction) { + return this._shouldBeAttributedToTouch(focusEventTarget) ? 'touch' : 'program'; + } else { + return this._origin; + } + } + // If the window has just regained focus, we can restore the most recent origin from before the + // window blurred. Otherwise, we've reached the point where we can't identify the source of the + // focus. This typically means one of two things happened: + // + // 1) The element was programmatically focused, or + // 2) The element was focused via screen reader navigation (which generally doesn't fire + // events). + // + // Because we can't distinguish between these two cases, we default to setting `program`. + if (this._windowFocused && this._lastFocusOrigin) { + return this._lastFocusOrigin; + } + // If the interaction is coming from an input label, we consider it a mouse interactions. + // This is a special case where focus moves on `click`, rather than `mousedown` which breaks + // our detection, because all our assumptions are for `mousedown`. We need to handle this + // special case, because it's very common for checkboxes and radio buttons. + if (focusEventTarget && this._isLastInteractionFromInputLabel(focusEventTarget)) { + return 'mouse'; + } + return 'program'; + } + /** + * Returns whether the focus event should be attributed to touch. Recall that in IMMEDIATE mode, a + * touch origin isn't immediately reset at the next tick (see _setOrigin). This means that when we + * handle a focus event following a touch interaction, we need to determine whether (1) the focus + * event was directly caused by the touch interaction or (2) the focus event was caused by a + * subsequent programmatic focus call triggered by the touch interaction. + * @param focusEventTarget The target of the focus event under examination. + */ + _shouldBeAttributedToTouch(focusEventTarget) { + // Please note that this check is not perfect. Consider the following edge case: + // + //
+ //
+ //
+ // + // Suppose there is a FocusMonitor in IMMEDIATE mode attached to #parent. When the user touches + // #child, #parent is programmatically focused. This code will attribute the focus to touch + // instead of program. This is a relatively minor edge-case that can be worked around by using + // focusVia(parent, 'program') to focus #parent. + return this._detectionMode === FocusMonitorDetectionMode.EVENTUAL || !!focusEventTarget?.contains(this._inputModalityDetector._mostRecentTarget); + } + /** + * Sets the focus classes on the element based on the given focus origin. + * @param element The element to update the classes on. + * @param origin The focus origin. + */ + _setClasses(element, origin) { + element.classList.toggle('cdk-focused', !!origin); + element.classList.toggle('cdk-touch-focused', origin === 'touch'); + element.classList.toggle('cdk-keyboard-focused', origin === 'keyboard'); + element.classList.toggle('cdk-mouse-focused', origin === 'mouse'); + element.classList.toggle('cdk-program-focused', origin === 'program'); + } + /** + * Updates the focus origin. If we're using immediate detection mode, we schedule an async + * function to clear the origin at the end of a timeout. The duration of the timeout depends on + * the origin being set. + * @param origin The origin to set. + * @param isFromInteraction Whether we are setting the origin from an interaction event. + */ + _setOrigin(origin, isFromInteraction = false) { + this._ngZone.runOutsideAngular(() => { + this._origin = origin; + this._originFromTouchInteraction = origin === 'touch' && isFromInteraction; + // If we're in IMMEDIATE mode, reset the origin at the next tick (or in `TOUCH_BUFFER_MS` ms + // for a touch event). We reset the origin at the next tick because Firefox focuses one tick + // after the interaction event. We wait `TOUCH_BUFFER_MS` ms before resetting the origin for + // a touch event because when a touch event is fired, the associated focus event isn't yet in + // the event queue. Before doing so, clear any pending timeouts. + if (this._detectionMode === FocusMonitorDetectionMode.IMMEDIATE) { + clearTimeout(this._originTimeoutId); + const ms = this._originFromTouchInteraction ? TOUCH_BUFFER_MS : 1; + this._originTimeoutId = setTimeout(() => this._origin = null, ms); + } + }); + } + /** + * Handles focus events on a registered element. + * @param event The focus event. + * @param element The monitored element. + */ + _onFocus(event, element) { + // NOTE(mmalerba): We currently set the classes based on the focus origin of the most recent + // focus event affecting the monitored element. If we want to use the origin of the first event + // instead we should check for the cdk-focused class here and return if the element already has + // it. (This only matters for elements that have includesChildren = true). + // If we are not counting child-element-focus as focused, make sure that the event target is the + // monitored element itself. + const elementInfo = this._elementInfo.get(element); + const focusEventTarget = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__._getEventTarget)(event); + if (!elementInfo || !elementInfo.checkChildren && element !== focusEventTarget) { + return; + } + this._originChanged(element, this._getFocusOrigin(focusEventTarget), elementInfo); + } + /** + * Handles blur events on a registered element. + * @param event The blur event. + * @param element The monitored element. + */ + _onBlur(event, element) { + // If we are counting child-element-focus as focused, make sure that we aren't just blurring in + // order to focus another child of the monitored element. + const elementInfo = this._elementInfo.get(element); + if (!elementInfo || elementInfo.checkChildren && event.relatedTarget instanceof Node && element.contains(event.relatedTarget)) { + return; + } + this._setClasses(element); + this._emitOrigin(elementInfo, null); + } + _emitOrigin(info, origin) { + if (info.subject.observers.length) { + this._ngZone.run(() => info.subject.next(origin)); + } + } + _registerGlobalListeners(elementInfo) { + if (!this._platform.isBrowser) { + return; + } + const rootNode = elementInfo.rootNode; + const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode) || 0; + if (!rootNodeFocusListeners) { + this._ngZone.runOutsideAngular(() => { + rootNode.addEventListener('focus', this._rootNodeFocusAndBlurListener, captureEventListenerOptions); + rootNode.addEventListener('blur', this._rootNodeFocusAndBlurListener, captureEventListenerOptions); + }); + } + this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners + 1); + // Register global listeners when first element is monitored. + if (++this._monitoredElementCount === 1) { + // Note: we listen to events in the capture phase so we + // can detect them even if the user stops propagation. + this._ngZone.runOutsideAngular(() => { + const window = this._getWindow(); + window.addEventListener('focus', this._windowFocusListener); + }); + // The InputModalityDetector is also just a collection of global listeners. + this._inputModalityDetector.modalityDetected.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_17__.takeUntil)(this._stopInputModalityDetector)).subscribe(modality => { + this._setOrigin(modality, true /* isFromInteraction */); + }); + } + } + + _removeGlobalListeners(elementInfo) { + const rootNode = elementInfo.rootNode; + if (this._rootNodeFocusListenerCount.has(rootNode)) { + const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode); + if (rootNodeFocusListeners > 1) { + this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners - 1); + } else { + rootNode.removeEventListener('focus', this._rootNodeFocusAndBlurListener, captureEventListenerOptions); + rootNode.removeEventListener('blur', this._rootNodeFocusAndBlurListener, captureEventListenerOptions); + this._rootNodeFocusListenerCount.delete(rootNode); + } + } + // Unregister global listeners when last element is unmonitored. + if (! --this._monitoredElementCount) { + const window = this._getWindow(); + window.removeEventListener('focus', this._windowFocusListener); + // Equivalently, stop our InputModalityDetector subscription. + this._stopInputModalityDetector.next(); + // Clear timeouts for all potentially pending timeouts to prevent the leaks. + clearTimeout(this._windowFocusTimeoutId); + clearTimeout(this._originTimeoutId); + } + } + /** Updates all the state on an element once its focus origin has changed. */ + _originChanged(element, origin, elementInfo) { + this._setClasses(element, origin); + this._emitOrigin(elementInfo, origin); + this._lastFocusOrigin = origin; + } + /** + * Collects the `MonitoredElementInfo` of a particular element and + * all of its ancestors that have enabled `checkChildren`. + * @param element Element from which to start the search. + */ + _getClosestElementsInfo(element) { + const results = []; + this._elementInfo.forEach((info, currentElement) => { + if (currentElement === element || info.checkChildren && currentElement.contains(element)) { + results.push([currentElement, info]); + } + }); + return results; + } + /** + * Returns whether an interaction is likely to have come from the user clicking the `label` of + * an `input` or `textarea` in order to focus it. + * @param focusEventTarget Target currently receiving focus. + */ + _isLastInteractionFromInputLabel(focusEventTarget) { + const { + _mostRecentTarget: mostRecentTarget, + mostRecentModality + } = this._inputModalityDetector; + // If the last interaction used the mouse on an element contained by one of the labels + // of an `input`/`textarea` that is currently focused, it is very likely that the + // user redirected focus using the label. + if (mostRecentModality !== 'mouse' || !mostRecentTarget || mostRecentTarget === focusEventTarget || focusEventTarget.nodeName !== 'INPUT' && focusEventTarget.nodeName !== 'TEXTAREA' || focusEventTarget.disabled) { + return false; + } + const labels = focusEventTarget.labels; + if (labels) { + for (let i = 0; i < labels.length; i++) { + if (labels[i].contains(mostRecentTarget)) { + return true; + } + } + } + return false; + } + static #_ = this.ɵfac = function FocusMonitor_Factory(t) { + return new (t || FocusMonitor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](InputModalityDetector), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](FOCUS_MONITOR_DEFAULT_OPTIONS, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: FocusMonitor, + factory: FocusMonitor.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FocusMonitor, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform + }, { + type: InputModalityDetector + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT] + }] + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [FOCUS_MONITOR_DEFAULT_OPTIONS] + }] + }], null); +})(); +/** + * Directive that determines how a particular element was focused (via keyboard, mouse, touch, or + * programmatically) and adds corresponding classes to the element. + * + * There are two variants of this directive: + * 1) cdkMonitorElementFocus: does not consider an element to be focused if one of its children is + * focused. + * 2) cdkMonitorSubtreeFocus: considers an element focused if it or any of its children are focused. + */ +class CdkMonitorFocus { + constructor(_elementRef, _focusMonitor) { + this._elementRef = _elementRef; + this._focusMonitor = _focusMonitor; + this._focusOrigin = null; + this.cdkFocusChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); + } + get focusOrigin() { + return this._focusOrigin; + } + ngAfterViewInit() { + const element = this._elementRef.nativeElement; + this._monitorSubscription = this._focusMonitor.monitor(element, element.nodeType === 1 && element.hasAttribute('cdkMonitorSubtreeFocus')).subscribe(origin => { + this._focusOrigin = origin; + this.cdkFocusChange.emit(origin); + }); + } + ngOnDestroy() { + this._focusMonitor.stopMonitoring(this._elementRef); + if (this._monitorSubscription) { + this._monitorSubscription.unsubscribe(); + } + } + static #_ = this.ɵfac = function CdkMonitorFocus_Factory(t) { + return new (t || CdkMonitorFocus)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](FocusMonitor)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkMonitorFocus, + selectors: [["", "cdkMonitorElementFocus", ""], ["", "cdkMonitorSubtreeFocus", ""]], + outputs: { + cdkFocusChange: "cdkFocusChange" + }, + exportAs: ["cdkMonitorFocus"], + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkMonitorFocus, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]', + exportAs: 'cdkMonitorFocus', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef + }, { + type: FocusMonitor + }], { + cdkFocusChange: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output + }] + }); +})(); + +/** Set of possible high-contrast mode backgrounds. */ +var HighContrastMode; +(function (HighContrastMode) { + HighContrastMode[HighContrastMode["NONE"] = 0] = "NONE"; + HighContrastMode[HighContrastMode["BLACK_ON_WHITE"] = 1] = "BLACK_ON_WHITE"; + HighContrastMode[HighContrastMode["WHITE_ON_BLACK"] = 2] = "WHITE_ON_BLACK"; +})(HighContrastMode || (HighContrastMode = {})); +/** CSS class applied to the document body when in black-on-white high-contrast mode. */ +const BLACK_ON_WHITE_CSS_CLASS = 'cdk-high-contrast-black-on-white'; +/** CSS class applied to the document body when in white-on-black high-contrast mode. */ +const WHITE_ON_BLACK_CSS_CLASS = 'cdk-high-contrast-white-on-black'; +/** CSS class applied to the document body when in high-contrast mode. */ +const HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS = 'cdk-high-contrast-active'; +/** + * Service to determine whether the browser is currently in a high-contrast-mode environment. + * + * Microsoft Windows supports an accessibility feature called "High Contrast Mode". This mode + * changes the appearance of all applications, including web applications, to dramatically increase + * contrast. + * + * IE, Edge, and Firefox currently support this mode. Chrome does not support Windows High Contrast + * Mode. This service does not detect high-contrast mode as added by the Chrome "High Contrast" + * browser extension. + */ +class HighContrastModeDetector { + constructor(_platform, document) { + this._platform = _platform; + this._document = document; + this._breakpointSubscription = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_cdk_layout__WEBPACK_IMPORTED_MODULE_18__.BreakpointObserver).observe('(forced-colors: active)').subscribe(() => { + if (this._hasCheckedHighContrastMode) { + this._hasCheckedHighContrastMode = false; + this._applyBodyHighContrastModeCssClasses(); + } + }); + } + /** Gets the current high-contrast-mode for the page. */ + getHighContrastMode() { + if (!this._platform.isBrowser) { + return HighContrastMode.NONE; + } + // Create a test element with an arbitrary background-color that is neither black nor + // white; high-contrast mode will coerce the color to either black or white. Also ensure that + // appending the test element to the DOM does not affect layout by absolutely positioning it + const testElement = this._document.createElement('div'); + testElement.style.backgroundColor = 'rgb(1,2,3)'; + testElement.style.position = 'absolute'; + this._document.body.appendChild(testElement); + // Get the computed style for the background color, collapsing spaces to normalize between + // browsers. Once we get this color, we no longer need the test element. Access the `window` + // via the document so we can fake it in tests. Note that we have extra null checks, because + // this logic will likely run during app bootstrap and throwing can break the entire app. + const documentWindow = this._document.defaultView || window; + const computedStyle = documentWindow && documentWindow.getComputedStyle ? documentWindow.getComputedStyle(testElement) : null; + const computedColor = (computedStyle && computedStyle.backgroundColor || '').replace(/ /g, ''); + testElement.remove(); + switch (computedColor) { + // Pre Windows 11 dark theme. + case 'rgb(0,0,0)': + // Windows 11 dark themes. + case 'rgb(45,50,54)': + case 'rgb(32,32,32)': + return HighContrastMode.WHITE_ON_BLACK; + // Pre Windows 11 light theme. + case 'rgb(255,255,255)': + // Windows 11 light theme. + case 'rgb(255,250,239)': + return HighContrastMode.BLACK_ON_WHITE; + } + return HighContrastMode.NONE; + } + ngOnDestroy() { + this._breakpointSubscription.unsubscribe(); + } + /** Applies CSS classes indicating high-contrast mode to document body (browser-only). */ + _applyBodyHighContrastModeCssClasses() { + if (!this._hasCheckedHighContrastMode && this._platform.isBrowser && this._document.body) { + const bodyClasses = this._document.body.classList; + bodyClasses.remove(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, BLACK_ON_WHITE_CSS_CLASS, WHITE_ON_BLACK_CSS_CLASS); + this._hasCheckedHighContrastMode = true; + const mode = this.getHighContrastMode(); + if (mode === HighContrastMode.BLACK_ON_WHITE) { + bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, BLACK_ON_WHITE_CSS_CLASS); + } else if (mode === HighContrastMode.WHITE_ON_BLACK) { + bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, WHITE_ON_BLACK_CSS_CLASS); + } + } + } + static #_ = this.ɵfac = function HighContrastModeDetector_Factory(t) { + return new (t || HighContrastModeDetector)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: HighContrastModeDetector, + factory: HighContrastModeDetector.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HighContrastModeDetector, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT] + }] + }], null); +})(); +class A11yModule { + constructor(highContrastModeDetector) { + highContrastModeDetector._applyBodyHighContrastModeCssClasses(); + } + static #_ = this.ɵfac = function A11yModule_Factory(t) { + return new (t || A11yModule)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](HighContrastModeDetector)); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ + type: A11yModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ + imports: [_angular_cdk_observers__WEBPACK_IMPORTED_MODULE_14__.ObserversModule] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](A11yModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, + args: [{ + imports: [_angular_cdk_observers__WEBPACK_IMPORTED_MODULE_14__.ObserversModule, CdkAriaLive, CdkTrapFocus, CdkMonitorFocus], + exports: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus] + }] + }], () => [{ + type: HighContrastModeDetector + }], null); +})(); + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 78143: +/*!**********************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/accordion.mjs ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ CDK_ACCORDION: () => (/* binding */ CDK_ACCORDION), +/* harmony export */ CdkAccordion: () => (/* binding */ CdkAccordion), +/* harmony export */ CdkAccordionItem: () => (/* binding */ CdkAccordionItem), +/* harmony export */ CdkAccordionModule: () => (/* binding */ CdkAccordionModule) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/collections */ 77774); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ 36421); + + + + + +/** Used to generate unique ID for each accordion. */ +let nextId$1 = 0; +/** + * Injection token that can be used to reference instances of `CdkAccordion`. It serves + * as alternative token to the actual `CdkAccordion` class which could cause unnecessary + * retention of the class and its directive metadata. + */ +const CDK_ACCORDION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('CdkAccordion'); +/** + * Directive whose purpose is to manage the expanded state of CdkAccordionItem children. + */ +class CdkAccordion { + constructor() { + /** Emits when the state of the accordion changes */ + this._stateChanges = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + /** Stream that emits true/false when openAll/closeAll is triggered. */ + this._openCloseAllActions = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + /** A readonly id value to use for unique selection coordination. */ + this.id = `cdk-accordion-${nextId$1++}`; + /** Whether the accordion should allow multiple expanded accordion items simultaneously. */ + this.multi = false; + } + /** Opens all enabled accordion items in an accordion where multi is enabled. */ + openAll() { + if (this.multi) { + this._openCloseAllActions.next(true); + } + } + /** Closes all enabled accordion items. */ + closeAll() { + this._openCloseAllActions.next(false); + } + ngOnChanges(changes) { + this._stateChanges.next(changes); + } + ngOnDestroy() { + this._stateChanges.complete(); + this._openCloseAllActions.complete(); + } + static #_ = this.ɵfac = function CdkAccordion_Factory(t) { + return new (t || CdkAccordion)(); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkAccordion, + selectors: [["cdk-accordion"], ["", "cdkAccordion", ""]], + inputs: { + multi: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "multi", "multi", _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute] + }, + exportAs: ["cdkAccordion"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([{ + provide: CDK_ACCORDION, + useExisting: CdkAccordion + }]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputTransformsFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkAccordion, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: 'cdk-accordion, [cdkAccordion]', + exportAs: 'cdkAccordion', + providers: [{ + provide: CDK_ACCORDION, + useExisting: CdkAccordion + }], + standalone: true + }] + }], null, { + multi: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute + }] + }] + }); +})(); + +/** Used to generate unique ID for each accordion item. */ +let nextId = 0; +/** + * An basic directive expected to be extended and decorated as a component. Sets up all + * events and attributes needed to be managed by a CdkAccordion parent. + */ +class CdkAccordionItem { + /** Whether the AccordionItem is expanded. */ + get expanded() { + return this._expanded; + } + set expanded(expanded) { + // Only emit events and update the internal value if the value changes. + if (this._expanded !== expanded) { + this._expanded = expanded; + this.expandedChange.emit(expanded); + if (expanded) { + this.opened.emit(); + /** + * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem, + * the name value is the id of the accordion. + */ + const accordionId = this.accordion ? this.accordion.id : this.id; + this._expansionDispatcher.notify(this.id, accordionId); + } else { + this.closed.emit(); + } + // Ensures that the animation will run when the value is set outside of an `@Input`. + // This includes cases like the open, close and toggle methods. + this._changeDetectorRef.markForCheck(); + } + } + constructor(accordion, _changeDetectorRef, _expansionDispatcher) { + this.accordion = accordion; + this._changeDetectorRef = _changeDetectorRef; + this._expansionDispatcher = _expansionDispatcher; + /** Subscription to openAll/closeAll events. */ + this._openCloseAllSubscription = rxjs__WEBPACK_IMPORTED_MODULE_2__.Subscription.EMPTY; + /** Event emitted every time the AccordionItem is closed. */ + this.closed = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); + /** Event emitted every time the AccordionItem is opened. */ + this.opened = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); + /** Event emitted when the AccordionItem is destroyed. */ + this.destroyed = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); + /** + * Emits whenever the expanded state of the accordion changes. + * Primarily used to facilitate two-way binding. + * @docs-private + */ + this.expandedChange = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); + /** The unique AccordionItem id. */ + this.id = `cdk-accordion-child-${nextId++}`; + this._expanded = false; + /** Whether the AccordionItem is disabled. */ + this.disabled = false; + /** Unregister function for _expansionDispatcher. */ + this._removeUniqueSelectionListener = () => {}; + this._removeUniqueSelectionListener = _expansionDispatcher.listen((id, accordionId) => { + if (this.accordion && !this.accordion.multi && this.accordion.id === accordionId && this.id !== id) { + this.expanded = false; + } + }); + // When an accordion item is hosted in an accordion, subscribe to open/close events. + if (this.accordion) { + this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions(); + } + } + /** Emits an event for the accordion item being destroyed. */ + ngOnDestroy() { + this.opened.complete(); + this.closed.complete(); + this.destroyed.emit(); + this.destroyed.complete(); + this._removeUniqueSelectionListener(); + this._openCloseAllSubscription.unsubscribe(); + } + /** Toggles the expanded state of the accordion item. */ + toggle() { + if (!this.disabled) { + this.expanded = !this.expanded; + } + } + /** Sets the expanded state of the accordion item to false. */ + close() { + if (!this.disabled) { + this.expanded = false; + } + } + /** Sets the expanded state of the accordion item to true. */ + open() { + if (!this.disabled) { + this.expanded = true; + } + } + _subscribeToOpenCloseAllActions() { + return this.accordion._openCloseAllActions.subscribe(expanded => { + // Only change expanded state if item is enabled + if (!this.disabled) { + this.expanded = expanded; + } + }); + } + static #_ = this.ɵfac = function CdkAccordionItem_Factory(t) { + return new (t || CdkAccordionItem)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](CDK_ACCORDION, 12), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__.UniqueSelectionDispatcher)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkAccordionItem, + selectors: [["cdk-accordion-item"], ["", "cdkAccordionItem", ""]], + inputs: { + expanded: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "expanded", "expanded", _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute], + disabled: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "disabled", "disabled", _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute] + }, + outputs: { + closed: "closed", + opened: "opened", + destroyed: "destroyed", + expandedChange: "expandedChange" + }, + exportAs: ["cdkAccordionItem"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([ + // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from + // registering to the same accordion. + { + provide: CDK_ACCORDION, + useValue: undefined + }]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputTransformsFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkAccordionItem, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: 'cdk-accordion-item, [cdkAccordionItem]', + exportAs: 'cdkAccordionItem', + providers: [ + // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from + // registering to the same accordion. + { + provide: CDK_ACCORDION, + useValue: undefined + }], + standalone: true + }] + }], () => [{ + type: CdkAccordion, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [CDK_ACCORDION] + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.SkipSelf + }] + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef + }, { + type: _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_3__.UniqueSelectionDispatcher + }], { + closed: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output + }], + opened: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output + }], + destroyed: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output + }], + expandedChange: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output + }], + expanded: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute + }] + }], + disabled: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute + }] + }] + }); +})(); +class CdkAccordionModule { + static #_ = this.ɵfac = function CdkAccordionModule_Factory(t) { + return new (t || CdkAccordionModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ + type: CdkAccordionModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({}); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkAccordionModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, + args: [{ + imports: [CdkAccordion, CdkAccordionItem], + exports: [CdkAccordion, CdkAccordionItem] + }] + }], null, null); +})(); + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 457: +/*!*****************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/bidi.mjs ***! + \*****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ BidiModule: () => (/* binding */ BidiModule), +/* harmony export */ DIR_DOCUMENT: () => (/* binding */ DIR_DOCUMENT), +/* harmony export */ Dir: () => (/* binding */ Dir), +/* harmony export */ Directionality: () => (/* binding */ Directionality) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ 39191); + + + + +/** + * Injection token used to inject the document into Directionality. + * This is used so that the value can be faked in tests. + * + * We can't use the real document in tests because changing the real `dir` causes geometry-based + * tests in Safari to fail. + * + * We also can't re-provide the DOCUMENT token from platform-browser because the unit tests + * themselves use things like `querySelector` in test code. + * + * This token is defined in a separate file from Directionality as a workaround for + * https://github.com/angular/angular/issues/22559 + * + * @docs-private + */ +const DIR_DOCUMENT = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('cdk-dir-doc', { + providedIn: 'root', + factory: DIR_DOCUMENT_FACTORY +}); +/** @docs-private */ +function DIR_DOCUMENT_FACTORY() { + return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT); +} + +/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */ +const RTL_LOCALE_PATTERN = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i; +/** Resolves a string value to a specific direction. */ +function _resolveDirectionality(rawValue) { + const value = rawValue?.toLowerCase() || ''; + if (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) { + return RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr'; + } + return value === 'rtl' ? 'rtl' : 'ltr'; +} +/** + * The directionality (LTR / RTL) context for the application (or a subtree of it). + * Exposes the current direction and a stream of direction changes. + */ +class Directionality { + constructor(_document) { + /** The current 'ltr' or 'rtl' value. */ + this.value = 'ltr'; + /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */ + this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); + if (_document) { + const bodyDir = _document.body ? _document.body.dir : null; + const htmlDir = _document.documentElement ? _document.documentElement.dir : null; + this.value = _resolveDirectionality(bodyDir || htmlDir || 'ltr'); + } + } + ngOnDestroy() { + this.change.complete(); + } + static #_ = this.ɵfac = function Directionality_Factory(t) { + return new (t || Directionality)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](DIR_DOCUMENT, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: Directionality, + factory: Directionality.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](Directionality, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [DIR_DOCUMENT] + }] + }], null); +})(); + +/** + * Directive to listen for changes of direction of part of the DOM. + * + * Provides itself as Directionality such that descendant directives only need to ever inject + * Directionality to get the closest direction. + */ +class Dir { + constructor() { + /** Normalized direction that accounts for invalid/unsupported values. */ + this._dir = 'ltr'; + /** Whether the `value` has been set to its initial value. */ + this._isInitialized = false; + /** Event emitted when the direction changes. */ + this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); + } + /** @docs-private */ + get dir() { + return this._dir; + } + set dir(value) { + const previousValue = this._dir; + // Note: `_resolveDirectionality` resolves the language based on the browser's language, + // whereas the browser does it based on the content of the element. Since doing so based + // on the content can be expensive, for now we're doing the simpler matching. + this._dir = _resolveDirectionality(value); + this._rawDir = value; + if (previousValue !== this._dir && this._isInitialized) { + this.change.emit(this._dir); + } + } + /** Current layout direction of the element. */ + get value() { + return this.dir; + } + /** Initialize once default value has been set. */ + ngAfterContentInit() { + this._isInitialized = true; + } + ngOnDestroy() { + this.change.complete(); + } + static #_ = this.ɵfac = function Dir_Factory(t) { + return new (t || Dir)(); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: Dir, + selectors: [["", "dir", ""]], + hostVars: 1, + hostBindings: function Dir_HostBindings(rf, ctx) { + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("dir", ctx._rawDir); + } + }, + inputs: { + dir: "dir" + }, + outputs: { + change: "dirChange" + }, + exportAs: ["dir"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([{ + provide: Directionality, + useExisting: Dir + }])] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](Dir, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[dir]', + providers: [{ + provide: Directionality, + useExisting: Dir + }], + host: { + '[attr.dir]': '_rawDir' + }, + exportAs: 'dir', + standalone: true + }] + }], null, { + change: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output, + args: ['dirChange'] + }], + dir: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); +class BidiModule { + static #_ = this.ɵfac = function BidiModule_Factory(t) { + return new (t || BidiModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ + type: BidiModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({}); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BidiModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, + args: [{ + imports: [Dir], + exports: [Dir] + }] + }], null, null); +})(); + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 64953: +/*!****************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/cdk.mjs ***! + \****************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ VERSION: () => (/* binding */ VERSION) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); + + +/** Current version of the Angular Component Development Kit. */ +const VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.Version('17.3.3'); + + +/***/ }), + +/***/ 79663: +/*!*********************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/coercion.mjs ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ _isNumberValue: () => (/* binding */ _isNumberValue), +/* harmony export */ coerceArray: () => (/* binding */ coerceArray), +/* harmony export */ coerceBooleanProperty: () => (/* binding */ coerceBooleanProperty), +/* harmony export */ coerceCssPixelValue: () => (/* binding */ coerceCssPixelValue), +/* harmony export */ coerceElement: () => (/* binding */ coerceElement), +/* harmony export */ coerceNumberProperty: () => (/* binding */ coerceNumberProperty), +/* harmony export */ coerceStringArray: () => (/* binding */ coerceStringArray) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); + + +/** Coerces a data-bound value (typically a string) to a boolean. */ +function coerceBooleanProperty(value) { + return value != null && `${value}` !== 'false'; +} +function coerceNumberProperty(value, fallbackValue = 0) { + return _isNumberValue(value) ? Number(value) : fallbackValue; +} +/** + * Whether the provided value is considered a number. + * @docs-private + */ +function _isNumberValue(value) { + // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string, + // and other non-number values as NaN, where Number just uses 0) but it considers the string + // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN. + return !isNaN(parseFloat(value)) && !isNaN(Number(value)); +} +function coerceArray(value) { + return Array.isArray(value) ? value : [value]; +} + +/** Coerces a value to a CSS pixel value. */ +function coerceCssPixelValue(value) { + if (value == null) { + return ''; + } + return typeof value === 'string' ? value : `${value}px`; +} + +/** + * Coerces an ElementRef or an Element into an element. + * Useful for APIs that can accept either a ref or the native element itself. + */ +function coerceElement(elementOrRef) { + return elementOrRef instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef ? elementOrRef.nativeElement : elementOrRef; +} + +/** + * Coerces a value to an array of trimmed non-empty strings. + * Any input that is not an array, `null` or `undefined` will be turned into a string + * via `toString()` and subsequently split with the given separator. + * `null` and `undefined` will result in an empty array. + * This results in the following outcomes: + * - `null` -> `[]` + * - `[null]` -> `["null"]` + * - `["a", "b ", " "]` -> `["a", "b"]` + * - `[1, [2, 3]]` -> `["1", "2,3"]` + * - `[{ a: 0 }]` -> `["[object Object]"]` + * - `{ a: 0 }` -> `["[object", "Object]"]` + * + * Useful for defining CSS classes or table columns. + * @param value the value to coerce into an array of strings + * @param separator split-separator if value isn't an array + */ +function coerceStringArray(value, separator = /\s+/) { + const result = []; + if (value != null) { + const sourceValues = Array.isArray(value) ? value : `${value}`.split(separator); + for (const sourceValue of sourceValues) { + const trimmedString = `${sourceValue}`.trim(); + if (trimmedString) { + result.push(trimmedString); + } + } + } + return result; +} + + +/***/ }), + +/***/ 77774: +/*!************************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/collections.mjs ***! + \************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ArrayDataSource: () => (/* binding */ ArrayDataSource), +/* harmony export */ DataSource: () => (/* binding */ DataSource), +/* harmony export */ SelectionModel: () => (/* binding */ SelectionModel), +/* harmony export */ UniqueSelectionDispatcher: () => (/* binding */ UniqueSelectionDispatcher), +/* harmony export */ _DisposeViewRepeaterStrategy: () => (/* binding */ _DisposeViewRepeaterStrategy), +/* harmony export */ _RecycleViewRepeaterStrategy: () => (/* binding */ _RecycleViewRepeaterStrategy), +/* harmony export */ _VIEW_REPEATER_STRATEGY: () => (/* binding */ _VIEW_REPEATER_STRATEGY), +/* harmony export */ _ViewRepeaterOperation: () => (/* binding */ _ViewRepeaterOperation), +/* harmony export */ getMultipleValuesInSingleSelectionError: () => (/* binding */ getMultipleValuesInSingleSelectionError), +/* harmony export */ isDataSource: () => (/* binding */ isDataSource) +/* harmony export */ }); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ 60381); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 59918); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ 13901); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 96623); + + + +class DataSource {} +/** Checks whether an object is a data source. */ +function isDataSource(value) { + // Check if the value is a DataSource by observing if it has a connect function. Cannot + // be checked as an `instanceof DataSource` since people could create their own sources + // that match the interface, but don't extend DataSource. We also can't use `isObservable` + // here, because of some internal apps. + return value && typeof value.connect === 'function' && !(value instanceof rxjs__WEBPACK_IMPORTED_MODULE_0__.ConnectableObservable); +} + +/** DataSource wrapper for a native array. */ +class ArrayDataSource extends DataSource { + constructor(_data) { + super(); + this._data = _data; + } + connect() { + return (0,rxjs__WEBPACK_IMPORTED_MODULE_1__.isObservable)(this._data) ? this._data : (0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)(this._data); + } + disconnect() {} +} + +/** Indicates how a view was changed by a {@link _ViewRepeater}. */ +var _ViewRepeaterOperation; +(function (_ViewRepeaterOperation) { + /** The content of an existing view was replaced with another item. */ + _ViewRepeaterOperation[_ViewRepeaterOperation["REPLACED"] = 0] = "REPLACED"; + /** A new view was created with `createEmbeddedView`. */ + _ViewRepeaterOperation[_ViewRepeaterOperation["INSERTED"] = 1] = "INSERTED"; + /** The position of a view changed, but the content remains the same. */ + _ViewRepeaterOperation[_ViewRepeaterOperation["MOVED"] = 2] = "MOVED"; + /** A view was detached from the view container. */ + _ViewRepeaterOperation[_ViewRepeaterOperation["REMOVED"] = 3] = "REMOVED"; +})(_ViewRepeaterOperation || (_ViewRepeaterOperation = {})); +/** + * Injection token for {@link _ViewRepeater}. This token is for use by Angular Material only. + * @docs-private + */ +const _VIEW_REPEATER_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_3__.InjectionToken('_ViewRepeater'); + +/** + * A repeater that destroys views when they are removed from a + * {@link ViewContainerRef}. When new items are inserted into the container, + * the repeater will always construct a new embedded view for each item. + * + * @template T The type for the embedded view's $implicit property. + * @template R The type for the item in each IterableDiffer change record. + * @template C The type for the context passed to each embedded view. + */ +class _DisposeViewRepeaterStrategy { + applyChanges(changes, viewContainerRef, itemContextFactory, itemValueResolver, itemViewChanged) { + changes.forEachOperation((record, adjustedPreviousIndex, currentIndex) => { + let view; + let operation; + if (record.previousIndex == null) { + const insertContext = itemContextFactory(record, adjustedPreviousIndex, currentIndex); + view = viewContainerRef.createEmbeddedView(insertContext.templateRef, insertContext.context, insertContext.index); + operation = _ViewRepeaterOperation.INSERTED; + } else if (currentIndex == null) { + viewContainerRef.remove(adjustedPreviousIndex); + operation = _ViewRepeaterOperation.REMOVED; + } else { + view = viewContainerRef.get(adjustedPreviousIndex); + viewContainerRef.move(view, currentIndex); + operation = _ViewRepeaterOperation.MOVED; + } + if (itemViewChanged) { + itemViewChanged({ + context: view?.context, + operation, + record + }); + } + }); + } + detach() {} +} + +/** + * A repeater that caches views when they are removed from a + * {@link ViewContainerRef}. When new items are inserted into the container, + * the repeater will reuse one of the cached views instead of creating a new + * embedded view. Recycling cached views reduces the quantity of expensive DOM + * inserts. + * + * @template T The type for the embedded view's $implicit property. + * @template R The type for the item in each IterableDiffer change record. + * @template C The type for the context passed to each embedded view. + */ +class _RecycleViewRepeaterStrategy { + constructor() { + /** + * The size of the cache used to store unused views. + * Setting the cache size to `0` will disable caching. Defaults to 20 views. + */ + this.viewCacheSize = 20; + /** + * View cache that stores embedded view instances that have been previously stamped out, + * but don't are not currently rendered. The view repeater will reuse these views rather than + * creating brand new ones. + * + * TODO(michaeljamesparsons) Investigate whether using a linked list would improve performance. + */ + this._viewCache = []; + } + /** Apply changes to the DOM. */ + applyChanges(changes, viewContainerRef, itemContextFactory, itemValueResolver, itemViewChanged) { + // Rearrange the views to put them in the right location. + changes.forEachOperation((record, adjustedPreviousIndex, currentIndex) => { + let view; + let operation; + if (record.previousIndex == null) { + // Item added. + const viewArgsFactory = () => itemContextFactory(record, adjustedPreviousIndex, currentIndex); + view = this._insertView(viewArgsFactory, currentIndex, viewContainerRef, itemValueResolver(record)); + operation = view ? _ViewRepeaterOperation.INSERTED : _ViewRepeaterOperation.REPLACED; + } else if (currentIndex == null) { + // Item removed. + this._detachAndCacheView(adjustedPreviousIndex, viewContainerRef); + operation = _ViewRepeaterOperation.REMOVED; + } else { + // Item moved. + view = this._moveView(adjustedPreviousIndex, currentIndex, viewContainerRef, itemValueResolver(record)); + operation = _ViewRepeaterOperation.MOVED; + } + if (itemViewChanged) { + itemViewChanged({ + context: view?.context, + operation, + record + }); + } + }); + } + detach() { + for (const view of this._viewCache) { + view.destroy(); + } + this._viewCache = []; + } + /** + * Inserts a view for a new item, either from the cache or by creating a new + * one. Returns `undefined` if the item was inserted into a cached view. + */ + _insertView(viewArgsFactory, currentIndex, viewContainerRef, value) { + const cachedView = this._insertViewFromCache(currentIndex, viewContainerRef); + if (cachedView) { + cachedView.context.$implicit = value; + return undefined; + } + const viewArgs = viewArgsFactory(); + return viewContainerRef.createEmbeddedView(viewArgs.templateRef, viewArgs.context, viewArgs.index); + } + /** Detaches the view at the given index and inserts into the view cache. */ + _detachAndCacheView(index, viewContainerRef) { + const detachedView = viewContainerRef.detach(index); + this._maybeCacheView(detachedView, viewContainerRef); + } + /** Moves view at the previous index to the current index. */ + _moveView(adjustedPreviousIndex, currentIndex, viewContainerRef, value) { + const view = viewContainerRef.get(adjustedPreviousIndex); + viewContainerRef.move(view, currentIndex); + view.context.$implicit = value; + return view; + } + /** + * Cache the given detached view. If the cache is full, the view will be + * destroyed. + */ + _maybeCacheView(view, viewContainerRef) { + if (this._viewCache.length < this.viewCacheSize) { + this._viewCache.push(view); + } else { + const index = viewContainerRef.indexOf(view); + // The host component could remove views from the container outside of + // the view repeater. It's unlikely this will occur, but just in case, + // destroy the view on its own, otherwise destroy it through the + // container to ensure that all the references are removed. + if (index === -1) { + view.destroy(); + } else { + viewContainerRef.remove(index); + } + } + } + /** Inserts a recycled view from the cache at the given index. */ + _insertViewFromCache(index, viewContainerRef) { + const cachedView = this._viewCache.pop(); + if (cachedView) { + viewContainerRef.insert(cachedView, index); + } + return cachedView || null; + } +} + +/** + * Class to be used to power selecting one or more options from a list. + */ +class SelectionModel { + /** Selected values. */ + get selected() { + if (!this._selected) { + this._selected = Array.from(this._selection.values()); + } + return this._selected; + } + constructor(_multiple = false, initiallySelectedValues, _emitChanges = true, compareWith) { + this._multiple = _multiple; + this._emitChanges = _emitChanges; + this.compareWith = compareWith; + /** Currently-selected values. */ + this._selection = new Set(); + /** Keeps track of the deselected options that haven't been emitted by the change event. */ + this._deselectedToEmit = []; + /** Keeps track of the selected options that haven't been emitted by the change event. */ + this._selectedToEmit = []; + /** Event emitted when the value has changed. */ + this.changed = new rxjs__WEBPACK_IMPORTED_MODULE_4__.Subject(); + if (initiallySelectedValues && initiallySelectedValues.length) { + if (_multiple) { + initiallySelectedValues.forEach(value => this._markSelected(value)); + } else { + this._markSelected(initiallySelectedValues[0]); + } + // Clear the array in order to avoid firing the change event for preselected values. + this._selectedToEmit.length = 0; + } + } + /** + * Selects a value or an array of values. + * @param values The values to select + * @return Whether the selection changed as a result of this call + * @breaking-change 16.0.0 make return type boolean + */ + select(...values) { + this._verifyValueAssignment(values); + values.forEach(value => this._markSelected(value)); + const changed = this._hasQueuedChanges(); + this._emitChangeEvent(); + return changed; + } + /** + * Deselects a value or an array of values. + * @param values The values to deselect + * @return Whether the selection changed as a result of this call + * @breaking-change 16.0.0 make return type boolean + */ + deselect(...values) { + this._verifyValueAssignment(values); + values.forEach(value => this._unmarkSelected(value)); + const changed = this._hasQueuedChanges(); + this._emitChangeEvent(); + return changed; + } + /** + * Sets the selected values + * @param values The new selected values + * @return Whether the selection changed as a result of this call + * @breaking-change 16.0.0 make return type boolean + */ + setSelection(...values) { + this._verifyValueAssignment(values); + const oldValues = this.selected; + const newSelectedSet = new Set(values); + values.forEach(value => this._markSelected(value)); + oldValues.filter(value => !newSelectedSet.has(this._getConcreteValue(value, newSelectedSet))).forEach(value => this._unmarkSelected(value)); + const changed = this._hasQueuedChanges(); + this._emitChangeEvent(); + return changed; + } + /** + * Toggles a value between selected and deselected. + * @param value The value to toggle + * @return Whether the selection changed as a result of this call + * @breaking-change 16.0.0 make return type boolean + */ + toggle(value) { + return this.isSelected(value) ? this.deselect(value) : this.select(value); + } + /** + * Clears all of the selected values. + * @param flushEvent Whether to flush the changes in an event. + * If false, the changes to the selection will be flushed along with the next event. + * @return Whether the selection changed as a result of this call + * @breaking-change 16.0.0 make return type boolean + */ + clear(flushEvent = true) { + this._unmarkAll(); + const changed = this._hasQueuedChanges(); + if (flushEvent) { + this._emitChangeEvent(); + } + return changed; + } + /** + * Determines whether a value is selected. + */ + isSelected(value) { + return this._selection.has(this._getConcreteValue(value)); + } + /** + * Determines whether the model does not have a value. + */ + isEmpty() { + return this._selection.size === 0; + } + /** + * Determines whether the model has a value. + */ + hasValue() { + return !this.isEmpty(); + } + /** + * Sorts the selected values based on a predicate function. + */ + sort(predicate) { + if (this._multiple && this.selected) { + this._selected.sort(predicate); + } + } + /** + * Gets whether multiple values can be selected. + */ + isMultipleSelection() { + return this._multiple; + } + /** Emits a change event and clears the records of selected and deselected values. */ + _emitChangeEvent() { + // Clear the selected values so they can be re-cached. + this._selected = null; + if (this._selectedToEmit.length || this._deselectedToEmit.length) { + this.changed.next({ + source: this, + added: this._selectedToEmit, + removed: this._deselectedToEmit + }); + this._deselectedToEmit = []; + this._selectedToEmit = []; + } + } + /** Selects a value. */ + _markSelected(value) { + value = this._getConcreteValue(value); + if (!this.isSelected(value)) { + if (!this._multiple) { + this._unmarkAll(); + } + if (!this.isSelected(value)) { + this._selection.add(value); + } + if (this._emitChanges) { + this._selectedToEmit.push(value); + } + } + } + /** Deselects a value. */ + _unmarkSelected(value) { + value = this._getConcreteValue(value); + if (this.isSelected(value)) { + this._selection.delete(value); + if (this._emitChanges) { + this._deselectedToEmit.push(value); + } + } + } + /** Clears out the selected values. */ + _unmarkAll() { + if (!this.isEmpty()) { + this._selection.forEach(value => this._unmarkSelected(value)); + } + } + /** + * Verifies the value assignment and throws an error if the specified value array is + * including multiple values while the selection model is not supporting multiple values. + */ + _verifyValueAssignment(values) { + if (values.length > 1 && !this._multiple && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw getMultipleValuesInSingleSelectionError(); + } + } + /** Whether there are queued up change to be emitted. */ + _hasQueuedChanges() { + return !!(this._deselectedToEmit.length || this._selectedToEmit.length); + } + /** Returns a value that is comparable to inputValue by applying compareWith function, returns the same inputValue otherwise. */ + _getConcreteValue(inputValue, selection) { + if (!this.compareWith) { + return inputValue; + } else { + selection = selection ?? this._selection; + for (let selectedValue of selection) { + if (this.compareWith(inputValue, selectedValue)) { + return selectedValue; + } + } + return inputValue; + } + } +} +/** + * Returns an error that reports that multiple values are passed into a selection model + * with a single value. + * @docs-private + */ +function getMultipleValuesInSingleSelectionError() { + return Error('Cannot pass multiple values into SelectionModel with single-value mode.'); +} + +/** + * Class to coordinate unique selection based on name. + * Intended to be consumed as an Angular service. + * This service is needed because native radio change events are only fired on the item currently + * being selected, and we still need to uncheck the previous selection. + * + * This service does not *store* any IDs and names because they may change at any time, so it is + * less error-prone if they are simply passed through when the events occur. + */ +class UniqueSelectionDispatcher { + constructor() { + this._listeners = []; + } + /** + * Notify other items that selection for the given name has been set. + * @param id ID of the item. + * @param name Name of the item. + */ + notify(id, name) { + for (let listener of this._listeners) { + listener(id, name); + } + } + /** + * Listen for future changes to item selection. + * @return Function used to deregister listener + */ + listen(listener) { + this._listeners.push(listener); + return () => { + this._listeners = this._listeners.filter(registered => { + return listener !== registered; + }); + }; + } + ngOnDestroy() { + this._listeners = []; + } + static #_ = this.ɵfac = function UniqueSelectionDispatcher_Factory(t) { + return new (t || UniqueSelectionDispatcher)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineInjectable"]({ + token: UniqueSelectionDispatcher, + factory: UniqueSelectionDispatcher.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵsetClassMetadata"](UniqueSelectionDispatcher, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_3__.Injectable, + args: [{ + providedIn: 'root' + }] + }], null, null); +})(); + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 11987: +/*!*******************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/dialog.mjs ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ CdkDialogContainer: () => (/* binding */ CdkDialogContainer), +/* harmony export */ DEFAULT_DIALOG_CONFIG: () => (/* binding */ DEFAULT_DIALOG_CONFIG), +/* harmony export */ DIALOG_DATA: () => (/* binding */ DIALOG_DATA), +/* harmony export */ DIALOG_SCROLL_STRATEGY: () => (/* binding */ DIALOG_SCROLL_STRATEGY), +/* harmony export */ DIALOG_SCROLL_STRATEGY_PROVIDER: () => (/* binding */ DIALOG_SCROLL_STRATEGY_PROVIDER), +/* harmony export */ DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY: () => (/* binding */ DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY), +/* harmony export */ Dialog: () => (/* binding */ Dialog), +/* harmony export */ DialogConfig: () => (/* binding */ DialogConfig), +/* harmony export */ DialogModule: () => (/* binding */ DialogModule), +/* harmony export */ DialogRef: () => (/* binding */ DialogRef), +/* harmony export */ throwDialogContentAlreadyAttachedError: () => (/* binding */ throwDialogContentAlreadyAttachedError) +/* harmony export */ }); +/* harmony import */ var _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/a11y */ 88627); +/* harmony import */ var _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/cdk/overlay */ 43181); +/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/platform */ 51338); +/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/cdk/portal */ 63965); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/cdk/keycodes */ 64986); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs */ 78210); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs */ 13901); +/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/cdk/bidi */ 457); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs/operators */ 56816); + + + + + + + + + + + + + + +/** Configuration for opening a modal dialog. */ +function CdkDialogContainer_ng_template_0_Template(rf, ctx) {} +class DialogConfig { + constructor() { + /** The ARIA role of the dialog element. */ + this.role = 'dialog'; + /** Optional CSS class or classes applied to the overlay panel. */ + this.panelClass = ''; + /** Whether the dialog has a backdrop. */ + this.hasBackdrop = true; + /** Optional CSS class or classes applied to the overlay backdrop. */ + this.backdropClass = ''; + /** Whether the dialog closes with the escape key or pointer events outside the panel element. */ + this.disableClose = false; + /** Width of the dialog. */ + this.width = ''; + /** Height of the dialog. */ + this.height = ''; + /** Data being injected into the child component. */ + this.data = null; + /** ID of the element that describes the dialog. */ + this.ariaDescribedBy = null; + /** ID of the element that labels the dialog. */ + this.ariaLabelledBy = null; + /** Dialog label applied via `aria-label` */ + this.ariaLabel = null; + /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */ + this.ariaModal = true; + /** + * Where the dialog should focus on open. + * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or + * AutoFocusTarget instead. + */ + this.autoFocus = 'first-tabbable'; + /** + * Whether the dialog should restore focus to the previously-focused element upon closing. + * Has the following behavior based on the type that is passed in: + * - `boolean` - when true, will return focus to the element that was focused before the dialog + * was opened, otherwise won't restore focus at all. + * - `string` - focus will be restored to the first element that matches the CSS selector. + * - `HTMLElement` - focus will be restored to the specific element. + */ + this.restoreFocus = true; + /** + * Whether the dialog should close when the user navigates backwards or forwards through browser + * history. This does not apply to navigation via anchor element unless using URL-hash based + * routing (`HashLocationStrategy` in the Angular router). + */ + this.closeOnNavigation = true; + /** + * Whether the dialog should close when the dialog service is destroyed. This is useful if + * another service is wrapping the dialog and is managing the destruction instead. + */ + this.closeOnDestroy = true; + /** + * Whether the dialog should close when the underlying overlay is detached. This is useful if + * another service is wrapping the dialog and is managing the destruction instead. E.g. an + * external detachment can happen as a result of a scroll strategy triggering it or when the + * browser location changes. + */ + this.closeOnOverlayDetachments = true; + } +} +function throwDialogContentAlreadyAttachedError() { + throw Error('Attempting to attach dialog content after content is already attached'); +} +/** + * Internal component that wraps user-provided dialog content. + * @docs-private + */ +class CdkDialogContainer extends _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.BasePortalOutlet { + constructor(_elementRef, _focusTrapFactory, _document, _config, _interactivityChecker, _ngZone, _overlayRef, _focusMonitor) { + super(); + this._elementRef = _elementRef; + this._focusTrapFactory = _focusTrapFactory; + this._config = _config; + this._interactivityChecker = _interactivityChecker; + this._ngZone = _ngZone; + this._overlayRef = _overlayRef; + this._focusMonitor = _focusMonitor; + this._platform = (0,_angular_core__WEBPACK_IMPORTED_MODULE_1__.inject)(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__.Platform); + /** The class that traps and manages focus within the dialog. */ + this._focusTrap = null; + /** Element that was focused before the dialog was opened. Save this to restore upon close. */ + this._elementFocusedBeforeDialogWasOpened = null; + /** + * Type of interaction that led to the dialog being closed. This is used to determine + * whether the focus style will be applied when returning focus to its original location + * after the dialog is closed. + */ + this._closeInteractionType = null; + /** + * Queue of the IDs of the dialog's label element, based on their definition order. The first + * ID will be used as the `aria-labelledby` value. We use a queue here to handle the case + * where there are two or more titles in the DOM at a time and the first one is destroyed while + * the rest are present. + */ + this._ariaLabelledByQueue = []; + this._changeDetectorRef = (0,_angular_core__WEBPACK_IMPORTED_MODULE_1__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_1__.ChangeDetectorRef); + /** + * Attaches a DOM portal to the dialog container. + * @param portal Portal to be attached. + * @deprecated To be turned into a method. + * @breaking-change 10.0.0 + */ + this.attachDomPortal = portal => { + if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throwDialogContentAlreadyAttachedError(); + } + const result = this._portalOutlet.attachDomPortal(portal); + this._contentAttached(); + return result; + }; + this._document = _document; + if (this._config.ariaLabelledBy) { + this._ariaLabelledByQueue.push(this._config.ariaLabelledBy); + } + } + _addAriaLabelledBy(id) { + this._ariaLabelledByQueue.push(id); + this._changeDetectorRef.markForCheck(); + } + _removeAriaLabelledBy(id) { + const index = this._ariaLabelledByQueue.indexOf(id); + if (index > -1) { + this._ariaLabelledByQueue.splice(index, 1); + this._changeDetectorRef.markForCheck(); + } + } + _contentAttached() { + this._initializeFocusTrap(); + this._handleBackdropClicks(); + this._captureInitialFocus(); + } + /** + * Can be used by child classes to customize the initial focus + * capturing behavior (e.g. if it's tied to an animation). + */ + _captureInitialFocus() { + this._trapFocus(); + } + ngOnDestroy() { + this._restoreFocus(); + } + /** + * Attach a ComponentPortal as content to this dialog container. + * @param portal Portal to be attached as the dialog content. + */ + attachComponentPortal(portal) { + if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throwDialogContentAlreadyAttachedError(); + } + const result = this._portalOutlet.attachComponentPortal(portal); + this._contentAttached(); + return result; + } + /** + * Attach a TemplatePortal as content to this dialog container. + * @param portal Portal to be attached as the dialog content. + */ + attachTemplatePortal(portal) { + if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throwDialogContentAlreadyAttachedError(); + } + const result = this._portalOutlet.attachTemplatePortal(portal); + this._contentAttached(); + return result; + } + // TODO(crisbeto): this shouldn't be exposed, but there are internal references to it. + /** Captures focus if it isn't already inside the dialog. */ + _recaptureFocus() { + if (!this._containsFocus()) { + this._trapFocus(); + } + } + /** + * Focuses the provided element. If the element is not focusable, it will add a tabIndex + * attribute to forcefully focus it. The attribute is removed after focus is moved. + * @param element The element to focus. + */ + _forceFocus(element, options) { + if (!this._interactivityChecker.isFocusable(element)) { + element.tabIndex = -1; + // The tabindex attribute should be removed to avoid navigating to that element again + this._ngZone.runOutsideAngular(() => { + const callback = () => { + element.removeEventListener('blur', callback); + element.removeEventListener('mousedown', callback); + element.removeAttribute('tabindex'); + }; + element.addEventListener('blur', callback); + element.addEventListener('mousedown', callback); + }); + } + element.focus(options); + } + /** + * Focuses the first element that matches the given selector within the focus trap. + * @param selector The CSS selector for the element to set focus to. + */ + _focusByCssSelector(selector, options) { + let elementToFocus = this._elementRef.nativeElement.querySelector(selector); + if (elementToFocus) { + this._forceFocus(elementToFocus, options); + } + } + /** + * Moves the focus inside the focus trap. When autoFocus is not set to 'dialog', if focus + * cannot be moved then focus will go to the dialog container. + */ + _trapFocus() { + const element = this._elementRef.nativeElement; + // If were to attempt to focus immediately, then the content of the dialog would not yet be + // ready in instances where change detection has to run first. To deal with this, we simply + // wait for the microtask queue to be empty when setting focus when autoFocus isn't set to + // dialog. If the element inside the dialog can't be focused, then the container is focused + // so the user can't tab into other elements behind it. + switch (this._config.autoFocus) { + case false: + case 'dialog': + // Ensure that focus is on the dialog container. It's possible that a different + // component tried to move focus while the open animation was running. See: + // https://github.com/angular/components/issues/16215. Note that we only want to do this + // if the focus isn't inside the dialog already, because it's possible that the consumer + // turned off `autoFocus` in order to move focus themselves. + if (!this._containsFocus()) { + element.focus(); + } + break; + case true: + case 'first-tabbable': + this._focusTrap?.focusInitialElementWhenReady().then(focusedSuccessfully => { + // If we weren't able to find a focusable element in the dialog, then focus the dialog + // container instead. + if (!focusedSuccessfully) { + this._focusDialogContainer(); + } + }); + break; + case 'first-heading': + this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]'); + break; + default: + this._focusByCssSelector(this._config.autoFocus); + break; + } + } + /** Restores focus to the element that was focused before the dialog opened. */ + _restoreFocus() { + const focusConfig = this._config.restoreFocus; + let focusTargetElement = null; + if (typeof focusConfig === 'string') { + focusTargetElement = this._document.querySelector(focusConfig); + } else if (typeof focusConfig === 'boolean') { + focusTargetElement = focusConfig ? this._elementFocusedBeforeDialogWasOpened : null; + } else if (focusConfig) { + focusTargetElement = focusConfig; + } + // We need the extra check, because IE can set the `activeElement` to null in some cases. + if (this._config.restoreFocus && focusTargetElement && typeof focusTargetElement.focus === 'function') { + const activeElement = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__._getFocusedElementPierceShadowDom)(); + const element = this._elementRef.nativeElement; + // Make sure that focus is still inside the dialog or is on the body (usually because a + // non-focusable element like the backdrop was clicked) before moving it. It's possible that + // the consumer moved it themselves before the animation was done, in which case we shouldn't + // do anything. + if (!activeElement || activeElement === this._document.body || activeElement === element || element.contains(activeElement)) { + if (this._focusMonitor) { + this._focusMonitor.focusVia(focusTargetElement, this._closeInteractionType); + this._closeInteractionType = null; + } else { + focusTargetElement.focus(); + } + } + } + if (this._focusTrap) { + this._focusTrap.destroy(); + } + } + /** Focuses the dialog container. */ + _focusDialogContainer() { + // Note that there is no focus method when rendering on the server. + if (this._elementRef.nativeElement.focus) { + this._elementRef.nativeElement.focus(); + } + } + /** Returns whether focus is inside the dialog. */ + _containsFocus() { + const element = this._elementRef.nativeElement; + const activeElement = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__._getFocusedElementPierceShadowDom)(); + return element === activeElement || element.contains(activeElement); + } + /** Sets up the focus trap. */ + _initializeFocusTrap() { + if (this._platform.isBrowser) { + this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement); + // Save the previously focused element. This element will be re-focused + // when the dialog closes. + if (this._document) { + this._elementFocusedBeforeDialogWasOpened = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_2__._getFocusedElementPierceShadowDom)(); + } + } + } + /** Sets up the listener that handles clicks on the dialog backdrop. */ + _handleBackdropClicks() { + // Clicking on the backdrop will move focus out of dialog. + // Recapture it if closing via the backdrop is disabled. + this._overlayRef.backdropClick().subscribe(() => { + if (this._config.disableClose) { + this._recaptureFocus(); + } + }); + } + static #_ = this.ɵfac = function CdkDialogContainer_Factory(t) { + return new (t || CdkDialogContainer)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__.FocusTrapFactory), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_4__.DOCUMENT, 8), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](DialogConfig), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__.InteractivityChecker), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.OverlayRef), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__.FocusMonitor)); + }; + static #_2 = this.ɵcmp = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({ + type: CdkDialogContainer, + selectors: [["cdk-dialog-container"]], + viewQuery: function CdkDialogContainer_Query(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.CdkPortalOutlet, 7); + } + if (rf & 2) { + let _t; + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx._portalOutlet = _t.first); + } + }, + hostAttrs: ["tabindex", "-1", 1, "cdk-dialog-container"], + hostVars: 6, + hostBindings: function CdkDialogContainer_HostBindings(rf, ctx) { + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵattribute"]("id", ctx._config.id || null)("role", ctx._config.role)("aria-modal", ctx._config.ariaModal)("aria-labelledby", ctx._config.ariaLabel ? null : ctx._ariaLabelledByQueue[0])("aria-label", ctx._config.ariaLabel)("aria-describedby", ctx._config.ariaDescribedBy || null); + } + }, + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵInheritDefinitionFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵStandaloneFeature"]], + decls: 1, + vars: 0, + consts: [["cdkPortalOutlet", ""]], + template: function CdkDialogContainer_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](0, CdkDialogContainer_ng_template_0_Template, 0, 0, "ng-template", 0); + } + }, + dependencies: [_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.CdkPortalOutlet], + styles: [".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"], + encapsulation: 2 + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](CdkDialogContainer, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Component, + args: [{ + selector: 'cdk-dialog-container', + encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewEncapsulation.None, + changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ChangeDetectionStrategy.Default, + standalone: true, + imports: [_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.CdkPortalOutlet], + host: { + 'class': 'cdk-dialog-container', + 'tabindex': '-1', + '[attr.id]': '_config.id || null', + '[attr.role]': '_config.role', + '[attr.aria-modal]': '_config.ariaModal', + '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]', + '[attr.aria-label]': '_config.ariaLabel', + '[attr.aria-describedby]': '_config.ariaDescribedBy || null' + }, + template: "\n", + styles: [".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"] + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ElementRef + }, { + type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__.FocusTrapFactory + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_4__.DOCUMENT] + }] + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject, + args: [DialogConfig] + }] + }, { + type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__.InteractivityChecker + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.NgZone + }, { + type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.OverlayRef + }, { + type: _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__.FocusMonitor + }], { + _portalOutlet: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.ViewChild, + args: [_angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.CdkPortalOutlet, { + static: true + }] + }] + }); +})(); + +/** + * Reference to a dialog opened via the Dialog service. + */ +class DialogRef { + constructor(overlayRef, config) { + this.overlayRef = overlayRef; + this.config = config; + /** Emits when the dialog has been closed. */ + this.closed = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); + this.disableClose = config.disableClose; + this.backdropClick = overlayRef.backdropClick(); + this.keydownEvents = overlayRef.keydownEvents(); + this.outsidePointerEvents = overlayRef.outsidePointerEvents(); + this.id = config.id; // By the time the dialog is created we are guaranteed to have an ID. + this.keydownEvents.subscribe(event => { + if (event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_7__.ESCAPE && !this.disableClose && !(0,_angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_7__.hasModifierKey)(event)) { + event.preventDefault(); + this.close(undefined, { + focusOrigin: 'keyboard' + }); + } + }); + this.backdropClick.subscribe(() => { + if (!this.disableClose) { + this.close(undefined, { + focusOrigin: 'mouse' + }); + } + }); + this._detachSubscription = overlayRef.detachments().subscribe(() => { + // Check specifically for `false`, because we want `undefined` to be treated like `true`. + if (config.closeOnOverlayDetachments !== false) { + this.close(); + } + }); + } + /** + * Close the dialog. + * @param result Optional result to return to the dialog opener. + * @param options Additional options to customize the closing behavior. + */ + close(result, options) { + if (this.containerInstance) { + const closedSubject = this.closed; + this.containerInstance._closeInteractionType = options?.focusOrigin || 'program'; + // Drop the detach subscription first since it can be triggered by the + // `dispose` call and override the result of this closing sequence. + this._detachSubscription.unsubscribe(); + this.overlayRef.dispose(); + closedSubject.next(result); + closedSubject.complete(); + this.componentInstance = this.containerInstance = null; + } + } + /** Updates the position of the dialog based on the current position strategy. */ + updatePosition() { + this.overlayRef.updatePosition(); + return this; + } + /** + * Updates the dialog's width and height. + * @param width New width of the dialog. + * @param height New height of the dialog. + */ + updateSize(width = '', height = '') { + this.overlayRef.updateSize({ + width, + height + }); + return this; + } + /** Add a CSS class or an array of classes to the overlay pane. */ + addPanelClass(classes) { + this.overlayRef.addPanelClass(classes); + return this; + } + /** Remove a CSS class or an array of classes from the overlay pane. */ + removePanelClass(classes) { + this.overlayRef.removePanelClass(classes); + return this; + } +} + +/** Injection token for the Dialog's ScrollStrategy. */ +const DIALOG_SCROLL_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_1__.InjectionToken('DialogScrollStrategy', { + providedIn: 'root', + factory: () => { + const overlay = (0,_angular_core__WEBPACK_IMPORTED_MODULE_1__.inject)(_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.Overlay); + return () => overlay.scrollStrategies.block(); + } +}); +/** Injection token for the Dialog's Data. */ +const DIALOG_DATA = new _angular_core__WEBPACK_IMPORTED_MODULE_1__.InjectionToken('DialogData'); +/** Injection token that can be used to provide default options for the dialog module. */ +const DEFAULT_DIALOG_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_1__.InjectionToken('DefaultDialogConfig'); +/** + * @docs-private + * @deprecated No longer used. To be removed. + * @breaking-change 19.0.0 + */ +function DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) { + return () => overlay.scrollStrategies.block(); +} +/** + * @docs-private + * @deprecated No longer used. To be removed. + * @breaking-change 19.0.0 + */ +const DIALOG_SCROLL_STRATEGY_PROVIDER = { + provide: DIALOG_SCROLL_STRATEGY, + deps: [_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.Overlay], + useFactory: DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY +}; + +/** Unique id for the created dialog. */ +let uniqueId = 0; +class Dialog { + /** Keeps track of the currently-open dialogs. */ + get openDialogs() { + return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel; + } + /** Stream that emits when a dialog has been opened. */ + get afterOpened() { + return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel; + } + constructor(_overlay, _injector, _defaultOptions, _parentDialog, _overlayContainer, scrollStrategy) { + this._overlay = _overlay; + this._injector = _injector; + this._defaultOptions = _defaultOptions; + this._parentDialog = _parentDialog; + this._overlayContainer = _overlayContainer; + this._openDialogsAtThisLevel = []; + this._afterAllClosedAtThisLevel = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); + this._afterOpenedAtThisLevel = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); + this._ariaHiddenElements = new Map(); + /** + * Stream that emits when all open dialog have finished closing. + * Will emit on subscribe if there are no open dialogs to begin with. + */ + this.afterAllClosed = (0,rxjs__WEBPACK_IMPORTED_MODULE_8__.defer)(() => this.openDialogs.length ? this._getAfterAllClosed() : this._getAfterAllClosed().pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_9__.startWith)(undefined))); + this._scrollStrategy = scrollStrategy; + } + open(componentOrTemplateRef, config) { + const defaults = this._defaultOptions || new DialogConfig(); + config = { + ...defaults, + ...config + }; + config.id = config.id || `cdk-dialog-${uniqueId++}`; + if (config.id && this.getDialogById(config.id) && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw Error(`Dialog with id "${config.id}" exists already. The dialog id must be unique.`); + } + const overlayConfig = this._getOverlayConfig(config); + const overlayRef = this._overlay.create(overlayConfig); + const dialogRef = new DialogRef(overlayRef, config); + const dialogContainer = this._attachContainer(overlayRef, dialogRef, config); + dialogRef.containerInstance = dialogContainer; + this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config); + // If this is the first dialog that we're opening, hide all the non-overlay content. + if (!this.openDialogs.length) { + this._hideNonDialogContentFromAssistiveTechnology(); + } + this.openDialogs.push(dialogRef); + dialogRef.closed.subscribe(() => this._removeOpenDialog(dialogRef, true)); + this.afterOpened.next(dialogRef); + return dialogRef; + } + /** + * Closes all of the currently-open dialogs. + */ + closeAll() { + reverseForEach(this.openDialogs, dialog => dialog.close()); + } + /** + * Finds an open dialog by its id. + * @param id ID to use when looking up the dialog. + */ + getDialogById(id) { + return this.openDialogs.find(dialog => dialog.id === id); + } + ngOnDestroy() { + // Make one pass over all the dialogs that need to be untracked, but should not be closed. We + // want to stop tracking the open dialog even if it hasn't been closed, because the tracking + // determines when `aria-hidden` is removed from elements outside the dialog. + reverseForEach(this._openDialogsAtThisLevel, dialog => { + // Check for `false` specifically since we want `undefined` to be interpreted as `true`. + if (dialog.config.closeOnDestroy === false) { + this._removeOpenDialog(dialog, false); + } + }); + // Make a second pass and close the remaining dialogs. We do this second pass in order to + // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs + // that should be closed and dialogs that should not. + reverseForEach(this._openDialogsAtThisLevel, dialog => dialog.close()); + this._afterAllClosedAtThisLevel.complete(); + this._afterOpenedAtThisLevel.complete(); + this._openDialogsAtThisLevel = []; + } + /** + * Creates an overlay config from a dialog config. + * @param config The dialog configuration. + * @returns The overlay configuration. + */ + _getOverlayConfig(config) { + const state = new _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.OverlayConfig({ + positionStrategy: config.positionStrategy || this._overlay.position().global().centerHorizontally().centerVertically(), + scrollStrategy: config.scrollStrategy || this._scrollStrategy(), + panelClass: config.panelClass, + hasBackdrop: config.hasBackdrop, + direction: config.direction, + minWidth: config.minWidth, + minHeight: config.minHeight, + maxWidth: config.maxWidth, + maxHeight: config.maxHeight, + width: config.width, + height: config.height, + disposeOnNavigation: config.closeOnNavigation + }); + if (config.backdropClass) { + state.backdropClass = config.backdropClass; + } + return state; + } + /** + * Attaches a dialog container to a dialog's already-created overlay. + * @param overlay Reference to the dialog's underlying overlay. + * @param config The dialog configuration. + * @returns A promise resolving to a ComponentRef for the attached container. + */ + _attachContainer(overlay, dialogRef, config) { + const userInjector = config.injector || config.viewContainerRef?.injector; + const providers = [{ + provide: DialogConfig, + useValue: config + }, { + provide: DialogRef, + useValue: dialogRef + }, { + provide: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.OverlayRef, + useValue: overlay + }]; + let containerType; + if (config.container) { + if (typeof config.container === 'function') { + containerType = config.container; + } else { + containerType = config.container.type; + providers.push(...config.container.providers(config)); + } + } else { + containerType = CdkDialogContainer; + } + const containerPortal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.ComponentPortal(containerType, config.viewContainerRef, _angular_core__WEBPACK_IMPORTED_MODULE_1__.Injector.create({ + parent: userInjector || this._injector, + providers + }), config.componentFactoryResolver); + const containerRef = overlay.attach(containerPortal); + return containerRef.instance; + } + /** + * Attaches the user-provided component to the already-created dialog container. + * @param componentOrTemplateRef The type of component being loaded into the dialog, + * or a TemplateRef to instantiate as the content. + * @param dialogRef Reference to the dialog being opened. + * @param dialogContainer Component that is going to wrap the dialog content. + * @param config Configuration used to open the dialog. + */ + _attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config) { + if (componentOrTemplateRef instanceof _angular_core__WEBPACK_IMPORTED_MODULE_1__.TemplateRef) { + const injector = this._createInjector(config, dialogRef, dialogContainer, undefined); + let context = { + $implicit: config.data, + dialogRef + }; + if (config.templateContext) { + context = { + ...context, + ...(typeof config.templateContext === 'function' ? config.templateContext() : config.templateContext) + }; + } + dialogContainer.attachTemplatePortal(new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.TemplatePortal(componentOrTemplateRef, null, context, injector)); + } else { + const injector = this._createInjector(config, dialogRef, dialogContainer, this._injector); + const contentRef = dialogContainer.attachComponentPortal(new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector, config.componentFactoryResolver)); + dialogRef.componentRef = contentRef; + dialogRef.componentInstance = contentRef.instance; + } + } + /** + * Creates a custom injector to be used inside the dialog. This allows a component loaded inside + * of a dialog to close itself and, optionally, to return a value. + * @param config Config object that is used to construct the dialog. + * @param dialogRef Reference to the dialog being opened. + * @param dialogContainer Component that is going to wrap the dialog content. + * @param fallbackInjector Injector to use as a fallback when a lookup fails in the custom + * dialog injector, if the user didn't provide a custom one. + * @returns The custom injector that can be used inside the dialog. + */ + _createInjector(config, dialogRef, dialogContainer, fallbackInjector) { + const userInjector = config.injector || config.viewContainerRef?.injector; + const providers = [{ + provide: DIALOG_DATA, + useValue: config.data + }, { + provide: DialogRef, + useValue: dialogRef + }]; + if (config.providers) { + if (typeof config.providers === 'function') { + providers.push(...config.providers(dialogRef, config, dialogContainer)); + } else { + providers.push(...config.providers); + } + } + if (config.direction && (!userInjector || !userInjector.get(_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_10__.Directionality, null, { + optional: true + }))) { + providers.push({ + provide: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_10__.Directionality, + useValue: { + value: config.direction, + change: (0,rxjs__WEBPACK_IMPORTED_MODULE_11__.of)() + } + }); + } + return _angular_core__WEBPACK_IMPORTED_MODULE_1__.Injector.create({ + parent: userInjector || fallbackInjector, + providers + }); + } + /** + * Removes a dialog from the array of open dialogs. + * @param dialogRef Dialog to be removed. + * @param emitEvent Whether to emit an event if this is the last dialog. + */ + _removeOpenDialog(dialogRef, emitEvent) { + const index = this.openDialogs.indexOf(dialogRef); + if (index > -1) { + this.openDialogs.splice(index, 1); + // If all the dialogs were closed, remove/restore the `aria-hidden` + // to a the siblings and emit to the `afterAllClosed` stream. + if (!this.openDialogs.length) { + this._ariaHiddenElements.forEach((previousValue, element) => { + if (previousValue) { + element.setAttribute('aria-hidden', previousValue); + } else { + element.removeAttribute('aria-hidden'); + } + }); + this._ariaHiddenElements.clear(); + if (emitEvent) { + this._getAfterAllClosed().next(); + } + } + } + } + /** Hides all of the content that isn't an overlay from assistive technology. */ + _hideNonDialogContentFromAssistiveTechnology() { + const overlayContainer = this._overlayContainer.getContainerElement(); + // Ensure that the overlay container is attached to the DOM. + if (overlayContainer.parentElement) { + const siblings = overlayContainer.parentElement.children; + for (let i = siblings.length - 1; i > -1; i--) { + const sibling = siblings[i]; + if (sibling !== overlayContainer && sibling.nodeName !== 'SCRIPT' && sibling.nodeName !== 'STYLE' && !sibling.hasAttribute('aria-live')) { + this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden')); + sibling.setAttribute('aria-hidden', 'true'); + } + } + } + } + _getAfterAllClosed() { + const parent = this._parentDialog; + return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel; + } + static #_ = this.ɵfac = function Dialog_Factory(t) { + return new (t || Dialog)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.Overlay), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__.Injector), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](DEFAULT_DIALOG_CONFIG, 8), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](Dialog, 12), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.OverlayContainer), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](DIALOG_SCROLL_STRATEGY)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ + token: Dialog, + factory: Dialog.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Dialog, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.Overlay + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Injector + }, { + type: DialogConfig, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject, + args: [DEFAULT_DIALOG_CONFIG] + }] + }, { + type: Dialog, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.SkipSelf + }] + }, { + type: _angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.OverlayContainer + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject, + args: [DIALOG_SCROLL_STRATEGY] + }] + }], null); +})(); +/** + * Executes a callback against all elements in an array while iterating in reverse. + * Useful if the array is being modified as it is being iterated. + */ +function reverseForEach(items, callback) { + let i = items.length; + while (i--) { + callback(items[i]); + } +} +class DialogModule { + static #_ = this.ɵfac = function DialogModule_Factory(t) { + return new (t || DialogModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ + type: DialogModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({ + providers: [Dialog], + imports: [_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.OverlayModule, _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.PortalModule, _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__.A11yModule, + // Re-export the PortalModule so that people extending the `CdkDialogContainer` + // don't have to remember to import it or be faced with an unhelpful error. + _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.PortalModule] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](DialogModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.NgModule, + args: [{ + imports: [_angular_cdk_overlay__WEBPACK_IMPORTED_MODULE_5__.OverlayModule, _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.PortalModule, _angular_cdk_a11y__WEBPACK_IMPORTED_MODULE_3__.A11yModule, CdkDialogContainer], + exports: [ + // Re-export the PortalModule so that people extending the `CdkDialogContainer` + // don't have to remember to import it or be faced with an unhelpful error. + _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_0__.PortalModule, CdkDialogContainer], + providers: [Dialog] + }] + }], null, null); +})(); + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 64986: +/*!*********************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/keycodes.mjs ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ A: () => (/* binding */ A), +/* harmony export */ ALT: () => (/* binding */ ALT), +/* harmony export */ APOSTROPHE: () => (/* binding */ APOSTROPHE), +/* harmony export */ AT_SIGN: () => (/* binding */ AT_SIGN), +/* harmony export */ B: () => (/* binding */ B), +/* harmony export */ BACKSLASH: () => (/* binding */ BACKSLASH), +/* harmony export */ BACKSPACE: () => (/* binding */ BACKSPACE), +/* harmony export */ C: () => (/* binding */ C), +/* harmony export */ CAPS_LOCK: () => (/* binding */ CAPS_LOCK), +/* harmony export */ CLOSE_SQUARE_BRACKET: () => (/* binding */ CLOSE_SQUARE_BRACKET), +/* harmony export */ COMMA: () => (/* binding */ COMMA), +/* harmony export */ CONTEXT_MENU: () => (/* binding */ CONTEXT_MENU), +/* harmony export */ CONTROL: () => (/* binding */ CONTROL), +/* harmony export */ D: () => (/* binding */ D), +/* harmony export */ DASH: () => (/* binding */ DASH), +/* harmony export */ DELETE: () => (/* binding */ DELETE), +/* harmony export */ DOWN_ARROW: () => (/* binding */ DOWN_ARROW), +/* harmony export */ E: () => (/* binding */ E), +/* harmony export */ EIGHT: () => (/* binding */ EIGHT), +/* harmony export */ END: () => (/* binding */ END), +/* harmony export */ ENTER: () => (/* binding */ ENTER), +/* harmony export */ EQUALS: () => (/* binding */ EQUALS), +/* harmony export */ ESCAPE: () => (/* binding */ ESCAPE), +/* harmony export */ F: () => (/* binding */ F), +/* harmony export */ F1: () => (/* binding */ F1), +/* harmony export */ F10: () => (/* binding */ F10), +/* harmony export */ F11: () => (/* binding */ F11), +/* harmony export */ F12: () => (/* binding */ F12), +/* harmony export */ F2: () => (/* binding */ F2), +/* harmony export */ F3: () => (/* binding */ F3), +/* harmony export */ F4: () => (/* binding */ F4), +/* harmony export */ F5: () => (/* binding */ F5), +/* harmony export */ F6: () => (/* binding */ F6), +/* harmony export */ F7: () => (/* binding */ F7), +/* harmony export */ F8: () => (/* binding */ F8), +/* harmony export */ F9: () => (/* binding */ F9), +/* harmony export */ FF_EQUALS: () => (/* binding */ FF_EQUALS), +/* harmony export */ FF_MINUS: () => (/* binding */ FF_MINUS), +/* harmony export */ FF_MUTE: () => (/* binding */ FF_MUTE), +/* harmony export */ FF_SEMICOLON: () => (/* binding */ FF_SEMICOLON), +/* harmony export */ FF_VOLUME_DOWN: () => (/* binding */ FF_VOLUME_DOWN), +/* harmony export */ FF_VOLUME_UP: () => (/* binding */ FF_VOLUME_UP), +/* harmony export */ FIRST_MEDIA: () => (/* binding */ FIRST_MEDIA), +/* harmony export */ FIVE: () => (/* binding */ FIVE), +/* harmony export */ FOUR: () => (/* binding */ FOUR), +/* harmony export */ G: () => (/* binding */ G), +/* harmony export */ H: () => (/* binding */ H), +/* harmony export */ HOME: () => (/* binding */ HOME), +/* harmony export */ I: () => (/* binding */ I), +/* harmony export */ INSERT: () => (/* binding */ INSERT), +/* harmony export */ J: () => (/* binding */ J), +/* harmony export */ K: () => (/* binding */ K), +/* harmony export */ L: () => (/* binding */ L), +/* harmony export */ LAST_MEDIA: () => (/* binding */ LAST_MEDIA), +/* harmony export */ LEFT_ARROW: () => (/* binding */ LEFT_ARROW), +/* harmony export */ M: () => (/* binding */ M), +/* harmony export */ MAC_ENTER: () => (/* binding */ MAC_ENTER), +/* harmony export */ MAC_META: () => (/* binding */ MAC_META), +/* harmony export */ MAC_WK_CMD_LEFT: () => (/* binding */ MAC_WK_CMD_LEFT), +/* harmony export */ MAC_WK_CMD_RIGHT: () => (/* binding */ MAC_WK_CMD_RIGHT), +/* harmony export */ META: () => (/* binding */ META), +/* harmony export */ MUTE: () => (/* binding */ MUTE), +/* harmony export */ N: () => (/* binding */ N), +/* harmony export */ NINE: () => (/* binding */ NINE), +/* harmony export */ NUMPAD_DIVIDE: () => (/* binding */ NUMPAD_DIVIDE), +/* harmony export */ NUMPAD_EIGHT: () => (/* binding */ NUMPAD_EIGHT), +/* harmony export */ NUMPAD_FIVE: () => (/* binding */ NUMPAD_FIVE), +/* harmony export */ NUMPAD_FOUR: () => (/* binding */ NUMPAD_FOUR), +/* harmony export */ NUMPAD_MINUS: () => (/* binding */ NUMPAD_MINUS), +/* harmony export */ NUMPAD_MULTIPLY: () => (/* binding */ NUMPAD_MULTIPLY), +/* harmony export */ NUMPAD_NINE: () => (/* binding */ NUMPAD_NINE), +/* harmony export */ NUMPAD_ONE: () => (/* binding */ NUMPAD_ONE), +/* harmony export */ NUMPAD_PERIOD: () => (/* binding */ NUMPAD_PERIOD), +/* harmony export */ NUMPAD_PLUS: () => (/* binding */ NUMPAD_PLUS), +/* harmony export */ NUMPAD_SEVEN: () => (/* binding */ NUMPAD_SEVEN), +/* harmony export */ NUMPAD_SIX: () => (/* binding */ NUMPAD_SIX), +/* harmony export */ NUMPAD_THREE: () => (/* binding */ NUMPAD_THREE), +/* harmony export */ NUMPAD_TWO: () => (/* binding */ NUMPAD_TWO), +/* harmony export */ NUMPAD_ZERO: () => (/* binding */ NUMPAD_ZERO), +/* harmony export */ NUM_CENTER: () => (/* binding */ NUM_CENTER), +/* harmony export */ NUM_LOCK: () => (/* binding */ NUM_LOCK), +/* harmony export */ O: () => (/* binding */ O), +/* harmony export */ ONE: () => (/* binding */ ONE), +/* harmony export */ OPEN_SQUARE_BRACKET: () => (/* binding */ OPEN_SQUARE_BRACKET), +/* harmony export */ P: () => (/* binding */ P), +/* harmony export */ PAGE_DOWN: () => (/* binding */ PAGE_DOWN), +/* harmony export */ PAGE_UP: () => (/* binding */ PAGE_UP), +/* harmony export */ PAUSE: () => (/* binding */ PAUSE), +/* harmony export */ PERIOD: () => (/* binding */ PERIOD), +/* harmony export */ PLUS_SIGN: () => (/* binding */ PLUS_SIGN), +/* harmony export */ PRINT_SCREEN: () => (/* binding */ PRINT_SCREEN), +/* harmony export */ Q: () => (/* binding */ Q), +/* harmony export */ QUESTION_MARK: () => (/* binding */ QUESTION_MARK), +/* harmony export */ R: () => (/* binding */ R), +/* harmony export */ RIGHT_ARROW: () => (/* binding */ RIGHT_ARROW), +/* harmony export */ S: () => (/* binding */ S), +/* harmony export */ SCROLL_LOCK: () => (/* binding */ SCROLL_LOCK), +/* harmony export */ SEMICOLON: () => (/* binding */ SEMICOLON), +/* harmony export */ SEVEN: () => (/* binding */ SEVEN), +/* harmony export */ SHIFT: () => (/* binding */ SHIFT), +/* harmony export */ SINGLE_QUOTE: () => (/* binding */ SINGLE_QUOTE), +/* harmony export */ SIX: () => (/* binding */ SIX), +/* harmony export */ SLASH: () => (/* binding */ SLASH), +/* harmony export */ SPACE: () => (/* binding */ SPACE), +/* harmony export */ T: () => (/* binding */ T), +/* harmony export */ TAB: () => (/* binding */ TAB), +/* harmony export */ THREE: () => (/* binding */ THREE), +/* harmony export */ TILDE: () => (/* binding */ TILDE), +/* harmony export */ TWO: () => (/* binding */ TWO), +/* harmony export */ U: () => (/* binding */ U), +/* harmony export */ UP_ARROW: () => (/* binding */ UP_ARROW), +/* harmony export */ V: () => (/* binding */ V), +/* harmony export */ VOLUME_DOWN: () => (/* binding */ VOLUME_DOWN), +/* harmony export */ VOLUME_UP: () => (/* binding */ VOLUME_UP), +/* harmony export */ W: () => (/* binding */ W), +/* harmony export */ X: () => (/* binding */ X), +/* harmony export */ Y: () => (/* binding */ Y), +/* harmony export */ Z: () => (/* binding */ Z), +/* harmony export */ ZERO: () => (/* binding */ ZERO), +/* harmony export */ hasModifierKey: () => (/* binding */ hasModifierKey) +/* harmony export */ }); +const MAC_ENTER = 3; +const BACKSPACE = 8; +const TAB = 9; +const NUM_CENTER = 12; +const ENTER = 13; +const SHIFT = 16; +const CONTROL = 17; +const ALT = 18; +const PAUSE = 19; +const CAPS_LOCK = 20; +const ESCAPE = 27; +const SPACE = 32; +const PAGE_UP = 33; +const PAGE_DOWN = 34; +const END = 35; +const HOME = 36; +const LEFT_ARROW = 37; +const UP_ARROW = 38; +const RIGHT_ARROW = 39; +const DOWN_ARROW = 40; +const PLUS_SIGN = 43; +const PRINT_SCREEN = 44; +const INSERT = 45; +const DELETE = 46; +const ZERO = 48; +const ONE = 49; +const TWO = 50; +const THREE = 51; +const FOUR = 52; +const FIVE = 53; +const SIX = 54; +const SEVEN = 55; +const EIGHT = 56; +const NINE = 57; +const FF_SEMICOLON = 59; // Firefox (Gecko) fires this for semicolon instead of 186 +const FF_EQUALS = 61; // Firefox (Gecko) fires this for equals instead of 187 +const QUESTION_MARK = 63; +const AT_SIGN = 64; +const A = 65; +const B = 66; +const C = 67; +const D = 68; +const E = 69; +const F = 70; +const G = 71; +const H = 72; +const I = 73; +const J = 74; +const K = 75; +const L = 76; +const M = 77; +const N = 78; +const O = 79; +const P = 80; +const Q = 81; +const R = 82; +const S = 83; +const T = 84; +const U = 85; +const V = 86; +const W = 87; +const X = 88; +const Y = 89; +const Z = 90; +const META = 91; // WIN_KEY_LEFT +const MAC_WK_CMD_LEFT = 91; +const MAC_WK_CMD_RIGHT = 93; +const CONTEXT_MENU = 93; +const NUMPAD_ZERO = 96; +const NUMPAD_ONE = 97; +const NUMPAD_TWO = 98; +const NUMPAD_THREE = 99; +const NUMPAD_FOUR = 100; +const NUMPAD_FIVE = 101; +const NUMPAD_SIX = 102; +const NUMPAD_SEVEN = 103; +const NUMPAD_EIGHT = 104; +const NUMPAD_NINE = 105; +const NUMPAD_MULTIPLY = 106; +const NUMPAD_PLUS = 107; +const NUMPAD_MINUS = 109; +const NUMPAD_PERIOD = 110; +const NUMPAD_DIVIDE = 111; +const F1 = 112; +const F2 = 113; +const F3 = 114; +const F4 = 115; +const F5 = 116; +const F6 = 117; +const F7 = 118; +const F8 = 119; +const F9 = 120; +const F10 = 121; +const F11 = 122; +const F12 = 123; +const NUM_LOCK = 144; +const SCROLL_LOCK = 145; +const FIRST_MEDIA = 166; +const FF_MINUS = 173; +const MUTE = 173; // Firefox (Gecko) fires 181 for MUTE +const VOLUME_DOWN = 174; // Firefox (Gecko) fires 182 for VOLUME_DOWN +const VOLUME_UP = 175; // Firefox (Gecko) fires 183 for VOLUME_UP +const FF_MUTE = 181; +const FF_VOLUME_DOWN = 182; +const LAST_MEDIA = 183; +const FF_VOLUME_UP = 183; +const SEMICOLON = 186; // Firefox (Gecko) fires 59 for SEMICOLON +const EQUALS = 187; // Firefox (Gecko) fires 61 for EQUALS +const COMMA = 188; +const DASH = 189; // Firefox (Gecko) fires 173 for DASH/MINUS +const PERIOD = 190; +const SLASH = 191; +const APOSTROPHE = 192; +const TILDE = 192; +const OPEN_SQUARE_BRACKET = 219; +const BACKSLASH = 220; +const CLOSE_SQUARE_BRACKET = 221; +const SINGLE_QUOTE = 222; +const MAC_META = 224; + +/** + * Checks whether a modifier key is pressed. + * @param event Event to be checked. + */ +function hasModifierKey(event, ...modifiers) { + if (modifiers.length) { + return modifiers.some(modifier => event[modifier]); + } + return event.altKey || event.shiftKey || event.ctrlKey || event.metaKey; +} + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 42085: +/*!*******************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/layout.mjs ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ BreakpointObserver: () => (/* binding */ BreakpointObserver), +/* harmony export */ Breakpoints: () => (/* binding */ Breakpoints), +/* harmony export */ LayoutModule: () => (/* binding */ LayoutModule), +/* harmony export */ MediaMatcher: () => (/* binding */ MediaMatcher) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/coercion */ 79663); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ 11640); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ 36812); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs */ 64517); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/operators */ 75117); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ 99473); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs/operators */ 43396); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs/operators */ 24406); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs/operators */ 56816); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rxjs/operators */ 65213); +/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/platform */ 51338); + + + + + + +class LayoutModule { + static #_ = this.ɵfac = function LayoutModule_Factory(t) { + return new (t || LayoutModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ + type: LayoutModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({}); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LayoutModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, + args: [{}] + }], null, null); +})(); + +/** Global registry for all dynamically-created, injected media queries. */ +const mediaQueriesForWebkitCompatibility = new Set(); +/** Style tag that holds all of the dynamically-created media queries. */ +let mediaQueryStyleNode; +/** A utility for calling matchMedia queries. */ +class MediaMatcher { + constructor(_platform, _nonce) { + this._platform = _platform; + this._nonce = _nonce; + this._matchMedia = this._platform.isBrowser && window.matchMedia ? + // matchMedia is bound to the window scope intentionally as it is an illegal invocation to + // call it from a different scope. + window.matchMedia.bind(window) : noopMatchMedia; + } + /** + * Evaluates the given media query and returns the native MediaQueryList from which results + * can be retrieved. + * Confirms the layout engine will trigger for the selector query provided and returns the + * MediaQueryList for the query provided. + */ + matchMedia(query) { + if (this._platform.WEBKIT || this._platform.BLINK) { + createEmptyStyleRule(query, this._nonce); + } + return this._matchMedia(query); + } + static #_ = this.ɵfac = function MediaMatcher_Factory(t) { + return new (t || MediaMatcher)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.CSP_NONCE, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: MediaMatcher, + factory: MediaMatcher.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](MediaMatcher, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.Platform + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.CSP_NONCE] + }] + }], null); +})(); +/** + * Creates an empty stylesheet that is used to work around browser inconsistencies related to + * `matchMedia`. At the time of writing, it handles the following cases: + * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia` + * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration. + * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules + * inside the `@media` match existing elements on the page. We work around it by having one rule + * targeting the `body`. See https://github.com/angular/components/issues/23546. + */ +function createEmptyStyleRule(query, nonce) { + if (mediaQueriesForWebkitCompatibility.has(query)) { + return; + } + try { + if (!mediaQueryStyleNode) { + mediaQueryStyleNode = document.createElement('style'); + if (nonce) { + mediaQueryStyleNode.setAttribute('nonce', nonce); + } + mediaQueryStyleNode.setAttribute('type', 'text/css'); + document.head.appendChild(mediaQueryStyleNode); + } + if (mediaQueryStyleNode.sheet) { + mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0); + mediaQueriesForWebkitCompatibility.add(query); + } + } catch (e) { + console.error(e); + } +} +/** No-op matchMedia replacement for non-browser platforms. */ +function noopMatchMedia(query) { + // Use `as any` here to avoid adding additional necessary properties for + // the noop matcher. + return { + matches: query === 'all' || query === '', + media: query, + addListener: () => {}, + removeListener: () => {} + }; +} + +/** Utility for checking the matching state of @media queries. */ +class BreakpointObserver { + constructor(_mediaMatcher, _zone) { + this._mediaMatcher = _mediaMatcher; + this._zone = _zone; + /** A map of all media queries currently being listened for. */ + this._queries = new Map(); + /** A subject for all other observables to takeUntil based on. */ + this._destroySubject = new rxjs__WEBPACK_IMPORTED_MODULE_2__.Subject(); + } + /** Completes the active subject, signalling to all other observables to complete. */ + ngOnDestroy() { + this._destroySubject.next(); + this._destroySubject.complete(); + } + /** + * Whether one or more media queries match the current viewport size. + * @param value One or more media queries to check. + * @returns Whether any of the media queries match. + */ + isMatched(value) { + const queries = splitQueries((0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__.coerceArray)(value)); + return queries.some(mediaQuery => this._registerQuery(mediaQuery).mql.matches); + } + /** + * Gets an observable of results for the given queries that will emit new results for any changes + * in matching of the given queries. + * @param value One or more media queries to check. + * @returns A stream of matches for the given queries. + */ + observe(value) { + const queries = splitQueries((0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__.coerceArray)(value)); + const observables = queries.map(query => this._registerQuery(query).observable); + let stateObservable = (0,rxjs__WEBPACK_IMPORTED_MODULE_4__.combineLatest)(observables); + // Emit the first state immediately, and then debounce the subsequent emissions. + stateObservable = (0,rxjs__WEBPACK_IMPORTED_MODULE_5__.concat)(stateObservable.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.take)(1)), stateObservable.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.skip)(1), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_8__.debounceTime)(0))); + return stateObservable.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_9__.map)(breakpointStates => { + const response = { + matches: false, + breakpoints: {} + }; + breakpointStates.forEach(({ + matches, + query + }) => { + response.matches = response.matches || matches; + response.breakpoints[query] = matches; + }); + return response; + })); + } + /** Registers a specific query to be listened for. */ + _registerQuery(query) { + // Only set up a new MediaQueryList if it is not already being listened for. + if (this._queries.has(query)) { + return this._queries.get(query); + } + const mql = this._mediaMatcher.matchMedia(query); + // Create callback for match changes and add it is as a listener. + const queryObservable = new rxjs__WEBPACK_IMPORTED_MODULE_10__.Observable(observer => { + // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed + // back into the zone because matchMedia is only included in Zone.js by loading the + // webapis-media-query.js file alongside the zone.js file. Additionally, some browsers do not + // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js + // patches it. + const handler = e => this._zone.run(() => observer.next(e)); + mql.addListener(handler); + return () => { + mql.removeListener(handler); + }; + }).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_11__.startWith)(mql), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_9__.map)(({ + matches + }) => ({ + query, + matches + })), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_12__.takeUntil)(this._destroySubject)); + // Add the MediaQueryList to the set of queries. + const output = { + observable: queryObservable, + mql + }; + this._queries.set(query, output); + return output; + } + static #_ = this.ɵfac = function BreakpointObserver_Factory(t) { + return new (t || BreakpointObserver)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](MediaMatcher), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: BreakpointObserver, + factory: BreakpointObserver.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BreakpointObserver, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: MediaMatcher + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }], null); +})(); +/** + * Split each query string into separate query strings if two queries are provided as comma + * separated. + */ +function splitQueries(queries) { + return queries.map(query => query.split(',')).reduce((a1, a2) => a1.concat(a2)).map(query => query.trim()); +} + +// PascalCase is being used as Breakpoints is used like an enum. +// tslint:disable-next-line:variable-name +const Breakpoints = { + XSmall: '(max-width: 599.98px)', + Small: '(min-width: 600px) and (max-width: 959.98px)', + Medium: '(min-width: 960px) and (max-width: 1279.98px)', + Large: '(min-width: 1280px) and (max-width: 1919.98px)', + XLarge: '(min-width: 1920px)', + Handset: '(max-width: 599.98px) and (orientation: portrait), ' + '(max-width: 959.98px) and (orientation: landscape)', + Tablet: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), ' + '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)', + Web: '(min-width: 840px) and (orientation: portrait), ' + '(min-width: 1280px) and (orientation: landscape)', + HandsetPortrait: '(max-width: 599.98px) and (orientation: portrait)', + TabletPortrait: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)', + WebPortrait: '(min-width: 840px) and (orientation: portrait)', + HandsetLandscape: '(max-width: 959.98px) and (orientation: landscape)', + TabletLandscape: '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)', + WebLandscape: '(min-width: 1280px) and (orientation: landscape)' +}; + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 98472: +/*!**********************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/observers.mjs ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ CdkObserveContent: () => (/* binding */ CdkObserveContent), +/* harmony export */ ContentObserver: () => (/* binding */ ContentObserver), +/* harmony export */ MutationObserverFactory: () => (/* binding */ MutationObserverFactory), +/* harmony export */ ObserversModule: () => (/* binding */ ObserversModule) +/* harmony export */ }); +/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/coercion */ 79663); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ 64517); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ 43396); + + + + + + +/** + * Factory that creates a new MutationObserver and allows us to stub it out in unit tests. + * @docs-private + */ +class MutationObserverFactory { + create(callback) { + return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback); + } + static #_ = this.ɵfac = function MutationObserverFactory_Factory(t) { + return new (t || MutationObserverFactory)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: MutationObserverFactory, + factory: MutationObserverFactory.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](MutationObserverFactory, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], null, null); +})(); +/** An injectable service that allows watching elements for changes to their content. */ +class ContentObserver { + constructor(_mutationObserverFactory) { + this._mutationObserverFactory = _mutationObserverFactory; + /** Keeps track of the existing MutationObservers so they can be reused. */ + this._observedElements = new Map(); + } + ngOnDestroy() { + this._observedElements.forEach((_, element) => this._cleanupObserver(element)); + } + observe(elementOrRef) { + const element = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__.coerceElement)(elementOrRef); + return new rxjs__WEBPACK_IMPORTED_MODULE_2__.Observable(observer => { + const stream = this._observeElement(element); + const subscription = stream.subscribe(observer); + return () => { + subscription.unsubscribe(); + this._unobserveElement(element); + }; + }); + } + /** + * Observes the given element by using the existing MutationObserver if available, or creating a + * new one if not. + */ + _observeElement(element) { + if (!this._observedElements.has(element)) { + const stream = new rxjs__WEBPACK_IMPORTED_MODULE_3__.Subject(); + const observer = this._mutationObserverFactory.create(mutations => stream.next(mutations)); + if (observer) { + observer.observe(element, { + characterData: true, + childList: true, + subtree: true + }); + } + this._observedElements.set(element, { + observer, + stream, + count: 1 + }); + } else { + this._observedElements.get(element).count++; + } + return this._observedElements.get(element).stream; + } + /** + * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is + * observing this element. + */ + _unobserveElement(element) { + if (this._observedElements.has(element)) { + this._observedElements.get(element).count--; + if (!this._observedElements.get(element).count) { + this._cleanupObserver(element); + } + } + } + /** Clean up the underlying MutationObserver for the specified element. */ + _cleanupObserver(element) { + if (this._observedElements.has(element)) { + const { + observer, + stream + } = this._observedElements.get(element); + if (observer) { + observer.disconnect(); + } + stream.complete(); + this._observedElements.delete(element); + } + } + static #_ = this.ɵfac = function ContentObserver_Factory(t) { + return new (t || ContentObserver)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](MutationObserverFactory)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: ContentObserver, + factory: ContentObserver.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ContentObserver, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: MutationObserverFactory + }], null); +})(); +/** + * Directive that triggers a callback whenever the content of + * its associated element has changed. + */ +class CdkObserveContent { + /** + * Whether observing content is disabled. This option can be used + * to disconnect the underlying MutationObserver until it is needed. + */ + get disabled() { + return this._disabled; + } + set disabled(value) { + this._disabled = value; + this._disabled ? this._unsubscribe() : this._subscribe(); + } + /** Debounce interval for emitting the changes. */ + get debounce() { + return this._debounce; + } + set debounce(value) { + this._debounce = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_1__.coerceNumberProperty)(value); + this._subscribe(); + } + constructor(_contentObserver, _elementRef, _ngZone) { + this._contentObserver = _contentObserver; + this._elementRef = _elementRef; + this._ngZone = _ngZone; + /** Event emitted for each change in the element's content. */ + this.event = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); + this._disabled = false; + this._currentSubscription = null; + } + ngAfterContentInit() { + if (!this._currentSubscription && !this.disabled) { + this._subscribe(); + } + } + ngOnDestroy() { + this._unsubscribe(); + } + _subscribe() { + this._unsubscribe(); + const stream = this._contentObserver.observe(this._elementRef); + // TODO(mmalerba): We shouldn't be emitting on this @Output() outside the zone. + // Consider brining it back inside the zone next time we're making breaking changes. + // Bringing it back inside can cause things like infinite change detection loops and changed + // after checked errors if people's code isn't handling it properly. + this._ngZone.runOutsideAngular(() => { + this._currentSubscription = (this.debounce ? stream.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.debounceTime)(this.debounce)) : stream).subscribe(this.event); + }); + } + _unsubscribe() { + this._currentSubscription?.unsubscribe(); + } + static #_ = this.ɵfac = function CdkObserveContent_Factory(t) { + return new (t || CdkObserveContent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ContentObserver), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkObserveContent, + selectors: [["", "cdkObserveContent", ""]], + inputs: { + disabled: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "cdkObserveContentDisabled", "disabled", _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute], + debounce: "debounce" + }, + outputs: { + event: "cdkObserveContent" + }, + exportAs: ["cdkObserveContent"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputTransformsFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkObserveContent, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdkObserveContent]', + exportAs: 'cdkObserveContent', + standalone: true + }] + }], () => [{ + type: ContentObserver + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }], { + event: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output, + args: ['cdkObserveContent'] + }], + disabled: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + alias: 'cdkObserveContentDisabled', + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute + }] + }], + debounce: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); +class ObserversModule { + static #_ = this.ɵfac = function ObserversModule_Factory(t) { + return new (t || ObserversModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ + type: ObserversModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ + providers: [MutationObserverFactory] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ObserversModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, + args: [{ + imports: [CdkObserveContent], + exports: [CdkObserveContent], + providers: [MutationObserverFactory] + }] + }], null, null); +})(); + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 36792: +/*!******************************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/observers/private.mjs ***! + \******************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SharedResizeObserver: () => (/* binding */ SharedResizeObserver) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 64517); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 61856); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ 95840); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ 65213); + + + + + +/** + * Handler that logs "ResizeObserver loop limit exceeded" errors. + * These errors are not shown in the Chrome console, so we log them to ensure developers are aware. + * @param e The error + */ +const loopLimitExceededErrorHandler = e => { + if (e instanceof Error && e.message === 'ResizeObserver loop limit exceeded') { + console.error(`${e.message}. This could indicate a performance issue with your app. See https://github.com/WICG/resize-observer/blob/master/explainer.md#error-handling`); + } +}; +/** + * A shared ResizeObserver to be used for a particular box type (content-box, border-box, or + * device-pixel-content-box) + */ +class SingleBoxSharedResizeObserver { + constructor( /** The box type to observe for resizes. */ + _box) { + this._box = _box; + /** Stream that emits when the shared observer is destroyed. */ + this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_0__.Subject(); + /** Stream of all events from the ResizeObserver. */ + this._resizeSubject = new rxjs__WEBPACK_IMPORTED_MODULE_0__.Subject(); + /** A map of elements to streams of their resize events. */ + this._elementObservables = new Map(); + if (typeof ResizeObserver !== 'undefined') { + this._resizeObserver = new ResizeObserver(entries => this._resizeSubject.next(entries)); + } + } + /** + * Gets a stream of resize events for the given element. + * @param target The element to observe. + * @return The stream of resize events for the element. + */ + observe(target) { + if (!this._elementObservables.has(target)) { + this._elementObservables.set(target, new rxjs__WEBPACK_IMPORTED_MODULE_1__.Observable(observer => { + const subscription = this._resizeSubject.subscribe(observer); + this._resizeObserver?.observe(target, { + box: this._box + }); + return () => { + this._resizeObserver?.unobserve(target); + subscription.unsubscribe(); + this._elementObservables.delete(target); + }; + }).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.filter)(entries => entries.some(entry => entry.target === target)), + // Share a replay of the last event so that subsequent calls to observe the same element + // receive initial sizing info like the first one. Also enable ref counting so the + // element will be automatically unobserved when there are no more subscriptions. + (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.shareReplay)({ + bufferSize: 1, + refCount: true + }), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.takeUntil)(this._destroyed))); + } + return this._elementObservables.get(target); + } + /** Destroys this instance. */ + destroy() { + this._destroyed.next(); + this._destroyed.complete(); + this._resizeSubject.complete(); + this._elementObservables.clear(); + } +} +/** + * Allows observing resize events on multiple elements using a shared set of ResizeObserver. + * Sharing a ResizeObserver instance is recommended for better performance (see + * https://github.com/WICG/resize-observer/issues/59). + * + * Rather than share a single `ResizeObserver`, this class creates one `ResizeObserver` per type + * of observed box ('content-box', 'border-box', and 'device-pixel-content-box'). This avoids + * later calls to `observe` with a different box type from influencing the events dispatched to + * earlier calls. + */ +class SharedResizeObserver { + constructor() { + /** Map of box type to shared resize observer. */ + this._observers = new Map(); + /** The Angular zone. */ + this._ngZone = (0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_5__.NgZone); + if (typeof ResizeObserver !== 'undefined' && (typeof ngDevMode === 'undefined' || ngDevMode)) { + this._ngZone.runOutsideAngular(() => { + window.addEventListener('error', loopLimitExceededErrorHandler); + }); + } + } + ngOnDestroy() { + for (const [, observer] of this._observers) { + observer.destroy(); + } + this._observers.clear(); + if (typeof ResizeObserver !== 'undefined' && (typeof ngDevMode === 'undefined' || ngDevMode)) { + window.removeEventListener('error', loopLimitExceededErrorHandler); + } + } + /** + * Gets a stream of resize events for the given target element and box type. + * @param target The element to observe for resizes. + * @param options Options to pass to the `ResizeObserver` + * @return The stream of resize events for the element. + */ + observe(target, options) { + const box = options?.box || 'content-box'; + if (!this._observers.has(box)) { + this._observers.set(box, new SingleBoxSharedResizeObserver(box)); + } + return this._observers.get(box).observe(target); + } + static #_ = this.ɵfac = function SharedResizeObserver_Factory(t) { + return new (t || SharedResizeObserver)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineInjectable"]({ + token: SharedResizeObserver, + factory: SharedResizeObserver.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵsetClassMetadata"](SharedResizeObserver, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_5__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [], null); +})(); + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 43181: +/*!********************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/overlay.mjs ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ BlockScrollStrategy: () => (/* binding */ BlockScrollStrategy), +/* harmony export */ CdkConnectedOverlay: () => (/* binding */ CdkConnectedOverlay), +/* harmony export */ CdkOverlayOrigin: () => (/* binding */ CdkOverlayOrigin), +/* harmony export */ CdkScrollable: () => (/* reexport safe */ _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.CdkScrollable), +/* harmony export */ CloseScrollStrategy: () => (/* binding */ CloseScrollStrategy), +/* harmony export */ ConnectedOverlayPositionChange: () => (/* binding */ ConnectedOverlayPositionChange), +/* harmony export */ ConnectionPositionPair: () => (/* binding */ ConnectionPositionPair), +/* harmony export */ FlexibleConnectedPositionStrategy: () => (/* binding */ FlexibleConnectedPositionStrategy), +/* harmony export */ FullscreenOverlayContainer: () => (/* binding */ FullscreenOverlayContainer), +/* harmony export */ GlobalPositionStrategy: () => (/* binding */ GlobalPositionStrategy), +/* harmony export */ NoopScrollStrategy: () => (/* binding */ NoopScrollStrategy), +/* harmony export */ Overlay: () => (/* binding */ Overlay), +/* harmony export */ OverlayConfig: () => (/* binding */ OverlayConfig), +/* harmony export */ OverlayContainer: () => (/* binding */ OverlayContainer), +/* harmony export */ OverlayKeyboardDispatcher: () => (/* binding */ OverlayKeyboardDispatcher), +/* harmony export */ OverlayModule: () => (/* binding */ OverlayModule), +/* harmony export */ OverlayOutsideClickDispatcher: () => (/* binding */ OverlayOutsideClickDispatcher), +/* harmony export */ OverlayPositionBuilder: () => (/* binding */ OverlayPositionBuilder), +/* harmony export */ OverlayRef: () => (/* binding */ OverlayRef), +/* harmony export */ RepositionScrollStrategy: () => (/* binding */ RepositionScrollStrategy), +/* harmony export */ STANDARD_DROPDOWN_ADJACENT_POSITIONS: () => (/* binding */ STANDARD_DROPDOWN_ADJACENT_POSITIONS), +/* harmony export */ STANDARD_DROPDOWN_BELOW_POSITIONS: () => (/* binding */ STANDARD_DROPDOWN_BELOW_POSITIONS), +/* harmony export */ ScrollDispatcher: () => (/* reexport safe */ _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ScrollDispatcher), +/* harmony export */ ScrollStrategyOptions: () => (/* binding */ ScrollStrategyOptions), +/* harmony export */ ScrollingVisibility: () => (/* binding */ ScrollingVisibility), +/* harmony export */ ViewportRuler: () => (/* reexport safe */ _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ViewportRuler), +/* harmony export */ validateHorizontalPosition: () => (/* binding */ validateHorizontalPosition), +/* harmony export */ validateVerticalPosition: () => (/* binding */ validateVerticalPosition) +/* harmony export */ }); +/* harmony import */ var _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/cdk/scrolling */ 73172); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/coercion */ 79663); +/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/cdk/platform */ 51338); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ 61856); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs/operators */ 75117); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs/operators */ 65213); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! rxjs/operators */ 92348); +/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/cdk/bidi */ 457); +/* harmony import */ var _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/cdk/portal */ 63965); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs */ 36421); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs */ 870); +/* harmony import */ var _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/cdk/keycodes */ 64986); + + + + + + + + + + + + + + + + +const scrollBehaviorSupported = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.supportsScrollBehavior)(); +/** + * Strategy that will prevent the user from scrolling while the overlay is visible. + */ +class BlockScrollStrategy { + constructor(_viewportRuler, document) { + this._viewportRuler = _viewportRuler; + this._previousHTMLStyles = { + top: '', + left: '' + }; + this._isEnabled = false; + this._document = document; + } + /** Attaches this scroll strategy to an overlay. */ + attach() {} + /** Blocks page-level scroll while the attached overlay is open. */ + enable() { + if (this._canBeEnabled()) { + const root = this._document.documentElement; + this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition(); + // Cache the previous inline styles in case the user had set them. + this._previousHTMLStyles.left = root.style.left || ''; + this._previousHTMLStyles.top = root.style.top || ''; + // Note: we're using the `html` node, instead of the `body`, because the `body` may + // have the user agent margin, whereas the `html` is guaranteed not to have one. + root.style.left = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(-this._previousScrollPosition.left); + root.style.top = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(-this._previousScrollPosition.top); + root.classList.add('cdk-global-scrollblock'); + this._isEnabled = true; + } + } + /** Unblocks page-level scroll while the attached overlay is open. */ + disable() { + if (this._isEnabled) { + const html = this._document.documentElement; + const body = this._document.body; + const htmlStyle = html.style; + const bodyStyle = body.style; + const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || ''; + const previousBodyScrollBehavior = bodyStyle.scrollBehavior || ''; + this._isEnabled = false; + htmlStyle.left = this._previousHTMLStyles.left; + htmlStyle.top = this._previousHTMLStyles.top; + html.classList.remove('cdk-global-scrollblock'); + // Disable user-defined smooth scrolling temporarily while we restore the scroll position. + // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior + // Note that we don't mutate the property if the browser doesn't support `scroll-behavior`, + // because it can throw off feature detections in `supportsScrollBehavior` which + // checks for `'scrollBehavior' in documentElement.style`. + if (scrollBehaviorSupported) { + htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto'; + } + window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top); + if (scrollBehaviorSupported) { + htmlStyle.scrollBehavior = previousHtmlScrollBehavior; + bodyStyle.scrollBehavior = previousBodyScrollBehavior; + } + } + } + _canBeEnabled() { + // Since the scroll strategies can't be singletons, we have to use a global CSS class + // (`cdk-global-scrollblock`) to make sure that we don't try to disable global + // scrolling multiple times. + const html = this._document.documentElement; + if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) { + return false; + } + const body = this._document.body; + const viewport = this._viewportRuler.getViewportSize(); + return body.scrollHeight > viewport.height || body.scrollWidth > viewport.width; + } +} + +/** + * Returns an error to be thrown when attempting to attach an already-attached scroll strategy. + */ +function getMatScrollStrategyAlreadyAttachedError() { + return Error(`Scroll strategy has already been attached.`); +} + +/** + * Strategy that will close the overlay as soon as the user starts scrolling. + */ +class CloseScrollStrategy { + constructor(_scrollDispatcher, _ngZone, _viewportRuler, _config) { + this._scrollDispatcher = _scrollDispatcher; + this._ngZone = _ngZone; + this._viewportRuler = _viewportRuler; + this._config = _config; + this._scrollSubscription = null; + /** Detaches the overlay ref and disables the scroll strategy. */ + this._detach = () => { + this.disable(); + if (this._overlayRef.hasAttached()) { + this._ngZone.run(() => this._overlayRef.detach()); + } + }; + } + /** Attaches this scroll strategy to an overlay. */ + attach(overlayRef) { + if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw getMatScrollStrategyAlreadyAttachedError(); + } + this._overlayRef = overlayRef; + } + /** Enables the closing of the attached overlay on scroll. */ + enable() { + if (this._scrollSubscription) { + return; + } + const stream = this._scrollDispatcher.scrolled(0).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.filter)(scrollable => { + return !scrollable || !this._overlayRef.overlayElement.contains(scrollable.getElementRef().nativeElement); + })); + if (this._config && this._config.threshold && this._config.threshold > 1) { + this._initialScrollPosition = this._viewportRuler.getViewportScrollPosition().top; + this._scrollSubscription = stream.subscribe(() => { + const scrollPosition = this._viewportRuler.getViewportScrollPosition().top; + if (Math.abs(scrollPosition - this._initialScrollPosition) > this._config.threshold) { + this._detach(); + } else { + this._overlayRef.updatePosition(); + } + }); + } else { + this._scrollSubscription = stream.subscribe(this._detach); + } + } + /** Disables the closing the attached overlay on scroll. */ + disable() { + if (this._scrollSubscription) { + this._scrollSubscription.unsubscribe(); + this._scrollSubscription = null; + } + } + detach() { + this.disable(); + this._overlayRef = null; + } +} + +/** Scroll strategy that doesn't do anything. */ +class NoopScrollStrategy { + /** Does nothing, as this scroll strategy is a no-op. */ + enable() {} + /** Does nothing, as this scroll strategy is a no-op. */ + disable() {} + /** Does nothing, as this scroll strategy is a no-op. */ + attach() {} +} + +/** + * Gets whether an element is scrolled outside of view by any of its parent scrolling containers. + * @param element Dimensions of the element (from getBoundingClientRect) + * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect) + * @returns Whether the element is scrolled out of view + * @docs-private + */ +function isElementScrolledOutsideView(element, scrollContainers) { + return scrollContainers.some(containerBounds => { + const outsideAbove = element.bottom < containerBounds.top; + const outsideBelow = element.top > containerBounds.bottom; + const outsideLeft = element.right < containerBounds.left; + const outsideRight = element.left > containerBounds.right; + return outsideAbove || outsideBelow || outsideLeft || outsideRight; + }); +} +/** + * Gets whether an element is clipped by any of its scrolling containers. + * @param element Dimensions of the element (from getBoundingClientRect) + * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect) + * @returns Whether the element is clipped + * @docs-private + */ +function isElementClippedByScrolling(element, scrollContainers) { + return scrollContainers.some(scrollContainerRect => { + const clippedAbove = element.top < scrollContainerRect.top; + const clippedBelow = element.bottom > scrollContainerRect.bottom; + const clippedLeft = element.left < scrollContainerRect.left; + const clippedRight = element.right > scrollContainerRect.right; + return clippedAbove || clippedBelow || clippedLeft || clippedRight; + }); +} + +/** + * Strategy that will update the element position as the user is scrolling. + */ +class RepositionScrollStrategy { + constructor(_scrollDispatcher, _viewportRuler, _ngZone, _config) { + this._scrollDispatcher = _scrollDispatcher; + this._viewportRuler = _viewportRuler; + this._ngZone = _ngZone; + this._config = _config; + this._scrollSubscription = null; + } + /** Attaches this scroll strategy to an overlay. */ + attach(overlayRef) { + if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw getMatScrollStrategyAlreadyAttachedError(); + } + this._overlayRef = overlayRef; + } + /** Enables repositioning of the attached overlay on scroll. */ + enable() { + if (!this._scrollSubscription) { + const throttle = this._config ? this._config.scrollThrottle : 0; + this._scrollSubscription = this._scrollDispatcher.scrolled(throttle).subscribe(() => { + this._overlayRef.updatePosition(); + // TODO(crisbeto): make `close` on by default once all components can handle it. + if (this._config && this._config.autoClose) { + const overlayRect = this._overlayRef.overlayElement.getBoundingClientRect(); + const { + width, + height + } = this._viewportRuler.getViewportSize(); + // TODO(crisbeto): include all ancestor scroll containers here once + // we have a way of exposing the trigger element to the scroll strategy. + const parentRects = [{ + width, + height, + bottom: height, + right: width, + top: 0, + left: 0 + }]; + if (isElementScrolledOutsideView(overlayRect, parentRects)) { + this.disable(); + this._ngZone.run(() => this._overlayRef.detach()); + } + } + }); + } + } + /** Disables repositioning of the attached overlay on scroll. */ + disable() { + if (this._scrollSubscription) { + this._scrollSubscription.unsubscribe(); + this._scrollSubscription = null; + } + } + detach() { + this.disable(); + this._overlayRef = null; + } +} + +/** + * Options for how an overlay will handle scrolling. + * + * Users can provide a custom value for `ScrollStrategyOptions` to replace the default + * behaviors. This class primarily acts as a factory for ScrollStrategy instances. + */ +class ScrollStrategyOptions { + constructor(_scrollDispatcher, _viewportRuler, _ngZone, document) { + this._scrollDispatcher = _scrollDispatcher; + this._viewportRuler = _viewportRuler; + this._ngZone = _ngZone; + /** Do nothing on scroll. */ + this.noop = () => new NoopScrollStrategy(); + /** + * Close the overlay as soon as the user scrolls. + * @param config Configuration to be used inside the scroll strategy. + */ + this.close = config => new CloseScrollStrategy(this._scrollDispatcher, this._ngZone, this._viewportRuler, config); + /** Block scrolling. */ + this.block = () => new BlockScrollStrategy(this._viewportRuler, this._document); + /** + * Update the overlay's position on scroll. + * @param config Configuration to be used inside the scroll strategy. + * Allows debouncing the reposition calls. + */ + this.reposition = config => new RepositionScrollStrategy(this._scrollDispatcher, this._viewportRuler, this._ngZone, config); + this._document = document; + } + static #_ = this.ɵfac = function ScrollStrategyOptions_Factory(t) { + return new (t || ScrollStrategyOptions)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ScrollDispatcher), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ViewportRuler), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: ScrollStrategyOptions, + factory: ScrollStrategyOptions.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](ScrollStrategyOptions, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ScrollDispatcher + }, { + type: _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ViewportRuler + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT] + }] + }], null); +})(); + +/** Initial configuration used when creating an overlay. */ +class OverlayConfig { + constructor(config) { + /** Strategy to be used when handling scroll events while the overlay is open. */ + this.scrollStrategy = new NoopScrollStrategy(); + /** Custom class to add to the overlay pane. */ + this.panelClass = ''; + /** Whether the overlay has a backdrop. */ + this.hasBackdrop = false; + /** Custom class to add to the backdrop */ + this.backdropClass = 'cdk-overlay-dark-backdrop'; + /** + * Whether the overlay should be disposed of when the user goes backwards/forwards in history. + * Note that this usually doesn't include clicking on links (unless the user is using + * the `HashLocationStrategy`). + */ + this.disposeOnNavigation = false; + if (config) { + // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3, + // loses the array generic type in the `for of`. But we *also* have to use `Array` because + // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration` + const configKeys = Object.keys(config); + for (const key of configKeys) { + if (config[key] !== undefined) { + // TypeScript, as of version 3.5, sees the left-hand-side of this expression + // as "I don't know *which* key this is, so the only valid value is the intersection + // of all the possible values." In this case, that happens to be `undefined`. TypeScript + // is not smart enough to see that the right-hand-side is actually an access of the same + // exact type with the same exact key, meaning that the value type must be identical. + // So we use `any` to work around this. + this[key] = config[key]; + } + } + } + } +} + +/** The points of the origin element and the overlay element to connect. */ +class ConnectionPositionPair { + constructor(origin, overlay, /** Offset along the X axis. */ + offsetX, /** Offset along the Y axis. */ + offsetY, /** Class(es) to be applied to the panel while this position is active. */ + panelClass) { + this.offsetX = offsetX; + this.offsetY = offsetY; + this.panelClass = panelClass; + this.originX = origin.originX; + this.originY = origin.originY; + this.overlayX = overlay.overlayX; + this.overlayY = overlay.overlayY; + } +} +/** + * Set of properties regarding the position of the origin and overlay relative to the viewport + * with respect to the containing Scrollable elements. + * + * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the + * bounds of any one of the strategy's Scrollable's bounding client rectangle. + * + * The overlay and origin are outside view if there is no overlap between their bounding client + * rectangle and any one of the strategy's Scrollable's bounding client rectangle. + * + * ----------- ----------- + * | outside | | clipped | + * | view | -------------------------- + * | | | | | | + * ---------- | ----------- | + * -------------------------- | | + * | | | Scrollable | + * | | | | + * | | -------------------------- + * | Scrollable | + * | | + * -------------------------- + * + * @docs-private + */ +class ScrollingVisibility {} +/** The change event emitted by the strategy when a fallback position is used. */ +class ConnectedOverlayPositionChange { + constructor( /** The position used as a result of this change. */ + connectionPair, /** @docs-private */ + scrollableViewProperties) { + this.connectionPair = connectionPair; + this.scrollableViewProperties = scrollableViewProperties; + } +} +/** + * Validates whether a vertical position property matches the expected values. + * @param property Name of the property being validated. + * @param value Value of the property being validated. + * @docs-private + */ +function validateVerticalPosition(property, value) { + if (value !== 'top' && value !== 'bottom' && value !== 'center') { + throw Error(`ConnectedPosition: Invalid ${property} "${value}". ` + `Expected "top", "bottom" or "center".`); + } +} +/** + * Validates whether a horizontal position property matches the expected values. + * @param property Name of the property being validated. + * @param value Value of the property being validated. + * @docs-private + */ +function validateHorizontalPosition(property, value) { + if (value !== 'start' && value !== 'end' && value !== 'center') { + throw Error(`ConnectedPosition: Invalid ${property} "${value}". ` + `Expected "start", "end" or "center".`); + } +} + +/** + * Service for dispatching events that land on the body to appropriate overlay ref, + * if any. It maintains a list of attached overlays to determine best suited overlay based + * on event target and order of overlay opens. + */ +class BaseOverlayDispatcher { + constructor(document) { + /** Currently attached overlays in the order they were attached. */ + this._attachedOverlays = []; + this._document = document; + } + ngOnDestroy() { + this.detach(); + } + /** Add a new overlay to the list of attached overlay refs. */ + add(overlayRef) { + // Ensure that we don't get the same overlay multiple times. + this.remove(overlayRef); + this._attachedOverlays.push(overlayRef); + } + /** Remove an overlay from the list of attached overlay refs. */ + remove(overlayRef) { + const index = this._attachedOverlays.indexOf(overlayRef); + if (index > -1) { + this._attachedOverlays.splice(index, 1); + } + // Remove the global listener once there are no more overlays. + if (this._attachedOverlays.length === 0) { + this.detach(); + } + } + static #_ = this.ɵfac = function BaseOverlayDispatcher_Factory(t) { + return new (t || BaseOverlayDispatcher)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: BaseOverlayDispatcher, + factory: BaseOverlayDispatcher.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](BaseOverlayDispatcher, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT] + }] + }], null); +})(); + +/** + * Service for dispatching keyboard events that land on the body to appropriate overlay ref, + * if any. It maintains a list of attached overlays to determine best suited overlay based + * on event target and order of overlay opens. + */ +class OverlayKeyboardDispatcher extends BaseOverlayDispatcher { + constructor(document, /** @breaking-change 14.0.0 _ngZone will be required. */ + _ngZone) { + super(document); + this._ngZone = _ngZone; + /** Keyboard event listener that will be attached to the body. */ + this._keydownListener = event => { + const overlays = this._attachedOverlays; + for (let i = overlays.length - 1; i > -1; i--) { + // Dispatch the keydown event to the top overlay which has subscribers to its keydown events. + // We want to target the most recent overlay, rather than trying to match where the event came + // from, because some components might open an overlay, but keep focus on a trigger element + // (e.g. for select and autocomplete). We skip overlays without keydown event subscriptions, + // because we don't want overlays that don't handle keyboard events to block the ones below + // them that do. + if (overlays[i]._keydownEvents.observers.length > 0) { + const keydownEvents = overlays[i]._keydownEvents; + /** @breaking-change 14.0.0 _ngZone will be required. */ + if (this._ngZone) { + this._ngZone.run(() => keydownEvents.next(event)); + } else { + keydownEvents.next(event); + } + break; + } + } + }; + } + /** Add a new overlay to the list of attached overlay refs. */ + add(overlayRef) { + super.add(overlayRef); + // Lazily start dispatcher once first overlay is added + if (!this._isAttached) { + /** @breaking-change 14.0.0 _ngZone will be required. */ + if (this._ngZone) { + this._ngZone.runOutsideAngular(() => this._document.body.addEventListener('keydown', this._keydownListener)); + } else { + this._document.body.addEventListener('keydown', this._keydownListener); + } + this._isAttached = true; + } + } + /** Detaches the global keyboard event listener. */ + detach() { + if (this._isAttached) { + this._document.body.removeEventListener('keydown', this._keydownListener); + this._isAttached = false; + } + } + static #_ = this.ɵfac = function OverlayKeyboardDispatcher_Factory(t) { + return new (t || OverlayKeyboardDispatcher)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: OverlayKeyboardDispatcher, + factory: OverlayKeyboardDispatcher.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](OverlayKeyboardDispatcher, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT] + }] + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Optional + }] + }], null); +})(); + +/** + * Service for dispatching mouse click events that land on the body to appropriate overlay ref, + * if any. It maintains a list of attached overlays to determine best suited overlay based + * on event target and order of overlay opens. + */ +class OverlayOutsideClickDispatcher extends BaseOverlayDispatcher { + constructor(document, _platform, /** @breaking-change 14.0.0 _ngZone will be required. */ + _ngZone) { + super(document); + this._platform = _platform; + this._ngZone = _ngZone; + this._cursorStyleIsSet = false; + /** Store pointerdown event target to track origin of click. */ + this._pointerDownListener = event => { + this._pointerDownEventTarget = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__._getEventTarget)(event); + }; + /** Click event listener that will be attached to the body propagate phase. */ + this._clickListener = event => { + const target = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__._getEventTarget)(event); + // In case of a click event, we want to check the origin of the click + // (e.g. in case where a user starts a click inside the overlay and + // releases the click outside of it). + // This is done by using the event target of the preceding pointerdown event. + // Every click event caused by a pointer device has a preceding pointerdown + // event, unless the click was programmatically triggered (e.g. in a unit test). + const origin = event.type === 'click' && this._pointerDownEventTarget ? this._pointerDownEventTarget : target; + // Reset the stored pointerdown event target, to avoid having it interfere + // in subsequent events. + this._pointerDownEventTarget = null; + // We copy the array because the original may be modified asynchronously if the + // outsidePointerEvents listener decides to detach overlays resulting in index errors inside + // the for loop. + const overlays = this._attachedOverlays.slice(); + // Dispatch the mouse event to the top overlay which has subscribers to its mouse events. + // We want to target all overlays for which the click could be considered as outside click. + // As soon as we reach an overlay for which the click is not outside click we break off + // the loop. + for (let i = overlays.length - 1; i > -1; i--) { + const overlayRef = overlays[i]; + if (overlayRef._outsidePointerEvents.observers.length < 1 || !overlayRef.hasAttached()) { + continue; + } + // If it's a click inside the overlay, just break - we should do nothing + // If it's an outside click (both origin and target of the click) dispatch the mouse event, + // and proceed with the next overlay + if (overlayRef.overlayElement.contains(target) || overlayRef.overlayElement.contains(origin)) { + break; + } + const outsidePointerEvents = overlayRef._outsidePointerEvents; + /** @breaking-change 14.0.0 _ngZone will be required. */ + if (this._ngZone) { + this._ngZone.run(() => outsidePointerEvents.next(event)); + } else { + outsidePointerEvents.next(event); + } + } + }; + } + /** Add a new overlay to the list of attached overlay refs. */ + add(overlayRef) { + super.add(overlayRef); + // Safari on iOS does not generate click events for non-interactive + // elements. However, we want to receive a click for any element outside + // the overlay. We can force a "clickable" state by setting + // `cursor: pointer` on the document body. See: + // https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#Safari_Mobile + // https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html + if (!this._isAttached) { + const body = this._document.body; + /** @breaking-change 14.0.0 _ngZone will be required. */ + if (this._ngZone) { + this._ngZone.runOutsideAngular(() => this._addEventListeners(body)); + } else { + this._addEventListeners(body); + } + // click event is not fired on iOS. To make element "clickable" we are + // setting the cursor to pointer + if (this._platform.IOS && !this._cursorStyleIsSet) { + this._cursorOriginalValue = body.style.cursor; + body.style.cursor = 'pointer'; + this._cursorStyleIsSet = true; + } + this._isAttached = true; + } + } + /** Detaches the global keyboard event listener. */ + detach() { + if (this._isAttached) { + const body = this._document.body; + body.removeEventListener('pointerdown', this._pointerDownListener, true); + body.removeEventListener('click', this._clickListener, true); + body.removeEventListener('auxclick', this._clickListener, true); + body.removeEventListener('contextmenu', this._clickListener, true); + if (this._platform.IOS && this._cursorStyleIsSet) { + body.style.cursor = this._cursorOriginalValue; + this._cursorStyleIsSet = false; + } + this._isAttached = false; + } + } + _addEventListeners(body) { + body.addEventListener('pointerdown', this._pointerDownListener, true); + body.addEventListener('click', this._clickListener, true); + body.addEventListener('auxclick', this._clickListener, true); + body.addEventListener('contextmenu', this._clickListener, true); + } + static #_ = this.ɵfac = function OverlayOutsideClickDispatcher_Factory(t) { + return new (t || OverlayOutsideClickDispatcher)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: OverlayOutsideClickDispatcher, + factory: OverlayOutsideClickDispatcher.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](OverlayOutsideClickDispatcher, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT] + }] + }, { + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.Platform + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Optional + }] + }], null); +})(); + +/** Container inside which all overlays will render. */ +class OverlayContainer { + constructor(document, _platform) { + this._platform = _platform; + this._document = document; + } + ngOnDestroy() { + this._containerElement?.remove(); + } + /** + * This method returns the overlay container element. It will lazily + * create the element the first time it is called to facilitate using + * the container in non-browser environments. + * @returns the container element + */ + getContainerElement() { + if (!this._containerElement) { + this._createContainer(); + } + return this._containerElement; + } + /** + * Create the overlay container element, which is simply a div + * with the 'cdk-overlay-container' class on the document body. + */ + _createContainer() { + const containerClass = 'cdk-overlay-container'; + // TODO(crisbeto): remove the testing check once we have an overlay testing + // module or Angular starts tearing down the testing `NgModule`. See: + // https://github.com/angular/angular/issues/18831 + if (this._platform.isBrowser || (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__._isTestEnvironment)()) { + const oppositePlatformContainers = this._document.querySelectorAll(`.${containerClass}[platform="server"], ` + `.${containerClass}[platform="test"]`); + // Remove any old containers from the opposite platform. + // This can happen when transitioning from the server to the client. + for (let i = 0; i < oppositePlatformContainers.length; i++) { + oppositePlatformContainers[i].remove(); + } + } + const container = this._document.createElement('div'); + container.classList.add(containerClass); + // A long time ago we kept adding new overlay containers whenever a new app was instantiated, + // but at some point we added logic which clears the duplicate ones in order to avoid leaks. + // The new logic was a little too aggressive since it was breaking some legitimate use cases. + // To mitigate the problem we made it so that only containers from a different platform are + // cleared, but the side-effect was that people started depending on the overly-aggressive + // logic to clean up their tests for them. Until we can introduce an overlay-specific testing + // module which does the cleanup, we try to detect that we're in a test environment and we + // always clear the container. See #17006. + // TODO(crisbeto): remove the test environment check once we have an overlay testing module. + if ((0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__._isTestEnvironment)()) { + container.setAttribute('platform', 'test'); + } else if (!this._platform.isBrowser) { + container.setAttribute('platform', 'server'); + } + this._document.body.appendChild(container); + this._containerElement = container; + } + static #_ = this.ɵfac = function OverlayContainer_Factory(t) { + return new (t || OverlayContainer)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.Platform)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: OverlayContainer, + factory: OverlayContainer.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](OverlayContainer, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT] + }] + }, { + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.Platform + }], null); +})(); + +/** + * Reference to an overlay that has been created with the Overlay service. + * Used to manipulate or dispose of said overlay. + */ +class OverlayRef { + constructor(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document, _location, _outsideClickDispatcher, _animationsDisabled = false) { + this._portalOutlet = _portalOutlet; + this._host = _host; + this._pane = _pane; + this._config = _config; + this._ngZone = _ngZone; + this._keyboardDispatcher = _keyboardDispatcher; + this._document = _document; + this._location = _location; + this._outsideClickDispatcher = _outsideClickDispatcher; + this._animationsDisabled = _animationsDisabled; + this._backdropElement = null; + this._backdropClick = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); + this._attachments = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); + this._detachments = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); + this._locationChanges = rxjs__WEBPACK_IMPORTED_MODULE_7__.Subscription.EMPTY; + this._backdropClickHandler = event => this._backdropClick.next(event); + this._backdropTransitionendHandler = event => { + this._disposeBackdrop(event.target); + }; + /** Stream of keydown events dispatched to this overlay. */ + this._keydownEvents = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); + /** Stream of mouse outside events dispatched to this overlay. */ + this._outsidePointerEvents = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); + if (_config.scrollStrategy) { + this._scrollStrategy = _config.scrollStrategy; + this._scrollStrategy.attach(this); + } + this._positionStrategy = _config.positionStrategy; + } + /** The overlay's HTML element */ + get overlayElement() { + return this._pane; + } + /** The overlay's backdrop HTML element. */ + get backdropElement() { + return this._backdropElement; + } + /** + * Wrapper around the panel element. Can be used for advanced + * positioning where a wrapper with specific styling is + * required around the overlay pane. + */ + get hostElement() { + return this._host; + } + /** + * Attaches content, given via a Portal, to the overlay. + * If the overlay is configured to have a backdrop, it will be created. + * + * @param portal Portal instance to which to attach the overlay. + * @returns The portal attachment result. + */ + attach(portal) { + // Insert the host into the DOM before attaching the portal, otherwise + // the animations module will skip animations on repeat attachments. + if (!this._host.parentElement && this._previousHostParent) { + this._previousHostParent.appendChild(this._host); + } + const attachResult = this._portalOutlet.attach(portal); + if (this._positionStrategy) { + this._positionStrategy.attach(this); + } + this._updateStackingOrder(); + this._updateElementSize(); + this._updateElementDirection(); + if (this._scrollStrategy) { + this._scrollStrategy.enable(); + } + // Update the position once the zone is stable so that the overlay will be fully rendered + // before attempting to position it, as the position may depend on the size of the rendered + // content. + this._ngZone.onStable.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_8__.take)(1)).subscribe(() => { + // The overlay could've been detached before the zone has stabilized. + if (this.hasAttached()) { + this.updatePosition(); + } + }); + // Enable pointer events for the overlay pane element. + this._togglePointerEvents(true); + if (this._config.hasBackdrop) { + this._attachBackdrop(); + } + if (this._config.panelClass) { + this._toggleClasses(this._pane, this._config.panelClass, true); + } + // Only emit the `attachments` event once all other setup is done. + this._attachments.next(); + // Track this overlay by the keyboard dispatcher + this._keyboardDispatcher.add(this); + if (this._config.disposeOnNavigation) { + this._locationChanges = this._location.subscribe(() => this.dispose()); + } + this._outsideClickDispatcher.add(this); + // TODO(crisbeto): the null check is here, because the portal outlet returns `any`. + // We should be guaranteed for the result to be `ComponentRef | EmbeddedViewRef`, but + // `instanceof EmbeddedViewRef` doesn't appear to work at the moment. + if (typeof attachResult?.onDestroy === 'function') { + // In most cases we control the portal and we know when it is being detached so that + // we can finish the disposal process. The exception is if the user passes in a custom + // `ViewContainerRef` that isn't destroyed through the overlay API. Note that we use + // `detach` here instead of `dispose`, because we don't know if the user intends to + // reattach the overlay at a later point. It also has the advantage of waiting for animations. + attachResult.onDestroy(() => { + if (this.hasAttached()) { + // We have to delay the `detach` call, because detaching immediately prevents + // other destroy hooks from running. This is likely a framework bug similar to + // https://github.com/angular/angular/issues/46119 + this._ngZone.runOutsideAngular(() => Promise.resolve().then(() => this.detach())); + } + }); + } + return attachResult; + } + /** + * Detaches an overlay from a portal. + * @returns The portal detachment result. + */ + detach() { + if (!this.hasAttached()) { + return; + } + this.detachBackdrop(); + // When the overlay is detached, the pane element should disable pointer events. + // This is necessary because otherwise the pane element will cover the page and disable + // pointer events therefore. Depends on the position strategy and the applied pane boundaries. + this._togglePointerEvents(false); + if (this._positionStrategy && this._positionStrategy.detach) { + this._positionStrategy.detach(); + } + if (this._scrollStrategy) { + this._scrollStrategy.disable(); + } + const detachmentResult = this._portalOutlet.detach(); + // Only emit after everything is detached. + this._detachments.next(); + // Remove this overlay from keyboard dispatcher tracking. + this._keyboardDispatcher.remove(this); + // Keeping the host element in the DOM can cause scroll jank, because it still gets + // rendered, even though it's transparent and unclickable which is why we remove it. + this._detachContentWhenStable(); + this._locationChanges.unsubscribe(); + this._outsideClickDispatcher.remove(this); + return detachmentResult; + } + /** Cleans up the overlay from the DOM. */ + dispose() { + const isAttached = this.hasAttached(); + if (this._positionStrategy) { + this._positionStrategy.dispose(); + } + this._disposeScrollStrategy(); + this._disposeBackdrop(this._backdropElement); + this._locationChanges.unsubscribe(); + this._keyboardDispatcher.remove(this); + this._portalOutlet.dispose(); + this._attachments.complete(); + this._backdropClick.complete(); + this._keydownEvents.complete(); + this._outsidePointerEvents.complete(); + this._outsideClickDispatcher.remove(this); + this._host?.remove(); + this._previousHostParent = this._pane = this._host = null; + if (isAttached) { + this._detachments.next(); + } + this._detachments.complete(); + } + /** Whether the overlay has attached content. */ + hasAttached() { + return this._portalOutlet.hasAttached(); + } + /** Gets an observable that emits when the backdrop has been clicked. */ + backdropClick() { + return this._backdropClick; + } + /** Gets an observable that emits when the overlay has been attached. */ + attachments() { + return this._attachments; + } + /** Gets an observable that emits when the overlay has been detached. */ + detachments() { + return this._detachments; + } + /** Gets an observable of keydown events targeted to this overlay. */ + keydownEvents() { + return this._keydownEvents; + } + /** Gets an observable of pointer events targeted outside this overlay. */ + outsidePointerEvents() { + return this._outsidePointerEvents; + } + /** Gets the current overlay configuration, which is immutable. */ + getConfig() { + return this._config; + } + /** Updates the position of the overlay based on the position strategy. */ + updatePosition() { + if (this._positionStrategy) { + this._positionStrategy.apply(); + } + } + /** Switches to a new position strategy and updates the overlay position. */ + updatePositionStrategy(strategy) { + if (strategy === this._positionStrategy) { + return; + } + if (this._positionStrategy) { + this._positionStrategy.dispose(); + } + this._positionStrategy = strategy; + if (this.hasAttached()) { + strategy.attach(this); + this.updatePosition(); + } + } + /** Update the size properties of the overlay. */ + updateSize(sizeConfig) { + this._config = { + ...this._config, + ...sizeConfig + }; + this._updateElementSize(); + } + /** Sets the LTR/RTL direction for the overlay. */ + setDirection(dir) { + this._config = { + ...this._config, + direction: dir + }; + this._updateElementDirection(); + } + /** Add a CSS class or an array of classes to the overlay pane. */ + addPanelClass(classes) { + if (this._pane) { + this._toggleClasses(this._pane, classes, true); + } + } + /** Remove a CSS class or an array of classes from the overlay pane. */ + removePanelClass(classes) { + if (this._pane) { + this._toggleClasses(this._pane, classes, false); + } + } + /** + * Returns the layout direction of the overlay panel. + */ + getDirection() { + const direction = this._config.direction; + if (!direction) { + return 'ltr'; + } + return typeof direction === 'string' ? direction : direction.value; + } + /** Switches to a new scroll strategy. */ + updateScrollStrategy(strategy) { + if (strategy === this._scrollStrategy) { + return; + } + this._disposeScrollStrategy(); + this._scrollStrategy = strategy; + if (this.hasAttached()) { + strategy.attach(this); + strategy.enable(); + } + } + /** Updates the text direction of the overlay panel. */ + _updateElementDirection() { + this._host.setAttribute('dir', this.getDirection()); + } + /** Updates the size of the overlay element based on the overlay config. */ + _updateElementSize() { + if (!this._pane) { + return; + } + const style = this._pane.style; + style.width = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(this._config.width); + style.height = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(this._config.height); + style.minWidth = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(this._config.minWidth); + style.minHeight = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(this._config.minHeight); + style.maxWidth = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(this._config.maxWidth); + style.maxHeight = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(this._config.maxHeight); + } + /** Toggles the pointer events for the overlay pane element. */ + _togglePointerEvents(enablePointer) { + this._pane.style.pointerEvents = enablePointer ? '' : 'none'; + } + /** Attaches a backdrop for this overlay. */ + _attachBackdrop() { + const showingClass = 'cdk-overlay-backdrop-showing'; + this._backdropElement = this._document.createElement('div'); + this._backdropElement.classList.add('cdk-overlay-backdrop'); + if (this._animationsDisabled) { + this._backdropElement.classList.add('cdk-overlay-backdrop-noop-animation'); + } + if (this._config.backdropClass) { + this._toggleClasses(this._backdropElement, this._config.backdropClass, true); + } + // Insert the backdrop before the pane in the DOM order, + // in order to handle stacked overlays properly. + this._host.parentElement.insertBefore(this._backdropElement, this._host); + // Forward backdrop clicks such that the consumer of the overlay can perform whatever + // action desired when such a click occurs (usually closing the overlay). + this._backdropElement.addEventListener('click', this._backdropClickHandler); + // Add class to fade-in the backdrop after one frame. + if (!this._animationsDisabled && typeof requestAnimationFrame !== 'undefined') { + this._ngZone.runOutsideAngular(() => { + requestAnimationFrame(() => { + if (this._backdropElement) { + this._backdropElement.classList.add(showingClass); + } + }); + }); + } else { + this._backdropElement.classList.add(showingClass); + } + } + /** + * Updates the stacking order of the element, moving it to the top if necessary. + * This is required in cases where one overlay was detached, while another one, + * that should be behind it, was destroyed. The next time both of them are opened, + * the stacking will be wrong, because the detached element's pane will still be + * in its original DOM position. + */ + _updateStackingOrder() { + if (this._host.nextSibling) { + this._host.parentNode.appendChild(this._host); + } + } + /** Detaches the backdrop (if any) associated with the overlay. */ + detachBackdrop() { + const backdropToDetach = this._backdropElement; + if (!backdropToDetach) { + return; + } + if (this._animationsDisabled) { + this._disposeBackdrop(backdropToDetach); + return; + } + backdropToDetach.classList.remove('cdk-overlay-backdrop-showing'); + this._ngZone.runOutsideAngular(() => { + backdropToDetach.addEventListener('transitionend', this._backdropTransitionendHandler); + }); + // If the backdrop doesn't have a transition, the `transitionend` event won't fire. + // In this case we make it unclickable and we try to remove it after a delay. + backdropToDetach.style.pointerEvents = 'none'; + // Run this outside the Angular zone because there's nothing that Angular cares about. + // If it were to run inside the Angular zone, every test that used Overlay would have to be + // either async or fakeAsync. + this._backdropTimeout = this._ngZone.runOutsideAngular(() => setTimeout(() => { + this._disposeBackdrop(backdropToDetach); + }, 500)); + } + /** Toggles a single CSS class or an array of classes on an element. */ + _toggleClasses(element, cssClasses, isAdd) { + const classes = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceArray)(cssClasses || []).filter(c => !!c); + if (classes.length) { + isAdd ? element.classList.add(...classes) : element.classList.remove(...classes); + } + } + /** Detaches the overlay content next time the zone stabilizes. */ + _detachContentWhenStable() { + // Normally we wouldn't have to explicitly run this outside the `NgZone`, however + // if the consumer is using `zone-patch-rxjs`, the `Subscription.unsubscribe` call will + // be patched to run inside the zone, which will throw us into an infinite loop. + this._ngZone.runOutsideAngular(() => { + // We can't remove the host here immediately, because the overlay pane's content + // might still be animating. This stream helps us avoid interrupting the animation + // by waiting for the pane to become empty. + const subscription = this._ngZone.onStable.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_9__.takeUntil)((0,rxjs__WEBPACK_IMPORTED_MODULE_10__.merge)(this._attachments, this._detachments))).subscribe(() => { + // Needs a couple of checks for the pane and host, because + // they may have been removed by the time the zone stabilizes. + if (!this._pane || !this._host || this._pane.children.length === 0) { + if (this._pane && this._config.panelClass) { + this._toggleClasses(this._pane, this._config.panelClass, false); + } + if (this._host && this._host.parentElement) { + this._previousHostParent = this._host.parentElement; + this._host.remove(); + } + subscription.unsubscribe(); + } + }); + }); + } + /** Disposes of a scroll strategy. */ + _disposeScrollStrategy() { + const scrollStrategy = this._scrollStrategy; + if (scrollStrategy) { + scrollStrategy.disable(); + if (scrollStrategy.detach) { + scrollStrategy.detach(); + } + } + } + /** Removes a backdrop element from the DOM. */ + _disposeBackdrop(backdrop) { + if (backdrop) { + backdrop.removeEventListener('click', this._backdropClickHandler); + backdrop.removeEventListener('transitionend', this._backdropTransitionendHandler); + backdrop.remove(); + // It is possible that a new portal has been attached to this overlay since we started + // removing the backdrop. If that is the case, only clear the backdrop reference if it + // is still the same instance that we started to remove. + if (this._backdropElement === backdrop) { + this._backdropElement = null; + } + } + if (this._backdropTimeout) { + clearTimeout(this._backdropTimeout); + this._backdropTimeout = undefined; + } + } +} + +// TODO: refactor clipping detection into a separate thing (part of scrolling module) +// TODO: doesn't handle both flexible width and height when it has to scroll along both axis. +/** Class to be added to the overlay bounding box. */ +const boundingBoxClass = 'cdk-overlay-connected-position-bounding-box'; +/** Regex used to split a string on its CSS units. */ +const cssUnitPattern = /([A-Za-z%]+)$/; +/** + * A strategy for positioning overlays. Using this strategy, an overlay is given an + * implicit position relative some origin element. The relative position is defined in terms of + * a point on the origin element that is connected to a point on the overlay element. For example, + * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner + * of the overlay. + */ +class FlexibleConnectedPositionStrategy { + /** Ordered list of preferred positions, from most to least desirable. */ + get positions() { + return this._preferredPositions; + } + constructor(connectedTo, _viewportRuler, _document, _platform, _overlayContainer) { + this._viewportRuler = _viewportRuler; + this._document = _document; + this._platform = _platform; + this._overlayContainer = _overlayContainer; + /** Last size used for the bounding box. Used to avoid resizing the overlay after open. */ + this._lastBoundingBoxSize = { + width: 0, + height: 0 + }; + /** Whether the overlay was pushed in a previous positioning. */ + this._isPushed = false; + /** Whether the overlay can be pushed on-screen on the initial open. */ + this._canPush = true; + /** Whether the overlay can grow via flexible width/height after the initial open. */ + this._growAfterOpen = false; + /** Whether the overlay's width and height can be constrained to fit within the viewport. */ + this._hasFlexibleDimensions = true; + /** Whether the overlay position is locked. */ + this._positionLocked = false; + /** Amount of space that must be maintained between the overlay and the edge of the viewport. */ + this._viewportMargin = 0; + /** The Scrollable containers used to check scrollable view properties on position change. */ + this._scrollables = []; + /** Ordered list of preferred positions, from most to least desirable. */ + this._preferredPositions = []; + /** Subject that emits whenever the position changes. */ + this._positionChanges = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); + /** Subscription to viewport size changes. */ + this._resizeSubscription = rxjs__WEBPACK_IMPORTED_MODULE_7__.Subscription.EMPTY; + /** Default offset for the overlay along the x axis. */ + this._offsetX = 0; + /** Default offset for the overlay along the y axis. */ + this._offsetY = 0; + /** Keeps track of the CSS classes that the position strategy has applied on the overlay panel. */ + this._appliedPanelClasses = []; + /** Observable sequence of position changes. */ + this.positionChanges = this._positionChanges; + this.setOrigin(connectedTo); + } + /** Attaches this position strategy to an overlay. */ + attach(overlayRef) { + if (this._overlayRef && overlayRef !== this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw Error('This position strategy is already attached to an overlay'); + } + this._validatePositions(); + overlayRef.hostElement.classList.add(boundingBoxClass); + this._overlayRef = overlayRef; + this._boundingBox = overlayRef.hostElement; + this._pane = overlayRef.overlayElement; + this._isDisposed = false; + this._isInitialRender = true; + this._lastPosition = null; + this._resizeSubscription.unsubscribe(); + this._resizeSubscription = this._viewportRuler.change().subscribe(() => { + // When the window is resized, we want to trigger the next reposition as if it + // was an initial render, in order for the strategy to pick a new optimal position, + // otherwise position locking will cause it to stay at the old one. + this._isInitialRender = true; + this.apply(); + }); + } + /** + * Updates the position of the overlay element, using whichever preferred position relative + * to the origin best fits on-screen. + * + * The selection of a position goes as follows: + * - If any positions fit completely within the viewport as-is, + * choose the first position that does so. + * - If flexible dimensions are enabled and at least one satisfies the given minimum width/height, + * choose the position with the greatest available size modified by the positions' weight. + * - If pushing is enabled, take the position that went off-screen the least and push it + * on-screen. + * - If none of the previous criteria were met, use the position that goes off-screen the least. + * @docs-private + */ + apply() { + // We shouldn't do anything if the strategy was disposed or we're on the server. + if (this._isDisposed || !this._platform.isBrowser) { + return; + } + // If the position has been applied already (e.g. when the overlay was opened) and the + // consumer opted into locking in the position, re-use the old position, in order to + // prevent the overlay from jumping around. + if (!this._isInitialRender && this._positionLocked && this._lastPosition) { + this.reapplyLastPosition(); + return; + } + this._clearPanelClasses(); + this._resetOverlayElementStyles(); + this._resetBoundingBoxStyles(); + // We need the bounding rects for the origin, the overlay and the container to determine how to position + // the overlay relative to the origin. + // We use the viewport rect to determine whether a position would go off-screen. + this._viewportRect = this._getNarrowedViewportRect(); + this._originRect = this._getOriginRect(); + this._overlayRect = this._pane.getBoundingClientRect(); + this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect(); + const originRect = this._originRect; + const overlayRect = this._overlayRect; + const viewportRect = this._viewportRect; + const containerRect = this._containerRect; + // Positions where the overlay will fit with flexible dimensions. + const flexibleFits = []; + // Fallback if none of the preferred positions fit within the viewport. + let fallback; + // Go through each of the preferred positions looking for a good fit. + // If a good fit is found, it will be applied immediately. + for (let pos of this._preferredPositions) { + // Get the exact (x, y) coordinate for the point-of-origin on the origin element. + let originPoint = this._getOriginPoint(originRect, containerRect, pos); + // From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the + // overlay in this position. We use the top-left corner for calculations and later translate + // this into an appropriate (top, left, bottom, right) style. + let overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos); + // Calculate how well the overlay would fit into the viewport with this point. + let overlayFit = this._getOverlayFit(overlayPoint, overlayRect, viewportRect, pos); + // If the overlay, without any further work, fits into the viewport, use this position. + if (overlayFit.isCompletelyWithinViewport) { + this._isPushed = false; + this._applyPosition(pos, originPoint); + return; + } + // If the overlay has flexible dimensions, we can use this position + // so long as there's enough space for the minimum dimensions. + if (this._canFitWithFlexibleDimensions(overlayFit, overlayPoint, viewportRect)) { + // Save positions where the overlay will fit with flexible dimensions. We will use these + // if none of the positions fit *without* flexible dimensions. + flexibleFits.push({ + position: pos, + origin: originPoint, + overlayRect, + boundingBoxRect: this._calculateBoundingBoxRect(originPoint, pos) + }); + continue; + } + // If the current preferred position does not fit on the screen, remember the position + // if it has more visible area on-screen than we've seen and move onto the next preferred + // position. + if (!fallback || fallback.overlayFit.visibleArea < overlayFit.visibleArea) { + fallback = { + overlayFit, + overlayPoint, + originPoint, + position: pos, + overlayRect + }; + } + } + // If there are any positions where the overlay would fit with flexible dimensions, choose the + // one that has the greatest area available modified by the position's weight + if (flexibleFits.length) { + let bestFit = null; + let bestScore = -1; + for (const fit of flexibleFits) { + const score = fit.boundingBoxRect.width * fit.boundingBoxRect.height * (fit.position.weight || 1); + if (score > bestScore) { + bestScore = score; + bestFit = fit; + } + } + this._isPushed = false; + this._applyPosition(bestFit.position, bestFit.origin); + return; + } + // When none of the preferred positions fit within the viewport, take the position + // that went off-screen the least and attempt to push it on-screen. + if (this._canPush) { + // TODO(jelbourn): after pushing, the opening "direction" of the overlay might not make sense. + this._isPushed = true; + this._applyPosition(fallback.position, fallback.originPoint); + return; + } + // All options for getting the overlay within the viewport have been exhausted, so go with the + // position that went off-screen the least. + this._applyPosition(fallback.position, fallback.originPoint); + } + detach() { + this._clearPanelClasses(); + this._lastPosition = null; + this._previousPushAmount = null; + this._resizeSubscription.unsubscribe(); + } + /** Cleanup after the element gets destroyed. */ + dispose() { + if (this._isDisposed) { + return; + } + // We can't use `_resetBoundingBoxStyles` here, because it resets + // some properties to zero, rather than removing them. + if (this._boundingBox) { + extendStyles(this._boundingBox.style, { + top: '', + left: '', + right: '', + bottom: '', + height: '', + width: '', + alignItems: '', + justifyContent: '' + }); + } + if (this._pane) { + this._resetOverlayElementStyles(); + } + if (this._overlayRef) { + this._overlayRef.hostElement.classList.remove(boundingBoxClass); + } + this.detach(); + this._positionChanges.complete(); + this._overlayRef = this._boundingBox = null; + this._isDisposed = true; + } + /** + * This re-aligns the overlay element with the trigger in its last calculated position, + * even if a position higher in the "preferred positions" list would now fit. This + * allows one to re-align the panel without changing the orientation of the panel. + */ + reapplyLastPosition() { + if (this._isDisposed || !this._platform.isBrowser) { + return; + } + const lastPosition = this._lastPosition; + if (lastPosition) { + this._originRect = this._getOriginRect(); + this._overlayRect = this._pane.getBoundingClientRect(); + this._viewportRect = this._getNarrowedViewportRect(); + this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect(); + const originPoint = this._getOriginPoint(this._originRect, this._containerRect, lastPosition); + this._applyPosition(lastPosition, originPoint); + } else { + this.apply(); + } + } + /** + * Sets the list of Scrollable containers that host the origin element so that + * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every + * Scrollable must be an ancestor element of the strategy's origin element. + */ + withScrollableContainers(scrollables) { + this._scrollables = scrollables; + return this; + } + /** + * Adds new preferred positions. + * @param positions List of positions options for this overlay. + */ + withPositions(positions) { + this._preferredPositions = positions; + // If the last calculated position object isn't part of the positions anymore, clear + // it in order to avoid it being picked up if the consumer tries to re-apply. + if (positions.indexOf(this._lastPosition) === -1) { + this._lastPosition = null; + } + this._validatePositions(); + return this; + } + /** + * Sets a minimum distance the overlay may be positioned to the edge of the viewport. + * @param margin Required margin between the overlay and the viewport edge in pixels. + */ + withViewportMargin(margin) { + this._viewportMargin = margin; + return this; + } + /** Sets whether the overlay's width and height can be constrained to fit within the viewport. */ + withFlexibleDimensions(flexibleDimensions = true) { + this._hasFlexibleDimensions = flexibleDimensions; + return this; + } + /** Sets whether the overlay can grow after the initial open via flexible width/height. */ + withGrowAfterOpen(growAfterOpen = true) { + this._growAfterOpen = growAfterOpen; + return this; + } + /** Sets whether the overlay can be pushed on-screen if none of the provided positions fit. */ + withPush(canPush = true) { + this._canPush = canPush; + return this; + } + /** + * Sets whether the overlay's position should be locked in after it is positioned + * initially. When an overlay is locked in, it won't attempt to reposition itself + * when the position is re-applied (e.g. when the user scrolls away). + * @param isLocked Whether the overlay should locked in. + */ + withLockedPosition(isLocked = true) { + this._positionLocked = isLocked; + return this; + } + /** + * Sets the origin, relative to which to position the overlay. + * Using an element origin is useful for building components that need to be positioned + * relatively to a trigger (e.g. dropdown menus or tooltips), whereas using a point can be + * used for cases like contextual menus which open relative to the user's pointer. + * @param origin Reference to the new origin. + */ + setOrigin(origin) { + this._origin = origin; + return this; + } + /** + * Sets the default offset for the overlay's connection point on the x-axis. + * @param offset New offset in the X axis. + */ + withDefaultOffsetX(offset) { + this._offsetX = offset; + return this; + } + /** + * Sets the default offset for the overlay's connection point on the y-axis. + * @param offset New offset in the Y axis. + */ + withDefaultOffsetY(offset) { + this._offsetY = offset; + return this; + } + /** + * Configures that the position strategy should set a `transform-origin` on some elements + * inside the overlay, depending on the current position that is being applied. This is + * useful for the cases where the origin of an animation can change depending on the + * alignment of the overlay. + * @param selector CSS selector that will be used to find the target + * elements onto which to set the transform origin. + */ + withTransformOriginOn(selector) { + this._transformOriginSelector = selector; + return this; + } + /** + * Gets the (x, y) coordinate of a connection point on the origin based on a relative position. + */ + _getOriginPoint(originRect, containerRect, pos) { + let x; + if (pos.originX == 'center') { + // Note: when centering we should always use the `left` + // offset, otherwise the position will be wrong in RTL. + x = originRect.left + originRect.width / 2; + } else { + const startX = this._isRtl() ? originRect.right : originRect.left; + const endX = this._isRtl() ? originRect.left : originRect.right; + x = pos.originX == 'start' ? startX : endX; + } + // When zooming in Safari the container rectangle contains negative values for the position + // and we need to re-add them to the calculated coordinates. + if (containerRect.left < 0) { + x -= containerRect.left; + } + let y; + if (pos.originY == 'center') { + y = originRect.top + originRect.height / 2; + } else { + y = pos.originY == 'top' ? originRect.top : originRect.bottom; + } + // Normally the containerRect's top value would be zero, however when the overlay is attached to an input + // (e.g. in an autocomplete), mobile browsers will shift everything in order to put the input in the middle + // of the screen and to make space for the virtual keyboard. We need to account for this offset, + // otherwise our positioning will be thrown off. + // Additionally, when zooming in Safari this fixes the vertical position. + if (containerRect.top < 0) { + y -= containerRect.top; + } + return { + x, + y + }; + } + /** + * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and + * origin point to which the overlay should be connected. + */ + _getOverlayPoint(originPoint, overlayRect, pos) { + // Calculate the (overlayStartX, overlayStartY), the start of the + // potential overlay position relative to the origin point. + let overlayStartX; + if (pos.overlayX == 'center') { + overlayStartX = -overlayRect.width / 2; + } else if (pos.overlayX === 'start') { + overlayStartX = this._isRtl() ? -overlayRect.width : 0; + } else { + overlayStartX = this._isRtl() ? 0 : -overlayRect.width; + } + let overlayStartY; + if (pos.overlayY == 'center') { + overlayStartY = -overlayRect.height / 2; + } else { + overlayStartY = pos.overlayY == 'top' ? 0 : -overlayRect.height; + } + // The (x, y) coordinates of the overlay. + return { + x: originPoint.x + overlayStartX, + y: originPoint.y + overlayStartY + }; + } + /** Gets how well an overlay at the given point will fit within the viewport. */ + _getOverlayFit(point, rawOverlayRect, viewport, position) { + // Round the overlay rect when comparing against the + // viewport, because the viewport is always rounded. + const overlay = getRoundedBoundingClientRect(rawOverlayRect); + let { + x, + y + } = point; + let offsetX = this._getOffset(position, 'x'); + let offsetY = this._getOffset(position, 'y'); + // Account for the offsets since they could push the overlay out of the viewport. + if (offsetX) { + x += offsetX; + } + if (offsetY) { + y += offsetY; + } + // How much the overlay would overflow at this position, on each side. + let leftOverflow = 0 - x; + let rightOverflow = x + overlay.width - viewport.width; + let topOverflow = 0 - y; + let bottomOverflow = y + overlay.height - viewport.height; + // Visible parts of the element on each axis. + let visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow); + let visibleHeight = this._subtractOverflows(overlay.height, topOverflow, bottomOverflow); + let visibleArea = visibleWidth * visibleHeight; + return { + visibleArea, + isCompletelyWithinViewport: overlay.width * overlay.height === visibleArea, + fitsInViewportVertically: visibleHeight === overlay.height, + fitsInViewportHorizontally: visibleWidth == overlay.width + }; + } + /** + * Whether the overlay can fit within the viewport when it may resize either its width or height. + * @param fit How well the overlay fits in the viewport at some position. + * @param point The (x, y) coordinates of the overlay at some position. + * @param viewport The geometry of the viewport. + */ + _canFitWithFlexibleDimensions(fit, point, viewport) { + if (this._hasFlexibleDimensions) { + const availableHeight = viewport.bottom - point.y; + const availableWidth = viewport.right - point.x; + const minHeight = getPixelValue(this._overlayRef.getConfig().minHeight); + const minWidth = getPixelValue(this._overlayRef.getConfig().minWidth); + const verticalFit = fit.fitsInViewportVertically || minHeight != null && minHeight <= availableHeight; + const horizontalFit = fit.fitsInViewportHorizontally || minWidth != null && minWidth <= availableWidth; + return verticalFit && horizontalFit; + } + return false; + } + /** + * Gets the point at which the overlay can be "pushed" on-screen. If the overlay is larger than + * the viewport, the top-left corner will be pushed on-screen (with overflow occurring on the + * right and bottom). + * + * @param start Starting point from which the overlay is pushed. + * @param rawOverlayRect Dimensions of the overlay. + * @param scrollPosition Current viewport scroll position. + * @returns The point at which to position the overlay after pushing. This is effectively a new + * originPoint. + */ + _pushOverlayOnScreen(start, rawOverlayRect, scrollPosition) { + // If the position is locked and we've pushed the overlay already, reuse the previous push + // amount, rather than pushing it again. If we were to continue pushing, the element would + // remain in the viewport, which goes against the expectations when position locking is enabled. + if (this._previousPushAmount && this._positionLocked) { + return { + x: start.x + this._previousPushAmount.x, + y: start.y + this._previousPushAmount.y + }; + } + // Round the overlay rect when comparing against the + // viewport, because the viewport is always rounded. + const overlay = getRoundedBoundingClientRect(rawOverlayRect); + const viewport = this._viewportRect; + // Determine how much the overlay goes outside the viewport on each + // side, which we'll use to decide which direction to push it. + const overflowRight = Math.max(start.x + overlay.width - viewport.width, 0); + const overflowBottom = Math.max(start.y + overlay.height - viewport.height, 0); + const overflowTop = Math.max(viewport.top - scrollPosition.top - start.y, 0); + const overflowLeft = Math.max(viewport.left - scrollPosition.left - start.x, 0); + // Amount by which to push the overlay in each axis such that it remains on-screen. + let pushX = 0; + let pushY = 0; + // If the overlay fits completely within the bounds of the viewport, push it from whichever + // direction is goes off-screen. Otherwise, push the top-left corner such that its in the + // viewport and allow for the trailing end of the overlay to go out of bounds. + if (overlay.width <= viewport.width) { + pushX = overflowLeft || -overflowRight; + } else { + pushX = start.x < this._viewportMargin ? viewport.left - scrollPosition.left - start.x : 0; + } + if (overlay.height <= viewport.height) { + pushY = overflowTop || -overflowBottom; + } else { + pushY = start.y < this._viewportMargin ? viewport.top - scrollPosition.top - start.y : 0; + } + this._previousPushAmount = { + x: pushX, + y: pushY + }; + return { + x: start.x + pushX, + y: start.y + pushY + }; + } + /** + * Applies a computed position to the overlay and emits a position change. + * @param position The position preference + * @param originPoint The point on the origin element where the overlay is connected. + */ + _applyPosition(position, originPoint) { + this._setTransformOrigin(position); + this._setOverlayElementStyles(originPoint, position); + this._setBoundingBoxStyles(originPoint, position); + if (position.panelClass) { + this._addPanelClasses(position.panelClass); + } + // Notify that the position has been changed along with its change properties. + // We only emit if we've got any subscriptions, because the scroll visibility + // calculations can be somewhat expensive. + if (this._positionChanges.observers.length) { + const scrollVisibility = this._getScrollVisibility(); + // We're recalculating on scroll, but we only want to emit if anything + // changed since downstream code might be hitting the `NgZone`. + if (position !== this._lastPosition || !this._lastScrollVisibility || !compareScrollVisibility(this._lastScrollVisibility, scrollVisibility)) { + const changeEvent = new ConnectedOverlayPositionChange(position, scrollVisibility); + this._positionChanges.next(changeEvent); + } + this._lastScrollVisibility = scrollVisibility; + } + // Save the last connected position in case the position needs to be re-calculated. + this._lastPosition = position; + this._isInitialRender = false; + } + /** Sets the transform origin based on the configured selector and the passed-in position. */ + _setTransformOrigin(position) { + if (!this._transformOriginSelector) { + return; + } + const elements = this._boundingBox.querySelectorAll(this._transformOriginSelector); + let xOrigin; + let yOrigin = position.overlayY; + if (position.overlayX === 'center') { + xOrigin = 'center'; + } else if (this._isRtl()) { + xOrigin = position.overlayX === 'start' ? 'right' : 'left'; + } else { + xOrigin = position.overlayX === 'start' ? 'left' : 'right'; + } + for (let i = 0; i < elements.length; i++) { + elements[i].style.transformOrigin = `${xOrigin} ${yOrigin}`; + } + } + /** + * Gets the position and size of the overlay's sizing container. + * + * This method does no measuring and applies no styles so that we can cheaply compute the + * bounds for all positions and choose the best fit based on these results. + */ + _calculateBoundingBoxRect(origin, position) { + const viewport = this._viewportRect; + const isRtl = this._isRtl(); + let height, top, bottom; + if (position.overlayY === 'top') { + // Overlay is opening "downward" and thus is bound by the bottom viewport edge. + top = origin.y; + height = viewport.height - top + this._viewportMargin; + } else if (position.overlayY === 'bottom') { + // Overlay is opening "upward" and thus is bound by the top viewport edge. We need to add + // the viewport margin back in, because the viewport rect is narrowed down to remove the + // margin, whereas the `origin` position is calculated based on its `DOMRect`. + bottom = viewport.height - origin.y + this._viewportMargin * 2; + height = viewport.height - bottom + this._viewportMargin; + } else { + // If neither top nor bottom, it means that the overlay is vertically centered on the + // origin point. Note that we want the position relative to the viewport, rather than + // the page, which is why we don't use something like `viewport.bottom - origin.y` and + // `origin.y - viewport.top`. + const smallestDistanceToViewportEdge = Math.min(viewport.bottom - origin.y + viewport.top, origin.y); + const previousHeight = this._lastBoundingBoxSize.height; + height = smallestDistanceToViewportEdge * 2; + top = origin.y - smallestDistanceToViewportEdge; + if (height > previousHeight && !this._isInitialRender && !this._growAfterOpen) { + top = origin.y - previousHeight / 2; + } + } + // The overlay is opening 'right-ward' (the content flows to the right). + const isBoundedByRightViewportEdge = position.overlayX === 'start' && !isRtl || position.overlayX === 'end' && isRtl; + // The overlay is opening 'left-ward' (the content flows to the left). + const isBoundedByLeftViewportEdge = position.overlayX === 'end' && !isRtl || position.overlayX === 'start' && isRtl; + let width, left, right; + if (isBoundedByLeftViewportEdge) { + right = viewport.width - origin.x + this._viewportMargin * 2; + width = origin.x - this._viewportMargin; + } else if (isBoundedByRightViewportEdge) { + left = origin.x; + width = viewport.right - origin.x; + } else { + // If neither start nor end, it means that the overlay is horizontally centered on the + // origin point. Note that we want the position relative to the viewport, rather than + // the page, which is why we don't use something like `viewport.right - origin.x` and + // `origin.x - viewport.left`. + const smallestDistanceToViewportEdge = Math.min(viewport.right - origin.x + viewport.left, origin.x); + const previousWidth = this._lastBoundingBoxSize.width; + width = smallestDistanceToViewportEdge * 2; + left = origin.x - smallestDistanceToViewportEdge; + if (width > previousWidth && !this._isInitialRender && !this._growAfterOpen) { + left = origin.x - previousWidth / 2; + } + } + return { + top: top, + left: left, + bottom: bottom, + right: right, + width, + height + }; + } + /** + * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the + * origin's connection point and stretches to the bounds of the viewport. + * + * @param origin The point on the origin element where the overlay is connected. + * @param position The position preference + */ + _setBoundingBoxStyles(origin, position) { + const boundingBoxRect = this._calculateBoundingBoxRect(origin, position); + // It's weird if the overlay *grows* while scrolling, so we take the last size into account + // when applying a new size. + if (!this._isInitialRender && !this._growAfterOpen) { + boundingBoxRect.height = Math.min(boundingBoxRect.height, this._lastBoundingBoxSize.height); + boundingBoxRect.width = Math.min(boundingBoxRect.width, this._lastBoundingBoxSize.width); + } + const styles = {}; + if (this._hasExactPosition()) { + styles.top = styles.left = '0'; + styles.bottom = styles.right = styles.maxHeight = styles.maxWidth = ''; + styles.width = styles.height = '100%'; + } else { + const maxHeight = this._overlayRef.getConfig().maxHeight; + const maxWidth = this._overlayRef.getConfig().maxWidth; + styles.height = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(boundingBoxRect.height); + styles.top = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(boundingBoxRect.top); + styles.bottom = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(boundingBoxRect.bottom); + styles.width = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(boundingBoxRect.width); + styles.left = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(boundingBoxRect.left); + styles.right = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(boundingBoxRect.right); + // Push the pane content towards the proper direction. + if (position.overlayX === 'center') { + styles.alignItems = 'center'; + } else { + styles.alignItems = position.overlayX === 'end' ? 'flex-end' : 'flex-start'; + } + if (position.overlayY === 'center') { + styles.justifyContent = 'center'; + } else { + styles.justifyContent = position.overlayY === 'bottom' ? 'flex-end' : 'flex-start'; + } + if (maxHeight) { + styles.maxHeight = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(maxHeight); + } + if (maxWidth) { + styles.maxWidth = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(maxWidth); + } + } + this._lastBoundingBoxSize = boundingBoxRect; + extendStyles(this._boundingBox.style, styles); + } + /** Resets the styles for the bounding box so that a new positioning can be computed. */ + _resetBoundingBoxStyles() { + extendStyles(this._boundingBox.style, { + top: '0', + left: '0', + right: '0', + bottom: '0', + height: '', + width: '', + alignItems: '', + justifyContent: '' + }); + } + /** Resets the styles for the overlay pane so that a new positioning can be computed. */ + _resetOverlayElementStyles() { + extendStyles(this._pane.style, { + top: '', + left: '', + bottom: '', + right: '', + position: '', + transform: '' + }); + } + /** Sets positioning styles to the overlay element. */ + _setOverlayElementStyles(originPoint, position) { + const styles = {}; + const hasExactPosition = this._hasExactPosition(); + const hasFlexibleDimensions = this._hasFlexibleDimensions; + const config = this._overlayRef.getConfig(); + if (hasExactPosition) { + const scrollPosition = this._viewportRuler.getViewportScrollPosition(); + extendStyles(styles, this._getExactOverlayY(position, originPoint, scrollPosition)); + extendStyles(styles, this._getExactOverlayX(position, originPoint, scrollPosition)); + } else { + styles.position = 'static'; + } + // Use a transform to apply the offsets. We do this because the `center` positions rely on + // being in the normal flex flow and setting a `top` / `left` at all will completely throw + // off the position. We also can't use margins, because they won't have an effect in some + // cases where the element doesn't have anything to "push off of". Finally, this works + // better both with flexible and non-flexible positioning. + let transformString = ''; + let offsetX = this._getOffset(position, 'x'); + let offsetY = this._getOffset(position, 'y'); + if (offsetX) { + transformString += `translateX(${offsetX}px) `; + } + if (offsetY) { + transformString += `translateY(${offsetY}px)`; + } + styles.transform = transformString.trim(); + // If a maxWidth or maxHeight is specified on the overlay, we remove them. We do this because + // we need these values to both be set to "100%" for the automatic flexible sizing to work. + // The maxHeight and maxWidth are set on the boundingBox in order to enforce the constraint. + // Note that this doesn't apply when we have an exact position, in which case we do want to + // apply them because they'll be cleared from the bounding box. + if (config.maxHeight) { + if (hasExactPosition) { + styles.maxHeight = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(config.maxHeight); + } else if (hasFlexibleDimensions) { + styles.maxHeight = ''; + } + } + if (config.maxWidth) { + if (hasExactPosition) { + styles.maxWidth = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(config.maxWidth); + } else if (hasFlexibleDimensions) { + styles.maxWidth = ''; + } + } + extendStyles(this._pane.style, styles); + } + /** Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing. */ + _getExactOverlayY(position, originPoint, scrollPosition) { + // Reset any existing styles. This is necessary in case the + // preferred position has changed since the last `apply`. + let styles = { + top: '', + bottom: '' + }; + let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position); + if (this._isPushed) { + overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition); + } + // We want to set either `top` or `bottom` based on whether the overlay wants to appear + // above or below the origin and the direction in which the element will expand. + if (position.overlayY === 'bottom') { + // When using `bottom`, we adjust the y position such that it is the distance + // from the bottom of the viewport rather than the top. + const documentHeight = this._document.documentElement.clientHeight; + styles.bottom = `${documentHeight - (overlayPoint.y + this._overlayRect.height)}px`; + } else { + styles.top = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(overlayPoint.y); + } + return styles; + } + /** Gets the exact left/right for the overlay when not using flexible sizing or when pushing. */ + _getExactOverlayX(position, originPoint, scrollPosition) { + // Reset any existing styles. This is necessary in case the preferred position has + // changed since the last `apply`. + let styles = { + left: '', + right: '' + }; + let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position); + if (this._isPushed) { + overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition); + } + // We want to set either `left` or `right` based on whether the overlay wants to appear "before" + // or "after" the origin, which determines the direction in which the element will expand. + // For the horizontal axis, the meaning of "before" and "after" change based on whether the + // page is in RTL or LTR. + let horizontalStyleProperty; + if (this._isRtl()) { + horizontalStyleProperty = position.overlayX === 'end' ? 'left' : 'right'; + } else { + horizontalStyleProperty = position.overlayX === 'end' ? 'right' : 'left'; + } + // When we're setting `right`, we adjust the x position such that it is the distance + // from the right edge of the viewport rather than the left edge. + if (horizontalStyleProperty === 'right') { + const documentWidth = this._document.documentElement.clientWidth; + styles.right = `${documentWidth - (overlayPoint.x + this._overlayRect.width)}px`; + } else { + styles.left = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceCssPixelValue)(overlayPoint.x); + } + return styles; + } + /** + * Gets the view properties of the trigger and overlay, including whether they are clipped + * or completely outside the view of any of the strategy's scrollables. + */ + _getScrollVisibility() { + // Note: needs fresh rects since the position could've changed. + const originBounds = this._getOriginRect(); + const overlayBounds = this._pane.getBoundingClientRect(); + // TODO(jelbourn): instead of needing all of the client rects for these scrolling containers + // every time, we should be able to use the scrollTop of the containers if the size of those + // containers hasn't changed. + const scrollContainerBounds = this._scrollables.map(scrollable => { + return scrollable.getElementRef().nativeElement.getBoundingClientRect(); + }); + return { + isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds), + isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds), + isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds), + isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds) + }; + } + /** Subtracts the amount that an element is overflowing on an axis from its length. */ + _subtractOverflows(length, ...overflows) { + return overflows.reduce((currentValue, currentOverflow) => { + return currentValue - Math.max(currentOverflow, 0); + }, length); + } + /** Narrows the given viewport rect by the current _viewportMargin. */ + _getNarrowedViewportRect() { + // We recalculate the viewport rect here ourselves, rather than using the ViewportRuler, + // because we want to use the `clientWidth` and `clientHeight` as the base. The difference + // being that the client properties don't include the scrollbar, as opposed to `innerWidth` + // and `innerHeight` that do. This is necessary, because the overlay container uses + // 100% `width` and `height` which don't include the scrollbar either. + const width = this._document.documentElement.clientWidth; + const height = this._document.documentElement.clientHeight; + const scrollPosition = this._viewportRuler.getViewportScrollPosition(); + return { + top: scrollPosition.top + this._viewportMargin, + left: scrollPosition.left + this._viewportMargin, + right: scrollPosition.left + width - this._viewportMargin, + bottom: scrollPosition.top + height - this._viewportMargin, + width: width - 2 * this._viewportMargin, + height: height - 2 * this._viewportMargin + }; + } + /** Whether the we're dealing with an RTL context */ + _isRtl() { + return this._overlayRef.getDirection() === 'rtl'; + } + /** Determines whether the overlay uses exact or flexible positioning. */ + _hasExactPosition() { + return !this._hasFlexibleDimensions || this._isPushed; + } + /** Retrieves the offset of a position along the x or y axis. */ + _getOffset(position, axis) { + if (axis === 'x') { + // We don't do something like `position['offset' + axis]` in + // order to avoid breaking minifiers that rename properties. + return position.offsetX == null ? this._offsetX : position.offsetX; + } + return position.offsetY == null ? this._offsetY : position.offsetY; + } + /** Validates that the current position match the expected values. */ + _validatePositions() { + if (typeof ngDevMode === 'undefined' || ngDevMode) { + if (!this._preferredPositions.length) { + throw Error('FlexibleConnectedPositionStrategy: At least one position is required.'); + } + // TODO(crisbeto): remove these once Angular's template type + // checking is advanced enough to catch these cases. + this._preferredPositions.forEach(pair => { + validateHorizontalPosition('originX', pair.originX); + validateVerticalPosition('originY', pair.originY); + validateHorizontalPosition('overlayX', pair.overlayX); + validateVerticalPosition('overlayY', pair.overlayY); + }); + } + } + /** Adds a single CSS class or an array of classes on the overlay panel. */ + _addPanelClasses(cssClasses) { + if (this._pane) { + (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceArray)(cssClasses).forEach(cssClass => { + if (cssClass !== '' && this._appliedPanelClasses.indexOf(cssClass) === -1) { + this._appliedPanelClasses.push(cssClass); + this._pane.classList.add(cssClass); + } + }); + } + } + /** Clears the classes that the position strategy has applied from the overlay panel. */ + _clearPanelClasses() { + if (this._pane) { + this._appliedPanelClasses.forEach(cssClass => { + this._pane.classList.remove(cssClass); + }); + this._appliedPanelClasses = []; + } + } + /** Returns the DOMRect of the current origin. */ + _getOriginRect() { + const origin = this._origin; + if (origin instanceof _angular_core__WEBPACK_IMPORTED_MODULE_4__.ElementRef) { + return origin.nativeElement.getBoundingClientRect(); + } + // Check for Element so SVG elements are also supported. + if (origin instanceof Element) { + return origin.getBoundingClientRect(); + } + const width = origin.width || 0; + const height = origin.height || 0; + // If the origin is a point, return a client rect as if it was a 0x0 element at the point. + return { + top: origin.y, + bottom: origin.y + height, + left: origin.x, + right: origin.x + width, + height, + width + }; + } +} +/** Shallow-extends a stylesheet object with another stylesheet object. */ +function extendStyles(destination, source) { + for (let key in source) { + if (source.hasOwnProperty(key)) { + destination[key] = source[key]; + } + } + return destination; +} +/** + * Extracts the pixel value as a number from a value, if it's a number + * or a CSS pixel string (e.g. `1337px`). Otherwise returns null. + */ +function getPixelValue(input) { + if (typeof input !== 'number' && input != null) { + const [value, units] = input.split(cssUnitPattern); + return !units || units === 'px' ? parseFloat(value) : null; + } + return input || null; +} +/** + * Gets a version of an element's bounding `DOMRect` where all the values are rounded down to + * the nearest pixel. This allows us to account for the cases where there may be sub-pixel + * deviations in the `DOMRect` returned by the browser (e.g. when zoomed in with a percentage + * size, see #21350). + */ +function getRoundedBoundingClientRect(clientRect) { + return { + top: Math.floor(clientRect.top), + right: Math.floor(clientRect.right), + bottom: Math.floor(clientRect.bottom), + left: Math.floor(clientRect.left), + width: Math.floor(clientRect.width), + height: Math.floor(clientRect.height) + }; +} +/** Returns whether two `ScrollingVisibility` objects are identical. */ +function compareScrollVisibility(a, b) { + if (a === b) { + return true; + } + return a.isOriginClipped === b.isOriginClipped && a.isOriginOutsideView === b.isOriginOutsideView && a.isOverlayClipped === b.isOverlayClipped && a.isOverlayOutsideView === b.isOverlayOutsideView; +} +const STANDARD_DROPDOWN_BELOW_POSITIONS = [{ + originX: 'start', + originY: 'bottom', + overlayX: 'start', + overlayY: 'top' +}, { + originX: 'start', + originY: 'top', + overlayX: 'start', + overlayY: 'bottom' +}, { + originX: 'end', + originY: 'bottom', + overlayX: 'end', + overlayY: 'top' +}, { + originX: 'end', + originY: 'top', + overlayX: 'end', + overlayY: 'bottom' +}]; +const STANDARD_DROPDOWN_ADJACENT_POSITIONS = [{ + originX: 'end', + originY: 'top', + overlayX: 'start', + overlayY: 'top' +}, { + originX: 'end', + originY: 'bottom', + overlayX: 'start', + overlayY: 'bottom' +}, { + originX: 'start', + originY: 'top', + overlayX: 'end', + overlayY: 'top' +}, { + originX: 'start', + originY: 'bottom', + overlayX: 'end', + overlayY: 'bottom' +}]; + +/** Class to be added to the overlay pane wrapper. */ +const wrapperClass = 'cdk-global-overlay-wrapper'; +/** + * A strategy for positioning overlays. Using this strategy, an overlay is given an + * explicit position relative to the browser's viewport. We use flexbox, instead of + * transforms, in order to avoid issues with subpixel rendering which can cause the + * element to become blurry. + */ +class GlobalPositionStrategy { + constructor() { + this._cssPosition = 'static'; + this._topOffset = ''; + this._bottomOffset = ''; + this._alignItems = ''; + this._xPosition = ''; + this._xOffset = ''; + this._width = ''; + this._height = ''; + this._isDisposed = false; + } + attach(overlayRef) { + const config = overlayRef.getConfig(); + this._overlayRef = overlayRef; + if (this._width && !config.width) { + overlayRef.updateSize({ + width: this._width + }); + } + if (this._height && !config.height) { + overlayRef.updateSize({ + height: this._height + }); + } + overlayRef.hostElement.classList.add(wrapperClass); + this._isDisposed = false; + } + /** + * Sets the top position of the overlay. Clears any previously set vertical position. + * @param value New top offset. + */ + top(value = '') { + this._bottomOffset = ''; + this._topOffset = value; + this._alignItems = 'flex-start'; + return this; + } + /** + * Sets the left position of the overlay. Clears any previously set horizontal position. + * @param value New left offset. + */ + left(value = '') { + this._xOffset = value; + this._xPosition = 'left'; + return this; + } + /** + * Sets the bottom position of the overlay. Clears any previously set vertical position. + * @param value New bottom offset. + */ + bottom(value = '') { + this._topOffset = ''; + this._bottomOffset = value; + this._alignItems = 'flex-end'; + return this; + } + /** + * Sets the right position of the overlay. Clears any previously set horizontal position. + * @param value New right offset. + */ + right(value = '') { + this._xOffset = value; + this._xPosition = 'right'; + return this; + } + /** + * Sets the overlay to the start of the viewport, depending on the overlay direction. + * This will be to the left in LTR layouts and to the right in RTL. + * @param offset Offset from the edge of the screen. + */ + start(value = '') { + this._xOffset = value; + this._xPosition = 'start'; + return this; + } + /** + * Sets the overlay to the end of the viewport, depending on the overlay direction. + * This will be to the right in LTR layouts and to the left in RTL. + * @param offset Offset from the edge of the screen. + */ + end(value = '') { + this._xOffset = value; + this._xPosition = 'end'; + return this; + } + /** + * Sets the overlay width and clears any previously set width. + * @param value New width for the overlay + * @deprecated Pass the `width` through the `OverlayConfig`. + * @breaking-change 8.0.0 + */ + width(value = '') { + if (this._overlayRef) { + this._overlayRef.updateSize({ + width: value + }); + } else { + this._width = value; + } + return this; + } + /** + * Sets the overlay height and clears any previously set height. + * @param value New height for the overlay + * @deprecated Pass the `height` through the `OverlayConfig`. + * @breaking-change 8.0.0 + */ + height(value = '') { + if (this._overlayRef) { + this._overlayRef.updateSize({ + height: value + }); + } else { + this._height = value; + } + return this; + } + /** + * Centers the overlay horizontally with an optional offset. + * Clears any previously set horizontal position. + * + * @param offset Overlay offset from the horizontal center. + */ + centerHorizontally(offset = '') { + this.left(offset); + this._xPosition = 'center'; + return this; + } + /** + * Centers the overlay vertically with an optional offset. + * Clears any previously set vertical position. + * + * @param offset Overlay offset from the vertical center. + */ + centerVertically(offset = '') { + this.top(offset); + this._alignItems = 'center'; + return this; + } + /** + * Apply the position to the element. + * @docs-private + */ + apply() { + // Since the overlay ref applies the strategy asynchronously, it could + // have been disposed before it ends up being applied. If that is the + // case, we shouldn't do anything. + if (!this._overlayRef || !this._overlayRef.hasAttached()) { + return; + } + const styles = this._overlayRef.overlayElement.style; + const parentStyles = this._overlayRef.hostElement.style; + const config = this._overlayRef.getConfig(); + const { + width, + height, + maxWidth, + maxHeight + } = config; + const shouldBeFlushHorizontally = (width === '100%' || width === '100vw') && (!maxWidth || maxWidth === '100%' || maxWidth === '100vw'); + const shouldBeFlushVertically = (height === '100%' || height === '100vh') && (!maxHeight || maxHeight === '100%' || maxHeight === '100vh'); + const xPosition = this._xPosition; + const xOffset = this._xOffset; + const isRtl = this._overlayRef.getConfig().direction === 'rtl'; + let marginLeft = ''; + let marginRight = ''; + let justifyContent = ''; + if (shouldBeFlushHorizontally) { + justifyContent = 'flex-start'; + } else if (xPosition === 'center') { + justifyContent = 'center'; + if (isRtl) { + marginRight = xOffset; + } else { + marginLeft = xOffset; + } + } else if (isRtl) { + if (xPosition === 'left' || xPosition === 'end') { + justifyContent = 'flex-end'; + marginLeft = xOffset; + } else if (xPosition === 'right' || xPosition === 'start') { + justifyContent = 'flex-start'; + marginRight = xOffset; + } + } else if (xPosition === 'left' || xPosition === 'start') { + justifyContent = 'flex-start'; + marginLeft = xOffset; + } else if (xPosition === 'right' || xPosition === 'end') { + justifyContent = 'flex-end'; + marginRight = xOffset; + } + styles.position = this._cssPosition; + styles.marginLeft = shouldBeFlushHorizontally ? '0' : marginLeft; + styles.marginTop = shouldBeFlushVertically ? '0' : this._topOffset; + styles.marginBottom = this._bottomOffset; + styles.marginRight = shouldBeFlushHorizontally ? '0' : marginRight; + parentStyles.justifyContent = justifyContent; + parentStyles.alignItems = shouldBeFlushVertically ? 'flex-start' : this._alignItems; + } + /** + * Cleans up the DOM changes from the position strategy. + * @docs-private + */ + dispose() { + if (this._isDisposed || !this._overlayRef) { + return; + } + const styles = this._overlayRef.overlayElement.style; + const parent = this._overlayRef.hostElement; + const parentStyles = parent.style; + parent.classList.remove(wrapperClass); + parentStyles.justifyContent = parentStyles.alignItems = styles.marginTop = styles.marginBottom = styles.marginLeft = styles.marginRight = styles.position = ''; + this._overlayRef = null; + this._isDisposed = true; + } +} + +/** Builder for overlay position strategy. */ +class OverlayPositionBuilder { + constructor(_viewportRuler, _document, _platform, _overlayContainer) { + this._viewportRuler = _viewportRuler; + this._document = _document; + this._platform = _platform; + this._overlayContainer = _overlayContainer; + } + /** + * Creates a global position strategy. + */ + global() { + return new GlobalPositionStrategy(); + } + /** + * Creates a flexible position strategy. + * @param origin Origin relative to which to position the overlay. + */ + flexibleConnectedTo(origin) { + return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer); + } + static #_ = this.ɵfac = function OverlayPositionBuilder_Factory(t) { + return new (t || OverlayPositionBuilder)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ViewportRuler), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](OverlayContainer)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: OverlayPositionBuilder, + factory: OverlayPositionBuilder.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](OverlayPositionBuilder, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ViewportRuler + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT] + }] + }, { + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.Platform + }, { + type: OverlayContainer + }], null); +})(); + +/** Next overlay unique ID. */ +let nextUniqueId = 0; +// Note that Overlay is *not* scoped to the app root because of the ComponentFactoryResolver +// which needs to be different depending on where OverlayModule is imported. +/** + * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be + * used as a low-level building block for other components. Dialogs, tooltips, menus, + * selects, etc. can all be built using overlays. The service should primarily be used by authors + * of re-usable components rather than developers building end-user applications. + * + * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one. + */ +class Overlay { + constructor( /** Scrolling strategies that can be used when creating an overlay. */ + scrollStrategies, _overlayContainer, _componentFactoryResolver, _positionBuilder, _keyboardDispatcher, _injector, _ngZone, _document, _directionality, _location, _outsideClickDispatcher, _animationsModuleType) { + this.scrollStrategies = scrollStrategies; + this._overlayContainer = _overlayContainer; + this._componentFactoryResolver = _componentFactoryResolver; + this._positionBuilder = _positionBuilder; + this._keyboardDispatcher = _keyboardDispatcher; + this._injector = _injector; + this._ngZone = _ngZone; + this._document = _document; + this._directionality = _directionality; + this._location = _location; + this._outsideClickDispatcher = _outsideClickDispatcher; + this._animationsModuleType = _animationsModuleType; + } + /** + * Creates an overlay. + * @param config Configuration applied to the overlay. + * @returns Reference to the created overlay. + */ + create(config) { + const host = this._createHostElement(); + const pane = this._createPaneElement(host); + const portalOutlet = this._createPortalOutlet(pane); + const overlayConfig = new OverlayConfig(config); + overlayConfig.direction = overlayConfig.direction || this._directionality.value; + return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document, this._location, this._outsideClickDispatcher, this._animationsModuleType === 'NoopAnimations'); + } + /** + * Gets a position builder that can be used, via fluent API, + * to construct and configure a position strategy. + * @returns An overlay position builder. + */ + position() { + return this._positionBuilder; + } + /** + * Creates the DOM element for an overlay and appends it to the overlay container. + * @returns Newly-created pane element + */ + _createPaneElement(host) { + const pane = this._document.createElement('div'); + pane.id = `cdk-overlay-${nextUniqueId++}`; + pane.classList.add('cdk-overlay-pane'); + host.appendChild(pane); + return pane; + } + /** + * Creates the host element that wraps around an overlay + * and can be used for advanced positioning. + * @returns Newly-create host element. + */ + _createHostElement() { + const host = this._document.createElement('div'); + this._overlayContainer.getContainerElement().appendChild(host); + return host; + } + /** + * Create a DomPortalOutlet into which the overlay content can be loaded. + * @param pane The DOM element to turn into a portal outlet. + * @returns A portal outlet for the given DOM element. + */ + _createPortalOutlet(pane) { + // We have to resolve the ApplicationRef later in order to allow people + // to use overlay-based providers during app initialization. + if (!this._appRef) { + this._appRef = this._injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_4__.ApplicationRef); + } + return new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_11__.DomPortalOutlet(pane, this._componentFactoryResolver, this._appRef, this._injector, this._document); + } + static #_ = this.ɵfac = function Overlay_Factory(t) { + return new (t || Overlay)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](ScrollStrategyOptions), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](OverlayContainer), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.ComponentFactoryResolver), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](OverlayPositionBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](OverlayKeyboardDispatcher), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.Injector), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_5__.Location), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](OverlayOutsideClickDispatcher), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.ANIMATION_MODULE_TYPE, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: Overlay, + factory: Overlay.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](Overlay, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: ScrollStrategyOptions + }, { + type: OverlayContainer + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.ComponentFactoryResolver + }, { + type: OverlayPositionBuilder + }, { + type: OverlayKeyboardDispatcher + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injector + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT] + }] + }, { + type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality + }, { + type: _angular_common__WEBPACK_IMPORTED_MODULE_5__.Location + }, { + type: OverlayOutsideClickDispatcher + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [_angular_core__WEBPACK_IMPORTED_MODULE_4__.ANIMATION_MODULE_TYPE] + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Optional + }] + }], null); +})(); + +/** Default set of positions for the overlay. Follows the behavior of a dropdown. */ +const defaultPositionList = [{ + originX: 'start', + originY: 'bottom', + overlayX: 'start', + overlayY: 'top' +}, { + originX: 'start', + originY: 'top', + overlayX: 'start', + overlayY: 'bottom' +}, { + originX: 'end', + originY: 'top', + overlayX: 'end', + overlayY: 'bottom' +}, { + originX: 'end', + originY: 'bottom', + overlayX: 'end', + overlayY: 'top' +}]; +/** Injection token that determines the scroll handling while the connected overlay is open. */ +const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_4__.InjectionToken('cdk-connected-overlay-scroll-strategy', { + providedIn: 'root', + factory: () => { + const overlay = (0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.inject)(Overlay); + return () => overlay.scrollStrategies.reposition(); + } +}); +/** + * Directive applied to an element to make it usable as an origin for an Overlay using a + * ConnectedPositionStrategy. + */ +class CdkOverlayOrigin { + constructor( /** Reference to the element on which the directive is applied. */ + elementRef) { + this.elementRef = elementRef; + } + static #_ = this.ɵfac = function CdkOverlayOrigin_Factory(t) { + return new (t || CdkOverlayOrigin)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.ElementRef)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineDirective"]({ + type: CdkOverlayOrigin, + selectors: [["", "cdk-overlay-origin", ""], ["", "overlay-origin", ""], ["", "cdkOverlayOrigin", ""]], + exportAs: ["cdkOverlayOrigin"], + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](CdkOverlayOrigin, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Directive, + args: [{ + selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]', + exportAs: 'cdkOverlayOrigin', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.ElementRef + }], null); +})(); +/** + * Directive to facilitate declarative creation of an + * Overlay using a FlexibleConnectedPositionStrategy. + */ +class CdkConnectedOverlay { + /** The offset in pixels for the overlay connection point on the x-axis */ + get offsetX() { + return this._offsetX; + } + set offsetX(offsetX) { + this._offsetX = offsetX; + if (this._position) { + this._updatePositionStrategy(this._position); + } + } + /** The offset in pixels for the overlay connection point on the y-axis */ + get offsetY() { + return this._offsetY; + } + set offsetY(offsetY) { + this._offsetY = offsetY; + if (this._position) { + this._updatePositionStrategy(this._position); + } + } + /** Whether the overlay should be disposed of when the user goes backwards/forwards in history. */ + get disposeOnNavigation() { + return this._disposeOnNavigation; + } + set disposeOnNavigation(value) { + this._disposeOnNavigation = value; + } + // TODO(jelbourn): inputs for size, scroll behavior, animation, etc. + constructor(_overlay, templateRef, viewContainerRef, scrollStrategyFactory, _dir) { + this._overlay = _overlay; + this._dir = _dir; + this._backdropSubscription = rxjs__WEBPACK_IMPORTED_MODULE_7__.Subscription.EMPTY; + this._attachSubscription = rxjs__WEBPACK_IMPORTED_MODULE_7__.Subscription.EMPTY; + this._detachSubscription = rxjs__WEBPACK_IMPORTED_MODULE_7__.Subscription.EMPTY; + this._positionSubscription = rxjs__WEBPACK_IMPORTED_MODULE_7__.Subscription.EMPTY; + this._disposeOnNavigation = false; + this._ngZone = (0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone); + /** Margin between the overlay and the viewport edges. */ + this.viewportMargin = 0; + /** Whether the overlay is open. */ + this.open = false; + /** Whether the overlay can be closed by user interaction. */ + this.disableClose = false; + /** Whether or not the overlay should attach a backdrop. */ + this.hasBackdrop = false; + /** Whether or not the overlay should be locked when scrolling. */ + this.lockPosition = false; + /** Whether the overlay's width and height can be constrained to fit within the viewport. */ + this.flexibleDimensions = false; + /** Whether the overlay can grow after the initial open when flexible positioning is turned on. */ + this.growAfterOpen = false; + /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */ + this.push = false; + /** Event emitted when the backdrop is clicked. */ + this.backdropClick = new _angular_core__WEBPACK_IMPORTED_MODULE_4__.EventEmitter(); + /** Event emitted when the position has changed. */ + this.positionChange = new _angular_core__WEBPACK_IMPORTED_MODULE_4__.EventEmitter(); + /** Event emitted when the overlay has been attached. */ + this.attach = new _angular_core__WEBPACK_IMPORTED_MODULE_4__.EventEmitter(); + /** Event emitted when the overlay has been detached. */ + this.detach = new _angular_core__WEBPACK_IMPORTED_MODULE_4__.EventEmitter(); + /** Emits when there are keyboard events that are targeted at the overlay. */ + this.overlayKeydown = new _angular_core__WEBPACK_IMPORTED_MODULE_4__.EventEmitter(); + /** Emits when there are mouse outside click events that are targeted at the overlay. */ + this.overlayOutsideClick = new _angular_core__WEBPACK_IMPORTED_MODULE_4__.EventEmitter(); + this._templatePortal = new _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_11__.TemplatePortal(templateRef, viewContainerRef); + this._scrollStrategyFactory = scrollStrategyFactory; + this.scrollStrategy = this._scrollStrategyFactory(); + } + /** The associated overlay reference. */ + get overlayRef() { + return this._overlayRef; + } + /** The element's layout direction. */ + get dir() { + return this._dir ? this._dir.value : 'ltr'; + } + ngOnDestroy() { + this._attachSubscription.unsubscribe(); + this._detachSubscription.unsubscribe(); + this._backdropSubscription.unsubscribe(); + this._positionSubscription.unsubscribe(); + if (this._overlayRef) { + this._overlayRef.dispose(); + } + } + ngOnChanges(changes) { + if (this._position) { + this._updatePositionStrategy(this._position); + this._overlayRef.updateSize({ + width: this.width, + minWidth: this.minWidth, + height: this.height, + minHeight: this.minHeight + }); + if (changes['origin'] && this.open) { + this._position.apply(); + } + } + if (changes['open']) { + this.open ? this._attachOverlay() : this._detachOverlay(); + } + } + /** Creates an overlay */ + _createOverlay() { + if (!this.positions || !this.positions.length) { + this.positions = defaultPositionList; + } + const overlayRef = this._overlayRef = this._overlay.create(this._buildConfig()); + this._attachSubscription = overlayRef.attachments().subscribe(() => this.attach.emit()); + this._detachSubscription = overlayRef.detachments().subscribe(() => this.detach.emit()); + overlayRef.keydownEvents().subscribe(event => { + this.overlayKeydown.next(event); + if (event.keyCode === _angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_13__.ESCAPE && !this.disableClose && !(0,_angular_cdk_keycodes__WEBPACK_IMPORTED_MODULE_13__.hasModifierKey)(event)) { + event.preventDefault(); + this._detachOverlay(); + } + }); + this._overlayRef.outsidePointerEvents().subscribe(event => { + this.overlayOutsideClick.next(event); + }); + } + /** Builds the overlay config based on the directive's inputs */ + _buildConfig() { + const positionStrategy = this._position = this.positionStrategy || this._createPositionStrategy(); + const overlayConfig = new OverlayConfig({ + direction: this._dir, + positionStrategy, + scrollStrategy: this.scrollStrategy, + hasBackdrop: this.hasBackdrop, + disposeOnNavigation: this.disposeOnNavigation + }); + if (this.width || this.width === 0) { + overlayConfig.width = this.width; + } + if (this.height || this.height === 0) { + overlayConfig.height = this.height; + } + if (this.minWidth || this.minWidth === 0) { + overlayConfig.minWidth = this.minWidth; + } + if (this.minHeight || this.minHeight === 0) { + overlayConfig.minHeight = this.minHeight; + } + if (this.backdropClass) { + overlayConfig.backdropClass = this.backdropClass; + } + if (this.panelClass) { + overlayConfig.panelClass = this.panelClass; + } + return overlayConfig; + } + /** Updates the state of a position strategy, based on the values of the directive inputs. */ + _updatePositionStrategy(positionStrategy) { + const positions = this.positions.map(currentPosition => ({ + originX: currentPosition.originX, + originY: currentPosition.originY, + overlayX: currentPosition.overlayX, + overlayY: currentPosition.overlayY, + offsetX: currentPosition.offsetX || this.offsetX, + offsetY: currentPosition.offsetY || this.offsetY, + panelClass: currentPosition.panelClass || undefined + })); + return positionStrategy.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(positions).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector); + } + /** Returns the position strategy of the overlay to be set on the overlay config */ + _createPositionStrategy() { + const strategy = this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin()); + this._updatePositionStrategy(strategy); + return strategy; + } + _getFlexibleConnectedPositionStrategyOrigin() { + if (this.origin instanceof CdkOverlayOrigin) { + return this.origin.elementRef; + } else { + return this.origin; + } + } + /** Attaches the overlay and subscribes to backdrop clicks if backdrop exists */ + _attachOverlay() { + if (!this._overlayRef) { + this._createOverlay(); + } else { + // Update the overlay size, in case the directive's inputs have changed + this._overlayRef.getConfig().hasBackdrop = this.hasBackdrop; + } + if (!this._overlayRef.hasAttached()) { + this._overlayRef.attach(this._templatePortal); + } + if (this.hasBackdrop) { + this._backdropSubscription = this._overlayRef.backdropClick().subscribe(event => { + this.backdropClick.emit(event); + }); + } else { + this._backdropSubscription.unsubscribe(); + } + this._positionSubscription.unsubscribe(); + // Only subscribe to `positionChanges` if requested, because putting + // together all the information for it can be expensive. + if (this.positionChange.observers.length > 0) { + this._positionSubscription = this._position.positionChanges.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_14__.takeWhile)(() => this.positionChange.observers.length > 0)).subscribe(position => { + this._ngZone.run(() => this.positionChange.emit(position)); + if (this.positionChange.observers.length === 0) { + this._positionSubscription.unsubscribe(); + } + }); + } + } + /** Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists */ + _detachOverlay() { + if (this._overlayRef) { + this._overlayRef.detach(); + } + this._backdropSubscription.unsubscribe(); + this._positionSubscription.unsubscribe(); + } + static #_ = this.ɵfac = function CdkConnectedOverlay_Factory(t) { + return new (t || CdkConnectedOverlay)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](Overlay), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, 8)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineDirective"]({ + type: CdkConnectedOverlay, + selectors: [["", "cdk-connected-overlay", ""], ["", "connected-overlay", ""], ["", "cdkConnectedOverlay", ""]], + inputs: { + origin: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayOrigin", "origin"], + positions: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayPositions", "positions"], + positionStrategy: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayPositionStrategy", "positionStrategy"], + offsetX: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayOffsetX", "offsetX"], + offsetY: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayOffsetY", "offsetY"], + width: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayWidth", "width"], + height: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayHeight", "height"], + minWidth: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayMinWidth", "minWidth"], + minHeight: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayMinHeight", "minHeight"], + backdropClass: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayBackdropClass", "backdropClass"], + panelClass: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayPanelClass", "panelClass"], + viewportMargin: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayViewportMargin", "viewportMargin"], + scrollStrategy: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayScrollStrategy", "scrollStrategy"], + open: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayOpen", "open"], + disableClose: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayDisableClose", "disableClose"], + transformOriginSelector: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkConnectedOverlayTransformOriginOn", "transformOriginSelector"], + hasBackdrop: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].HasDecoratorInputTransform, "cdkConnectedOverlayHasBackdrop", "hasBackdrop", _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute], + lockPosition: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].HasDecoratorInputTransform, "cdkConnectedOverlayLockPosition", "lockPosition", _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute], + flexibleDimensions: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].HasDecoratorInputTransform, "cdkConnectedOverlayFlexibleDimensions", "flexibleDimensions", _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute], + growAfterOpen: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].HasDecoratorInputTransform, "cdkConnectedOverlayGrowAfterOpen", "growAfterOpen", _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute], + push: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].HasDecoratorInputTransform, "cdkConnectedOverlayPush", "push", _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute], + disposeOnNavigation: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].HasDecoratorInputTransform, "cdkConnectedOverlayDisposeOnNavigation", "disposeOnNavigation", _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute] + }, + outputs: { + backdropClick: "backdropClick", + positionChange: "positionChange", + attach: "attach", + detach: "detach", + overlayKeydown: "overlayKeydown", + overlayOutsideClick: "overlayOutsideClick" + }, + exportAs: ["cdkConnectedOverlay"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputTransformsFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵNgOnChangesFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](CdkConnectedOverlay, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Directive, + args: [{ + selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]', + exportAs: 'cdkConnectedOverlay', + standalone: true + }] + }], () => [{ + type: Overlay + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.TemplateRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.ViewContainerRef + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY] + }] + }, { + type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Optional + }] + }], { + origin: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayOrigin'] + }], + positions: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayPositions'] + }], + positionStrategy: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayPositionStrategy'] + }], + offsetX: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayOffsetX'] + }], + offsetY: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayOffsetY'] + }], + width: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayWidth'] + }], + height: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayHeight'] + }], + minWidth: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayMinWidth'] + }], + minHeight: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayMinHeight'] + }], + backdropClass: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayBackdropClass'] + }], + panelClass: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayPanelClass'] + }], + viewportMargin: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayViewportMargin'] + }], + scrollStrategy: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayScrollStrategy'] + }], + open: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayOpen'] + }], + disableClose: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayDisableClose'] + }], + transformOriginSelector: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkConnectedOverlayTransformOriginOn'] + }], + hasBackdrop: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: [{ + alias: 'cdkConnectedOverlayHasBackdrop', + transform: _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute + }] + }], + lockPosition: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: [{ + alias: 'cdkConnectedOverlayLockPosition', + transform: _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute + }] + }], + flexibleDimensions: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: [{ + alias: 'cdkConnectedOverlayFlexibleDimensions', + transform: _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute + }] + }], + growAfterOpen: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: [{ + alias: 'cdkConnectedOverlayGrowAfterOpen', + transform: _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute + }] + }], + push: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: [{ + alias: 'cdkConnectedOverlayPush', + transform: _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute + }] + }], + disposeOnNavigation: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: [{ + alias: 'cdkConnectedOverlayDisposeOnNavigation', + transform: _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute + }] + }], + backdropClick: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Output + }], + positionChange: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Output + }], + attach: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Output + }], + detach: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Output + }], + overlayKeydown: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Output + }], + overlayOutsideClick: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Output + }] + }); +})(); +/** @docs-private */ +function CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) { + return () => overlay.scrollStrategies.reposition(); +} +/** @docs-private */ +const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = { + provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY, + deps: [Overlay], + useFactory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY +}; +class OverlayModule { + static #_ = this.ɵfac = function OverlayModule_Factory(t) { + return new (t || OverlayModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineNgModule"]({ + type: OverlayModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjector"]({ + providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER], + imports: [_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.BidiModule, _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_11__.PortalModule, _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ScrollingModule, _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ScrollingModule] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](OverlayModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.NgModule, + args: [{ + imports: [_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.BidiModule, _angular_cdk_portal__WEBPACK_IMPORTED_MODULE_11__.PortalModule, _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ScrollingModule, CdkConnectedOverlay, CdkOverlayOrigin], + exports: [CdkConnectedOverlay, CdkOverlayOrigin, _angular_cdk_scrolling__WEBPACK_IMPORTED_MODULE_0__.ScrollingModule], + providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER] + }] + }], null, null); +})(); + +/** + * Alternative to OverlayContainer that supports correct displaying of overlay elements in + * Fullscreen mode + * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen + * + * Should be provided in the root component. + */ +class FullscreenOverlayContainer extends OverlayContainer { + constructor(_document, platform) { + super(_document, platform); + } + ngOnDestroy() { + super.ngOnDestroy(); + if (this._fullScreenEventName && this._fullScreenListener) { + this._document.removeEventListener(this._fullScreenEventName, this._fullScreenListener); + } + } + _createContainer() { + super._createContainer(); + this._adjustParentForFullscreenChange(); + this._addFullscreenChangeListener(() => this._adjustParentForFullscreenChange()); + } + _adjustParentForFullscreenChange() { + if (!this._containerElement) { + return; + } + const fullscreenElement = this.getFullscreenElement(); + const parent = fullscreenElement || this._document.body; + parent.appendChild(this._containerElement); + } + _addFullscreenChangeListener(fn) { + const eventName = this._getEventName(); + if (eventName) { + if (this._fullScreenListener) { + this._document.removeEventListener(eventName, this._fullScreenListener); + } + this._document.addEventListener(eventName, fn); + this._fullScreenListener = fn; + } + } + _getEventName() { + if (!this._fullScreenEventName) { + const _document = this._document; + if (_document.fullscreenEnabled) { + this._fullScreenEventName = 'fullscreenchange'; + } else if (_document.webkitFullscreenEnabled) { + this._fullScreenEventName = 'webkitfullscreenchange'; + } else if (_document.mozFullScreenEnabled) { + this._fullScreenEventName = 'mozfullscreenchange'; + } else if (_document.msFullscreenEnabled) { + this._fullScreenEventName = 'MSFullscreenChange'; + } + } + return this._fullScreenEventName; + } + /** + * When the page is put into fullscreen mode, a specific element is specified. + * Only that element and its children are visible when in fullscreen mode. + */ + getFullscreenElement() { + const _document = this._document; + return _document.fullscreenElement || _document.webkitFullscreenElement || _document.mozFullScreenElement || _document.msFullscreenElement || null; + } + static #_ = this.ɵfac = function FullscreenOverlayContainer_Factory(t) { + return new (t || FullscreenOverlayContainer)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.Platform)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: FullscreenOverlayContainer, + factory: FullscreenOverlayContainer.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FullscreenOverlayContainer, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.DOCUMENT] + }] + }, { + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_1__.Platform + }], null); +})(); + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 51338: +/*!*********************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/platform.mjs ***! + \*********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Platform: () => (/* binding */ Platform), +/* harmony export */ PlatformModule: () => (/* binding */ PlatformModule), +/* harmony export */ RtlScrollAxisType: () => (/* binding */ RtlScrollAxisType), +/* harmony export */ _getEventTarget: () => (/* binding */ _getEventTarget), +/* harmony export */ _getFocusedElementPierceShadowDom: () => (/* binding */ _getFocusedElementPierceShadowDom), +/* harmony export */ _getShadowRoot: () => (/* binding */ _getShadowRoot), +/* harmony export */ _isTestEnvironment: () => (/* binding */ _isTestEnvironment), +/* harmony export */ _supportsShadowDom: () => (/* binding */ _supportsShadowDom), +/* harmony export */ getRtlScrollAxisType: () => (/* binding */ getRtlScrollAxisType), +/* harmony export */ getSupportedInputTypes: () => (/* binding */ getSupportedInputTypes), +/* harmony export */ normalizePassiveListenerOptions: () => (/* binding */ normalizePassiveListenerOptions), +/* harmony export */ supportsPassiveEventListeners: () => (/* binding */ supportsPassiveEventListeners), +/* harmony export */ supportsScrollBehavior: () => (/* binding */ supportsScrollBehavior) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ 39191); + + + + +// Whether the current platform supports the V8 Break Iterator. The V8 check +// is necessary to detect all Blink based browsers. +let hasV8BreakIterator; +// We need a try/catch around the reference to `Intl`, because accessing it in some cases can +// cause IE to throw. These cases are tied to particular versions of Windows and can happen if +// the consumer is providing a polyfilled `Map`. See: +// https://github.com/Microsoft/ChakraCore/issues/3189 +// https://github.com/angular/components/issues/15687 +try { + hasV8BreakIterator = typeof Intl !== 'undefined' && Intl.v8BreakIterator; +} catch { + hasV8BreakIterator = false; +} +/** + * Service to detect the current platform by comparing the userAgent strings and + * checking browser-specific global properties. + */ +class Platform { + constructor(_platformId) { + this._platformId = _platformId; + // We want to use the Angular platform check because if the Document is shimmed + // without the navigator, the following checks will fail. This is preferred because + // sometimes the Document may be shimmed without the user's knowledge or intention + /** Whether the Angular application is being rendered in the browser. */ + this.isBrowser = this._platformId ? (0,_angular_common__WEBPACK_IMPORTED_MODULE_0__.isPlatformBrowser)(this._platformId) : typeof document === 'object' && !!document; + /** Whether the current browser is Microsoft Edge. */ + this.EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent); + /** Whether the current rendering engine is Microsoft Trident. */ + this.TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent); + // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check. + /** Whether the current rendering engine is Blink. */ + this.BLINK = this.isBrowser && !!(window.chrome || hasV8BreakIterator) && typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT; + // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to + // ensure that Webkit runs standalone and is not used as another engine's base. + /** Whether the current rendering engine is WebKit. */ + this.WEBKIT = this.isBrowser && /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT; + /** Whether the current platform is Apple iOS. */ + this.IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window); + // It's difficult to detect the plain Gecko engine, because most of the browsers identify + // them self as Gecko-like browsers and modify the userAgent's according to that. + // Since we only cover one explicit Firefox case, we can simply check for Firefox + // instead of having an unstable check for Gecko. + /** Whether the current browser is Firefox. */ + this.FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent); + /** Whether the current platform is Android. */ + // Trident on mobile adds the android platform to the userAgent to trick detections. + this.ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT; + // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake + // this and just place the Safari keyword in the userAgent. To be more safe about Safari every + // Safari browser should also use Webkit as its layout engine. + /** Whether the current browser is Safari. */ + this.SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT; + } + static #_ = this.ɵfac = function Platform_Factory(t) { + return new (t || Platform)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__.PLATFORM_ID)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({ + token: Platform, + factory: Platform.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](Platform, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: Object, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.Inject, + args: [_angular_core__WEBPACK_IMPORTED_MODULE_1__.PLATFORM_ID] + }] + }], null); +})(); +class PlatformModule { + static #_ = this.ɵfac = function PlatformModule_Factory(t) { + return new (t || PlatformModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({ + type: PlatformModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({}); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](PlatformModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_1__.NgModule, + args: [{}] + }], null, null); +})(); + +/** Cached result Set of input types support by the current browser. */ +let supportedInputTypes; +/** Types of `` that *might* be supported. */ +const candidateInputTypes = [ +// `color` must come first. Chrome 56 shows a warning if we change the type to `color` after +// first changing it to something else: +// The specified value "" does not conform to the required format. +// The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers. +'color', 'button', 'checkbox', 'date', 'datetime-local', 'email', 'file', 'hidden', 'image', 'month', 'number', 'password', 'radio', 'range', 'reset', 'search', 'submit', 'tel', 'text', 'time', 'url', 'week']; +/** @returns The input types supported by this browser. */ +function getSupportedInputTypes() { + // Result is cached. + if (supportedInputTypes) { + return supportedInputTypes; + } + // We can't check if an input type is not supported until we're on the browser, so say that + // everything is supported when not on the browser. We don't use `Platform` here since it's + // just a helper function and can't inject it. + if (typeof document !== 'object' || !document) { + supportedInputTypes = new Set(candidateInputTypes); + return supportedInputTypes; + } + let featureTestInput = document.createElement('input'); + supportedInputTypes = new Set(candidateInputTypes.filter(value => { + featureTestInput.setAttribute('type', value); + return featureTestInput.type === value; + })); + return supportedInputTypes; +} + +/** Cached result of whether the user's browser supports passive event listeners. */ +let supportsPassiveEvents; +/** + * Checks whether the user's browser supports passive event listeners. + * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md + */ +function supportsPassiveEventListeners() { + if (supportsPassiveEvents == null && typeof window !== 'undefined') { + try { + window.addEventListener('test', null, Object.defineProperty({}, 'passive', { + get: () => supportsPassiveEvents = true + })); + } finally { + supportsPassiveEvents = supportsPassiveEvents || false; + } + } + return supportsPassiveEvents; +} +/** + * Normalizes an `AddEventListener` object to something that can be passed + * to `addEventListener` on any browser, no matter whether it supports the + * `options` parameter. + * @param options Object to be normalized. + */ +function normalizePassiveListenerOptions(options) { + return supportsPassiveEventListeners() ? options : !!options.capture; +} + +/** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */ +var RtlScrollAxisType; +(function (RtlScrollAxisType) { + /** + * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled + * all the way right. + */ + RtlScrollAxisType[RtlScrollAxisType["NORMAL"] = 0] = "NORMAL"; + /** + * scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled + * all the way right. + */ + RtlScrollAxisType[RtlScrollAxisType["NEGATED"] = 1] = "NEGATED"; + /** + * scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled + * all the way right. + */ + RtlScrollAxisType[RtlScrollAxisType["INVERTED"] = 2] = "INVERTED"; +})(RtlScrollAxisType || (RtlScrollAxisType = {})); +/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */ +let rtlScrollAxisType; +/** Cached result of the check that indicates whether the browser supports scroll behaviors. */ +let scrollBehaviorSupported; +/** Check whether the browser supports scroll behaviors. */ +function supportsScrollBehavior() { + if (scrollBehaviorSupported == null) { + // If we're not in the browser, it can't be supported. Also check for `Element`, because + // some projects stub out the global `document` during SSR which can throw us off. + if (typeof document !== 'object' || !document || typeof Element !== 'function' || !Element) { + scrollBehaviorSupported = false; + return scrollBehaviorSupported; + } + // If the element can have a `scrollBehavior` style, we can be sure that it's supported. + if ('scrollBehavior' in document.documentElement.style) { + scrollBehaviorSupported = true; + } else { + // At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's + // supported but it doesn't handle scroll behavior, or it has been polyfilled. + const scrollToFunction = Element.prototype.scrollTo; + if (scrollToFunction) { + // We can detect if the function has been polyfilled by calling `toString` on it. Native + // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get + // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider + // polyfilled functions as supporting scroll behavior. + scrollBehaviorSupported = !/\{\s*\[native code\]\s*\}/.test(scrollToFunction.toString()); + } else { + scrollBehaviorSupported = false; + } + } + } + return scrollBehaviorSupported; +} +/** + * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL, + * Firefox & Safari are NEGATED, and IE & Edge are INVERTED. + */ +function getRtlScrollAxisType() { + // We can't check unless we're on the browser. Just assume 'normal' if we're not. + if (typeof document !== 'object' || !document) { + return RtlScrollAxisType.NORMAL; + } + if (rtlScrollAxisType == null) { + // Create a 1px wide scrolling container and a 2px wide content element. + const scrollContainer = document.createElement('div'); + const containerStyle = scrollContainer.style; + scrollContainer.dir = 'rtl'; + containerStyle.width = '1px'; + containerStyle.overflow = 'auto'; + containerStyle.visibility = 'hidden'; + containerStyle.pointerEvents = 'none'; + containerStyle.position = 'absolute'; + const content = document.createElement('div'); + const contentStyle = content.style; + contentStyle.width = '2px'; + contentStyle.height = '1px'; + scrollContainer.appendChild(content); + document.body.appendChild(scrollContainer); + rtlScrollAxisType = RtlScrollAxisType.NORMAL; + // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL + // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're + // dealing with one of the other two types of browsers. + if (scrollContainer.scrollLeft === 0) { + // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an + // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by + // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will + // return 0 when we read it again. + scrollContainer.scrollLeft = 1; + rtlScrollAxisType = scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED; + } + scrollContainer.remove(); + } + return rtlScrollAxisType; +} +let shadowDomIsSupported; +/** Checks whether the user's browser support Shadow DOM. */ +function _supportsShadowDom() { + if (shadowDomIsSupported == null) { + const head = typeof document !== 'undefined' ? document.head : null; + shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow)); + } + return shadowDomIsSupported; +} +/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */ +function _getShadowRoot(element) { + if (_supportsShadowDom()) { + const rootNode = element.getRootNode ? element.getRootNode() : null; + // Note that this should be caught by `_supportsShadowDom`, but some + // teams have been able to hit this code path on unsupported browsers. + if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) { + return rootNode; + } + } + return null; +} +/** + * Gets the currently-focused element on the page while + * also piercing through Shadow DOM boundaries. + */ +function _getFocusedElementPierceShadowDom() { + let activeElement = typeof document !== 'undefined' && document ? document.activeElement : null; + while (activeElement && activeElement.shadowRoot) { + const newActiveElement = activeElement.shadowRoot.activeElement; + if (newActiveElement === activeElement) { + break; + } else { + activeElement = newActiveElement; + } + } + return activeElement; +} +/** Gets the target of an event while accounting for Shadow DOM. */ +function _getEventTarget(event) { + // If an event is bound outside the Shadow DOM, the `event.target` will + // point to the shadow root so we have to use `composedPath` instead. + return event.composedPath ? event.composedPath()[0] : event.target; +} + +/** Gets whether the code is currently running in a test environment. */ +function _isTestEnvironment() { + // We can't use `declare const` because it causes conflicts inside Google with the real typings + // for these symbols and we can't read them off the global object, because they don't appear to + // be attached there for some runners like Jest. + // (see: https://github.com/angular/components/issues/23365#issuecomment-938146643) + return ( + // @ts-ignore + typeof __karma__ !== 'undefined' && !!__karma__ || + // @ts-ignore + typeof jasmine !== 'undefined' && !!jasmine || + // @ts-ignore + typeof jest !== 'undefined' && !!jest || + // @ts-ignore + typeof Mocha !== 'undefined' && !!Mocha + ); +} + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 63965: +/*!*******************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/portal.mjs ***! + \*******************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ BasePortalHost: () => (/* binding */ BasePortalHost), +/* harmony export */ BasePortalOutlet: () => (/* binding */ BasePortalOutlet), +/* harmony export */ CdkPortal: () => (/* binding */ CdkPortal), +/* harmony export */ CdkPortalOutlet: () => (/* binding */ CdkPortalOutlet), +/* harmony export */ ComponentPortal: () => (/* binding */ ComponentPortal), +/* harmony export */ DomPortal: () => (/* binding */ DomPortal), +/* harmony export */ DomPortalHost: () => (/* binding */ DomPortalHost), +/* harmony export */ DomPortalOutlet: () => (/* binding */ DomPortalOutlet), +/* harmony export */ Portal: () => (/* binding */ Portal), +/* harmony export */ PortalHostDirective: () => (/* binding */ PortalHostDirective), +/* harmony export */ PortalInjector: () => (/* binding */ PortalInjector), +/* harmony export */ PortalModule: () => (/* binding */ PortalModule), +/* harmony export */ TemplatePortal: () => (/* binding */ TemplatePortal), +/* harmony export */ TemplatePortalDirective: () => (/* binding */ TemplatePortalDirective) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ 39191); + + + + +/** + * Throws an exception when attempting to attach a null portal to a host. + * @docs-private + */ +function throwNullPortalError() { + throw Error('Must provide a portal to attach'); +} +/** + * Throws an exception when attempting to attach a portal to a host that is already attached. + * @docs-private + */ +function throwPortalAlreadyAttachedError() { + throw Error('Host already has a portal attached'); +} +/** + * Throws an exception when attempting to attach a portal to an already-disposed host. + * @docs-private + */ +function throwPortalOutletAlreadyDisposedError() { + throw Error('This PortalOutlet has already been disposed'); +} +/** + * Throws an exception when attempting to attach an unknown portal type. + * @docs-private + */ +function throwUnknownPortalTypeError() { + throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' + 'a ComponentPortal or a TemplatePortal.'); +} +/** + * Throws an exception when attempting to attach a portal to a null host. + * @docs-private + */ +function throwNullPortalOutletError() { + throw Error('Attempting to attach a portal to a null PortalOutlet'); +} +/** + * Throws an exception when attempting to detach a portal that is not attached. + * @docs-private + */ +function throwNoPortalAttachedError() { + throw Error('Attempting to detach a portal that is not attached to a host'); +} + +/** + * A `Portal` is something that you want to render somewhere else. + * It can be attach to / detached from a `PortalOutlet`. + */ +class Portal { + /** Attach this portal to a host. */ + attach(host) { + if (typeof ngDevMode === 'undefined' || ngDevMode) { + if (host == null) { + throwNullPortalOutletError(); + } + if (host.hasAttached()) { + throwPortalAlreadyAttachedError(); + } + } + this._attachedHost = host; + return host.attach(this); + } + /** Detach this portal from its host */ + detach() { + let host = this._attachedHost; + if (host != null) { + this._attachedHost = null; + host.detach(); + } else if (typeof ngDevMode === 'undefined' || ngDevMode) { + throwNoPortalAttachedError(); + } + } + /** Whether this portal is attached to a host. */ + get isAttached() { + return this._attachedHost != null; + } + /** + * Sets the PortalOutlet reference without performing `attach()`. This is used directly by + * the PortalOutlet when it is performing an `attach()` or `detach()`. + */ + setAttachedHost(host) { + this._attachedHost = host; + } +} +/** + * A `ComponentPortal` is a portal that instantiates some Component upon attachment. + */ +class ComponentPortal extends Portal { + constructor(component, viewContainerRef, injector, componentFactoryResolver, projectableNodes) { + super(); + this.component = component; + this.viewContainerRef = viewContainerRef; + this.injector = injector; + this.componentFactoryResolver = componentFactoryResolver; + this.projectableNodes = projectableNodes; + } +} +/** + * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef). + */ +class TemplatePortal extends Portal { + constructor( /** The embedded template that will be used to instantiate an embedded View in the host. */ + templateRef, /** Reference to the ViewContainer into which the template will be stamped out. */ + viewContainerRef, /** Contextual data to be passed in to the embedded view. */ + context, /** The injector to use for the embedded view. */ + injector) { + super(); + this.templateRef = templateRef; + this.viewContainerRef = viewContainerRef; + this.context = context; + this.injector = injector; + } + get origin() { + return this.templateRef.elementRef; + } + /** + * Attach the portal to the provided `PortalOutlet`. + * When a context is provided it will override the `context` property of the `TemplatePortal` + * instance. + */ + attach(host, context = this.context) { + this.context = context; + return super.attach(host); + } + detach() { + this.context = undefined; + return super.detach(); + } +} +/** + * A `DomPortal` is a portal whose DOM element will be taken from its current position + * in the DOM and moved into a portal outlet, when it is attached. On detach, the content + * will be restored to its original position. + */ +class DomPortal extends Portal { + constructor(element) { + super(); + this.element = element instanceof _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef ? element.nativeElement : element; + } +} +/** + * Partial implementation of PortalOutlet that handles attaching + * ComponentPortal and TemplatePortal. + */ +class BasePortalOutlet { + constructor() { + /** Whether this host has already been permanently disposed. */ + this._isDisposed = false; + // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method. + this.attachDomPortal = null; + } + /** Whether this host has an attached portal. */ + hasAttached() { + return !!this._attachedPortal; + } + /** Attaches a portal. */ + attach(portal) { + if (typeof ngDevMode === 'undefined' || ngDevMode) { + if (!portal) { + throwNullPortalError(); + } + if (this.hasAttached()) { + throwPortalAlreadyAttachedError(); + } + if (this._isDisposed) { + throwPortalOutletAlreadyDisposedError(); + } + } + if (portal instanceof ComponentPortal) { + this._attachedPortal = portal; + return this.attachComponentPortal(portal); + } else if (portal instanceof TemplatePortal) { + this._attachedPortal = portal; + return this.attachTemplatePortal(portal); + // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`. + } else if (this.attachDomPortal && portal instanceof DomPortal) { + this._attachedPortal = portal; + return this.attachDomPortal(portal); + } + if (typeof ngDevMode === 'undefined' || ngDevMode) { + throwUnknownPortalTypeError(); + } + } + /** Detaches a previously attached portal. */ + detach() { + if (this._attachedPortal) { + this._attachedPortal.setAttachedHost(null); + this._attachedPortal = null; + } + this._invokeDisposeFn(); + } + /** Permanently dispose of this portal host. */ + dispose() { + if (this.hasAttached()) { + this.detach(); + } + this._invokeDisposeFn(); + this._isDisposed = true; + } + /** @docs-private */ + setDisposeFn(fn) { + this._disposeFn = fn; + } + _invokeDisposeFn() { + if (this._disposeFn) { + this._disposeFn(); + this._disposeFn = null; + } + } +} +/** + * @deprecated Use `BasePortalOutlet` instead. + * @breaking-change 9.0.0 + */ +class BasePortalHost extends BasePortalOutlet {} + +/** + * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular + * application context. + */ +class DomPortalOutlet extends BasePortalOutlet { + /** + * @param outletElement Element into which the content is projected. + * @param _componentFactoryResolver Used to resolve the component factory. + * Only required when attaching component portals. + * @param _appRef Reference to the application. Only used in component portals when there + * is no `ViewContainerRef` available. + * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't + * have one. Only used for component portals. + * @param _document Reference to the document. Used when attaching a DOM portal. Will eventually + * become a required parameter. + */ + constructor( /** Element into which the content is projected. */ + outletElement, _componentFactoryResolver, _appRef, _defaultInjector, + /** + * @deprecated `_document` Parameter to be made required. + * @breaking-change 10.0.0 + */ + _document) { + super(); + this.outletElement = outletElement; + this._componentFactoryResolver = _componentFactoryResolver; + this._appRef = _appRef; + this._defaultInjector = _defaultInjector; + /** + * Attaches a DOM portal by transferring its content into the outlet. + * @param portal Portal to be attached. + * @deprecated To be turned into a method. + * @breaking-change 10.0.0 + */ + this.attachDomPortal = portal => { + // @breaking-change 10.0.0 Remove check and error once the + // `_document` constructor parameter is required. + if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw Error('Cannot attach DOM portal without _document constructor parameter'); + } + const element = portal.element; + if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw Error('DOM portal content must be attached to a parent node.'); + } + // Anchor used to save the element's previous position so + // that we can restore it when the portal is detached. + const anchorNode = this._document.createComment('dom-portal'); + element.parentNode.insertBefore(anchorNode, element); + this.outletElement.appendChild(element); + this._attachedPortal = portal; + super.setDisposeFn(() => { + // We can't use `replaceWith` here because IE doesn't support it. + if (anchorNode.parentNode) { + anchorNode.parentNode.replaceChild(element, anchorNode); + } + }); + }; + this._document = _document; + } + /** + * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver. + * @param portal Portal to be attached + * @returns Reference to the created component. + */ + attachComponentPortal(portal) { + const resolver = portal.componentFactoryResolver || this._componentFactoryResolver; + if ((typeof ngDevMode === 'undefined' || ngDevMode) && !resolver) { + throw Error('Cannot attach component portal to outlet without a ComponentFactoryResolver.'); + } + const componentFactory = resolver.resolveComponentFactory(portal.component); + let componentRef; + // If the portal specifies a ViewContainerRef, we will use that as the attachment point + // for the component (in terms of Angular's component tree, not rendering). + // When the ViewContainerRef is missing, we use the factory to create the component directly + // and then manually attach the view to the application. + if (portal.viewContainerRef) { + componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector, portal.projectableNodes || undefined); + this.setDisposeFn(() => componentRef.destroy()); + } else { + if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) { + throw Error('Cannot attach component portal to outlet without an ApplicationRef.'); + } + componentRef = componentFactory.create(portal.injector || this._defaultInjector || _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injector.NULL); + this._appRef.attachView(componentRef.hostView); + this.setDisposeFn(() => { + // Verify that the ApplicationRef has registered views before trying to detach a host view. + // This check also protects the `detachView` from being called on a destroyed ApplicationRef. + if (this._appRef.viewCount > 0) { + this._appRef.detachView(componentRef.hostView); + } + componentRef.destroy(); + }); + } + // At this point the component has been instantiated, so we move it to the location in the DOM + // where we want it to be rendered. + this.outletElement.appendChild(this._getComponentRootNode(componentRef)); + this._attachedPortal = portal; + return componentRef; + } + /** + * Attaches a template portal to the DOM as an embedded view. + * @param portal Portal to be attached. + * @returns Reference to the created embedded view. + */ + attachTemplatePortal(portal) { + let viewContainer = portal.viewContainerRef; + let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, { + injector: portal.injector + }); + // The method `createEmbeddedView` will add the view as a child of the viewContainer. + // But for the DomPortalOutlet the view can be added everywhere in the DOM + // (e.g Overlay Container) To move the view to the specified host element. We just + // re-append the existing root nodes. + viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode)); + // Note that we want to detect changes after the nodes have been moved so that + // any directives inside the portal that are looking at the DOM inside a lifecycle + // hook won't be invoked too early. + viewRef.detectChanges(); + this.setDisposeFn(() => { + let index = viewContainer.indexOf(viewRef); + if (index !== -1) { + viewContainer.remove(index); + } + }); + this._attachedPortal = portal; + // TODO(jelbourn): Return locals from view. + return viewRef; + } + /** + * Clears out a portal from the DOM. + */ + dispose() { + super.dispose(); + this.outletElement.remove(); + } + /** Gets the root HTMLElement for an instantiated component. */ + _getComponentRootNode(componentRef) { + return componentRef.hostView.rootNodes[0]; + } +} +/** + * @deprecated Use `DomPortalOutlet` instead. + * @breaking-change 9.0.0 + */ +class DomPortalHost extends DomPortalOutlet {} + +/** + * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal, + * the directive instance itself can be attached to a host, enabling declarative use of portals. + */ +class CdkPortal extends TemplatePortal { + constructor(templateRef, viewContainerRef) { + super(templateRef, viewContainerRef); + } + static #_ = this.ɵfac = function CdkPortal_Factory(t) { + return new (t || CdkPortal)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkPortal, + selectors: [["", "cdkPortal", ""]], + exportAs: ["cdkPortal"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkPortal, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdkPortal]', + exportAs: 'cdkPortal', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef + }], null); +})(); +/** + * @deprecated Use `CdkPortal` instead. + * @breaking-change 9.0.0 + */ +class TemplatePortalDirective extends CdkPortal { + static #_ = this.ɵfac = /* @__PURE__ */(() => { + let ɵTemplatePortalDirective_BaseFactory; + return function TemplatePortalDirective_Factory(t) { + return (ɵTemplatePortalDirective_BaseFactory || (ɵTemplatePortalDirective_BaseFactory = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](TemplatePortalDirective)))(t || TemplatePortalDirective); + }; + })(); + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: TemplatePortalDirective, + selectors: [["", "cdk-portal", ""], ["", "portal", ""]], + exportAs: ["cdkPortal"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([{ + provide: CdkPortal, + useExisting: TemplatePortalDirective + }]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TemplatePortalDirective, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdk-portal], [portal]', + exportAs: 'cdkPortal', + providers: [{ + provide: CdkPortal, + useExisting: TemplatePortalDirective + }], + standalone: true + }] + }], null, null); +})(); +/** + * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be + * directly attached to it, enabling declarative use. + * + * Usage: + * `` + */ +class CdkPortalOutlet extends BasePortalOutlet { + constructor(_componentFactoryResolver, _viewContainerRef, + /** + * @deprecated `_document` parameter to be made required. + * @breaking-change 9.0.0 + */ + _document) { + super(); + this._componentFactoryResolver = _componentFactoryResolver; + this._viewContainerRef = _viewContainerRef; + /** Whether the portal component is initialized. */ + this._isInitialized = false; + /** Emits when a portal is attached to the outlet. */ + this.attached = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); + /** + * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it. + * @param portal Portal to be attached. + * @deprecated To be turned into a method. + * @breaking-change 10.0.0 + */ + this.attachDomPortal = portal => { + // @breaking-change 9.0.0 Remove check and error once the + // `_document` constructor parameter is required. + if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw Error('Cannot attach DOM portal without _document constructor parameter'); + } + const element = portal.element; + if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw Error('DOM portal content must be attached to a parent node.'); + } + // Anchor used to save the element's previous position so + // that we can restore it when the portal is detached. + const anchorNode = this._document.createComment('dom-portal'); + portal.setAttachedHost(this); + element.parentNode.insertBefore(anchorNode, element); + this._getRootNode().appendChild(element); + this._attachedPortal = portal; + super.setDisposeFn(() => { + if (anchorNode.parentNode) { + anchorNode.parentNode.replaceChild(element, anchorNode); + } + }); + }; + this._document = _document; + } + /** Portal associated with the Portal outlet. */ + get portal() { + return this._attachedPortal; + } + set portal(portal) { + // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have + // run. This handles the cases where the user might do something like `
` + // and attach a portal programmatically in the parent component. When Angular does the first CD + // round, it will fire the setter with empty string, causing the user's content to be cleared. + if (this.hasAttached() && !portal && !this._isInitialized) { + return; + } + if (this.hasAttached()) { + super.detach(); + } + if (portal) { + super.attach(portal); + } + this._attachedPortal = portal || null; + } + /** Component or view reference that is attached to the portal. */ + get attachedRef() { + return this._attachedRef; + } + ngOnInit() { + this._isInitialized = true; + } + ngOnDestroy() { + super.dispose(); + this._attachedRef = this._attachedPortal = null; + } + /** + * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver. + * + * @param portal Portal to be attached to the portal outlet. + * @returns Reference to the created component. + */ + attachComponentPortal(portal) { + portal.setAttachedHost(this); + // If the portal specifies an origin, use that as the logical location of the component + // in the application tree. Otherwise use the location of this PortalOutlet. + const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef; + const resolver = portal.componentFactoryResolver || this._componentFactoryResolver; + const componentFactory = resolver.resolveComponentFactory(portal.component); + const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector, portal.projectableNodes || undefined); + // If we're using a view container that's different from the injected one (e.g. when the portal + // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered + // inside of the alternate view container. + if (viewContainerRef !== this._viewContainerRef) { + this._getRootNode().appendChild(ref.hostView.rootNodes[0]); + } + super.setDisposeFn(() => ref.destroy()); + this._attachedPortal = portal; + this._attachedRef = ref; + this.attached.emit(ref); + return ref; + } + /** + * Attach the given TemplatePortal to this PortalHost as an embedded View. + * @param portal Portal to be attached. + * @returns Reference to the created embedded view. + */ + attachTemplatePortal(portal) { + portal.setAttachedHost(this); + const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, { + injector: portal.injector + }); + super.setDisposeFn(() => this._viewContainerRef.clear()); + this._attachedPortal = portal; + this._attachedRef = viewRef; + this.attached.emit(viewRef); + return viewRef; + } + /** Gets the root node of the portal outlet. */ + _getRootNode() { + const nativeElement = this._viewContainerRef.element.nativeElement; + // The directive could be set on a template which will result in a comment + // node being the root. Use the comment's parent node if that is the case. + return nativeElement.nodeType === nativeElement.ELEMENT_NODE ? nativeElement : nativeElement.parentNode; + } + static #_ = this.ɵfac = function CdkPortalOutlet_Factory(t) { + return new (t || CdkPortalOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ComponentFactoryResolver), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkPortalOutlet, + selectors: [["", "cdkPortalOutlet", ""]], + inputs: { + portal: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].None, "cdkPortalOutlet", "portal"] + }, + outputs: { + attached: "attached" + }, + exportAs: ["cdkPortalOutlet"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkPortalOutlet, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdkPortalOutlet]', + exportAs: 'cdkPortalOutlet', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ComponentFactoryResolver + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_1__.DOCUMENT] + }] + }], { + portal: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: ['cdkPortalOutlet'] + }], + attached: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output + }] + }); +})(); +/** + * @deprecated Use `CdkPortalOutlet` instead. + * @breaking-change 9.0.0 + */ +class PortalHostDirective extends CdkPortalOutlet { + static #_ = this.ɵfac = /* @__PURE__ */(() => { + let ɵPortalHostDirective_BaseFactory; + return function PortalHostDirective_Factory(t) { + return (ɵPortalHostDirective_BaseFactory || (ɵPortalHostDirective_BaseFactory = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetInheritedFactory"](PortalHostDirective)))(t || PortalHostDirective); + }; + })(); + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: PortalHostDirective, + selectors: [["", "cdkPortalHost", ""], ["", "portalHost", ""]], + inputs: { + portal: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].None, "cdkPortalHost", "portal"] + }, + exportAs: ["cdkPortalHost"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([{ + provide: CdkPortalOutlet, + useExisting: PortalHostDirective + }]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PortalHostDirective, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdkPortalHost], [portalHost]', + exportAs: 'cdkPortalHost', + inputs: [{ + name: 'portal', + alias: 'cdkPortalHost' + }], + providers: [{ + provide: CdkPortalOutlet, + useExisting: PortalHostDirective + }], + standalone: true + }] + }], null, null); +})(); +class PortalModule { + static #_ = this.ɵfac = function PortalModule_Factory(t) { + return new (t || PortalModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ + type: PortalModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({}); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PortalModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, + args: [{ + imports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], + exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective] + }] + }], null, null); +})(); + +/** + * Custom injector to be used when providing custom + * injection tokens to components inside a portal. + * @docs-private + * @deprecated Use `Injector.create` instead. + * @breaking-change 11.0.0 + */ +class PortalInjector { + constructor(_parentInjector, _customTokens) { + this._parentInjector = _parentInjector; + this._customTokens = _customTokens; + } + get(token, notFoundValue) { + const value = this._customTokens.get(token); + if (typeof value !== 'undefined') { + return value; + } + return this._parentInjector.get(token, notFoundValue); + } +} + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 73172: +/*!**********************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/scrolling.mjs ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ CdkFixedSizeVirtualScroll: () => (/* binding */ CdkFixedSizeVirtualScroll), +/* harmony export */ CdkScrollable: () => (/* binding */ CdkScrollable), +/* harmony export */ CdkScrollableModule: () => (/* binding */ CdkScrollableModule), +/* harmony export */ CdkVirtualForOf: () => (/* binding */ CdkVirtualForOf), +/* harmony export */ CdkVirtualScrollViewport: () => (/* binding */ CdkVirtualScrollViewport), +/* harmony export */ CdkVirtualScrollable: () => (/* binding */ CdkVirtualScrollable), +/* harmony export */ CdkVirtualScrollableElement: () => (/* binding */ CdkVirtualScrollableElement), +/* harmony export */ CdkVirtualScrollableWindow: () => (/* binding */ CdkVirtualScrollableWindow), +/* harmony export */ DEFAULT_RESIZE_TIME: () => (/* binding */ DEFAULT_RESIZE_TIME), +/* harmony export */ DEFAULT_SCROLL_TIME: () => (/* binding */ DEFAULT_SCROLL_TIME), +/* harmony export */ FixedSizeVirtualScrollStrategy: () => (/* binding */ FixedSizeVirtualScrollStrategy), +/* harmony export */ ScrollDispatcher: () => (/* binding */ ScrollDispatcher), +/* harmony export */ ScrollingModule: () => (/* binding */ ScrollingModule), +/* harmony export */ VIRTUAL_SCROLLABLE: () => (/* binding */ VIRTUAL_SCROLLABLE), +/* harmony export */ VIRTUAL_SCROLL_STRATEGY: () => (/* binding */ VIRTUAL_SCROLL_STRATEGY), +/* harmony export */ ViewportRuler: () => (/* binding */ ViewportRuler), +/* harmony export */ _fixedSizeVirtualScrollStrategyFactory: () => (/* binding */ _fixedSizeVirtualScrollStrategyFactory) +/* harmony export */ }); +/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/cdk/coercion */ 79663); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ 13901); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ 64517); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rxjs */ 47066); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! rxjs */ 97757); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! rxjs */ 45351); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! rxjs */ 36421); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! rxjs */ 59918); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 79746); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/operators */ 71654); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ 61856); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs/operators */ 65213); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! rxjs/operators */ 56816); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! rxjs/operators */ 23246); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! rxjs/operators */ 21082); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! rxjs/operators */ 95840); +/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/cdk/platform */ 51338); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/common */ 39191); +/* harmony import */ var _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/cdk/bidi */ 457); +/* harmony import */ var _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/cdk/collections */ 77774); + + + + + + + + + + + + + +/** The injection token used to specify the virtual scrolling strategy. */ +const _c0 = ["contentWrapper"]; +const _c1 = ["*"]; +const VIRTUAL_SCROLL_STRATEGY = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('VIRTUAL_SCROLL_STRATEGY'); + +/** Virtual scrolling strategy for lists with items of known fixed size. */ +class FixedSizeVirtualScrollStrategy { + /** + * @param itemSize The size of the items in the virtually scrolling list. + * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more + * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more. + */ + constructor(itemSize, minBufferPx, maxBufferPx) { + this._scrolledIndexChange = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + /** @docs-private Implemented as part of VirtualScrollStrategy. */ + this.scrolledIndexChange = this._scrolledIndexChange.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.distinctUntilChanged)()); + /** The attached viewport. */ + this._viewport = null; + this._itemSize = itemSize; + this._minBufferPx = minBufferPx; + this._maxBufferPx = maxBufferPx; + } + /** + * Attaches this scroll strategy to a viewport. + * @param viewport The viewport to attach this strategy to. + */ + attach(viewport) { + this._viewport = viewport; + this._updateTotalContentSize(); + this._updateRenderedRange(); + } + /** Detaches this scroll strategy from the currently attached viewport. */ + detach() { + this._scrolledIndexChange.complete(); + this._viewport = null; + } + /** + * Update the item size and buffer size. + * @param itemSize The size of the items in the virtually scrolling list. + * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more + * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more. + */ + updateItemAndBufferSize(itemSize, minBufferPx, maxBufferPx) { + if (maxBufferPx < minBufferPx && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw Error('CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx'); + } + this._itemSize = itemSize; + this._minBufferPx = minBufferPx; + this._maxBufferPx = maxBufferPx; + this._updateTotalContentSize(); + this._updateRenderedRange(); + } + /** @docs-private Implemented as part of VirtualScrollStrategy. */ + onContentScrolled() { + this._updateRenderedRange(); + } + /** @docs-private Implemented as part of VirtualScrollStrategy. */ + onDataLengthChanged() { + this._updateTotalContentSize(); + this._updateRenderedRange(); + } + /** @docs-private Implemented as part of VirtualScrollStrategy. */ + onContentRendered() { + /* no-op */ + } + /** @docs-private Implemented as part of VirtualScrollStrategy. */ + onRenderedOffsetChanged() { + /* no-op */ + } + /** + * Scroll to the offset for the given index. + * @param index The index of the element to scroll to. + * @param behavior The ScrollBehavior to use when scrolling. + */ + scrollToIndex(index, behavior) { + if (this._viewport) { + this._viewport.scrollToOffset(index * this._itemSize, behavior); + } + } + /** Update the viewport's total content size. */ + _updateTotalContentSize() { + if (!this._viewport) { + return; + } + this._viewport.setTotalContentSize(this._viewport.getDataLength() * this._itemSize); + } + /** Update the viewport's rendered range. */ + _updateRenderedRange() { + if (!this._viewport) { + return; + } + const renderedRange = this._viewport.getRenderedRange(); + const newRange = { + start: renderedRange.start, + end: renderedRange.end + }; + const viewportSize = this._viewport.getViewportSize(); + const dataLength = this._viewport.getDataLength(); + let scrollOffset = this._viewport.measureScrollOffset(); + // Prevent NaN as result when dividing by zero. + let firstVisibleIndex = this._itemSize > 0 ? scrollOffset / this._itemSize : 0; + // If user scrolls to the bottom of the list and data changes to a smaller list + if (newRange.end > dataLength) { + // We have to recalculate the first visible index based on new data length and viewport size. + const maxVisibleItems = Math.ceil(viewportSize / this._itemSize); + const newVisibleIndex = Math.max(0, Math.min(firstVisibleIndex, dataLength - maxVisibleItems)); + // If first visible index changed we must update scroll offset to handle start/end buffers + // Current range must also be adjusted to cover the new position (bottom of new list). + if (firstVisibleIndex != newVisibleIndex) { + firstVisibleIndex = newVisibleIndex; + scrollOffset = newVisibleIndex * this._itemSize; + newRange.start = Math.floor(firstVisibleIndex); + } + newRange.end = Math.max(0, Math.min(dataLength, newRange.start + maxVisibleItems)); + } + const startBuffer = scrollOffset - newRange.start * this._itemSize; + if (startBuffer < this._minBufferPx && newRange.start != 0) { + const expandStart = Math.ceil((this._maxBufferPx - startBuffer) / this._itemSize); + newRange.start = Math.max(0, newRange.start - expandStart); + newRange.end = Math.min(dataLength, Math.ceil(firstVisibleIndex + (viewportSize + this._minBufferPx) / this._itemSize)); + } else { + const endBuffer = newRange.end * this._itemSize - (scrollOffset + viewportSize); + if (endBuffer < this._minBufferPx && newRange.end != dataLength) { + const expandEnd = Math.ceil((this._maxBufferPx - endBuffer) / this._itemSize); + if (expandEnd > 0) { + newRange.end = Math.min(dataLength, newRange.end + expandEnd); + newRange.start = Math.max(0, Math.floor(firstVisibleIndex - this._minBufferPx / this._itemSize)); + } + } + } + this._viewport.setRenderedRange(newRange); + this._viewport.setRenderedContentOffset(this._itemSize * newRange.start); + this._scrolledIndexChange.next(Math.floor(firstVisibleIndex)); + } +} +/** + * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created + * `FixedSizeVirtualScrollStrategy` from the given directive. + * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the + * `FixedSizeVirtualScrollStrategy` from. + */ +function _fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) { + return fixedSizeDir._scrollStrategy; +} +/** A virtual scroll strategy that supports fixed-size items. */ +class CdkFixedSizeVirtualScroll { + constructor() { + this._itemSize = 20; + this._minBufferPx = 100; + this._maxBufferPx = 200; + /** The scroll strategy used by this directive. */ + this._scrollStrategy = new FixedSizeVirtualScrollStrategy(this.itemSize, this.minBufferPx, this.maxBufferPx); + } + /** The size of the items in the list (in pixels). */ + get itemSize() { + return this._itemSize; + } + set itemSize(value) { + this._itemSize = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__.coerceNumberProperty)(value); + } + /** + * The minimum amount of buffer rendered beyond the viewport (in pixels). + * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px. + */ + get minBufferPx() { + return this._minBufferPx; + } + set minBufferPx(value) { + this._minBufferPx = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__.coerceNumberProperty)(value); + } + /** + * The number of pixels worth of buffer to render for when rendering new items. Defaults to 200px. + */ + get maxBufferPx() { + return this._maxBufferPx; + } + set maxBufferPx(value) { + this._maxBufferPx = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__.coerceNumberProperty)(value); + } + ngOnChanges() { + this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx); + } + static #_ = this.ɵfac = function CdkFixedSizeVirtualScroll_Factory(t) { + return new (t || CdkFixedSizeVirtualScroll)(); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkFixedSizeVirtualScroll, + selectors: [["cdk-virtual-scroll-viewport", "itemSize", ""]], + inputs: { + itemSize: "itemSize", + minBufferPx: "minBufferPx", + maxBufferPx: "maxBufferPx" + }, + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([{ + provide: VIRTUAL_SCROLL_STRATEGY, + useFactory: _fixedSizeVirtualScrollStrategyFactory, + deps: [(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(() => CdkFixedSizeVirtualScroll)] + }]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkFixedSizeVirtualScroll, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: 'cdk-virtual-scroll-viewport[itemSize]', + standalone: true, + providers: [{ + provide: VIRTUAL_SCROLL_STRATEGY, + useFactory: _fixedSizeVirtualScrollStrategyFactory, + deps: [(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(() => CdkFixedSizeVirtualScroll)] + }] + }] + }], null, { + itemSize: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + minBufferPx: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + maxBufferPx: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); + +/** Time in ms to throttle the scrolling events by default. */ +const DEFAULT_SCROLL_TIME = 20; +/** + * Service contained all registered Scrollable references and emits an event when any one of the + * Scrollable references emit a scrolled event. + */ +class ScrollDispatcher { + constructor(_ngZone, _platform, document) { + this._ngZone = _ngZone; + this._platform = _platform; + /** Subject for notifying that a registered scrollable reference element has been scrolled. */ + this._scrolled = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + /** Keeps track of the global `scroll` and `resize` subscriptions. */ + this._globalSubscription = null; + /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */ + this._scrolledCount = 0; + /** + * Map of all the scrollable references that are registered with the service and their + * scroll event subscriptions. + */ + this.scrollContainers = new Map(); + this._document = document; + } + /** + * Registers a scrollable instance with the service and listens for its scrolled events. When the + * scrollable is scrolled, the service emits the event to its scrolled observable. + * @param scrollable Scrollable instance to be registered. + */ + register(scrollable) { + if (!this.scrollContainers.has(scrollable)) { + this.scrollContainers.set(scrollable, scrollable.elementScrolled().subscribe(() => this._scrolled.next(scrollable))); + } + } + /** + * De-registers a Scrollable reference and unsubscribes from its scroll event observable. + * @param scrollable Scrollable instance to be deregistered. + */ + deregister(scrollable) { + const scrollableReference = this.scrollContainers.get(scrollable); + if (scrollableReference) { + scrollableReference.unsubscribe(); + this.scrollContainers.delete(scrollable); + } + } + /** + * Returns an observable that emits an event whenever any of the registered Scrollable + * references (or window, document, or body) fire a scrolled event. Can provide a time in ms + * to override the default "throttle" time. + * + * **Note:** in order to avoid hitting change detection for every scroll event, + * all of the events emitted from this stream will be run outside the Angular zone. + * If you need to update any data bindings as a result of a scroll event, you have + * to run the callback using `NgZone.run`. + */ + scrolled(auditTimeInMs = DEFAULT_SCROLL_TIME) { + if (!this._platform.isBrowser) { + return (0,rxjs__WEBPACK_IMPORTED_MODULE_4__.of)(); + } + return new rxjs__WEBPACK_IMPORTED_MODULE_5__.Observable(observer => { + if (!this._globalSubscription) { + this._addGlobalListener(); + } + // In the case of a 0ms delay, use an observable without auditTime + // since it does add a perceptible delay in processing overhead. + const subscription = auditTimeInMs > 0 ? this._scrolled.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.auditTime)(auditTimeInMs)).subscribe(observer) : this._scrolled.subscribe(observer); + this._scrolledCount++; + return () => { + subscription.unsubscribe(); + this._scrolledCount--; + if (!this._scrolledCount) { + this._removeGlobalListener(); + } + }; + }); + } + ngOnDestroy() { + this._removeGlobalListener(); + this.scrollContainers.forEach((_, container) => this.deregister(container)); + this._scrolled.complete(); + } + /** + * Returns an observable that emits whenever any of the + * scrollable ancestors of an element are scrolled. + * @param elementOrElementRef Element whose ancestors to listen for. + * @param auditTimeInMs Time to throttle the scroll events. + */ + ancestorScrolled(elementOrElementRef, auditTimeInMs) { + const ancestors = this.getAncestorScrollContainers(elementOrElementRef); + return this.scrolled(auditTimeInMs).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.filter)(target => { + return !target || ancestors.indexOf(target) > -1; + })); + } + /** Returns all registered Scrollables that contain the provided element. */ + getAncestorScrollContainers(elementOrElementRef) { + const scrollingContainers = []; + this.scrollContainers.forEach((_subscription, scrollable) => { + if (this._scrollableContainsElement(scrollable, elementOrElementRef)) { + scrollingContainers.push(scrollable); + } + }); + return scrollingContainers; + } + /** Use defaultView of injected document if available or fallback to global window reference */ + _getWindow() { + return this._document.defaultView || window; + } + /** Returns true if the element is contained within the provided Scrollable. */ + _scrollableContainsElement(scrollable, elementOrElementRef) { + let element = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__.coerceElement)(elementOrElementRef); + let scrollableElement = scrollable.getElementRef().nativeElement; + // Traverse through the element parents until we reach null, checking if any of the elements + // are the scrollable's element. + do { + if (element == scrollableElement) { + return true; + } + } while (element = element.parentElement); + return false; + } + /** Sets up the global scroll listeners. */ + _addGlobalListener() { + this._globalSubscription = this._ngZone.runOutsideAngular(() => { + const window = this._getWindow(); + return (0,rxjs__WEBPACK_IMPORTED_MODULE_8__.fromEvent)(window.document, 'scroll').subscribe(() => this._scrolled.next()); + }); + } + /** Cleans up the global scroll listener. */ + _removeGlobalListener() { + if (this._globalSubscription) { + this._globalSubscription.unsubscribe(); + this._globalSubscription = null; + } + } + static #_ = this.ɵfac = function ScrollDispatcher_Factory(t) { + return new (t || ScrollDispatcher)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_10__.DOCUMENT, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: ScrollDispatcher, + factory: ScrollDispatcher.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ScrollDispatcher, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.Platform + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_10__.DOCUMENT] + }] + }], null); +})(); + +/** + * Sends an event when the directive's element is scrolled. Registers itself with the + * ScrollDispatcher service to include itself as part of its collection of scrolling events that it + * can be listened to through the service. + */ +class CdkScrollable { + constructor(elementRef, scrollDispatcher, ngZone, dir) { + this.elementRef = elementRef; + this.scrollDispatcher = scrollDispatcher; + this.ngZone = ngZone; + this.dir = dir; + this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + this._elementScrolled = new rxjs__WEBPACK_IMPORTED_MODULE_5__.Observable(observer => this.ngZone.runOutsideAngular(() => (0,rxjs__WEBPACK_IMPORTED_MODULE_8__.fromEvent)(this.elementRef.nativeElement, 'scroll').pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_11__.takeUntil)(this._destroyed)).subscribe(observer))); + } + ngOnInit() { + this.scrollDispatcher.register(this); + } + ngOnDestroy() { + this.scrollDispatcher.deregister(this); + this._destroyed.next(); + this._destroyed.complete(); + } + /** Returns observable that emits when a scroll event is fired on the host element. */ + elementScrolled() { + return this._elementScrolled; + } + /** Gets the ElementRef for the viewport. */ + getElementRef() { + return this.elementRef; + } + /** + * Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo + * method, since browsers are not consistent about what scrollLeft means in RTL. For this method + * left and right always refer to the left and right side of the scrolling container irrespective + * of the layout direction. start and end refer to left and right in an LTR context and vice-versa + * in an RTL context. + * @param options specified the offsets to scroll to. + */ + scrollTo(options) { + const el = this.elementRef.nativeElement; + const isRtl = this.dir && this.dir.value == 'rtl'; + // Rewrite start & end offsets as right or left offsets. + if (options.left == null) { + options.left = isRtl ? options.end : options.start; + } + if (options.right == null) { + options.right = isRtl ? options.start : options.end; + } + // Rewrite the bottom offset as a top offset. + if (options.bottom != null) { + options.top = el.scrollHeight - el.clientHeight - options.bottom; + } + // Rewrite the right offset as a left offset. + if (isRtl && (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.getRtlScrollAxisType)() != _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.RtlScrollAxisType.NORMAL) { + if (options.left != null) { + options.right = el.scrollWidth - el.clientWidth - options.left; + } + if ((0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.getRtlScrollAxisType)() == _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.RtlScrollAxisType.INVERTED) { + options.left = options.right; + } else if ((0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.getRtlScrollAxisType)() == _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.RtlScrollAxisType.NEGATED) { + options.left = options.right ? -options.right : options.right; + } + } else { + if (options.right != null) { + options.left = el.scrollWidth - el.clientWidth - options.right; + } + } + this._applyScrollToOptions(options); + } + _applyScrollToOptions(options) { + const el = this.elementRef.nativeElement; + if ((0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.supportsScrollBehavior)()) { + el.scrollTo(options); + } else { + if (options.top != null) { + el.scrollTop = options.top; + } + if (options.left != null) { + el.scrollLeft = options.left; + } + } + } + /** + * Measures the scroll offset relative to the specified edge of the viewport. This method can be + * used instead of directly checking scrollLeft or scrollTop, since browsers are not consistent + * about what scrollLeft means in RTL. The values returned by this method are normalized such that + * left and right always refer to the left and right side of the scrolling container irrespective + * of the layout direction. start and end refer to left and right in an LTR context and vice-versa + * in an RTL context. + * @param from The edge to measure from. + */ + measureScrollOffset(from) { + const LEFT = 'left'; + const RIGHT = 'right'; + const el = this.elementRef.nativeElement; + if (from == 'top') { + return el.scrollTop; + } + if (from == 'bottom') { + return el.scrollHeight - el.clientHeight - el.scrollTop; + } + // Rewrite start & end as left or right offsets. + const isRtl = this.dir && this.dir.value == 'rtl'; + if (from == 'start') { + from = isRtl ? RIGHT : LEFT; + } else if (from == 'end') { + from = isRtl ? LEFT : RIGHT; + } + if (isRtl && (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.getRtlScrollAxisType)() == _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.RtlScrollAxisType.INVERTED) { + // For INVERTED, scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and + // 0 when scrolled all the way right. + if (from == LEFT) { + return el.scrollWidth - el.clientWidth - el.scrollLeft; + } else { + return el.scrollLeft; + } + } else if (isRtl && (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.getRtlScrollAxisType)() == _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.RtlScrollAxisType.NEGATED) { + // For NEGATED, scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and + // 0 when scrolled all the way right. + if (from == LEFT) { + return el.scrollLeft + el.scrollWidth - el.clientWidth; + } else { + return -el.scrollLeft; + } + } else { + // For NORMAL, as well as non-RTL contexts, scrollLeft is 0 when scrolled all the way left and + // (scrollWidth - clientWidth) when scrolled all the way right. + if (from == LEFT) { + return el.scrollLeft; + } else { + return el.scrollWidth - el.clientWidth - el.scrollLeft; + } + } + } + static #_ = this.ɵfac = function CdkScrollable_Factory(t) { + return new (t || CdkScrollable)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ScrollDispatcher), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, 8)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkScrollable, + selectors: [["", "cdk-scrollable", ""], ["", "cdkScrollable", ""]], + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkScrollable, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdk-scrollable], [cdkScrollable]', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef + }, { + type: ScrollDispatcher + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }] + }], null); +})(); + +/** Time in ms to throttle the resize events by default. */ +const DEFAULT_RESIZE_TIME = 20; +/** + * Simple utility for getting the bounds of the browser viewport. + * @docs-private + */ +class ViewportRuler { + constructor(_platform, ngZone, document) { + this._platform = _platform; + /** Stream of viewport change events. */ + this._change = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + /** Event listener that will be used to handle the viewport change events. */ + this._changeListener = event => { + this._change.next(event); + }; + this._document = document; + ngZone.runOutsideAngular(() => { + if (_platform.isBrowser) { + const window = this._getWindow(); + // Note that bind the events ourselves, rather than going through something like RxJS's + // `fromEvent` so that we can ensure that they're bound outside of the NgZone. + window.addEventListener('resize', this._changeListener); + window.addEventListener('orientationchange', this._changeListener); + } + // Clear the cached position so that the viewport is re-measured next time it is required. + // We don't need to keep track of the subscription, because it is completed on destroy. + this.change().subscribe(() => this._viewportSize = null); + }); + } + ngOnDestroy() { + if (this._platform.isBrowser) { + const window = this._getWindow(); + window.removeEventListener('resize', this._changeListener); + window.removeEventListener('orientationchange', this._changeListener); + } + this._change.complete(); + } + /** Returns the viewport's width and height. */ + getViewportSize() { + if (!this._viewportSize) { + this._updateViewportSize(); + } + const output = { + width: this._viewportSize.width, + height: this._viewportSize.height + }; + // If we're not on a browser, don't cache the size since it'll be mocked out anyway. + if (!this._platform.isBrowser) { + this._viewportSize = null; + } + return output; + } + /** Gets a DOMRect for the viewport's bounds. */ + getViewportRect() { + // Use the document element's bounding rect rather than the window scroll properties + // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll + // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different + // conceptual viewports. Under most circumstances these viewports are equivalent, but they + // can disagree when the page is pinch-zoomed (on devices that support touch). + // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4 + // We use the documentElement instead of the body because, by default (without a css reset) + // browsers typically give the document body an 8px margin, which is not included in + // getBoundingClientRect(). + const scrollPosition = this.getViewportScrollPosition(); + const { + width, + height + } = this.getViewportSize(); + return { + top: scrollPosition.top, + left: scrollPosition.left, + bottom: scrollPosition.top + height, + right: scrollPosition.left + width, + height, + width + }; + } + /** Gets the (top, left) scroll position of the viewport. */ + getViewportScrollPosition() { + // While we can get a reference to the fake document + // during SSR, it doesn't have getBoundingClientRect. + if (!this._platform.isBrowser) { + return { + top: 0, + left: 0 + }; + } + // The top-left-corner of the viewport is determined by the scroll position of the document + // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about + // whether `document.body` or `document.documentElement` is the scrolled element, so reading + // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of + // `document.documentElement` works consistently, where the `top` and `left` values will + // equal negative the scroll position. + const document = this._document; + const window = this._getWindow(); + const documentElement = document.documentElement; + const documentRect = documentElement.getBoundingClientRect(); + const top = -documentRect.top || document.body.scrollTop || window.scrollY || documentElement.scrollTop || 0; + const left = -documentRect.left || document.body.scrollLeft || window.scrollX || documentElement.scrollLeft || 0; + return { + top, + left + }; + } + /** + * Returns a stream that emits whenever the size of the viewport changes. + * This stream emits outside of the Angular zone. + * @param throttleTime Time in milliseconds to throttle the stream. + */ + change(throttleTime = DEFAULT_RESIZE_TIME) { + return throttleTime > 0 ? this._change.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.auditTime)(throttleTime)) : this._change; + } + /** Use defaultView of injected document if available or fallback to global window reference */ + _getWindow() { + return this._document.defaultView || window; + } + /** Updates the cached viewport size. */ + _updateViewportSize() { + const window = this._getWindow(); + this._viewportSize = this._platform.isBrowser ? { + width: window.innerWidth, + height: window.innerHeight + } : { + width: 0, + height: 0 + }; + } + static #_ = this.ɵfac = function ViewportRuler_Factory(t) { + return new (t || ViewportRuler)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_common__WEBPACK_IMPORTED_MODULE_10__.DOCUMENT, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: ViewportRuler, + factory: ViewportRuler.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ViewportRuler, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.Platform + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_10__.DOCUMENT] + }] + }], null); +})(); +const VIRTUAL_SCROLLABLE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('VIRTUAL_SCROLLABLE'); +/** + * Extending the {@link CdkScrollable} to be used as scrolling container for virtual scrolling. + */ +class CdkVirtualScrollable extends CdkScrollable { + constructor(elementRef, scrollDispatcher, ngZone, dir) { + super(elementRef, scrollDispatcher, ngZone, dir); + } + /** + * Measure the viewport size for the provided orientation. + * + * @param orientation The orientation to measure the size from. + */ + measureViewportSize(orientation) { + const viewportEl = this.elementRef.nativeElement; + return orientation === 'horizontal' ? viewportEl.clientWidth : viewportEl.clientHeight; + } + static #_ = this.ɵfac = function CdkVirtualScrollable_Factory(t) { + return new (t || CdkVirtualScrollable)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ScrollDispatcher), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, 8)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkVirtualScrollable, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkVirtualScrollable, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef + }, { + type: ScrollDispatcher + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }] + }], null); +})(); + +/** Checks if the given ranges are equal. */ +function rangesEqual(r1, r2) { + return r1.start == r2.start && r1.end == r2.end; +} +/** + * Scheduler to be used for scroll events. Needs to fall back to + * something that doesn't rely on requestAnimationFrame on environments + * that don't support it (e.g. server-side rendering). + */ +const SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? rxjs__WEBPACK_IMPORTED_MODULE_13__.animationFrameScheduler : rxjs__WEBPACK_IMPORTED_MODULE_14__.asapScheduler; +/** A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`. */ +class CdkVirtualScrollViewport extends CdkVirtualScrollable { + /** The direction the viewport scrolls. */ + get orientation() { + return this._orientation; + } + set orientation(orientation) { + if (this._orientation !== orientation) { + this._orientation = orientation; + this._calculateSpacerSize(); + } + } + constructor(elementRef, _changeDetectorRef, ngZone, _scrollStrategy, dir, scrollDispatcher, viewportRuler, scrollable) { + super(elementRef, scrollDispatcher, ngZone, dir); + this.elementRef = elementRef; + this._changeDetectorRef = _changeDetectorRef; + this._scrollStrategy = _scrollStrategy; + this.scrollable = scrollable; + this._platform = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_9__.Platform); + /** Emits when the viewport is detached from a CdkVirtualForOf. */ + this._detachedSubject = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + /** Emits when the rendered range changes. */ + this._renderedRangeSubject = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + this._orientation = 'vertical'; + /** + * Whether rendered items should persist in the DOM after scrolling out of view. By default, items + * will be removed. + */ + this.appendOnly = false; + // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll + // strategy lazily (i.e. only if the user is actually listening to the events). We do this because + // depending on how the strategy calculates the scrolled index, it may come at a cost to + // performance. + /** Emits when the index of the first element visible in the viewport changes. */ + this.scrolledIndexChange = new rxjs__WEBPACK_IMPORTED_MODULE_5__.Observable(observer => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index))))); + /** A stream that emits whenever the rendered range changes. */ + this.renderedRangeStream = this._renderedRangeSubject; + /** + * The total size of all content (in pixels), including content that is not currently rendered. + */ + this._totalContentSize = 0; + /** A string representing the `style.width` property value to be used for the spacer element. */ + this._totalContentWidth = ''; + /** A string representing the `style.height` property value to be used for the spacer element. */ + this._totalContentHeight = ''; + /** The currently rendered range of indices. */ + this._renderedRange = { + start: 0, + end: 0 + }; + /** The length of the data bound to this viewport (in number of items). */ + this._dataLength = 0; + /** The size of the viewport (in pixels). */ + this._viewportSize = 0; + /** The last rendered content offset that was set. */ + this._renderedContentOffset = 0; + /** + * Whether the last rendered content offset was to the end of the content (and therefore needs to + * be rewritten as an offset to the start of the content). + */ + this._renderedContentOffsetNeedsRewrite = false; + /** Whether there is a pending change detection cycle. */ + this._isChangeDetectionPending = false; + /** A list of functions to run after the next change detection cycle. */ + this._runAfterChangeDetection = []; + /** Subscription to changes in the viewport size. */ + this._viewportChanges = rxjs__WEBPACK_IMPORTED_MODULE_15__.Subscription.EMPTY; + if (!_scrollStrategy && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw Error('Error: cdk-virtual-scroll-viewport requires the "itemSize" property to be set.'); + } + this._viewportChanges = viewportRuler.change().subscribe(() => { + this.checkViewportSize(); + }); + if (!this.scrollable) { + // No scrollable is provided, so the virtual-scroll-viewport needs to become a scrollable + this.elementRef.nativeElement.classList.add('cdk-virtual-scrollable'); + this.scrollable = this; + } + } + ngOnInit() { + // Scrolling depends on the element dimensions which we can't get during SSR. + if (!this._platform.isBrowser) { + return; + } + if (this.scrollable === this) { + super.ngOnInit(); + } + // It's still too early to measure the viewport at this point. Deferring with a promise allows + // the Viewport to be rendered with the correct size before we measure. We run this outside the + // zone to avoid causing more change detection cycles. We handle the change detection loop + // ourselves instead. + this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => { + this._measureViewportSize(); + this._scrollStrategy.attach(this); + this.scrollable.elementScrolled().pipe( + // Start off with a fake scroll event so we properly detect our initial position. + (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_16__.startWith)(null), + // Collect multiple events into one until the next animation frame. This way if + // there are multiple scroll events in the same frame we only need to recheck + // our layout once. + (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.auditTime)(0, SCROLL_SCHEDULER), + // Usually `elementScrolled` is completed when the scrollable is destroyed, but + // that may not be the case if a `CdkVirtualScrollableElement` is used so we have + // to unsubscribe here just in case. + (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_11__.takeUntil)(this._destroyed)).subscribe(() => this._scrollStrategy.onContentScrolled()); + this._markChangeDetectionNeeded(); + })); + } + ngOnDestroy() { + this.detach(); + this._scrollStrategy.detach(); + // Complete all subjects + this._renderedRangeSubject.complete(); + this._detachedSubject.complete(); + this._viewportChanges.unsubscribe(); + super.ngOnDestroy(); + } + /** Attaches a `CdkVirtualScrollRepeater` to this viewport. */ + attach(forOf) { + if (this._forOf && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw Error('CdkVirtualScrollViewport is already attached.'); + } + // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length + // changes. Run outside the zone to avoid triggering change detection, since we're managing the + // change detection loop ourselves. + this.ngZone.runOutsideAngular(() => { + this._forOf = forOf; + this._forOf.dataStream.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_11__.takeUntil)(this._detachedSubject)).subscribe(data => { + const newLength = data.length; + if (newLength !== this._dataLength) { + this._dataLength = newLength; + this._scrollStrategy.onDataLengthChanged(); + } + this._doChangeDetection(); + }); + }); + } + /** Detaches the current `CdkVirtualForOf`. */ + detach() { + this._forOf = null; + this._detachedSubject.next(); + } + /** Gets the length of the data bound to this viewport (in number of items). */ + getDataLength() { + return this._dataLength; + } + /** Gets the size of the viewport (in pixels). */ + getViewportSize() { + return this._viewportSize; + } + // TODO(mmalerba): This is technically out of sync with what's really rendered until a render + // cycle happens. I'm being careful to only call it after the render cycle is complete and before + // setting it to something else, but its error prone and should probably be split into + // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM. + /** Get the current rendered range of items. */ + getRenderedRange() { + return this._renderedRange; + } + measureBoundingClientRectWithScrollOffset(from) { + return this.getElementRef().nativeElement.getBoundingClientRect()[from]; + } + /** + * Sets the total size of all content (in pixels), including content that is not currently + * rendered. + */ + setTotalContentSize(size) { + if (this._totalContentSize !== size) { + this._totalContentSize = size; + this._calculateSpacerSize(); + this._markChangeDetectionNeeded(); + } + } + /** Sets the currently rendered range of indices. */ + setRenderedRange(range) { + if (!rangesEqual(this._renderedRange, range)) { + if (this.appendOnly) { + range = { + start: 0, + end: Math.max(this._renderedRange.end, range.end) + }; + } + this._renderedRangeSubject.next(this._renderedRange = range); + this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered()); + } + } + /** + * Gets the offset from the start of the viewport to the start of the rendered data (in pixels). + */ + getOffsetToRenderedContentStart() { + return this._renderedContentOffsetNeedsRewrite ? null : this._renderedContentOffset; + } + /** + * Sets the offset from the start of the viewport to either the start or end of the rendered data + * (in pixels). + */ + setRenderedContentOffset(offset, to = 'to-start') { + // In appendOnly, we always start from the top + offset = this.appendOnly && to === 'to-start' ? 0 : offset; + // For a horizontal viewport in a right-to-left language we need to translate along the x-axis + // in the negative direction. + const isRtl = this.dir && this.dir.value == 'rtl'; + const isHorizontal = this.orientation == 'horizontal'; + const axis = isHorizontal ? 'X' : 'Y'; + const axisDirection = isHorizontal && isRtl ? -1 : 1; + let transform = `translate${axis}(${Number(axisDirection * offset)}px)`; + this._renderedContentOffset = offset; + if (to === 'to-end') { + transform += ` translate${axis}(-100%)`; + // The viewport should rewrite this as a `to-start` offset on the next render cycle. Otherwise + // elements will appear to expand in the wrong direction (e.g. `mat-expansion-panel` would + // expand upward). + this._renderedContentOffsetNeedsRewrite = true; + } + if (this._renderedContentTransform != transform) { + // We know this value is safe because we parse `offset` with `Number()` before passing it + // into the string. + this._renderedContentTransform = transform; + this._markChangeDetectionNeeded(() => { + if (this._renderedContentOffsetNeedsRewrite) { + this._renderedContentOffset -= this.measureRenderedContentSize(); + this._renderedContentOffsetNeedsRewrite = false; + this.setRenderedContentOffset(this._renderedContentOffset); + } else { + this._scrollStrategy.onRenderedOffsetChanged(); + } + }); + } + } + /** + * Scrolls to the given offset from the start of the viewport. Please note that this is not always + * the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left + * direction, this would be the equivalent of setting a fictional `scrollRight` property. + * @param offset The offset to scroll to. + * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`. + */ + scrollToOffset(offset, behavior = 'auto') { + const options = { + behavior + }; + if (this.orientation === 'horizontal') { + options.start = offset; + } else { + options.top = offset; + } + this.scrollable.scrollTo(options); + } + /** + * Scrolls to the offset for the given index. + * @param index The index of the element to scroll to. + * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`. + */ + scrollToIndex(index, behavior = 'auto') { + this._scrollStrategy.scrollToIndex(index, behavior); + } + /** + * Gets the current scroll offset from the start of the scrollable (in pixels). + * @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start' + * in horizontal mode. + */ + measureScrollOffset(from) { + // This is to break the call cycle + let measureScrollOffset; + if (this.scrollable == this) { + measureScrollOffset = _from => super.measureScrollOffset(_from); + } else { + measureScrollOffset = _from => this.scrollable.measureScrollOffset(_from); + } + return Math.max(0, measureScrollOffset(from ?? (this.orientation === 'horizontal' ? 'start' : 'top')) - this.measureViewportOffset()); + } + /** + * Measures the offset of the viewport from the scrolling container + * @param from The edge to measure from. + */ + measureViewportOffset(from) { + let fromRect; + const LEFT = 'left'; + const RIGHT = 'right'; + const isRtl = this.dir?.value == 'rtl'; + if (from == 'start') { + fromRect = isRtl ? RIGHT : LEFT; + } else if (from == 'end') { + fromRect = isRtl ? LEFT : RIGHT; + } else if (from) { + fromRect = from; + } else { + fromRect = this.orientation === 'horizontal' ? 'left' : 'top'; + } + const scrollerClientRect = this.scrollable.measureBoundingClientRectWithScrollOffset(fromRect); + const viewportClientRect = this.elementRef.nativeElement.getBoundingClientRect()[fromRect]; + return viewportClientRect - scrollerClientRect; + } + /** Measure the combined size of all of the rendered items. */ + measureRenderedContentSize() { + const contentEl = this._contentWrapper.nativeElement; + return this.orientation === 'horizontal' ? contentEl.offsetWidth : contentEl.offsetHeight; + } + /** + * Measure the total combined size of the given range. Throws if the range includes items that are + * not rendered. + */ + measureRangeSize(range) { + if (!this._forOf) { + return 0; + } + return this._forOf.measureRangeSize(range, this.orientation); + } + /** Update the viewport dimensions and re-render. */ + checkViewportSize() { + // TODO: Cleanup later when add logic for handling content resize + this._measureViewportSize(); + this._scrollStrategy.onDataLengthChanged(); + } + /** Measure the viewport size. */ + _measureViewportSize() { + this._viewportSize = this.scrollable.measureViewportSize(this.orientation); + } + /** Queue up change detection to run. */ + _markChangeDetectionNeeded(runAfter) { + if (runAfter) { + this._runAfterChangeDetection.push(runAfter); + } + // Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of + // properties sequentially we only have to run `_doChangeDetection` once at the end. + if (!this._isChangeDetectionPending) { + this._isChangeDetectionPending = true; + this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => { + this._doChangeDetection(); + })); + } + } + /** Run change detection. */ + _doChangeDetection() { + this._isChangeDetectionPending = false; + // Apply the content transform. The transform can't be set via an Angular binding because + // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of + // string literals, a variable that can only be 'X' or 'Y', and user input that is run through + // the `Number` function first to coerce it to a numeric value. + this._contentWrapper.nativeElement.style.transform = this._renderedContentTransform; + // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection + // from the root, since the repeated items are content projected in. Calling `detectChanges` + // instead does not properly check the projected content. + this.ngZone.run(() => this._changeDetectorRef.markForCheck()); + const runAfterChangeDetection = this._runAfterChangeDetection; + this._runAfterChangeDetection = []; + for (const fn of runAfterChangeDetection) { + fn(); + } + } + /** Calculates the `style.width` and `style.height` for the spacer element. */ + _calculateSpacerSize() { + this._totalContentHeight = this.orientation === 'horizontal' ? '' : `${this._totalContentSize}px`; + this._totalContentWidth = this.orientation === 'horizontal' ? `${this._totalContentSize}px` : ''; + } + static #_ = this.ɵfac = function CdkVirtualScrollViewport_Factory(t) { + return new (t || CdkVirtualScrollViewport)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](VIRTUAL_SCROLL_STRATEGY, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, 8), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ScrollDispatcher), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ViewportRuler), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](VIRTUAL_SCROLLABLE, 8)); + }; + static #_2 = this.ɵcmp = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ + type: CdkVirtualScrollViewport, + selectors: [["cdk-virtual-scroll-viewport"]], + viewQuery: function CdkVirtualScrollViewport_Query(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵviewQuery"](_c0, 7); + } + if (rf & 2) { + let _t; + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵloadQuery"]()) && (ctx._contentWrapper = _t.first); + } + }, + hostAttrs: [1, "cdk-virtual-scroll-viewport"], + hostVars: 4, + hostBindings: function CdkVirtualScrollViewport_HostBindings(rf, ctx) { + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassProp"]("cdk-virtual-scroll-orientation-horizontal", ctx.orientation === "horizontal")("cdk-virtual-scroll-orientation-vertical", ctx.orientation !== "horizontal"); + } + }, + inputs: { + orientation: "orientation", + appendOnly: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "appendOnly", "appendOnly", _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute] + }, + outputs: { + scrolledIndexChange: "scrolledIndexChange" + }, + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([{ + provide: CdkScrollable, + useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport, + deps: [[new _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional(), new _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject(VIRTUAL_SCROLLABLE)], CdkVirtualScrollViewport] + }]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputTransformsFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵStandaloneFeature"]], + ngContentSelectors: _c1, + decls: 4, + vars: 4, + consts: [["contentWrapper", ""], [1, "cdk-virtual-scroll-content-wrapper"], [1, "cdk-virtual-scroll-spacer"]], + template: function CdkVirtualScrollViewport_Template(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojectionDef"](); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 1, 0); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵprojection"](2); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"](); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](3, "div", 2); + } + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](3); + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstyleProp"]("width", ctx._totalContentWidth)("height", ctx._totalContentHeight); + } + }, + styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"], + encapsulation: 2, + changeDetection: 0 + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkVirtualScrollViewport, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Component, + args: [{ + selector: 'cdk-virtual-scroll-viewport', + host: { + 'class': 'cdk-virtual-scroll-viewport', + '[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === "horizontal"', + '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== "horizontal"' + }, + encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewEncapsulation.None, + changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectionStrategy.OnPush, + standalone: true, + providers: [{ + provide: CdkScrollable, + useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport, + deps: [[new _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional(), new _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject(VIRTUAL_SCROLLABLE)], CdkVirtualScrollViewport] + }], + template: "\n
\n \n
\n\n
\n", + styles: ["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"] + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [VIRTUAL_SCROLL_STRATEGY] + }] + }, { + type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }] + }, { + type: ScrollDispatcher + }, { + type: ViewportRuler + }, { + type: CdkVirtualScrollable, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [VIRTUAL_SCROLLABLE] + }] + }], { + orientation: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + appendOnly: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute + }] + }], + scrolledIndexChange: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Output + }], + _contentWrapper: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewChild, + args: ['contentWrapper', { + static: true + }] + }] + }); +})(); + +/** Helper to extract the offset of a DOM Node in a certain direction. */ +function getOffset(orientation, direction, node) { + const el = node; + if (!el.getBoundingClientRect) { + return 0; + } + const rect = el.getBoundingClientRect(); + if (orientation === 'horizontal') { + return direction === 'start' ? rect.left : rect.right; + } + return direction === 'start' ? rect.top : rect.bottom; +} +/** + * A directive similar to `ngForOf` to be used for rendering data inside a virtual scrolling + * container. + */ +class CdkVirtualForOf { + /** The DataSource to display. */ + get cdkVirtualForOf() { + return this._cdkVirtualForOf; + } + set cdkVirtualForOf(value) { + this._cdkVirtualForOf = value; + if ((0,_angular_cdk_collections__WEBPACK_IMPORTED_MODULE_17__.isDataSource)(value)) { + this._dataSourceChanges.next(value); + } else { + // If value is an an NgIterable, convert it to an array. + this._dataSourceChanges.next(new _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_17__.ArrayDataSource((0,rxjs__WEBPACK_IMPORTED_MODULE_18__.isObservable)(value) ? value : Array.from(value || []))); + } + } + /** + * The `TrackByFunction` to use for tracking changes. The `TrackByFunction` takes the index and + * the item and produces a value to be used as the item's identity when tracking changes. + */ + get cdkVirtualForTrackBy() { + return this._cdkVirtualForTrackBy; + } + set cdkVirtualForTrackBy(fn) { + this._needsUpdate = true; + this._cdkVirtualForTrackBy = fn ? (index, item) => fn(index + (this._renderedRange ? this._renderedRange.start : 0), item) : undefined; + } + /** The template used to stamp out new elements. */ + set cdkVirtualForTemplate(value) { + if (value) { + this._needsUpdate = true; + this._template = value; + } + } + /** + * The size of the cache used to store templates that are not being used for re-use later. + * Setting the cache size to `0` will disable caching. Defaults to 20 templates. + */ + get cdkVirtualForTemplateCacheSize() { + return this._viewRepeater.viewCacheSize; + } + set cdkVirtualForTemplateCacheSize(size) { + this._viewRepeater.viewCacheSize = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_3__.coerceNumberProperty)(size); + } + constructor( /** The view container to add items to. */ + _viewContainerRef, /** The template to use when stamping out new items. */ + _template, /** The set of available differs. */ + _differs, /** The strategy used to render items in the virtual scroll viewport. */ + _viewRepeater, /** The virtual scrolling viewport that these items are being rendered in. */ + _viewport, ngZone) { + this._viewContainerRef = _viewContainerRef; + this._template = _template; + this._differs = _differs; + this._viewRepeater = _viewRepeater; + this._viewport = _viewport; + /** Emits when the rendered view of the data changes. */ + this.viewChange = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + /** Subject that emits when a new DataSource instance is given. */ + this._dataSourceChanges = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + /** Emits whenever the data in the current DataSource changes. */ + this.dataStream = this._dataSourceChanges.pipe( + // Start off with null `DataSource`. + (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_16__.startWith)(null), + // Bundle up the previous and current data sources so we can work with both. + (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_19__.pairwise)(), + // Use `_changeDataSource` to disconnect from the previous data source and connect to the + // new one, passing back a stream of data changes which we run through `switchMap` to give + // us a data stream that emits the latest data from whatever the current `DataSource` is. + (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_20__.switchMap)(([prev, cur]) => this._changeDataSource(prev, cur)), + // Replay the last emitted data when someone subscribes. + (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_21__.shareReplay)(1)); + /** The differ used to calculate changes to the data. */ + this._differ = null; + /** Whether the rendered data should be updated during the next ngDoCheck cycle. */ + this._needsUpdate = false; + this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_1__.Subject(); + this.dataStream.subscribe(data => { + this._data = data; + this._onRenderedDataChange(); + }); + this._viewport.renderedRangeStream.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_11__.takeUntil)(this._destroyed)).subscribe(range => { + this._renderedRange = range; + if (this.viewChange.observers.length) { + ngZone.run(() => this.viewChange.next(this._renderedRange)); + } + this._onRenderedDataChange(); + }); + this._viewport.attach(this); + } + /** + * Measures the combined size (width for horizontal orientation, height for vertical) of all items + * in the specified range. Throws an error if the range includes items that are not currently + * rendered. + */ + measureRangeSize(range, orientation) { + if (range.start >= range.end) { + return 0; + } + if ((range.start < this._renderedRange.start || range.end > this._renderedRange.end) && (typeof ngDevMode === 'undefined' || ngDevMode)) { + throw Error(`Error: attempted to measure an item that isn't rendered.`); + } + // The index into the list of rendered views for the first item in the range. + const renderedStartIndex = range.start - this._renderedRange.start; + // The length of the range we're measuring. + const rangeLen = range.end - range.start; + // Loop over all the views, find the first and land node and compute the size by subtracting + // the top of the first node from the bottom of the last one. + let firstNode; + let lastNode; + // Find the first node by starting from the beginning and going forwards. + for (let i = 0; i < rangeLen; i++) { + const view = this._viewContainerRef.get(i + renderedStartIndex); + if (view && view.rootNodes.length) { + firstNode = lastNode = view.rootNodes[0]; + break; + } + } + // Find the last node by starting from the end and going backwards. + for (let i = rangeLen - 1; i > -1; i--) { + const view = this._viewContainerRef.get(i + renderedStartIndex); + if (view && view.rootNodes.length) { + lastNode = view.rootNodes[view.rootNodes.length - 1]; + break; + } + } + return firstNode && lastNode ? getOffset(orientation, 'end', lastNode) - getOffset(orientation, 'start', firstNode) : 0; + } + ngDoCheck() { + if (this._differ && this._needsUpdate) { + // TODO(mmalerba): We should differentiate needs update due to scrolling and a new portion of + // this list being rendered (can use simpler algorithm) vs needs update due to data actually + // changing (need to do this diff). + const changes = this._differ.diff(this._renderedItems); + if (!changes) { + this._updateContext(); + } else { + this._applyChanges(changes); + } + this._needsUpdate = false; + } + } + ngOnDestroy() { + this._viewport.detach(); + this._dataSourceChanges.next(undefined); + this._dataSourceChanges.complete(); + this.viewChange.complete(); + this._destroyed.next(); + this._destroyed.complete(); + this._viewRepeater.detach(); + } + /** React to scroll state changes in the viewport. */ + _onRenderedDataChange() { + if (!this._renderedRange) { + return; + } + this._renderedItems = this._data.slice(this._renderedRange.start, this._renderedRange.end); + if (!this._differ) { + // Use a wrapper function for the `trackBy` so any new values are + // picked up automatically without having to recreate the differ. + this._differ = this._differs.find(this._renderedItems).create((index, item) => { + return this.cdkVirtualForTrackBy ? this.cdkVirtualForTrackBy(index, item) : item; + }); + } + this._needsUpdate = true; + } + /** Swap out one `DataSource` for another. */ + _changeDataSource(oldDs, newDs) { + if (oldDs) { + oldDs.disconnect(this); + } + this._needsUpdate = true; + return newDs ? newDs.connect(this) : (0,rxjs__WEBPACK_IMPORTED_MODULE_4__.of)(); + } + /** Update the `CdkVirtualForOfContext` for all views. */ + _updateContext() { + const count = this._data.length; + let i = this._viewContainerRef.length; + while (i--) { + const view = this._viewContainerRef.get(i); + view.context.index = this._renderedRange.start + i; + view.context.count = count; + this._updateComputedContextProperties(view.context); + view.detectChanges(); + } + } + /** Apply changes to the DOM. */ + _applyChanges(changes) { + this._viewRepeater.applyChanges(changes, this._viewContainerRef, (record, _adjustedPreviousIndex, currentIndex) => this._getEmbeddedViewArgs(record, currentIndex), record => record.item); + // Update $implicit for any items that had an identity change. + changes.forEachIdentityChange(record => { + const view = this._viewContainerRef.get(record.currentIndex); + view.context.$implicit = record.item; + }); + // Update the context variables on all items. + const count = this._data.length; + let i = this._viewContainerRef.length; + while (i--) { + const view = this._viewContainerRef.get(i); + view.context.index = this._renderedRange.start + i; + view.context.count = count; + this._updateComputedContextProperties(view.context); + } + } + /** Update the computed properties on the `CdkVirtualForOfContext`. */ + _updateComputedContextProperties(context) { + context.first = context.index === 0; + context.last = context.index === context.count - 1; + context.even = context.index % 2 === 0; + context.odd = !context.even; + } + _getEmbeddedViewArgs(record, index) { + // Note that it's important that we insert the item directly at the proper index, + // rather than inserting it and the moving it in place, because if there's a directive + // on the same node that injects the `ViewContainerRef`, Angular will insert another + // comment node which can throw off the move when it's being repeated for all items. + return { + templateRef: this._template, + context: { + $implicit: record.item, + // It's guaranteed that the iterable is not "undefined" or "null" because we only + // generate views for elements if the "cdkVirtualForOf" iterable has elements. + cdkVirtualForOf: this._cdkVirtualForOf, + index: -1, + count: -1, + first: false, + last: false, + odd: false, + even: false + }, + index + }; + } + static #_ = this.ɵfac = function CdkVirtualForOf_Factory(t) { + return new (t || CdkVirtualForOf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.IterableDiffers), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_cdk_collections__WEBPACK_IMPORTED_MODULE_17__._VIEW_REPEATER_STRATEGY), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](CdkVirtualScrollViewport, 4), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkVirtualForOf, + selectors: [["", "cdkVirtualFor", "", "cdkVirtualForOf", ""]], + inputs: { + cdkVirtualForOf: "cdkVirtualForOf", + cdkVirtualForTrackBy: "cdkVirtualForTrackBy", + cdkVirtualForTemplate: "cdkVirtualForTemplate", + cdkVirtualForTemplateCacheSize: "cdkVirtualForTemplateCacheSize" + }, + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([{ + provide: _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_17__._VIEW_REPEATER_STRATEGY, + useClass: _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_17__._RecycleViewRepeaterStrategy + }])] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkVirtualForOf, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdkVirtualFor][cdkVirtualForOf]', + providers: [{ + provide: _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_17__._VIEW_REPEATER_STRATEGY, + useClass: _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_17__._RecycleViewRepeaterStrategy + }], + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.IterableDiffers + }, { + type: _angular_cdk_collections__WEBPACK_IMPORTED_MODULE_17__._RecycleViewRepeaterStrategy, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_cdk_collections__WEBPACK_IMPORTED_MODULE_17__._VIEW_REPEATER_STRATEGY] + }] + }, { + type: CdkVirtualScrollViewport, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.SkipSelf + }] + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }], { + cdkVirtualForOf: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + cdkVirtualForTrackBy: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + cdkVirtualForTemplate: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + cdkVirtualForTemplateCacheSize: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); + +/** + * Provides a virtual scrollable for the element it is attached to. + */ +class CdkVirtualScrollableElement extends CdkVirtualScrollable { + constructor(elementRef, scrollDispatcher, ngZone, dir) { + super(elementRef, scrollDispatcher, ngZone, dir); + } + measureBoundingClientRectWithScrollOffset(from) { + return this.getElementRef().nativeElement.getBoundingClientRect()[from] - this.measureScrollOffset(from); + } + static #_ = this.ɵfac = function CdkVirtualScrollableElement_Factory(t) { + return new (t || CdkVirtualScrollableElement)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ScrollDispatcher), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, 8)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkVirtualScrollableElement, + selectors: [["", "cdkVirtualScrollingElement", ""]], + hostAttrs: [1, "cdk-virtual-scrollable"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([{ + provide: VIRTUAL_SCROLLABLE, + useExisting: CdkVirtualScrollableElement + }]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkVirtualScrollableElement, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[cdkVirtualScrollingElement]', + providers: [{ + provide: VIRTUAL_SCROLLABLE, + useExisting: CdkVirtualScrollableElement + }], + standalone: true, + host: { + 'class': 'cdk-virtual-scrollable' + } + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef + }, { + type: ScrollDispatcher + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }] + }], null); +})(); + +/** + * Provides as virtual scrollable for the global / window scrollbar. + */ +class CdkVirtualScrollableWindow extends CdkVirtualScrollable { + constructor(scrollDispatcher, ngZone, dir) { + super(new _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef(document.documentElement), scrollDispatcher, ngZone, dir); + this._elementScrolled = new rxjs__WEBPACK_IMPORTED_MODULE_5__.Observable(observer => this.ngZone.runOutsideAngular(() => (0,rxjs__WEBPACK_IMPORTED_MODULE_8__.fromEvent)(document, 'scroll').pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_11__.takeUntil)(this._destroyed)).subscribe(observer))); + } + measureBoundingClientRectWithScrollOffset(from) { + return this.getElementRef().nativeElement.getBoundingClientRect()[from]; + } + static #_ = this.ɵfac = function CdkVirtualScrollableWindow_Factory(t) { + return new (t || CdkVirtualScrollableWindow)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ScrollDispatcher), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, 8)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: CdkVirtualScrollableWindow, + selectors: [["cdk-virtual-scroll-viewport", "scrollWindow", ""]], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵProvidersFeature"]([{ + provide: VIRTUAL_SCROLLABLE, + useExisting: CdkVirtualScrollableWindow + }]), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkVirtualScrollableWindow, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: 'cdk-virtual-scroll-viewport[scrollWindow]', + providers: [{ + provide: VIRTUAL_SCROLLABLE, + useExisting: CdkVirtualScrollableWindow + }], + standalone: true + }] + }], () => [{ + type: ScrollDispatcher + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone + }, { + type: _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.Directionality, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }] + }], null); +})(); +class CdkScrollableModule { + static #_ = this.ɵfac = function CdkScrollableModule_Factory(t) { + return new (t || CdkScrollableModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ + type: CdkScrollableModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({}); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CdkScrollableModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, + args: [{ + exports: [CdkScrollable], + imports: [CdkScrollable] + }] + }], null, null); +})(); +/** + * @docs-primary-export + */ +class ScrollingModule { + static #_ = this.ɵfac = function ScrollingModule_Factory(t) { + return new (t || ScrollingModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ + type: ScrollingModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ + imports: [_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.BidiModule, CdkScrollableModule, _angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.BidiModule, CdkScrollableModule] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](ScrollingModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, + args: [{ + imports: [_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.BidiModule, CdkScrollableModule, CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf, CdkVirtualScrollableWindow, CdkVirtualScrollableElement], + exports: [_angular_cdk_bidi__WEBPACK_IMPORTED_MODULE_12__.BidiModule, CdkScrollableModule, CdkFixedSizeVirtualScroll, CdkVirtualForOf, CdkVirtualScrollViewport, CdkVirtualScrollableWindow, CdkVirtualScrollableElement] + }] + }], null, null); +})(); + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 79401: +/*!***********************************************************!*\ + !*** ./node_modules/@angular/cdk/fesm2022/text-field.mjs ***! + \***********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AutofillMonitor: () => (/* binding */ AutofillMonitor), +/* harmony export */ CdkAutofill: () => (/* binding */ CdkAutofill), +/* harmony export */ CdkTextareaAutosize: () => (/* binding */ CdkTextareaAutosize), +/* harmony export */ TextFieldModule: () => (/* binding */ TextFieldModule) +/* harmony export */ }); +/* harmony import */ var _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/cdk/platform */ 51338); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var _angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/cdk/coercion */ 79663); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 90523); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ 63150); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs */ 47066); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/operators */ 71654); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ 65213); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ 39191); + + + + + + + + + +/** Options to pass to the animationstart listener. */ +const listenerOptions = (0,_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__.normalizePassiveListenerOptions)({ + passive: true +}); +/** + * An injectable service that can be used to monitor the autofill state of an input. + * Based on the following blog post: + * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7 + */ +class AutofillMonitor { + constructor(_platform, _ngZone) { + this._platform = _platform; + this._ngZone = _ngZone; + this._monitoredElements = new Map(); + } + monitor(elementOrRef) { + if (!this._platform.isBrowser) { + return rxjs__WEBPACK_IMPORTED_MODULE_1__.EMPTY; + } + const element = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceElement)(elementOrRef); + const info = this._monitoredElements.get(element); + if (info) { + return info.subject; + } + const result = new rxjs__WEBPACK_IMPORTED_MODULE_3__.Subject(); + const cssClass = 'cdk-text-field-autofilled'; + const listener = event => { + // Animation events fire on initial element render, we check for the presence of the autofill + // CSS class to make sure this is a real change in state, not just the initial render before + // we fire off events. + if (event.animationName === 'cdk-text-field-autofill-start' && !element.classList.contains(cssClass)) { + element.classList.add(cssClass); + this._ngZone.run(() => result.next({ + target: event.target, + isAutofilled: true + })); + } else if (event.animationName === 'cdk-text-field-autofill-end' && element.classList.contains(cssClass)) { + element.classList.remove(cssClass); + this._ngZone.run(() => result.next({ + target: event.target, + isAutofilled: false + })); + } + }; + this._ngZone.runOutsideAngular(() => { + element.addEventListener('animationstart', listener, listenerOptions); + element.classList.add('cdk-text-field-autofill-monitored'); + }); + this._monitoredElements.set(element, { + subject: result, + unlisten: () => { + element.removeEventListener('animationstart', listener, listenerOptions); + } + }); + return result; + } + stopMonitoring(elementOrRef) { + const element = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceElement)(elementOrRef); + const info = this._monitoredElements.get(element); + if (info) { + info.unlisten(); + info.subject.complete(); + element.classList.remove('cdk-text-field-autofill-monitored'); + element.classList.remove('cdk-text-field-autofilled'); + this._monitoredElements.delete(element); + } + } + ngOnDestroy() { + this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element)); + } + static #_ = this.ɵfac = function AutofillMonitor_Factory(t) { + return new (t || AutofillMonitor)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjectable"]({ + token: AutofillMonitor, + factory: AutofillMonitor.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](AutofillMonitor, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__.Platform + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone + }], null); +})(); +/** A directive that can be used to monitor the autofill state of an input. */ +class CdkAutofill { + constructor(_elementRef, _autofillMonitor) { + this._elementRef = _elementRef; + this._autofillMonitor = _autofillMonitor; + /** Emits when the autofill state of the element changes. */ + this.cdkAutofill = new _angular_core__WEBPACK_IMPORTED_MODULE_4__.EventEmitter(); + } + ngOnInit() { + this._autofillMonitor.monitor(this._elementRef).subscribe(event => this.cdkAutofill.emit(event)); + } + ngOnDestroy() { + this._autofillMonitor.stopMonitoring(this._elementRef); + } + static #_ = this.ɵfac = function CdkAutofill_Factory(t) { + return new (t || CdkAutofill)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](AutofillMonitor)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineDirective"]({ + type: CdkAutofill, + selectors: [["", "cdkAutofill", ""]], + outputs: { + cdkAutofill: "cdkAutofill" + }, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](CdkAutofill, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Directive, + args: [{ + selector: '[cdkAutofill]', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.ElementRef + }, { + type: AutofillMonitor + }], { + cdkAutofill: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Output + }] + }); +})(); + +/** Directive to automatically resize a textarea to fit its content. */ +class CdkTextareaAutosize { + /** Minimum amount of rows in the textarea. */ + get minRows() { + return this._minRows; + } + set minRows(value) { + this._minRows = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceNumberProperty)(value); + this._setMinHeight(); + } + /** Maximum amount of rows in the textarea. */ + get maxRows() { + return this._maxRows; + } + set maxRows(value) { + this._maxRows = (0,_angular_cdk_coercion__WEBPACK_IMPORTED_MODULE_2__.coerceNumberProperty)(value); + this._setMaxHeight(); + } + /** Whether autosizing is enabled or not */ + get enabled() { + return this._enabled; + } + set enabled(value) { + // Only act if the actual value changed. This specifically helps to not run + // resizeToFitContent too early (i.e. before ngAfterViewInit) + if (this._enabled !== value) { + (this._enabled = value) ? this.resizeToFitContent(true) : this.reset(); + } + } + get placeholder() { + return this._textareaElement.placeholder; + } + set placeholder(value) { + this._cachedPlaceholderHeight = undefined; + if (value) { + this._textareaElement.setAttribute('placeholder', value); + } else { + this._textareaElement.removeAttribute('placeholder'); + } + this._cacheTextareaPlaceholderHeight(); + } + constructor(_elementRef, _platform, _ngZone, /** @breaking-change 11.0.0 make document required */ + document) { + this._elementRef = _elementRef; + this._platform = _platform; + this._ngZone = _ngZone; + this._destroyed = new rxjs__WEBPACK_IMPORTED_MODULE_3__.Subject(); + this._enabled = true; + /** + * Value of minRows as of last resize. If the minRows has decreased, the + * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight + * does not have the same problem because it does not affect the textarea's scrollHeight. + */ + this._previousMinRows = -1; + this._isViewInited = false; + /** Handles `focus` and `blur` events. */ + this._handleFocusEvent = event => { + this._hasFocus = event.type === 'focus'; + }; + this._document = document; + this._textareaElement = this._elementRef.nativeElement; + } + /** Sets the minimum height of the textarea as determined by minRows. */ + _setMinHeight() { + const minHeight = this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null; + if (minHeight) { + this._textareaElement.style.minHeight = minHeight; + } + } + /** Sets the maximum height of the textarea as determined by maxRows. */ + _setMaxHeight() { + const maxHeight = this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null; + if (maxHeight) { + this._textareaElement.style.maxHeight = maxHeight; + } + } + ngAfterViewInit() { + if (this._platform.isBrowser) { + // Remember the height which we started with in case autosizing is disabled + this._initialHeight = this._textareaElement.style.height; + this.resizeToFitContent(); + this._ngZone.runOutsideAngular(() => { + const window = this._getWindow(); + (0,rxjs__WEBPACK_IMPORTED_MODULE_5__.fromEvent)(window, 'resize').pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_6__.auditTime)(16), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.takeUntil)(this._destroyed)).subscribe(() => this.resizeToFitContent(true)); + this._textareaElement.addEventListener('focus', this._handleFocusEvent); + this._textareaElement.addEventListener('blur', this._handleFocusEvent); + }); + this._isViewInited = true; + this.resizeToFitContent(true); + } + } + ngOnDestroy() { + this._textareaElement.removeEventListener('focus', this._handleFocusEvent); + this._textareaElement.removeEventListener('blur', this._handleFocusEvent); + this._destroyed.next(); + this._destroyed.complete(); + } + /** + * Cache the height of a single-row textarea if it has not already been cached. + * + * We need to know how large a single "row" of a textarea is in order to apply minRows and + * maxRows. For the initial version, we will assume that the height of a single line in the + * textarea does not ever change. + */ + _cacheTextareaLineHeight() { + if (this._cachedLineHeight) { + return; + } + // Use a clone element because we have to override some styles. + let textareaClone = this._textareaElement.cloneNode(false); + textareaClone.rows = 1; + // Use `position: absolute` so that this doesn't cause a browser layout and use + // `visibility: hidden` so that nothing is rendered. Clear any other styles that + // would affect the height. + textareaClone.style.position = 'absolute'; + textareaClone.style.visibility = 'hidden'; + textareaClone.style.border = 'none'; + textareaClone.style.padding = '0'; + textareaClone.style.height = ''; + textareaClone.style.minHeight = ''; + textareaClone.style.maxHeight = ''; + // In Firefox it happens that textarea elements are always bigger than the specified amount + // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar. + // As a workaround that removes the extra space for the scrollbar, we can just set overflow + // to hidden. This ensures that there is no invalid calculation of the line height. + // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654 + textareaClone.style.overflow = 'hidden'; + this._textareaElement.parentNode.appendChild(textareaClone); + this._cachedLineHeight = textareaClone.clientHeight; + textareaClone.remove(); + // Min and max heights have to be re-calculated if the cached line height changes + this._setMinHeight(); + this._setMaxHeight(); + } + _measureScrollHeight() { + const element = this._textareaElement; + const previousMargin = element.style.marginBottom || ''; + const isFirefox = this._platform.FIREFOX; + const needsMarginFiller = isFirefox && this._hasFocus; + const measuringClass = isFirefox ? 'cdk-textarea-autosize-measuring-firefox' : 'cdk-textarea-autosize-measuring'; + // In some cases the page might move around while we're measuring the `textarea` on Firefox. We + // work around it by assigning a temporary margin with the same height as the `textarea` so that + // it occupies the same amount of space. See #23233. + if (needsMarginFiller) { + element.style.marginBottom = `${element.clientHeight}px`; + } + // Reset the textarea height to auto in order to shrink back to its default size. + // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations. + element.classList.add(measuringClass); + // The measuring class includes a 2px padding to workaround an issue with Chrome, + // so we account for that extra space here by subtracting 4 (2px top + 2px bottom). + const scrollHeight = element.scrollHeight - 4; + element.classList.remove(measuringClass); + if (needsMarginFiller) { + element.style.marginBottom = previousMargin; + } + return scrollHeight; + } + _cacheTextareaPlaceholderHeight() { + if (!this._isViewInited || this._cachedPlaceholderHeight != undefined) { + return; + } + if (!this.placeholder) { + this._cachedPlaceholderHeight = 0; + return; + } + const value = this._textareaElement.value; + this._textareaElement.value = this._textareaElement.placeholder; + this._cachedPlaceholderHeight = this._measureScrollHeight(); + this._textareaElement.value = value; + } + ngDoCheck() { + if (this._platform.isBrowser) { + this.resizeToFitContent(); + } + } + /** + * Resize the textarea to fit its content. + * @param force Whether to force a height recalculation. By default the height will be + * recalculated only if the value changed since the last call. + */ + resizeToFitContent(force = false) { + // If autosizing is disabled, just skip everything else + if (!this._enabled) { + return; + } + this._cacheTextareaLineHeight(); + this._cacheTextareaPlaceholderHeight(); + // If we haven't determined the line-height yet, we know we're still hidden and there's no point + // in checking the height of the textarea. + if (!this._cachedLineHeight) { + return; + } + const textarea = this._elementRef.nativeElement; + const value = textarea.value; + // Only resize if the value or minRows have changed since these calculations can be expensive. + if (!force && this._minRows === this._previousMinRows && value === this._previousValue) { + return; + } + const scrollHeight = this._measureScrollHeight(); + const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0); + // Use the scrollHeight to know how large the textarea *would* be if fit its entire value. + textarea.style.height = `${height}px`; + this._ngZone.runOutsideAngular(() => { + if (typeof requestAnimationFrame !== 'undefined') { + requestAnimationFrame(() => this._scrollToCaretPosition(textarea)); + } else { + setTimeout(() => this._scrollToCaretPosition(textarea)); + } + }); + this._previousValue = value; + this._previousMinRows = this._minRows; + } + /** + * Resets the textarea to its original size + */ + reset() { + // Do not try to change the textarea, if the initialHeight has not been determined yet + // This might potentially remove styles when reset() is called before ngAfterViewInit + if (this._initialHeight !== undefined) { + this._textareaElement.style.height = this._initialHeight; + } + } + _noopInputHandler() { + // no-op handler that ensures we're running change detection on input events. + } + /** Access injected document if available or fallback to global document reference */ + _getDocument() { + return this._document || document; + } + /** Use defaultView of injected document if available or fallback to global window reference */ + _getWindow() { + const doc = this._getDocument(); + return doc.defaultView || window; + } + /** + * Scrolls a textarea to the caret position. On Firefox resizing the textarea will + * prevent it from scrolling to the caret position. We need to re-set the selection + * in order for it to scroll to the proper position. + */ + _scrollToCaretPosition(textarea) { + const { + selectionStart, + selectionEnd + } = textarea; + // IE will throw an "Unspecified error" if we try to set the selection range after the + // element has been removed from the DOM. Assert that the directive hasn't been destroyed + // between the time we requested the animation frame and when it was executed. + // Also note that we have to assert that the textarea is focused before we set the + // selection range. Setting the selection range on a non-focused textarea will cause + // it to receive focus on IE and Edge. + if (!this._destroyed.isStopped && this._hasFocus) { + textarea.setSelectionRange(selectionStart, selectionEnd); + } + } + static #_ = this.ɵfac = function CdkTextareaAutosize_Factory(t) { + return new (t || CdkTextareaAutosize)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_8__.DOCUMENT, 8)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineDirective"]({ + type: CdkTextareaAutosize, + selectors: [["textarea", "cdkTextareaAutosize", ""]], + hostAttrs: ["rows", "1", 1, "cdk-textarea-autosize"], + hostBindings: function CdkTextareaAutosize_HostBindings(rf, ctx) { + if (rf & 1) { + _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵlistener"]("input", function CdkTextareaAutosize_input_HostBindingHandler() { + return ctx._noopInputHandler(); + }); + } + }, + inputs: { + minRows: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkAutosizeMinRows", "minRows"], + maxRows: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].None, "cdkAutosizeMaxRows", "maxRows"], + enabled: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputFlags"].HasDecoratorInputTransform, "cdkTextareaAutosize", "enabled", _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute], + placeholder: "placeholder" + }, + exportAs: ["cdkTextareaAutosize"], + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInputTransformsFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](CdkTextareaAutosize, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Directive, + args: [{ + selector: 'textarea[cdkTextareaAutosize]', + exportAs: 'cdkTextareaAutosize', + host: { + 'class': 'cdk-textarea-autosize', + // Textarea elements that have the directive applied should have a single row by default. + // Browsers normally show two rows by default and therefore this limits the minRows binding. + 'rows': '1', + '(input)': '_noopInputHandler()' + }, + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.ElementRef + }, { + type: _angular_cdk_platform__WEBPACK_IMPORTED_MODULE_0__.Platform + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.NgZone + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Inject, + args: [_angular_common__WEBPACK_IMPORTED_MODULE_8__.DOCUMENT] + }] + }], { + minRows: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkAutosizeMinRows'] + }], + maxRows: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: ['cdkAutosizeMaxRows'] + }], + enabled: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input, + args: [{ + alias: 'cdkTextareaAutosize', + transform: _angular_core__WEBPACK_IMPORTED_MODULE_4__.booleanAttribute + }] + }], + placeholder: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.Input + }] + }); +})(); +class TextFieldModule { + static #_ = this.ɵfac = function TextFieldModule_Factory(t) { + return new (t || TextFieldModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineNgModule"]({ + type: TextFieldModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjector"]({}); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](TextFieldModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_4__.NgModule, + args: [{ + imports: [CdkAutofill, CdkTextareaAutosize], + exports: [CdkAutofill, CdkTextareaAutosize] + }] + }], null, null); +})(); + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 39191: +/*!**********************************************************!*\ + !*** ./node_modules/@angular/common/fesm2022/common.mjs ***! + \**********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ APP_BASE_HREF: () => (/* binding */ APP_BASE_HREF), +/* harmony export */ AsyncPipe: () => (/* binding */ AsyncPipe), +/* harmony export */ BrowserPlatformLocation: () => (/* binding */ BrowserPlatformLocation), +/* harmony export */ CommonModule: () => (/* binding */ CommonModule), +/* harmony export */ CurrencyPipe: () => (/* binding */ CurrencyPipe), +/* harmony export */ DATE_PIPE_DEFAULT_OPTIONS: () => (/* binding */ DATE_PIPE_DEFAULT_OPTIONS), +/* harmony export */ DATE_PIPE_DEFAULT_TIMEZONE: () => (/* binding */ DATE_PIPE_DEFAULT_TIMEZONE), +/* harmony export */ DOCUMENT: () => (/* binding */ DOCUMENT), +/* harmony export */ DatePipe: () => (/* binding */ DatePipe), +/* harmony export */ DecimalPipe: () => (/* binding */ DecimalPipe), +/* harmony export */ FormStyle: () => (/* binding */ FormStyle), +/* harmony export */ FormatWidth: () => (/* binding */ FormatWidth), +/* harmony export */ HashLocationStrategy: () => (/* binding */ HashLocationStrategy), +/* harmony export */ I18nPluralPipe: () => (/* binding */ I18nPluralPipe), +/* harmony export */ I18nSelectPipe: () => (/* binding */ I18nSelectPipe), +/* harmony export */ IMAGE_CONFIG: () => (/* reexport safe */ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵIMAGE_CONFIG"]), +/* harmony export */ IMAGE_LOADER: () => (/* binding */ IMAGE_LOADER), +/* harmony export */ JsonPipe: () => (/* binding */ JsonPipe), +/* harmony export */ KeyValuePipe: () => (/* binding */ KeyValuePipe), +/* harmony export */ LOCATION_INITIALIZED: () => (/* binding */ LOCATION_INITIALIZED), +/* harmony export */ Location: () => (/* binding */ Location), +/* harmony export */ LocationStrategy: () => (/* binding */ LocationStrategy), +/* harmony export */ LowerCasePipe: () => (/* binding */ LowerCasePipe), +/* harmony export */ NgClass: () => (/* binding */ NgClass), +/* harmony export */ NgComponentOutlet: () => (/* binding */ NgComponentOutlet), +/* harmony export */ NgFor: () => (/* binding */ NgForOf), +/* harmony export */ NgForOf: () => (/* binding */ NgForOf), +/* harmony export */ NgForOfContext: () => (/* binding */ NgForOfContext), +/* harmony export */ NgIf: () => (/* binding */ NgIf), +/* harmony export */ NgIfContext: () => (/* binding */ NgIfContext), +/* harmony export */ NgLocaleLocalization: () => (/* binding */ NgLocaleLocalization), +/* harmony export */ NgLocalization: () => (/* binding */ NgLocalization), +/* harmony export */ NgOptimizedImage: () => (/* binding */ NgOptimizedImage), +/* harmony export */ NgPlural: () => (/* binding */ NgPlural), +/* harmony export */ NgPluralCase: () => (/* binding */ NgPluralCase), +/* harmony export */ NgStyle: () => (/* binding */ NgStyle), +/* harmony export */ NgSwitch: () => (/* binding */ NgSwitch), +/* harmony export */ NgSwitchCase: () => (/* binding */ NgSwitchCase), +/* harmony export */ NgSwitchDefault: () => (/* binding */ NgSwitchDefault), +/* harmony export */ NgTemplateOutlet: () => (/* binding */ NgTemplateOutlet), +/* harmony export */ NumberFormatStyle: () => (/* binding */ NumberFormatStyle), +/* harmony export */ NumberSymbol: () => (/* binding */ NumberSymbol), +/* harmony export */ PRECONNECT_CHECK_BLOCKLIST: () => (/* binding */ PRECONNECT_CHECK_BLOCKLIST), +/* harmony export */ PathLocationStrategy: () => (/* binding */ PathLocationStrategy), +/* harmony export */ PercentPipe: () => (/* binding */ PercentPipe), +/* harmony export */ PlatformLocation: () => (/* binding */ PlatformLocation), +/* harmony export */ Plural: () => (/* binding */ Plural), +/* harmony export */ SlicePipe: () => (/* binding */ SlicePipe), +/* harmony export */ TitleCasePipe: () => (/* binding */ TitleCasePipe), +/* harmony export */ TranslationWidth: () => (/* binding */ TranslationWidth), +/* harmony export */ UpperCasePipe: () => (/* binding */ UpperCasePipe), +/* harmony export */ VERSION: () => (/* binding */ VERSION), +/* harmony export */ ViewportScroller: () => (/* binding */ ViewportScroller), +/* harmony export */ WeekDay: () => (/* binding */ WeekDay), +/* harmony export */ XhrFactory: () => (/* binding */ XhrFactory), +/* harmony export */ formatCurrency: () => (/* binding */ formatCurrency), +/* harmony export */ formatDate: () => (/* binding */ formatDate), +/* harmony export */ formatNumber: () => (/* binding */ formatNumber), +/* harmony export */ formatPercent: () => (/* binding */ formatPercent), +/* harmony export */ getCurrencySymbol: () => (/* binding */ getCurrencySymbol), +/* harmony export */ getLocaleCurrencyCode: () => (/* binding */ getLocaleCurrencyCode), +/* harmony export */ getLocaleCurrencyName: () => (/* binding */ getLocaleCurrencyName), +/* harmony export */ getLocaleCurrencySymbol: () => (/* binding */ getLocaleCurrencySymbol), +/* harmony export */ getLocaleDateFormat: () => (/* binding */ getLocaleDateFormat), +/* harmony export */ getLocaleDateTimeFormat: () => (/* binding */ getLocaleDateTimeFormat), +/* harmony export */ getLocaleDayNames: () => (/* binding */ getLocaleDayNames), +/* harmony export */ getLocaleDayPeriods: () => (/* binding */ getLocaleDayPeriods), +/* harmony export */ getLocaleDirection: () => (/* binding */ getLocaleDirection), +/* harmony export */ getLocaleEraNames: () => (/* binding */ getLocaleEraNames), +/* harmony export */ getLocaleExtraDayPeriodRules: () => (/* binding */ getLocaleExtraDayPeriodRules), +/* harmony export */ getLocaleExtraDayPeriods: () => (/* binding */ getLocaleExtraDayPeriods), +/* harmony export */ getLocaleFirstDayOfWeek: () => (/* binding */ getLocaleFirstDayOfWeek), +/* harmony export */ getLocaleId: () => (/* binding */ getLocaleId), +/* harmony export */ getLocaleMonthNames: () => (/* binding */ getLocaleMonthNames), +/* harmony export */ getLocaleNumberFormat: () => (/* binding */ getLocaleNumberFormat), +/* harmony export */ getLocaleNumberSymbol: () => (/* binding */ getLocaleNumberSymbol), +/* harmony export */ getLocalePluralCase: () => (/* binding */ getLocalePluralCase), +/* harmony export */ getLocaleTimeFormat: () => (/* binding */ getLocaleTimeFormat), +/* harmony export */ getLocaleWeekEndRange: () => (/* binding */ getLocaleWeekEndRange), +/* harmony export */ getNumberOfCurrencyDigits: () => (/* binding */ getNumberOfCurrencyDigits), +/* harmony export */ isPlatformBrowser: () => (/* binding */ isPlatformBrowser), +/* harmony export */ isPlatformServer: () => (/* binding */ isPlatformServer), +/* harmony export */ isPlatformWorkerApp: () => (/* binding */ isPlatformWorkerApp), +/* harmony export */ isPlatformWorkerUi: () => (/* binding */ isPlatformWorkerUi), +/* harmony export */ provideCloudflareLoader: () => (/* binding */ provideCloudflareLoader), +/* harmony export */ provideCloudinaryLoader: () => (/* binding */ provideCloudinaryLoader), +/* harmony export */ provideImageKitLoader: () => (/* binding */ provideImageKitLoader), +/* harmony export */ provideImgixLoader: () => (/* binding */ provideImgixLoader), +/* harmony export */ provideNetlifyLoader: () => (/* binding */ provideNetlifyLoader), +/* harmony export */ registerLocaleData: () => (/* binding */ registerLocaleData), +/* harmony export */ "ɵDomAdapter": () => (/* binding */ DomAdapter), +/* harmony export */ "ɵNullViewportScroller": () => (/* binding */ NullViewportScroller), +/* harmony export */ "ɵPLATFORM_BROWSER_ID": () => (/* binding */ PLATFORM_BROWSER_ID), +/* harmony export */ "ɵPLATFORM_SERVER_ID": () => (/* binding */ PLATFORM_SERVER_ID), +/* harmony export */ "ɵPLATFORM_WORKER_APP_ID": () => (/* binding */ PLATFORM_WORKER_APP_ID), +/* harmony export */ "ɵPLATFORM_WORKER_UI_ID": () => (/* binding */ PLATFORM_WORKER_UI_ID), +/* harmony export */ "ɵPlatformNavigation": () => (/* binding */ PlatformNavigation), +/* harmony export */ "ɵgetDOM": () => (/* binding */ getDOM), +/* harmony export */ "ɵnormalizeQueryParams": () => (/* binding */ normalizeQueryParams), +/* harmony export */ "ɵparseCookieValue": () => (/* binding */ parseCookieValue), +/* harmony export */ "ɵsetRootDomAdapter": () => (/* binding */ setRootDomAdapter) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 96623); +/** + * @license Angular v17.3.3 + * (c) 2010-2022 Google LLC. https://angular.io/ + * License: MIT + */ + + + + +let _DOM = null; +function getDOM() { + return _DOM; +} +function setRootDomAdapter(adapter) { + _DOM ??= adapter; +} +/* tslint:disable:requireParameterType */ +/** + * Provides DOM operations in an environment-agnostic way. + * + * @security Tread carefully! Interacting with the DOM directly is dangerous and + * can introduce XSS risks. + */ +class DomAdapter {} + +/** + * This class wraps the platform Navigation API which allows server-specific and test + * implementations. + */ +class PlatformNavigation { + static #_ = this.ɵfac = function PlatformNavigation_Factory(t) { + return new (t || PlatformNavigation)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: PlatformNavigation, + factory: () => (() => window.navigation)(), + providedIn: 'platform' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PlatformNavigation, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'platform', + useFactory: () => window.navigation + }] + }], null, null); +})(); + +/** + * A DI Token representing the main rendering context. + * In a browser and SSR this is the DOM Document. + * When using SSR, that document is created by [Domino](https://github.com/angular/domino). + * + * @publicApi + */ +const DOCUMENT = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken(ngDevMode ? 'DocumentToken' : ''); + +/** + * This class should not be used directly by an application developer. Instead, use + * {@link Location}. + * + * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be + * platform-agnostic. + * This means that we can have different implementation of `PlatformLocation` for the different + * platforms that Angular supports. For example, `@angular/platform-browser` provides an + * implementation specific to the browser environment, while `@angular/platform-server` provides + * one suitable for use with server-side rendering. + * + * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy} + * when they need to interact with the DOM APIs like pushState, popState, etc. + * + * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly + * by the {@link Router} in order to navigate between routes. Since all interactions between {@link + * Router} / + * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation` + * class, they are all platform-agnostic. + * + * @publicApi + */ +class PlatformLocation { + historyGo(relativePosition) { + throw new Error(ngDevMode ? 'Not implemented' : ''); + } + static #_ = this.ɵfac = function PlatformLocation_Factory(t) { + return new (t || PlatformLocation)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: PlatformLocation, + factory: () => (() => (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(BrowserPlatformLocation))(), + providedIn: 'platform' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PlatformLocation, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'platform', + useFactory: () => (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(BrowserPlatformLocation) + }] + }], null, null); +})(); +/** + * @description + * Indicates when a location is initialized. + * + * @publicApi + */ +const LOCATION_INITIALIZED = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken(ngDevMode ? 'Location Initialized' : ''); +/** + * `PlatformLocation` encapsulates all of the direct calls to platform APIs. + * This class should not be used directly by an application developer. Instead, use + * {@link Location}. + * + * @publicApi + */ +class BrowserPlatformLocation extends PlatformLocation { + constructor() { + super(); + this._doc = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(DOCUMENT); + this._location = window.location; + this._history = window.history; + } + getBaseHrefFromDOM() { + return getDOM().getBaseHref(this._doc); + } + onPopState(fn) { + const window = getDOM().getGlobalEventTarget(this._doc, 'window'); + window.addEventListener('popstate', fn, false); + return () => window.removeEventListener('popstate', fn); + } + onHashChange(fn) { + const window = getDOM().getGlobalEventTarget(this._doc, 'window'); + window.addEventListener('hashchange', fn, false); + return () => window.removeEventListener('hashchange', fn); + } + get href() { + return this._location.href; + } + get protocol() { + return this._location.protocol; + } + get hostname() { + return this._location.hostname; + } + get port() { + return this._location.port; + } + get pathname() { + return this._location.pathname; + } + get search() { + return this._location.search; + } + get hash() { + return this._location.hash; + } + set pathname(newPath) { + this._location.pathname = newPath; + } + pushState(state, title, url) { + this._history.pushState(state, title, url); + } + replaceState(state, title, url) { + this._history.replaceState(state, title, url); + } + forward() { + this._history.forward(); + } + back() { + this._history.back(); + } + historyGo(relativePosition = 0) { + this._history.go(relativePosition); + } + getState() { + return this._history.state; + } + static #_ = this.ɵfac = function BrowserPlatformLocation_Factory(t) { + return new (t || BrowserPlatformLocation)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: BrowserPlatformLocation, + factory: () => (() => new BrowserPlatformLocation())(), + providedIn: 'platform' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](BrowserPlatformLocation, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'platform', + useFactory: () => new BrowserPlatformLocation() + }] + }], () => [], null); +})(); + +/** + * Joins two parts of a URL with a slash if needed. + * + * @param start URL string + * @param end URL string + * + * + * @returns The joined URL string. + */ +function joinWithSlash(start, end) { + if (start.length == 0) { + return end; + } + if (end.length == 0) { + return start; + } + let slashes = 0; + if (start.endsWith('/')) { + slashes++; + } + if (end.startsWith('/')) { + slashes++; + } + if (slashes == 2) { + return start + end.substring(1); + } + if (slashes == 1) { + return start + end; + } + return start + '/' + end; +} +/** + * Removes a trailing slash from a URL string if needed. + * Looks for the first occurrence of either `#`, `?`, or the end of the + * line as `/` characters and removes the trailing slash if one exists. + * + * @param url URL string. + * + * @returns The URL string, modified if needed. + */ +function stripTrailingSlash(url) { + const match = url.match(/#|\?|$/); + const pathEndIdx = match && match.index || url.length; + const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0); + return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx); +} +/** + * Normalizes URL parameters by prepending with `?` if needed. + * + * @param params String of URL parameters. + * + * @returns The normalized URL parameters string. + */ +function normalizeQueryParams(params) { + return params && params[0] !== '?' ? '?' + params : params; +} + +/** + * Enables the `Location` service to read route state from the browser's URL. + * Angular provides two strategies: + * `HashLocationStrategy` and `PathLocationStrategy`. + * + * Applications should use the `Router` or `Location` services to + * interact with application route state. + * + * For instance, `HashLocationStrategy` produces URLs like + * http://example.com#/foo, + * and `PathLocationStrategy` produces + * http://example.com/foo as an equivalent URL. + * + * See these two classes for more. + * + * @publicApi + */ +class LocationStrategy { + historyGo(relativePosition) { + throw new Error(ngDevMode ? 'Not implemented' : ''); + } + static #_ = this.ɵfac = function LocationStrategy_Factory(t) { + return new (t || LocationStrategy)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: LocationStrategy, + factory: () => (() => (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(PathLocationStrategy))(), + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LocationStrategy, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root', + useFactory: () => (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(PathLocationStrategy) + }] + }], null, null); +})(); +/** + * A predefined [DI token](guide/glossary#di-token) for the base href + * to be used with the `PathLocationStrategy`. + * The base href is the URL prefix that should be preserved when generating + * and recognizing URLs. + * + * @usageNotes + * + * The following example shows how to use this token to configure the root app injector + * with a base href value, so that the DI framework can supply the dependency anywhere in the app. + * + * ```typescript + * import {NgModule} from '@angular/core'; + * import {APP_BASE_HREF} from '@angular/common'; + * + * @NgModule({ + * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}] + * }) + * class AppModule {} + * ``` + * + * @publicApi + */ +const APP_BASE_HREF = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken(ngDevMode ? 'appBaseHref' : ''); +/** + * @description + * A {@link LocationStrategy} used to configure the {@link Location} service to + * represent its state in the + * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the + * browser's URL. + * + * If you're using `PathLocationStrategy`, you may provide a {@link APP_BASE_HREF} + * or add a `` element to the document to override the default. + * + * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call + * `location.go('/foo')`, the browser's URL will become + * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly, + * the `` and/or `APP_BASE_HREF` should end with a `/`. + * + * Similarly, if you add `` to the document and call + * `location.go('/foo')`, the browser's URL will become + * `example.com/my/app/foo`. + * + * Note that when using `PathLocationStrategy`, neither the query nor + * the fragment in the `` will be preserved, as outlined + * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2). + * + * @usageNotes + * + * ### Example + * + * {@example common/location/ts/path_location_component.ts region='LocationComponent'} + * + * @publicApi + */ +class PathLocationStrategy extends LocationStrategy { + constructor(_platformLocation, href) { + super(); + this._platformLocation = _platformLocation; + this._removeListenerFns = []; + this._baseHref = href ?? this._platformLocation.getBaseHrefFromDOM() ?? (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(DOCUMENT).location?.origin ?? ''; + } + /** @nodoc */ + ngOnDestroy() { + while (this._removeListenerFns.length) { + this._removeListenerFns.pop()(); + } + } + onPopState(fn) { + this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn)); + } + getBaseHref() { + return this._baseHref; + } + prepareExternalUrl(internal) { + return joinWithSlash(this._baseHref, internal); + } + path(includeHash = false) { + const pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search); + const hash = this._platformLocation.hash; + return hash && includeHash ? `${pathname}${hash}` : pathname; + } + pushState(state, title, url, queryParams) { + const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams)); + this._platformLocation.pushState(state, title, externalUrl); + } + replaceState(state, title, url, queryParams) { + const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams)); + this._platformLocation.replaceState(state, title, externalUrl); + } + forward() { + this._platformLocation.forward(); + } + back() { + this._platformLocation.back(); + } + getState() { + return this._platformLocation.getState(); + } + historyGo(relativePosition = 0) { + this._platformLocation.historyGo?.(relativePosition); + } + static #_ = this.ɵfac = function PathLocationStrategy_Factory(t) { + return new (t || PathLocationStrategy)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](APP_BASE_HREF, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: PathLocationStrategy, + factory: PathLocationStrategy.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PathLocationStrategy, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [{ + type: PlatformLocation + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [APP_BASE_HREF] + }] + }], null); +})(); + +/** + * @description + * A {@link LocationStrategy} used to configure the {@link Location} service to + * represent its state in the + * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) + * of the browser's URL. + * + * For instance, if you call `location.go('/foo')`, the browser's URL will become + * `example.com#/foo`. + * + * @usageNotes + * + * ### Example + * + * {@example common/location/ts/hash_location_component.ts region='LocationComponent'} + * + * @publicApi + */ +class HashLocationStrategy extends LocationStrategy { + constructor(_platformLocation, _baseHref) { + super(); + this._platformLocation = _platformLocation; + this._baseHref = ''; + this._removeListenerFns = []; + if (_baseHref != null) { + this._baseHref = _baseHref; + } + } + /** @nodoc */ + ngOnDestroy() { + while (this._removeListenerFns.length) { + this._removeListenerFns.pop()(); + } + } + onPopState(fn) { + this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn)); + } + getBaseHref() { + return this._baseHref; + } + path(includeHash = false) { + // the hash value is always prefixed with a `#` + // and if it is empty then it will stay empty + const path = this._platformLocation.hash ?? '#'; + return path.length > 0 ? path.substring(1) : path; + } + prepareExternalUrl(internal) { + const url = joinWithSlash(this._baseHref, internal); + return url.length > 0 ? '#' + url : url; + } + pushState(state, title, path, queryParams) { + let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams)); + if (url.length == 0) { + url = this._platformLocation.pathname; + } + this._platformLocation.pushState(state, title, url); + } + replaceState(state, title, path, queryParams) { + let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams)); + if (url.length == 0) { + url = this._platformLocation.pathname; + } + this._platformLocation.replaceState(state, title, url); + } + forward() { + this._platformLocation.forward(); + } + back() { + this._platformLocation.back(); + } + getState() { + return this._platformLocation.getState(); + } + historyGo(relativePosition = 0) { + this._platformLocation.historyGo?.(relativePosition); + } + static #_ = this.ɵfac = function HashLocationStrategy_Factory(t) { + return new (t || HashLocationStrategy)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](PlatformLocation), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](APP_BASE_HREF, 8)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: HashLocationStrategy, + factory: HashLocationStrategy.ɵfac + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](HashLocationStrategy, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable + }], () => [{ + type: PlatformLocation + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [APP_BASE_HREF] + }] + }], null); +})(); + +/** + * @description + * + * A service that applications can use to interact with a browser's URL. + * + * Depending on the `LocationStrategy` used, `Location` persists + * to the URL's path or the URL's hash segment. + * + * @usageNotes + * + * It's better to use the `Router.navigate()` service to trigger route changes. Use + * `Location` only if you need to interact with or create normalized URLs outside of + * routing. + * + * `Location` is responsible for normalizing the URL against the application's base href. + * A normalized URL is absolute from the URL host, includes the application's base href, and has no + * trailing slash: + * - `/my/app/user/123` is normalized + * - `my/app/user/123` **is not** normalized + * - `/my/app/user/123/` **is not** normalized + * + * ### Example + * + * + * + * @publicApi + */ +class Location { + constructor(locationStrategy) { + /** @internal */ + this._subject = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.EventEmitter(); + /** @internal */ + this._urlChangeListeners = []; + /** @internal */ + this._urlChangeSubscription = null; + this._locationStrategy = locationStrategy; + const baseHref = this._locationStrategy.getBaseHref(); + // Note: This class's interaction with base HREF does not fully follow the rules + // outlined in the spec https://www.freesoft.org/CIE/RFC/1808/18.htm. + // Instead of trying to fix individual bugs with more and more code, we should + // investigate using the URL constructor and providing the base as a second + // argument. + // https://developer.mozilla.org/en-US/docs/Web/API/URL/URL#parameters + this._basePath = _stripOrigin(stripTrailingSlash(_stripIndexHtml(baseHref))); + this._locationStrategy.onPopState(ev => { + this._subject.emit({ + 'url': this.path(true), + 'pop': true, + 'state': ev.state, + 'type': ev.type + }); + }); + } + /** @nodoc */ + ngOnDestroy() { + this._urlChangeSubscription?.unsubscribe(); + this._urlChangeListeners = []; + } + /** + * Normalizes the URL path for this location. + * + * @param includeHash True to include an anchor fragment in the path. + * + * @returns The normalized URL path. + */ + // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is + // removed. + path(includeHash = false) { + return this.normalize(this._locationStrategy.path(includeHash)); + } + /** + * Reports the current state of the location history. + * @returns The current value of the `history.state` object. + */ + getState() { + return this._locationStrategy.getState(); + } + /** + * Normalizes the given path and compares to the current normalized path. + * + * @param path The given URL path. + * @param query Query parameters. + * + * @returns True if the given URL path is equal to the current normalized path, false + * otherwise. + */ + isCurrentPathEqualTo(path, query = '') { + return this.path() == this.normalize(path + normalizeQueryParams(query)); + } + /** + * Normalizes a URL path by stripping any trailing slashes. + * + * @param url String representing a URL. + * + * @returns The normalized URL string. + */ + normalize(url) { + return Location.stripTrailingSlash(_stripBasePath(this._basePath, _stripIndexHtml(url))); + } + /** + * Normalizes an external URL path. + * If the given URL doesn't begin with a leading slash (`'/'`), adds one + * before normalizing. Adds a hash if `HashLocationStrategy` is + * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use. + * + * @param url String representing a URL. + * + * @returns A normalized platform-specific URL. + */ + prepareExternalUrl(url) { + if (url && url[0] !== '/') { + url = '/' + url; + } + return this._locationStrategy.prepareExternalUrl(url); + } + // TODO: rename this method to pushState + /** + * Changes the browser's URL to a normalized version of a given URL, and pushes a + * new item onto the platform's history. + * + * @param path URL path to normalize. + * @param query Query parameters. + * @param state Location history state. + * + */ + go(path, query = '', state = null) { + this._locationStrategy.pushState(state, '', path, query); + this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state); + } + /** + * Changes the browser's URL to a normalized version of the given URL, and replaces + * the top item on the platform's history stack. + * + * @param path URL path to normalize. + * @param query Query parameters. + * @param state Location history state. + */ + replaceState(path, query = '', state = null) { + this._locationStrategy.replaceState(state, '', path, query); + this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state); + } + /** + * Navigates forward in the platform's history. + */ + forward() { + this._locationStrategy.forward(); + } + /** + * Navigates back in the platform's history. + */ + back() { + this._locationStrategy.back(); + } + /** + * Navigate to a specific page from session history, identified by its relative position to the + * current page. + * + * @param relativePosition Position of the target page in the history relative to the current + * page. + * A negative value moves backwards, a positive value moves forwards, e.g. `location.historyGo(2)` + * moves forward two pages and `location.historyGo(-2)` moves back two pages. When we try to go + * beyond what's stored in the history session, we stay in the current page. Same behaviour occurs + * when `relativePosition` equals 0. + * @see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Moving_to_a_specific_point_in_history + */ + historyGo(relativePosition = 0) { + this._locationStrategy.historyGo?.(relativePosition); + } + /** + * Registers a URL change listener. Use to catch updates performed by the Angular + * framework that are not detectible through "popstate" or "hashchange" events. + * + * @param fn The change handler function, which take a URL and a location history state. + * @returns A function that, when executed, unregisters a URL change listener. + */ + onUrlChange(fn) { + this._urlChangeListeners.push(fn); + this._urlChangeSubscription ??= this.subscribe(v => { + this._notifyUrlChangeListeners(v.url, v.state); + }); + return () => { + const fnIndex = this._urlChangeListeners.indexOf(fn); + this._urlChangeListeners.splice(fnIndex, 1); + if (this._urlChangeListeners.length === 0) { + this._urlChangeSubscription?.unsubscribe(); + this._urlChangeSubscription = null; + } + }; + } + /** @internal */ + _notifyUrlChangeListeners(url = '', state) { + this._urlChangeListeners.forEach(fn => fn(url, state)); + } + /** + * Subscribes to the platform's `popState` events. + * + * Note: `Location.go()` does not trigger the `popState` event in the browser. Use + * `Location.onUrlChange()` to subscribe to URL changes instead. + * + * @param value Event that is triggered when the state history changes. + * @param exception The exception to throw. + * + * @see [onpopstate](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate) + * + * @returns Subscribed events. + */ + subscribe(onNext, onThrow, onReturn) { + return this._subject.subscribe({ + next: onNext, + error: onThrow, + complete: onReturn + }); + } + /** + * Normalizes URL parameters by prepending with `?` if needed. + * + * @param params String of URL parameters. + * + * @returns The normalized URL parameters string. + */ + static #_ = this.normalizeQueryParams = normalizeQueryParams; + /** + * Joins two parts of a URL with a slash if needed. + * + * @param start URL string + * @param end URL string + * + * + * @returns The joined URL string. + */ + static #_2 = this.joinWithSlash = joinWithSlash; + /** + * Removes a trailing slash from a URL string if needed. + * Looks for the first occurrence of either `#`, `?`, or the end of the + * line as `/` characters and removes the trailing slash if one exists. + * + * @param url URL string. + * + * @returns The URL string, modified if needed. + */ + static #_3 = this.stripTrailingSlash = stripTrailingSlash; + static #_4 = this.ɵfac = function Location_Factory(t) { + return new (t || Location)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](LocationStrategy)); + }; + static #_5 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: Location, + factory: () => createLocation(), + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](Location, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root', + // See #23917 + useFactory: createLocation + }] + }], () => [{ + type: LocationStrategy + }], null); +})(); +function createLocation() { + return new Location((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"])(LocationStrategy)); +} +function _stripBasePath(basePath, url) { + if (!basePath || !url.startsWith(basePath)) { + return url; + } + const strippedUrl = url.substring(basePath.length); + if (strippedUrl === '' || ['/', ';', '?', '#'].includes(strippedUrl[0])) { + return strippedUrl; + } + return url; +} +function _stripIndexHtml(url) { + return url.replace(/\/index.html$/, ''); +} +function _stripOrigin(baseHref) { + // DO NOT REFACTOR! Previously, this check looked like this: + // `/^(https?:)?\/\//.test(baseHref)`, but that resulted in + // syntactically incorrect code after Closure Compiler minification. + // This was likely caused by a bug in Closure Compiler, but + // for now, the check is rewritten to use `new RegExp` instead. + const isAbsoluteUrl = new RegExp('^(https?:)?//').test(baseHref); + if (isAbsoluteUrl) { + const [, pathname] = baseHref.split(/\/\/[^\/]+/); + return pathname; + } + return baseHref; +} + +/** @internal */ +const CURRENCIES_EN = { + "ADP": [undefined, undefined, 0], + "AFN": [undefined, "؋", 0], + "ALL": [undefined, undefined, 0], + "AMD": [undefined, "֏", 2], + "AOA": [undefined, "Kz"], + "ARS": [undefined, "$"], + "AUD": ["A$", "$"], + "AZN": [undefined, "₼"], + "BAM": [undefined, "KM"], + "BBD": [undefined, "$"], + "BDT": [undefined, "৳"], + "BHD": [undefined, undefined, 3], + "BIF": [undefined, undefined, 0], + "BMD": [undefined, "$"], + "BND": [undefined, "$"], + "BOB": [undefined, "Bs"], + "BRL": ["R$"], + "BSD": [undefined, "$"], + "BWP": [undefined, "P"], + "BYN": [undefined, undefined, 2], + "BYR": [undefined, undefined, 0], + "BZD": [undefined, "$"], + "CAD": ["CA$", "$", 2], + "CHF": [undefined, undefined, 2], + "CLF": [undefined, undefined, 4], + "CLP": [undefined, "$", 0], + "CNY": ["CN¥", "¥"], + "COP": [undefined, "$", 2], + "CRC": [undefined, "₡", 2], + "CUC": [undefined, "$"], + "CUP": [undefined, "$"], + "CZK": [undefined, "Kč", 2], + "DJF": [undefined, undefined, 0], + "DKK": [undefined, "kr", 2], + "DOP": [undefined, "$"], + "EGP": [undefined, "E£"], + "ESP": [undefined, "₧", 0], + "EUR": ["€"], + "FJD": [undefined, "$"], + "FKP": [undefined, "£"], + "GBP": ["£"], + "GEL": [undefined, "₾"], + "GHS": [undefined, "GH₵"], + "GIP": [undefined, "£"], + "GNF": [undefined, "FG", 0], + "GTQ": [undefined, "Q"], + "GYD": [undefined, "$", 2], + "HKD": ["HK$", "$"], + "HNL": [undefined, "L"], + "HRK": [undefined, "kn"], + "HUF": [undefined, "Ft", 2], + "IDR": [undefined, "Rp", 2], + "ILS": ["₪"], + "INR": ["₹"], + "IQD": [undefined, undefined, 0], + "IRR": [undefined, undefined, 0], + "ISK": [undefined, "kr", 0], + "ITL": [undefined, undefined, 0], + "JMD": [undefined, "$"], + "JOD": [undefined, undefined, 3], + "JPY": ["¥", undefined, 0], + "KHR": [undefined, "៛"], + "KMF": [undefined, "CF", 0], + "KPW": [undefined, "₩", 0], + "KRW": ["₩", undefined, 0], + "KWD": [undefined, undefined, 3], + "KYD": [undefined, "$"], + "KZT": [undefined, "₸"], + "LAK": [undefined, "₭", 0], + "LBP": [undefined, "L£", 0], + "LKR": [undefined, "Rs"], + "LRD": [undefined, "$"], + "LTL": [undefined, "Lt"], + "LUF": [undefined, undefined, 0], + "LVL": [undefined, "Ls"], + "LYD": [undefined, undefined, 3], + "MGA": [undefined, "Ar", 0], + "MGF": [undefined, undefined, 0], + "MMK": [undefined, "K", 0], + "MNT": [undefined, "₮", 2], + "MRO": [undefined, undefined, 0], + "MUR": [undefined, "Rs", 2], + "MXN": ["MX$", "$"], + "MYR": [undefined, "RM"], + "NAD": [undefined, "$"], + "NGN": [undefined, "₦"], + "NIO": [undefined, "C$"], + "NOK": [undefined, "kr", 2], + "NPR": [undefined, "Rs"], + "NZD": ["NZ$", "$"], + "OMR": [undefined, undefined, 3], + "PHP": ["₱"], + "PKR": [undefined, "Rs", 2], + "PLN": [undefined, "zł"], + "PYG": [undefined, "₲", 0], + "RON": [undefined, "lei"], + "RSD": [undefined, undefined, 0], + "RUB": [undefined, "₽"], + "RWF": [undefined, "RF", 0], + "SBD": [undefined, "$"], + "SEK": [undefined, "kr", 2], + "SGD": [undefined, "$"], + "SHP": [undefined, "£"], + "SLE": [undefined, undefined, 2], + "SLL": [undefined, undefined, 0], + "SOS": [undefined, undefined, 0], + "SRD": [undefined, "$"], + "SSP": [undefined, "£"], + "STD": [undefined, undefined, 0], + "STN": [undefined, "Db"], + "SYP": [undefined, "£", 0], + "THB": [undefined, "฿"], + "TMM": [undefined, undefined, 0], + "TND": [undefined, undefined, 3], + "TOP": [undefined, "T$"], + "TRL": [undefined, undefined, 0], + "TRY": [undefined, "₺"], + "TTD": [undefined, "$"], + "TWD": ["NT$", "$", 2], + "TZS": [undefined, undefined, 2], + "UAH": [undefined, "₴"], + "UGX": [undefined, undefined, 0], + "USD": ["$"], + "UYI": [undefined, undefined, 0], + "UYU": [undefined, "$"], + "UYW": [undefined, undefined, 4], + "UZS": [undefined, undefined, 2], + "VEF": [undefined, "Bs", 2], + "VND": ["₫", undefined, 0], + "VUV": [undefined, undefined, 0], + "XAF": ["FCFA", undefined, 0], + "XCD": ["EC$", "$"], + "XOF": ["F CFA", undefined, 0], + "XPF": ["CFPF", undefined, 0], + "XXX": ["¤"], + "YER": [undefined, undefined, 0], + "ZAR": [undefined, "R"], + "ZMK": [undefined, undefined, 0], + "ZMW": [undefined, "ZK"], + "ZWD": [undefined, undefined, 0] +}; + +/** + * Format styles that can be used to represent numbers. + * @see {@link getLocaleNumberFormat} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +var NumberFormatStyle; +(function (NumberFormatStyle) { + NumberFormatStyle[NumberFormatStyle["Decimal"] = 0] = "Decimal"; + NumberFormatStyle[NumberFormatStyle["Percent"] = 1] = "Percent"; + NumberFormatStyle[NumberFormatStyle["Currency"] = 2] = "Currency"; + NumberFormatStyle[NumberFormatStyle["Scientific"] = 3] = "Scientific"; +})(NumberFormatStyle || (NumberFormatStyle = {})); +/** + * Plurality cases used for translating plurals to different languages. + * + * @see {@link NgPlural} + * @see {@link NgPluralCase} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +var Plural; +(function (Plural) { + Plural[Plural["Zero"] = 0] = "Zero"; + Plural[Plural["One"] = 1] = "One"; + Plural[Plural["Two"] = 2] = "Two"; + Plural[Plural["Few"] = 3] = "Few"; + Plural[Plural["Many"] = 4] = "Many"; + Plural[Plural["Other"] = 5] = "Other"; +})(Plural || (Plural = {})); +/** + * Context-dependant translation forms for strings. + * Typically the standalone version is for the nominative form of the word, + * and the format version is used for the genitive case. + * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles) + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +var FormStyle; +(function (FormStyle) { + FormStyle[FormStyle["Format"] = 0] = "Format"; + FormStyle[FormStyle["Standalone"] = 1] = "Standalone"; +})(FormStyle || (FormStyle = {})); +/** + * String widths available for translations. + * The specific character widths are locale-specific. + * Examples are given for the word "Sunday" in English. + * + * @publicApi + */ +var TranslationWidth; +(function (TranslationWidth) { + /** 1 character for `en-US`. For example: 'S' */ + TranslationWidth[TranslationWidth["Narrow"] = 0] = "Narrow"; + /** 3 characters for `en-US`. For example: 'Sun' */ + TranslationWidth[TranslationWidth["Abbreviated"] = 1] = "Abbreviated"; + /** Full length for `en-US`. For example: "Sunday" */ + TranslationWidth[TranslationWidth["Wide"] = 2] = "Wide"; + /** 2 characters for `en-US`, For example: "Su" */ + TranslationWidth[TranslationWidth["Short"] = 3] = "Short"; +})(TranslationWidth || (TranslationWidth = {})); +/** + * String widths available for date-time formats. + * The specific character widths are locale-specific. + * Examples are given for `en-US`. + * + * @see {@link getLocaleDateFormat} + * @see {@link getLocaleTimeFormat} + * @see {@link getLocaleDateTimeFormat} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * @publicApi + */ +var FormatWidth; +(function (FormatWidth) { + /** + * For `en-US`, 'M/d/yy, h:mm a'` + * (Example: `6/15/15, 9:03 AM`) + */ + FormatWidth[FormatWidth["Short"] = 0] = "Short"; + /** + * For `en-US`, `'MMM d, y, h:mm:ss a'` + * (Example: `Jun 15, 2015, 9:03:01 AM`) + */ + FormatWidth[FormatWidth["Medium"] = 1] = "Medium"; + /** + * For `en-US`, `'MMMM d, y, h:mm:ss a z'` + * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`) + */ + FormatWidth[FormatWidth["Long"] = 2] = "Long"; + /** + * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'` + * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`) + */ + FormatWidth[FormatWidth["Full"] = 3] = "Full"; +})(FormatWidth || (FormatWidth = {})); +// This needs to be an object literal, rather than an enum, because TypeScript 5.4+ +// doesn't allow numeric keys and we have `Infinity` and `NaN`. +/** + * Symbols that can be used to replace placeholders in number patterns. + * Examples are based on `en-US` values. + * + * @see {@link getLocaleNumberSymbol} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + * @object-literal-as-enum + */ +const NumberSymbol = { + /** + * Decimal separator. + * For `en-US`, the dot character. + * Example: 2,345`.`67 + */ + Decimal: 0, + /** + * Grouping separator, typically for thousands. + * For `en-US`, the comma character. + * Example: 2`,`345.67 + */ + Group: 1, + /** + * List-item separator. + * Example: "one, two, and three" + */ + List: 2, + /** + * Sign for percentage (out of 100). + * Example: 23.4% + */ + PercentSign: 3, + /** + * Sign for positive numbers. + * Example: +23 + */ + PlusSign: 4, + /** + * Sign for negative numbers. + * Example: -23 + */ + MinusSign: 5, + /** + * Computer notation for exponential value (n times a power of 10). + * Example: 1.2E3 + */ + Exponential: 6, + /** + * Human-readable format of exponential. + * Example: 1.2x103 + */ + SuperscriptingExponent: 7, + /** + * Sign for permille (out of 1000). + * Example: 23.4‰ + */ + PerMille: 8, + /** + * Infinity, can be used with plus and minus. + * Example: ∞, +∞, -∞ + */ + Infinity: 9, + /** + * Not a number. + * Example: NaN + */ + NaN: 10, + /** + * Symbol used between time units. + * Example: 10:52 + */ + TimeSeparator: 11, + /** + * Decimal separator for currency values (fallback to `Decimal`). + * Example: $2,345.67 + */ + CurrencyDecimal: 12, + /** + * Group separator for currency values (fallback to `Group`). + * Example: $2,345.67 + */ + CurrencyGroup: 13 +}; +/** + * The value for each day of the week, based on the `en-US` locale + * + * @publicApi + */ +var WeekDay; +(function (WeekDay) { + WeekDay[WeekDay["Sunday"] = 0] = "Sunday"; + WeekDay[WeekDay["Monday"] = 1] = "Monday"; + WeekDay[WeekDay["Tuesday"] = 2] = "Tuesday"; + WeekDay[WeekDay["Wednesday"] = 3] = "Wednesday"; + WeekDay[WeekDay["Thursday"] = 4] = "Thursday"; + WeekDay[WeekDay["Friday"] = 5] = "Friday"; + WeekDay[WeekDay["Saturday"] = 6] = "Saturday"; +})(WeekDay || (WeekDay = {})); +/** + * Retrieves the locale ID from the currently loaded locale. + * The loaded locale could be, for example, a global one rather than a regional one. + * @param locale A locale code, such as `fr-FR`. + * @returns The locale code. For example, `fr`. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleId(locale) { + return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale)[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].LocaleId]; +} +/** + * Retrieves day period strings for the given locale. + * + * @param locale A locale code for the locale format rules to use. + * @param formStyle The required grammatical form. + * @param width The required character width. + * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleDayPeriods(locale, formStyle, width) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + const amPmData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DayPeriodsStandalone]]; + const amPm = getLastDefinedValue(amPmData, formStyle); + return getLastDefinedValue(amPm, width); +} +/** + * Retrieves days of the week for the given locale, using the Gregorian calendar. + * + * @param locale A locale code for the locale format rules to use. + * @param formStyle The required grammatical form. + * @param width The required character width. + * @returns An array of localized name strings. + * For example,`[Sunday, Monday, ... Saturday]` for `en-US`. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleDayNames(locale, formStyle, width) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + const daysData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DaysStandalone]]; + const days = getLastDefinedValue(daysData, formStyle); + return getLastDefinedValue(days, width); +} +/** + * Retrieves months of the year for the given locale, using the Gregorian calendar. + * + * @param locale A locale code for the locale format rules to use. + * @param formStyle The required grammatical form. + * @param width The required character width. + * @returns An array of localized name strings. + * For example, `[January, February, ...]` for `en-US`. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleMonthNames(locale, formStyle, width) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + const monthsData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsFormat], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].MonthsStandalone]]; + const months = getLastDefinedValue(monthsData, formStyle); + return getLastDefinedValue(months, width); +} +/** + * Retrieves Gregorian-calendar eras for the given locale. + * @param locale A locale code for the locale format rules to use. + * @param width The required character width. + + * @returns An array of localized era strings. + * For example, `[AD, BC]` for `en-US`. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleEraNames(locale, width) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + const erasData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Eras]; + return getLastDefinedValue(erasData, width); +} +/** + * Retrieves the first day of the week for the given locale. + * + * @param locale A locale code for the locale format rules to use. + * @returns A day index number, using the 0-based week-day index for `en-US` + * (Sunday = 0, Monday = 1, ...). + * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleFirstDayOfWeek(locale) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].FirstDayOfWeek]; +} +/** + * Range of week days that are considered the week-end for the given locale. + * + * @param locale A locale code for the locale format rules to use. + * @returns The range of day values, `[startDay, endDay]`. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleWeekEndRange(locale) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].WeekendRange]; +} +/** + * Retrieves a localized date-value formatting string. + * + * @param locale A locale code for the locale format rules to use. + * @param width The format type. + * @returns The localized formatting string. + * @see {@link FormatWidth} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleDateFormat(locale, width) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + return getLastDefinedValue(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DateFormat], width); +} +/** + * Retrieves a localized time-value formatting string. + * + * @param locale A locale code for the locale format rules to use. + * @param width The format type. + * @returns The localized formatting string. + * @see {@link FormatWidth} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + + * @publicApi + */ +function getLocaleTimeFormat(locale, width) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + return getLastDefinedValue(data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].TimeFormat], width); +} +/** + * Retrieves a localized date-time formatting string. + * + * @param locale A locale code for the locale format rules to use. + * @param width The format type. + * @returns The localized formatting string. + * @see {@link FormatWidth} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleDateTimeFormat(locale, width) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + const dateTimeFormatData = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].DateTimeFormat]; + return getLastDefinedValue(dateTimeFormatData, width); +} +/** + * Retrieves a localized number symbol that can be used to replace placeholders in number formats. + * @param locale The locale code. + * @param symbol The symbol to localize. Must be one of `NumberSymbol`. + * @returns The character for the localized symbol. + * @see {@link NumberSymbol} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleNumberSymbol(locale, symbol) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + const res = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][symbol]; + if (typeof res === 'undefined') { + if (symbol === NumberSymbol.CurrencyDecimal) { + return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][NumberSymbol.Decimal]; + } else if (symbol === NumberSymbol.CurrencyGroup) { + return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberSymbols][NumberSymbol.Group]; + } + } + return res; +} +/** + * Retrieves a number format for a given locale. + * + * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00` + * when used to format the number 12345.678 could result in "12'345,678". That would happen if the + * grouping separator for your language is an apostrophe, and the decimal separator is a comma. + * + * Important: The characters `.` `,` `0` `#` (and others below) are special placeholders + * that stand for the decimal separator, and so on, and are NOT real characters. + * You must NOT "translate" the placeholders. For example, don't change `.` to `,` even though in + * your language the decimal point is written with a comma. The symbols should be replaced by the + * local equivalents, using the appropriate `NumberSymbol` for your language. + * + * Here are the special characters used in number patterns: + * + * | Symbol | Meaning | + * |--------|---------| + * | . | Replaced automatically by the character used for the decimal point. | + * | , | Replaced by the "grouping" (thousands) separator. | + * | 0 | Replaced by a digit (or zero if there aren't enough digits). | + * | # | Replaced by a digit (or nothing if there aren't enough). | + * | ¤ | Replaced by a currency symbol, such as $ or USD. | + * | % | Marks a percent format. The % symbol may change position, but must be retained. | + * | E | Marks a scientific format. The E symbol may change position, but must be retained. | + * | ' | Special characters used as literal characters are quoted with ASCII single quotes. | + * + * @param locale A locale code for the locale format rules to use. + * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.) + * @returns The localized format string. + * @see {@link NumberFormatStyle} + * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns) + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleNumberFormat(locale, type) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].NumberFormats][type]; +} +/** + * Retrieves the symbol used to represent the currency for the main country + * corresponding to a given locale. For example, '$' for `en-US`. + * + * @param locale A locale code for the locale format rules to use. + * @returns The localized symbol character, + * or `null` if the main country cannot be determined. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleCurrencySymbol(locale) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencySymbol] || null; +} +/** + * Retrieves the name of the currency for the main country corresponding + * to a given locale. For example, 'US Dollar' for `en-US`. + * @param locale A locale code for the locale format rules to use. + * @returns The currency name, + * or `null` if the main country cannot be determined. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleCurrencyName(locale) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].CurrencyName] || null; +} +/** + * Retrieves the default currency code for the given locale. + * + * The default is defined as the first currency which is still in use. + * + * @param locale The code of the locale whose currency code we want. + * @returns The code of the default currency for the given locale. + * + * @publicApi + */ +function getLocaleCurrencyCode(locale) { + return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocaleCurrencyCode"])(locale); +} +/** + * Retrieves the currency values for a given locale. + * @param locale A locale code for the locale format rules to use. + * @returns The currency values. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + */ +function getLocaleCurrencies(locale) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Currencies]; +} +/** + * @alias core/ɵgetLocalePluralCase + * @publicApi + */ +const getLocalePluralCase = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵgetLocalePluralCase"]; +function checkFullData(data) { + if (!data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData]) { + throw new Error(`Missing extra locale data for the locale "${data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`); + } +} +/** + * Retrieves locale-specific rules used to determine which day period to use + * when more than one period is defined for a locale. + * + * There is a rule for each defined day period. The + * first rule is applied to the first day period and so on. + * Fall back to AM/PM when no rules are available. + * + * A rule can specify a period as time range, or as a single time value. + * + * This functionality is only available when you have loaded the full locale data. + * See the ["I18n guide"](guide/i18n-common-format-data-locale). + * + * @param locale A locale code for the locale format rules to use. + * @returns The rules for the locale, a single time value or array of *from-time, to-time*, + * or null if no periods are available. + * + * @see {@link getLocaleExtraDayPeriods} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleExtraDayPeriodRules(locale) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + checkFullData(data); + const rules = data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][2 /* ɵExtraLocaleDataIndex.ExtraDayPeriodsRules */] || []; + return rules.map(rule => { + if (typeof rule === 'string') { + return extractTime(rule); + } + return [extractTime(rule[0]), extractTime(rule[1])]; + }); +} +/** + * Retrieves locale-specific day periods, which indicate roughly how a day is broken up + * in different languages. + * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight. + * + * This functionality is only available when you have loaded the full locale data. + * See the ["I18n guide"](guide/i18n-common-format-data-locale). + * + * @param locale A locale code for the locale format rules to use. + * @param formStyle The required grammatical form. + * @param width The required character width. + * @returns The translated day-period strings. + * @see {@link getLocaleExtraDayPeriodRules} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLocaleExtraDayPeriods(locale, formStyle, width) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + checkFullData(data); + const dayPeriodsData = [data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][0 /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */], data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */]]; + + const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || []; + return getLastDefinedValue(dayPeriods, width) || []; +} +/** + * Retrieves the writing direction of a specified locale + * @param locale A locale code for the locale format rules to use. + * @publicApi + * @returns 'rtl' or 'ltr' + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + */ +function getLocaleDirection(locale) { + const data = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵfindLocaleData"])(locale); + return data[_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵLocaleDataIndex"].Directionality]; +} +/** + * Retrieves the first value that is defined in an array, going backwards from an index position. + * + * To avoid repeating the same data (as when the "format" and "standalone" forms are the same) + * add the first value to the locale data arrays, and add other values only if they are different. + * + * @param data The data array to retrieve from. + * @param index A 0-based index into the array to start from. + * @returns The value immediately before the given index position. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getLastDefinedValue(data, index) { + for (let i = index; i > -1; i--) { + if (typeof data[i] !== 'undefined') { + return data[i]; + } + } + throw new Error('Locale data API: locale data undefined'); +} +/** + * Extracts the hours and minutes from a string like "15:45" + */ +function extractTime(time) { + const [h, m] = time.split(':'); + return { + hours: +h, + minutes: +m + }; +} +/** + * Retrieves the currency symbol for a given currency code. + * + * For example, for the default `en-US` locale, the code `USD` can + * be represented by the narrow symbol `$` or the wide symbol `US$`. + * + * @param code The currency code. + * @param format The format, `wide` or `narrow`. + * @param locale A locale code for the locale format rules to use. + * + * @returns The symbol, or the currency code if no symbol is available. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getCurrencySymbol(code, format, locale = 'en') { + const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || []; + const symbolNarrow = currency[1 /* ɵCurrencyIndex.SymbolNarrow */]; + if (format === 'narrow' && typeof symbolNarrow === 'string') { + return symbolNarrow; + } + return currency[0 /* ɵCurrencyIndex.Symbol */] || code; +} +// Most currencies have cents, that's why the default is 2 +const DEFAULT_NB_OF_CURRENCY_DIGITS = 2; +/** + * Reports the number of decimal digits for a given currency. + * The value depends upon the presence of cents in that particular currency. + * + * @param code The currency code. + * @returns The number of decimal digits, typically 0 or 2. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function getNumberOfCurrencyDigits(code) { + let digits; + const currency = CURRENCIES_EN[code]; + if (currency) { + digits = currency[2 /* ɵCurrencyIndex.NbOfDigits */]; + } + + return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS; +} +const ISO8601_DATE_REGEX = /^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; +// 1 2 3 4 5 6 7 8 9 10 11 +const NAMED_FORMATS = {}; +const DATE_FORMATS_SPLIT = /((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/; +var ZoneWidth; +(function (ZoneWidth) { + ZoneWidth[ZoneWidth["Short"] = 0] = "Short"; + ZoneWidth[ZoneWidth["ShortGMT"] = 1] = "ShortGMT"; + ZoneWidth[ZoneWidth["Long"] = 2] = "Long"; + ZoneWidth[ZoneWidth["Extended"] = 3] = "Extended"; +})(ZoneWidth || (ZoneWidth = {})); +var DateType; +(function (DateType) { + DateType[DateType["FullYear"] = 0] = "FullYear"; + DateType[DateType["Month"] = 1] = "Month"; + DateType[DateType["Date"] = 2] = "Date"; + DateType[DateType["Hours"] = 3] = "Hours"; + DateType[DateType["Minutes"] = 4] = "Minutes"; + DateType[DateType["Seconds"] = 5] = "Seconds"; + DateType[DateType["FractionalSeconds"] = 6] = "FractionalSeconds"; + DateType[DateType["Day"] = 7] = "Day"; +})(DateType || (DateType = {})); +var TranslationType; +(function (TranslationType) { + TranslationType[TranslationType["DayPeriods"] = 0] = "DayPeriods"; + TranslationType[TranslationType["Days"] = 1] = "Days"; + TranslationType[TranslationType["Months"] = 2] = "Months"; + TranslationType[TranslationType["Eras"] = 3] = "Eras"; +})(TranslationType || (TranslationType = {})); +/** + * @ngModule CommonModule + * @description + * + * Formats a date according to locale rules. + * + * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch) + * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime). + * @param format The date-time components to include. See `DatePipe` for details. + * @param locale A locale code for the locale format rules to use. + * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`), + * or a standard UTC/GMT or continental US time zone abbreviation. + * If not specified, uses host system settings. + * + * @returns The formatted date string. + * + * @see {@link DatePipe} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function formatDate(value, format, locale, timezone) { + let date = toDate(value); + const namedFormat = getNamedFormat(locale, format); + format = namedFormat || format; + let parts = []; + let match; + while (format) { + match = DATE_FORMATS_SPLIT.exec(format); + if (match) { + parts = parts.concat(match.slice(1)); + const part = parts.pop(); + if (!part) { + break; + } + format = part; + } else { + parts.push(format); + break; + } + } + let dateTimezoneOffset = date.getTimezoneOffset(); + if (timezone) { + dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); + date = convertTimezoneToLocal(date, timezone, true); + } + let text = ''; + parts.forEach(value => { + const dateFormatter = getDateFormatter(value); + text += dateFormatter ? dateFormatter(date, locale, dateTimezoneOffset) : value === "''" ? "'" : value.replace(/(^'|'$)/g, '').replace(/''/g, "'"); + }); + return text; +} +/** + * Create a new Date object with the given date value, and the time set to midnight. + * + * We cannot use `new Date(year, month, date)` because it maps years between 0 and 99 to 1900-1999. + * See: https://github.com/angular/angular/issues/40377 + * + * Note that this function returns a Date object whose time is midnight in the current locale's + * timezone. In the future we might want to change this to be midnight in UTC, but this would be a + * considerable breaking change. + */ +function createDate(year, month, date) { + // The `newDate` is set to midnight (UTC) on January 1st 1970. + // - In PST this will be December 31st 1969 at 4pm. + // - In GMT this will be January 1st 1970 at 1am. + // Note that they even have different years, dates and months! + const newDate = new Date(0); + // `setFullYear()` allows years like 0001 to be set correctly. This function does not + // change the internal time of the date. + // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019). + // - In PST this will now be September 20, 2019 at 4pm + // - In GMT this will now be September 20, 2019 at 1am + newDate.setFullYear(year, month, date); + // We want the final date to be at local midnight, so we reset the time. + // - In PST this will now be September 20, 2019 at 12am + // - In GMT this will now be September 20, 2019 at 12am + newDate.setHours(0, 0, 0); + return newDate; +} +function getNamedFormat(locale, format) { + const localeId = getLocaleId(locale); + NAMED_FORMATS[localeId] ??= {}; + if (NAMED_FORMATS[localeId][format]) { + return NAMED_FORMATS[localeId][format]; + } + let formatValue = ''; + switch (format) { + case 'shortDate': + formatValue = getLocaleDateFormat(locale, FormatWidth.Short); + break; + case 'mediumDate': + formatValue = getLocaleDateFormat(locale, FormatWidth.Medium); + break; + case 'longDate': + formatValue = getLocaleDateFormat(locale, FormatWidth.Long); + break; + case 'fullDate': + formatValue = getLocaleDateFormat(locale, FormatWidth.Full); + break; + case 'shortTime': + formatValue = getLocaleTimeFormat(locale, FormatWidth.Short); + break; + case 'mediumTime': + formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium); + break; + case 'longTime': + formatValue = getLocaleTimeFormat(locale, FormatWidth.Long); + break; + case 'fullTime': + formatValue = getLocaleTimeFormat(locale, FormatWidth.Full); + break; + case 'short': + const shortTime = getNamedFormat(locale, 'shortTime'); + const shortDate = getNamedFormat(locale, 'shortDate'); + formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]); + break; + case 'medium': + const mediumTime = getNamedFormat(locale, 'mediumTime'); + const mediumDate = getNamedFormat(locale, 'mediumDate'); + formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]); + break; + case 'long': + const longTime = getNamedFormat(locale, 'longTime'); + const longDate = getNamedFormat(locale, 'longDate'); + formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]); + break; + case 'full': + const fullTime = getNamedFormat(locale, 'fullTime'); + const fullDate = getNamedFormat(locale, 'fullDate'); + formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]); + break; + } + if (formatValue) { + NAMED_FORMATS[localeId][format] = formatValue; + } + return formatValue; +} +function formatDateTime(str, opt_values) { + if (opt_values) { + str = str.replace(/\{([^}]+)}/g, function (match, key) { + return opt_values != null && key in opt_values ? opt_values[key] : match; + }); + } + return str; +} +function padNumber(num, digits, minusSign = '-', trim, negWrap) { + let neg = ''; + if (num < 0 || negWrap && num <= 0) { + if (negWrap) { + num = -num + 1; + } else { + num = -num; + neg = minusSign; + } + } + let strNum = String(num); + while (strNum.length < digits) { + strNum = '0' + strNum; + } + if (trim) { + strNum = strNum.slice(strNum.length - digits); + } + return neg + strNum; +} +function formatFractionalSeconds(milliseconds, digits) { + const strMs = padNumber(milliseconds, 3); + return strMs.substring(0, digits); +} +/** + * Returns a date formatter that transforms a date into its locale digit representation + */ +function dateGetter(name, size, offset = 0, trim = false, negWrap = false) { + return function (date, locale) { + let part = getDatePart(name, date); + if (offset > 0 || part > -offset) { + part += offset; + } + if (name === DateType.Hours) { + if (part === 0 && offset === -12) { + part = 12; + } + } else if (name === DateType.FractionalSeconds) { + return formatFractionalSeconds(part, size); + } + const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign); + return padNumber(part, size, localeMinus, trim, negWrap); + }; +} +function getDatePart(part, date) { + switch (part) { + case DateType.FullYear: + return date.getFullYear(); + case DateType.Month: + return date.getMonth(); + case DateType.Date: + return date.getDate(); + case DateType.Hours: + return date.getHours(); + case DateType.Minutes: + return date.getMinutes(); + case DateType.Seconds: + return date.getSeconds(); + case DateType.FractionalSeconds: + return date.getMilliseconds(); + case DateType.Day: + return date.getDay(); + default: + throw new Error(`Unknown DateType value "${part}".`); + } +} +/** + * Returns a date formatter that transforms a date into its locale string representation + */ +function dateStrGetter(name, width, form = FormStyle.Format, extended = false) { + return function (date, locale) { + return getDateTranslation(date, locale, name, width, form, extended); + }; +} +/** + * Returns the locale translation of a date for a given form, type and width + */ +function getDateTranslation(date, locale, name, width, form, extended) { + switch (name) { + case TranslationType.Months: + return getLocaleMonthNames(locale, form, width)[date.getMonth()]; + case TranslationType.Days: + return getLocaleDayNames(locale, form, width)[date.getDay()]; + case TranslationType.DayPeriods: + const currentHours = date.getHours(); + const currentMinutes = date.getMinutes(); + if (extended) { + const rules = getLocaleExtraDayPeriodRules(locale); + const dayPeriods = getLocaleExtraDayPeriods(locale, form, width); + const index = rules.findIndex(rule => { + if (Array.isArray(rule)) { + // morning, afternoon, evening, night + const [from, to] = rule; + const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes; + const beforeTo = currentHours < to.hours || currentHours === to.hours && currentMinutes < to.minutes; + // We must account for normal rules that span a period during the day (e.g. 6am-9am) + // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g. + // 10pm - 5am) where `from` is greater (later!) than `to`. + // + // In the first case the current time must be BOTH after `from` AND before `to` + // (e.g. 8am is after 6am AND before 10am). + // + // In the second case the current time must be EITHER after `from` OR before `to` + // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is + // after 10pm). + if (from.hours < to.hours) { + if (afterFrom && beforeTo) { + return true; + } + } else if (afterFrom || beforeTo) { + return true; + } + } else { + // noon or midnight + if (rule.hours === currentHours && rule.minutes === currentMinutes) { + return true; + } + } + return false; + }); + if (index !== -1) { + return dayPeriods[index]; + } + } + // if no rules for the day periods, we use am/pm by default + return getLocaleDayPeriods(locale, form, width)[currentHours < 12 ? 0 : 1]; + case TranslationType.Eras: + return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1]; + default: + // This default case is not needed by TypeScript compiler, as the switch is exhaustive. + // However Closure Compiler does not understand that and reports an error in typed mode. + // The `throw new Error` below works around the problem, and the unexpected: never variable + // makes sure tsc still checks this code is unreachable. + const unexpected = name; + throw new Error(`unexpected translation type ${unexpected}`); + } +} +/** + * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or + * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30, + * extended = +04:30) + */ +function timeZoneGetter(width) { + return function (date, locale, offset) { + const zone = -1 * offset; + const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign); + const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60); + switch (width) { + case ZoneWidth.Short: + return (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + padNumber(Math.abs(zone % 60), 2, minusSign); + case ZoneWidth.ShortGMT: + return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 1, minusSign); + case ZoneWidth.Long: + return 'GMT' + (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign); + case ZoneWidth.Extended: + if (offset === 0) { + return 'Z'; + } else { + return (zone >= 0 ? '+' : '') + padNumber(hours, 2, minusSign) + ':' + padNumber(Math.abs(zone % 60), 2, minusSign); + } + default: + throw new Error(`Unknown zone width "${width}"`); + } + }; +} +const JANUARY = 0; +const THURSDAY = 4; +function getFirstThursdayOfYear(year) { + const firstDayOfYear = createDate(year, JANUARY, 1).getDay(); + return createDate(year, 0, 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear); +} +/** + * ISO Week starts on day 1 (Monday) and ends with day 0 (Sunday) + */ +function getThursdayThisIsoWeek(datetime) { + // getDay returns 0-6 range with sunday as 0. + const currentDay = datetime.getDay(); + // On a Sunday, read the previous Thursday since ISO weeks start on Monday. + const deltaToThursday = currentDay === 0 ? -3 : THURSDAY - currentDay; + return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + deltaToThursday); +} +function weekGetter(size, monthBased = false) { + return function (date, locale) { + let result; + if (monthBased) { + const nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1; + const today = date.getDate(); + result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7); + } else { + const thisThurs = getThursdayThisIsoWeek(date); + // Some days of a year are part of next year according to ISO 8601. + // Compute the firstThurs from the year of this week's Thursday + const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear()); + const diff = thisThurs.getTime() - firstThurs.getTime(); + result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week + } + + return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); + }; +} +/** + * Returns a date formatter that provides the week-numbering year for the input date. + */ +function weekNumberingYearGetter(size, trim = false) { + return function (date, locale) { + const thisThurs = getThursdayThisIsoWeek(date); + const weekNumberingYear = thisThurs.getFullYear(); + return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim); + }; +} +const DATE_FORMATS = {}; +// Based on CLDR formats: +// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table +// See also explanations: http://cldr.unicode.org/translation/date-time +// TODO(ocombe): support all missing cldr formats: U, Q, D, F, e, j, J, C, A, v, V, X, x +function getDateFormatter(format) { + if (DATE_FORMATS[format]) { + return DATE_FORMATS[format]; + } + let formatter; + switch (format) { + // Era name (AD/BC) + case 'G': + case 'GG': + case 'GGG': + formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated); + break; + case 'GGGG': + formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide); + break; + case 'GGGGG': + formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow); + break; + // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199) + case 'y': + formatter = dateGetter(DateType.FullYear, 1, 0, false, true); + break; + // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10) + case 'yy': + formatter = dateGetter(DateType.FullYear, 2, 0, true, true); + break; + // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10) + case 'yyy': + formatter = dateGetter(DateType.FullYear, 3, 0, false, true); + break; + // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010) + case 'yyyy': + formatter = dateGetter(DateType.FullYear, 4, 0, false, true); + break; + // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199) + case 'Y': + formatter = weekNumberingYearGetter(1); + break; + // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD + // 2010 => 10) + case 'YY': + formatter = weekNumberingYearGetter(2, true); + break; + // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD + // 2010 => 2010) + case 'YYY': + formatter = weekNumberingYearGetter(3); + break; + // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010) + case 'YYYY': + formatter = weekNumberingYearGetter(4); + break; + // Month of the year (1-12), numeric + case 'M': + case 'L': + formatter = dateGetter(DateType.Month, 1, 1); + break; + case 'MM': + case 'LL': + formatter = dateGetter(DateType.Month, 2, 1); + break; + // Month of the year (January, ...), string, format + case 'MMM': + formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated); + break; + case 'MMMM': + formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide); + break; + case 'MMMMM': + formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow); + break; + // Month of the year (January, ...), string, standalone + case 'LLL': + formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone); + break; + case 'LLLL': + formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone); + break; + case 'LLLLL': + formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone); + break; + // Week of the year (1, ... 52) + case 'w': + formatter = weekGetter(1); + break; + case 'ww': + formatter = weekGetter(2); + break; + // Week of the month (1, ...) + case 'W': + formatter = weekGetter(1, true); + break; + // Day of the month (1-31) + case 'd': + formatter = dateGetter(DateType.Date, 1); + break; + case 'dd': + formatter = dateGetter(DateType.Date, 2); + break; + // Day of the Week StandAlone (1, 1, Mon, Monday, M, Mo) + case 'c': + case 'cc': + formatter = dateGetter(DateType.Day, 1); + break; + case 'ccc': + formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone); + break; + case 'cccc': + formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone); + break; + case 'ccccc': + formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone); + break; + case 'cccccc': + formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone); + break; + // Day of the Week + case 'E': + case 'EE': + case 'EEE': + formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated); + break; + case 'EEEE': + formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide); + break; + case 'EEEEE': + formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow); + break; + case 'EEEEEE': + formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short); + break; + // Generic period of the day (am-pm) + case 'a': + case 'aa': + case 'aaa': + formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated); + break; + case 'aaaa': + formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide); + break; + case 'aaaaa': + formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow); + break; + // Extended period of the day (midnight, at night, ...), standalone + case 'b': + case 'bb': + case 'bbb': + formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true); + break; + case 'bbbb': + formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true); + break; + case 'bbbbb': + formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true); + break; + // Extended period of the day (midnight, night, ...), standalone + case 'B': + case 'BB': + case 'BBB': + formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true); + break; + case 'BBBB': + formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true); + break; + case 'BBBBB': + formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true); + break; + // Hour in AM/PM, (1-12) + case 'h': + formatter = dateGetter(DateType.Hours, 1, -12); + break; + case 'hh': + formatter = dateGetter(DateType.Hours, 2, -12); + break; + // Hour of the day (0-23) + case 'H': + formatter = dateGetter(DateType.Hours, 1); + break; + // Hour in day, padded (00-23) + case 'HH': + formatter = dateGetter(DateType.Hours, 2); + break; + // Minute of the hour (0-59) + case 'm': + formatter = dateGetter(DateType.Minutes, 1); + break; + case 'mm': + formatter = dateGetter(DateType.Minutes, 2); + break; + // Second of the minute (0-59) + case 's': + formatter = dateGetter(DateType.Seconds, 1); + break; + case 'ss': + formatter = dateGetter(DateType.Seconds, 2); + break; + // Fractional second + case 'S': + formatter = dateGetter(DateType.FractionalSeconds, 1); + break; + case 'SS': + formatter = dateGetter(DateType.FractionalSeconds, 2); + break; + case 'SSS': + formatter = dateGetter(DateType.FractionalSeconds, 3); + break; + // Timezone ISO8601 short format (-0430) + case 'Z': + case 'ZZ': + case 'ZZZ': + formatter = timeZoneGetter(ZoneWidth.Short); + break; + // Timezone ISO8601 extended format (-04:30) + case 'ZZZZZ': + formatter = timeZoneGetter(ZoneWidth.Extended); + break; + // Timezone GMT short format (GMT+4) + case 'O': + case 'OO': + case 'OOO': + // Should be location, but fallback to format O instead because we don't have the data yet + case 'z': + case 'zz': + case 'zzz': + formatter = timeZoneGetter(ZoneWidth.ShortGMT); + break; + // Timezone GMT long format (GMT+0430) + case 'OOOO': + case 'ZZZZ': + // Should be location, but fallback to format O instead because we don't have the data yet + case 'zzzz': + formatter = timeZoneGetter(ZoneWidth.Long); + break; + default: + return null; + } + DATE_FORMATS[format] = formatter; + return formatter; +} +function timezoneToOffset(timezone, fallback) { + // Support: IE 11 only, Edge 13-15+ + // IE/Edge do not "understand" colon (`:`) in timezone + timezone = timezone.replace(/:/g, ''); + const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000; + return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset; +} +function addDateMinutes(date, minutes) { + date = new Date(date.getTime()); + date.setMinutes(date.getMinutes() + minutes); + return date; +} +function convertTimezoneToLocal(date, timezone, reverse) { + const reverseValue = reverse ? -1 : 1; + const dateTimezoneOffset = date.getTimezoneOffset(); + const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset); + return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset)); +} +/** + * Converts a value to date. + * + * Supported input formats: + * - `Date` + * - number: timestamp + * - string: numeric (e.g. "1234"), ISO and date strings in a format supported by + * [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). + * Note: ISO strings without time return a date without timeoffset. + * + * Throws if unable to convert to a date. + */ +function toDate(value) { + if (isDate(value)) { + return value; + } + if (typeof value === 'number' && !isNaN(value)) { + return new Date(value); + } + if (typeof value === 'string') { + value = value.trim(); + if (/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(value)) { + /* For ISO Strings without time the day, month and year must be extracted from the ISO String + before Date creation to avoid time offset and errors in the new Date. + If we only replace '-' with ',' in the ISO String ("2015,01,01"), and try to create a new + date, some browsers (e.g. IE 9) will throw an invalid Date error. + If we leave the '-' ("2015-01-01") and try to create a new Date("2015-01-01") the timeoffset + is applied. + Note: ISO months are 0 for January, 1 for February, ... */ + const [y, m = 1, d = 1] = value.split('-').map(val => +val); + return createDate(y, m - 1, d); + } + const parsedNb = parseFloat(value); + // any string that only contains numbers, like "1234" but not like "1234hello" + if (!isNaN(value - parsedNb)) { + return new Date(parsedNb); + } + let match; + if (match = value.match(ISO8601_DATE_REGEX)) { + return isoStringToDate(match); + } + } + const date = new Date(value); + if (!isDate(date)) { + throw new Error(`Unable to convert "${value}" into a date`); + } + return date; +} +/** + * Converts a date in ISO8601 to a Date. + * Used instead of `Date.parse` because of browser discrepancies. + */ +function isoStringToDate(match) { + const date = new Date(0); + let tzHour = 0; + let tzMin = 0; + // match[8] means that the string contains "Z" (UTC) or a timezone like "+01:00" or "+0100" + const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear; + const timeSetter = match[8] ? date.setUTCHours : date.setHours; + // if there is a timezone defined like "+01:00" or "+0100" + if (match[9]) { + tzHour = Number(match[9] + match[10]); + tzMin = Number(match[9] + match[11]); + } + dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3])); + const h = Number(match[4] || 0) - tzHour; + const m = Number(match[5] || 0) - tzMin; + const s = Number(match[6] || 0); + // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11) + // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms` + // becomes `999ms`. + const ms = Math.floor(parseFloat('0.' + (match[7] || 0)) * 1000); + timeSetter.call(date, h, m, s, ms); + return date; +} +function isDate(value) { + return value instanceof Date && !isNaN(value.valueOf()); +} +const NUMBER_FORMAT_REGEXP = /^(\d+)?\.((\d+)(-(\d+))?)?$/; +const MAX_DIGITS = 22; +const DECIMAL_SEP = '.'; +const ZERO_CHAR = '0'; +const PATTERN_SEP = ';'; +const GROUP_SEP = ','; +const DIGIT_CHAR = '#'; +const CURRENCY_CHAR = '¤'; +const PERCENT_CHAR = '%'; +/** + * Transforms a number to a locale string based on a style and a format. + */ +function formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent = false) { + let formattedText = ''; + let isZero = false; + if (!isFinite(value)) { + formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity); + } else { + let parsedNumber = parseNumber(value); + if (isPercent) { + parsedNumber = toPercent(parsedNumber); + } + let minInt = pattern.minInt; + let minFraction = pattern.minFrac; + let maxFraction = pattern.maxFrac; + if (digitsInfo) { + const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP); + if (parts === null) { + throw new Error(`${digitsInfo} is not a valid digit info`); + } + const minIntPart = parts[1]; + const minFractionPart = parts[3]; + const maxFractionPart = parts[5]; + if (minIntPart != null) { + minInt = parseIntAutoRadix(minIntPart); + } + if (minFractionPart != null) { + minFraction = parseIntAutoRadix(minFractionPart); + } + if (maxFractionPart != null) { + maxFraction = parseIntAutoRadix(maxFractionPart); + } else if (minFractionPart != null && minFraction > maxFraction) { + maxFraction = minFraction; + } + } + roundNumber(parsedNumber, minFraction, maxFraction); + let digits = parsedNumber.digits; + let integerLen = parsedNumber.integerLen; + const exponent = parsedNumber.exponent; + let decimals = []; + isZero = digits.every(d => !d); + // pad zeros for small numbers + for (; integerLen < minInt; integerLen++) { + digits.unshift(0); + } + // pad zeros for small numbers + for (; integerLen < 0; integerLen++) { + digits.unshift(0); + } + // extract decimals digits + if (integerLen > 0) { + decimals = digits.splice(integerLen, digits.length); + } else { + decimals = digits; + digits = [0]; + } + // format the integer digits with grouping separators + const groups = []; + if (digits.length >= pattern.lgSize) { + groups.unshift(digits.splice(-pattern.lgSize, digits.length).join('')); + } + while (digits.length > pattern.gSize) { + groups.unshift(digits.splice(-pattern.gSize, digits.length).join('')); + } + if (digits.length) { + groups.unshift(digits.join('')); + } + formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol)); + // append the decimal digits + if (decimals.length) { + formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join(''); + } + if (exponent) { + formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent; + } + } + if (value < 0 && !isZero) { + formattedText = pattern.negPre + formattedText + pattern.negSuf; + } else { + formattedText = pattern.posPre + formattedText + pattern.posSuf; + } + return formattedText; +} +/** + * @ngModule CommonModule + * @description + * + * Formats a number as currency using locale rules. + * + * @param value The number to format. + * @param locale A locale code for the locale format rules to use. + * @param currency A string containing the currency symbol or its name, + * such as "$" or "Canadian Dollar". Used in output string, but does not affect the operation + * of the function. + * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) + * currency code, such as `USD` for the US dollar and `EUR` for the euro. + * Used to determine the number of digits in the decimal part. + * @param digitsInfo Decimal representation options, specified by a string in the following format: + * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details. + * + * @returns The formatted currency value. + * + * @see {@link formatNumber} + * @see {@link DecimalPipe} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function formatCurrency(value, locale, currency, currencyCode, digitsInfo) { + const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency); + const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); + pattern.minFrac = getNumberOfCurrencyDigits(currencyCode); + pattern.maxFrac = pattern.minFrac; + const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo); + return res.replace(CURRENCY_CHAR, currency) + // if we have 2 time the currency character, the second one is ignored + .replace(CURRENCY_CHAR, '') + // If there is a spacing between currency character and the value and + // the currency character is suppressed by passing an empty string, the + // spacing character would remain as part of the string. Then we + // should remove it. + .trim(); +} +/** + * @ngModule CommonModule + * @description + * + * Formats a number as a percentage according to locale rules. + * + * @param value The number to format. + * @param locale A locale code for the locale format rules to use. + * @param digitsInfo Decimal representation options, specified by a string in the following format: + * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details. + * + * @returns The formatted percentage value. + * + * @see {@link formatNumber} + * @see {@link DecimalPipe} + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * @publicApi + * + */ +function formatPercent(value, locale, digitsInfo) { + const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent); + const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); + const res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true); + return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign)); +} +/** + * @ngModule CommonModule + * @description + * + * Formats a number as text, with group sizing, separator, and other + * parameters based on the locale. + * + * @param value The number to format. + * @param locale A locale code for the locale format rules to use. + * @param digitsInfo Decimal representation options, specified by a string in the following format: + * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details. + * + * @returns The formatted text string. + * @see [Internationalization (i18n) Guide](/guide/i18n-overview) + * + * @publicApi + */ +function formatNumber(value, locale, digitsInfo) { + const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal); + const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign)); + return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo); +} +function parseNumberFormat(format, minusSign = '-') { + const p = { + minInt: 1, + minFrac: 0, + maxFrac: 0, + posPre: '', + posSuf: '', + negPre: '', + negSuf: '', + gSize: 0, + lgSize: 0 + }; + const patternParts = format.split(PATTERN_SEP); + const positive = patternParts[0]; + const negative = patternParts[1]; + const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ? positive.split(DECIMAL_SEP) : [positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1), positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)], + integer = positiveParts[0], + fraction = positiveParts[1] || ''; + p.posPre = integer.substring(0, integer.indexOf(DIGIT_CHAR)); + for (let i = 0; i < fraction.length; i++) { + const ch = fraction.charAt(i); + if (ch === ZERO_CHAR) { + p.minFrac = p.maxFrac = i + 1; + } else if (ch === DIGIT_CHAR) { + p.maxFrac = i + 1; + } else { + p.posSuf += ch; + } + } + const groups = integer.split(GROUP_SEP); + p.gSize = groups[1] ? groups[1].length : 0; + p.lgSize = groups[2] || groups[1] ? (groups[2] || groups[1]).length : 0; + if (negative) { + const trunkLen = positive.length - p.posPre.length - p.posSuf.length, + pos = negative.indexOf(DIGIT_CHAR); + p.negPre = negative.substring(0, pos).replace(/'/g, ''); + p.negSuf = negative.slice(pos + trunkLen).replace(/'/g, ''); + } else { + p.negPre = minusSign + p.posPre; + p.negSuf = p.posSuf; + } + return p; +} +// Transforms a parsed number into a percentage by multiplying it by 100 +function toPercent(parsedNumber) { + // if the number is 0, don't do anything + if (parsedNumber.digits[0] === 0) { + return parsedNumber; + } + // Getting the current number of decimals + const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen; + if (parsedNumber.exponent) { + parsedNumber.exponent += 2; + } else { + if (fractionLen === 0) { + parsedNumber.digits.push(0, 0); + } else if (fractionLen === 1) { + parsedNumber.digits.push(0); + } + parsedNumber.integerLen += 2; + } + return parsedNumber; +} +/** + * Parses a number. + * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/ + */ +function parseNumber(num) { + let numStr = Math.abs(num) + ''; + let exponent = 0, + digits, + integerLen; + let i, j, zeros; + // Decimal point? + if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) { + numStr = numStr.replace(DECIMAL_SEP, ''); + } + // Exponential form? + if ((i = numStr.search(/e/i)) > 0) { + // Work out the exponent. + if (integerLen < 0) integerLen = i; + integerLen += +numStr.slice(i + 1); + numStr = numStr.substring(0, i); + } else if (integerLen < 0) { + // There was no decimal point or exponent so it is an integer. + integerLen = numStr.length; + } + // Count the number of leading zeros. + for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { + /* empty */ + } + if (i === (zeros = numStr.length)) { + // The digits are all zero. + digits = [0]; + integerLen = 1; + } else { + // Count the number of trailing zeros + zeros--; + while (numStr.charAt(zeros) === ZERO_CHAR) zeros--; + // Trailing zeros are insignificant so ignore them + integerLen -= i; + digits = []; + // Convert string to array of digits without leading/trailing zeros. + for (j = 0; i <= zeros; i++, j++) { + digits[j] = Number(numStr.charAt(i)); + } + } + // If the number overflows the maximum allowed digits then use an exponent. + if (integerLen > MAX_DIGITS) { + digits = digits.splice(0, MAX_DIGITS - 1); + exponent = integerLen - 1; + integerLen = 1; + } + return { + digits, + exponent, + integerLen + }; +} +/** + * Round the parsed number to the specified number of decimal places + * This function changes the parsedNumber in-place + */ +function roundNumber(parsedNumber, minFrac, maxFrac) { + if (minFrac > maxFrac) { + throw new Error(`The minimum number of digits after fraction (${minFrac}) is higher than the maximum (${maxFrac}).`); + } + let digits = parsedNumber.digits; + let fractionLen = digits.length - parsedNumber.integerLen; + const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac); + // The index of the digit to where rounding is to occur + let roundAt = fractionSize + parsedNumber.integerLen; + let digit = digits[roundAt]; + if (roundAt > 0) { + // Drop fractional digits beyond `roundAt` + digits.splice(Math.max(parsedNumber.integerLen, roundAt)); + // Set non-fractional digits beyond `roundAt` to 0 + for (let j = roundAt; j < digits.length; j++) { + digits[j] = 0; + } + } else { + // We rounded to zero so reset the parsedNumber + fractionLen = Math.max(0, fractionLen); + parsedNumber.integerLen = 1; + digits.length = Math.max(1, roundAt = fractionSize + 1); + digits[0] = 0; + for (let i = 1; i < roundAt; i++) digits[i] = 0; + } + if (digit >= 5) { + if (roundAt - 1 < 0) { + for (let k = 0; k > roundAt; k--) { + digits.unshift(0); + parsedNumber.integerLen++; + } + digits.unshift(1); + parsedNumber.integerLen++; + } else { + digits[roundAt - 1]++; + } + } + // Pad out with zeros to get the required fraction length + for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0); + let dropTrailingZeros = fractionSize !== 0; + // Minimal length = nb of decimals required + current nb of integers + // Any number besides that is optional and can be removed if it's a trailing 0 + const minLen = minFrac + parsedNumber.integerLen; + // Do any carrying, e.g. a digit was rounded up to 10 + const carry = digits.reduceRight(function (carry, d, i, digits) { + d = d + carry; + digits[i] = d < 10 ? d : d - 10; // d % 10 + if (dropTrailingZeros) { + // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52) + if (digits[i] === 0 && i >= minLen) { + digits.pop(); + } else { + dropTrailingZeros = false; + } + } + return d >= 10 ? 1 : 0; // Math.floor(d / 10); + }, 0); + if (carry) { + digits.unshift(carry); + parsedNumber.integerLen++; + } +} +function parseIntAutoRadix(text) { + const result = parseInt(text); + if (isNaN(result)) { + throw new Error('Invalid integer literal when parsing ' + text); + } + return result; +} + +/** + * @publicApi + */ +class NgLocalization { + static #_ = this.ɵfac = function NgLocalization_Factory(t) { + return new (t || NgLocalization)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: NgLocalization, + factory: function NgLocalization_Factory(t) { + let r = null; + if (t) { + r = new t(); + } else { + r = (locale => new NgLocaleLocalization(locale))(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID)); + } + return r; + }, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgLocalization, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root', + useFactory: locale => new NgLocaleLocalization(locale), + deps: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID] + }] + }], null, null); +})(); +/** + * Returns the plural category for a given value. + * - "=value" when the case exists, + * - the plural category otherwise + */ +function getPluralCategory(value, cases, ngLocalization, locale) { + let key = `=${value}`; + if (cases.indexOf(key) > -1) { + return key; + } + key = ngLocalization.getPluralCategory(value, locale); + if (cases.indexOf(key) > -1) { + return key; + } + if (cases.indexOf('other') > -1) { + return 'other'; + } + throw new Error(`No plural message found for value "${value}"`); +} +/** + * Returns the plural case based on the locale + * + * @publicApi + */ +class NgLocaleLocalization extends NgLocalization { + constructor(locale) { + super(); + this.locale = locale; + } + getPluralCategory(value, locale) { + const plural = getLocalePluralCase(locale || this.locale)(value); + switch (plural) { + case Plural.Zero: + return 'zero'; + case Plural.One: + return 'one'; + case Plural.Two: + return 'two'; + case Plural.Few: + return 'few'; + case Plural.Many: + return 'many'; + default: + return 'other'; + } + } + static #_ = this.ɵfac = function NgLocaleLocalization_Factory(t) { + return new (t || NgLocaleLocalization)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: NgLocaleLocalization, + factory: NgLocaleLocalization.ɵfac + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgLocaleLocalization, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID] + }] + }], null); +})(); + +/** + * Register global data to be used internally by Angular. See the + * ["I18n guide"](guide/i18n-common-format-data-locale) to know how to import additional locale + * data. + * + * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1 + * + * @publicApi + */ +function registerLocaleData(data, localeId, extraData) { + return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵregisterLocaleData"])(data, localeId, extraData); +} +function parseCookieValue(cookieStr, name) { + name = encodeURIComponent(name); + for (const cookie of cookieStr.split(';')) { + const eqIndex = cookie.indexOf('='); + const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)]; + if (cookieName.trim() === name) { + return decodeURIComponent(cookieValue); + } + } + return null; +} +const WS_REGEXP = /\s+/; +const EMPTY_ARRAY = []; +/** + * @ngModule CommonModule + * + * @usageNotes + * ``` + * ... + * + * ... + * + * ... + * + * ... + * + * ... + * ``` + * + * @description + * + * Adds and removes CSS classes on an HTML element. + * + * The CSS classes are updated as follows, depending on the type of the expression evaluation: + * - `string` - the CSS classes listed in the string (space delimited) are added, + * - `Array` - the CSS classes declared as Array elements are added, + * - `Object` - keys are CSS classes that get added when the expression given in the value + * evaluates to a truthy value, otherwise they are removed. + * + * @publicApi + */ +class NgClass { + constructor(_ngEl, _renderer) { + this._ngEl = _ngEl; + this._renderer = _renderer; + this.initialClasses = EMPTY_ARRAY; + this.stateMap = new Map(); + } + set klass(value) { + this.initialClasses = value != null ? value.trim().split(WS_REGEXP) : EMPTY_ARRAY; + } + set ngClass(value) { + this.rawClass = typeof value === 'string' ? value.trim().split(WS_REGEXP) : value; + } + /* + The NgClass directive uses the custom change detection algorithm for its inputs. The custom + algorithm is necessary since inputs are represented as complex object or arrays that need to be + deeply-compared. + This algorithm is perf-sensitive since NgClass is used very frequently and its poor performance + might negatively impact runtime performance of the entire change detection cycle. The design of + this algorithm is making sure that: + - there is no unnecessary DOM manipulation (CSS classes are added / removed from the DOM only when + needed), even if references to bound objects change; + - there is no memory allocation if nothing changes (even relatively modest memory allocation + during the change detection cycle can result in GC pauses for some of the CD cycles). + The algorithm works by iterating over the set of bound classes, staring with [class] binding and + then going over [ngClass] binding. For each CSS class name: + - check if it was seen before (this information is tracked in the state map) and if its value + changed; + - mark it as "touched" - names that are not marked are not present in the latest set of binding + and we can remove such class name from the internal data structures; + After iteration over all the CSS class names we've got data structure with all the information + necessary to synchronize changes to the DOM - it is enough to iterate over the state map, flush + changes to the DOM and reset internal data structures so those are ready for the next change + detection cycle. + */ + ngDoCheck() { + // classes from the [class] binding + for (const klass of this.initialClasses) { + this._updateState(klass, true); + } + // classes from the [ngClass] binding + const rawClass = this.rawClass; + if (Array.isArray(rawClass) || rawClass instanceof Set) { + for (const klass of rawClass) { + this._updateState(klass, true); + } + } else if (rawClass != null) { + for (const klass of Object.keys(rawClass)) { + this._updateState(klass, Boolean(rawClass[klass])); + } + } + this._applyStateDiff(); + } + _updateState(klass, nextEnabled) { + const state = this.stateMap.get(klass); + if (state !== undefined) { + if (state.enabled !== nextEnabled) { + state.changed = true; + state.enabled = nextEnabled; + } + state.touched = true; + } else { + this.stateMap.set(klass, { + enabled: nextEnabled, + changed: true, + touched: true + }); + } + } + _applyStateDiff() { + for (const stateEntry of this.stateMap) { + const klass = stateEntry[0]; + const state = stateEntry[1]; + if (state.changed) { + this._toggleClass(klass, state.enabled); + state.changed = false; + } else if (!state.touched) { + // A class that was previously active got removed from the new collection of classes - + // remove from the DOM as well. + if (state.enabled) { + this._toggleClass(klass, false); + } + this.stateMap.delete(klass); + } + state.touched = false; + } + } + _toggleClass(klass, enabled) { + if (ngDevMode) { + if (typeof klass !== 'string') { + throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(klass)}`); + } + } + klass = klass.trim(); + if (klass.length > 0) { + klass.split(WS_REGEXP).forEach(klass => { + if (enabled) { + this._renderer.addClass(this._ngEl.nativeElement, klass); + } else { + this._renderer.removeClass(this._ngEl.nativeElement, klass); + } + }); + } + } + static #_ = this.ɵfac = function NgClass_Factory(t) { + return new (t || NgClass)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgClass, + selectors: [["", "ngClass", ""]], + inputs: { + klass: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].None, "class", "klass"], + ngClass: "ngClass" + }, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgClass, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngClass]', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2 + }], { + klass: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: ['class'] + }], + ngClass: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: ['ngClass'] + }] + }); +})(); + +/** + * Instantiates a {@link Component} type and inserts its Host View into the current View. + * `NgComponentOutlet` provides a declarative approach for dynamic component creation. + * + * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and + * any existing component will be destroyed. + * + * @usageNotes + * + * ### Fine tune control + * + * You can control the component creation process by using the following optional attributes: + * + * * `ngComponentOutletInputs`: Optional component inputs object, which will be bind to the + * component. + * + * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for + * the Component. Defaults to the injector of the current view container. + * + * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content + * section of the component, if it exists. + * + * * `ngComponentOutletNgModule`: Optional NgModule class reference to allow loading another + * module dynamically, then loading a component from that module. + * + * * `ngComponentOutletNgModuleFactory`: Deprecated config option that allows providing optional + * NgModule factory to allow loading another module dynamically, then loading a component from that + * module. Use `ngComponentOutletNgModule` instead. + * + * ### Syntax + * + * Simple + * ``` + * + * ``` + * + * With inputs + * ``` + * + * + * ``` + * + * Customized injector/content + * ``` + * + * + * ``` + * + * Customized NgModule reference + * ``` + * + * + * ``` + * + * ### A simple example + * + * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'} + * + * A more complete example with additional options: + * + * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'} + * + * @publicApi + * @ngModule CommonModule + */ +class NgComponentOutlet { + constructor(_viewContainerRef) { + this._viewContainerRef = _viewContainerRef; + this.ngComponentOutlet = null; + /** + * A helper data structure that allows us to track inputs that were part of the + * ngComponentOutletInputs expression. Tracking inputs is necessary for proper removal of ones + * that are no longer referenced. + */ + this._inputsUsed = new Map(); + } + _needToReCreateNgModuleInstance(changes) { + // Note: square brackets property accessor is safe for Closure compiler optimizations (the + // `changes` argument of the `ngOnChanges` lifecycle hook retains the names of the fields that + // were changed). + return changes['ngComponentOutletNgModule'] !== undefined || changes['ngComponentOutletNgModuleFactory'] !== undefined; + } + _needToReCreateComponentInstance(changes) { + // Note: square brackets property accessor is safe for Closure compiler optimizations (the + // `changes` argument of the `ngOnChanges` lifecycle hook retains the names of the fields that + // were changed). + return changes['ngComponentOutlet'] !== undefined || changes['ngComponentOutletContent'] !== undefined || changes['ngComponentOutletInjector'] !== undefined || this._needToReCreateNgModuleInstance(changes); + } + /** @nodoc */ + ngOnChanges(changes) { + if (this._needToReCreateComponentInstance(changes)) { + this._viewContainerRef.clear(); + this._inputsUsed.clear(); + this._componentRef = undefined; + if (this.ngComponentOutlet) { + const injector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector; + if (this._needToReCreateNgModuleInstance(changes)) { + this._moduleRef?.destroy(); + if (this.ngComponentOutletNgModule) { + this._moduleRef = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.createNgModule)(this.ngComponentOutletNgModule, getParentInjector(injector)); + } else if (this.ngComponentOutletNgModuleFactory) { + this._moduleRef = this.ngComponentOutletNgModuleFactory.create(getParentInjector(injector)); + } else { + this._moduleRef = undefined; + } + } + this._componentRef = this._viewContainerRef.createComponent(this.ngComponentOutlet, { + injector, + ngModuleRef: this._moduleRef, + projectableNodes: this.ngComponentOutletContent + }); + } + } + } + /** @nodoc */ + ngDoCheck() { + if (this._componentRef) { + if (this.ngComponentOutletInputs) { + for (const inputName of Object.keys(this.ngComponentOutletInputs)) { + this._inputsUsed.set(inputName, true); + } + } + this._applyInputStateDiff(this._componentRef); + } + } + /** @nodoc */ + ngOnDestroy() { + this._moduleRef?.destroy(); + } + _applyInputStateDiff(componentRef) { + for (const [inputName, touched] of this._inputsUsed) { + if (!touched) { + // The input that was previously active no longer exists and needs to be set to undefined. + componentRef.setInput(inputName, undefined); + this._inputsUsed.delete(inputName); + } else { + // Since touched is true, it can be asserted that the inputs object is not empty. + componentRef.setInput(inputName, this.ngComponentOutletInputs[inputName]); + this._inputsUsed.set(inputName, false); + } + } + } + static #_ = this.ɵfac = function NgComponentOutlet_Factory(t) { + return new (t || NgComponentOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgComponentOutlet, + selectors: [["", "ngComponentOutlet", ""]], + inputs: { + ngComponentOutlet: "ngComponentOutlet", + ngComponentOutletInputs: "ngComponentOutletInputs", + ngComponentOutletInjector: "ngComponentOutletInjector", + ngComponentOutletContent: "ngComponentOutletContent", + ngComponentOutletNgModule: "ngComponentOutletNgModule", + ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" + }, + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgComponentOutlet, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngComponentOutlet]', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef + }], { + ngComponentOutlet: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngComponentOutletInputs: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngComponentOutletInjector: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngComponentOutletContent: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngComponentOutletNgModule: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngComponentOutletNgModuleFactory: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); +// Helper function that returns an Injector instance of a parent NgModule. +function getParentInjector(injector) { + const parentNgModule = injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModuleRef); + return parentNgModule.injector; +} + +/** + * @publicApi + */ +class NgForOfContext { + constructor($implicit, ngForOf, index, count) { + this.$implicit = $implicit; + this.ngForOf = ngForOf; + this.index = index; + this.count = count; + } + get first() { + return this.index === 0; + } + get last() { + return this.index === this.count - 1; + } + get even() { + return this.index % 2 === 0; + } + get odd() { + return !this.even; + } +} +/** + * A [structural directive](guide/structural-directives) that renders + * a template for each item in a collection. + * The directive is placed on an element, which becomes the parent + * of the cloned templates. + * + * The `ngForOf` directive is generally used in the + * [shorthand form](guide/structural-directives#asterisk) `*ngFor`. + * In this form, the template to be rendered for each iteration is the content + * of an anchor element containing the directive. + * + * The following example shows the shorthand syntax with some options, + * contained in an `
  • ` element. + * + * ``` + *
  • ...
  • + * ``` + * + * The shorthand form expands into a long form that uses the `ngForOf` selector + * on an `` element. + * The content of the `` element is the `
  • ` element that held the + * short-form directive. + * + * Here is the expanded version of the short-form example. + * + * ``` + * + *
  • ...
  • + *
    + * ``` + * + * Angular automatically expands the shorthand syntax as it compiles the template. + * The context for each embedded view is logically merged to the current component + * context according to its lexical position. + * + * When using the shorthand syntax, Angular allows only [one structural directive + * on an element](guide/structural-directives#one-per-element). + * If you want to iterate conditionally, for example, + * put the `*ngIf` on a container element that wraps the `*ngFor` element. + * For further discussion, see + * [Structural Directives](guide/structural-directives#one-per-element). + * + * @usageNotes + * + * ### Local variables + * + * `NgForOf` provides exported values that can be aliased to local variables. + * For example: + * + * ``` + *
  • + * {{i}}/{{users.length}}. {{user}} default + *
  • + * ``` + * + * The following exported values can be aliased to local variables: + * + * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`). + * - `ngForOf: NgIterable`: The value of the iterable expression. Useful when the expression is + * more complex then a property access, for example when using the async pipe (`userStreams | + * async`). + * - `index: number`: The index of the current item in the iterable. + * - `count: number`: The length of the iterable. + * - `first: boolean`: True when the item is the first item in the iterable. + * - `last: boolean`: True when the item is the last item in the iterable. + * - `even: boolean`: True when the item has an even index in the iterable. + * - `odd: boolean`: True when the item has an odd index in the iterable. + * + * ### Change propagation + * + * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM: + * + * * When an item is added, a new instance of the template is added to the DOM. + * * When an item is removed, its template instance is removed from the DOM. + * * When items are reordered, their respective templates are reordered in the DOM. + * + * Angular uses object identity to track insertions and deletions within the iterator and reproduce + * those changes in the DOM. This has important implications for animations and any stateful + * controls that are present, such as `` elements that accept user input. Inserted rows can + * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state + * such as user input. + * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers). + * + * The identities of elements in the iterator can change while the data does not. + * This can happen, for example, if the iterator is produced from an RPC to the server, and that + * RPC is re-run. Even if the data hasn't changed, the second response produces objects with + * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old + * elements were deleted and all new elements inserted). + * + * To avoid this expensive operation, you can customize the default tracking algorithm. + * by supplying the `trackBy` option to `NgForOf`. + * `trackBy` takes a function that has two arguments: `index` and `item`. + * If `trackBy` is given, Angular tracks changes by the return value of the function. + * + * @see [Structural Directives](guide/structural-directives) + * @ngModule CommonModule + * @publicApi + */ +class NgForOf { + /** + * The value of the iterable expression, which can be used as a + * [template input variable](guide/structural-directives#shorthand). + */ + set ngForOf(ngForOf) { + this._ngForOf = ngForOf; + this._ngForOfDirty = true; + } + /** + * Specifies a custom `TrackByFunction` to compute the identity of items in an iterable. + * + * If a custom `TrackByFunction` is not provided, `NgForOf` will use the item's [object + * identity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) + * as the key. + * + * `NgForOf` uses the computed key to associate items in an iterable with DOM elements + * it produces for these items. + * + * A custom `TrackByFunction` is useful to provide good user experience in cases when items in an + * iterable rendered using `NgForOf` have a natural identifier (for example, custom ID or a + * primary key), and this iterable could be updated with new object instances that still + * represent the same underlying entity (for example, when data is re-fetched from the server, + * and the iterable is recreated and re-rendered, but most of the data is still the same). + * + * @see {@link TrackByFunction} + */ + set ngForTrackBy(fn) { + if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') { + console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` + `See https://angular.io/api/common/NgForOf#change-propagation for more information.`); + } + this._trackByFn = fn; + } + get ngForTrackBy() { + return this._trackByFn; + } + constructor(_viewContainer, _template, _differs) { + this._viewContainer = _viewContainer; + this._template = _template; + this._differs = _differs; + this._ngForOf = null; + this._ngForOfDirty = true; + this._differ = null; + } + /** + * A reference to the template that is stamped out for each item in the iterable. + * @see [template reference variable](guide/template-reference-variables) + */ + set ngForTemplate(value) { + // TODO(TS2.1): make TemplateRef>> once we move to TS v2.1 + // The current type is too restrictive; a template that just uses index, for example, + // should be acceptable. + if (value) { + this._template = value; + } + } + /** + * Applies the changes when needed. + * @nodoc + */ + ngDoCheck() { + if (this._ngForOfDirty) { + this._ngForOfDirty = false; + // React on ngForOf changes only once all inputs have been initialized + const value = this._ngForOf; + if (!this._differ && value) { + if (typeof ngDevMode === 'undefined' || ngDevMode) { + try { + // CAUTION: this logic is duplicated for production mode below, as the try-catch + // is only present in development builds. + this._differ = this._differs.find(value).create(this.ngForTrackBy); + } catch { + let errorMessage = `Cannot find a differ supporting object '${value}' of type '` + `${getTypeName(value)}'. NgFor only supports binding to Iterables, such as Arrays.`; + if (typeof value === 'object') { + errorMessage += ' Did you mean to use the keyvalue pipe?'; + } + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](-2200 /* RuntimeErrorCode.NG_FOR_MISSING_DIFFER */, errorMessage); + } + } else { + // CAUTION: this logic is duplicated for development mode above, as the try-catch + // is only present in development builds. + this._differ = this._differs.find(value).create(this.ngForTrackBy); + } + } + } + if (this._differ) { + const changes = this._differ.diff(this._ngForOf); + if (changes) this._applyChanges(changes); + } + } + _applyChanges(changes) { + const viewContainer = this._viewContainer; + changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => { + if (item.previousIndex == null) { + // NgForOf is never "null" or "undefined" here because the differ detected + // that a new item needs to be inserted from the iterable. This implies that + // there is an iterable value for "_ngForOf". + viewContainer.createEmbeddedView(this._template, new NgForOfContext(item.item, this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex); + } else if (currentIndex == null) { + viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex); + } else if (adjustedPreviousIndex !== null) { + const view = viewContainer.get(adjustedPreviousIndex); + viewContainer.move(view, currentIndex); + applyViewChange(view, item); + } + }); + for (let i = 0, ilen = viewContainer.length; i < ilen; i++) { + const viewRef = viewContainer.get(i); + const context = viewRef.context; + context.index = i; + context.count = ilen; + context.ngForOf = this._ngForOf; + } + changes.forEachIdentityChange(record => { + const viewRef = viewContainer.get(record.currentIndex); + applyViewChange(viewRef, record); + }); + } + /** + * Asserts the correct type of the context for the template that `NgForOf` will render. + * + * The presence of this method is a signal to the Ivy template type-check compiler that the + * `NgForOf` structural directive renders its template with a specific context type. + */ + static ngTemplateContextGuard(dir, ctx) { + return true; + } + static #_ = this.ɵfac = function NgForOf_Factory(t) { + return new (t || NgForOf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.IterableDiffers)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgForOf, + selectors: [["", "ngFor", "", "ngForOf", ""]], + inputs: { + ngForOf: "ngForOf", + ngForTrackBy: "ngForTrackBy", + ngForTemplate: "ngForTemplate" + }, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgForOf, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngFor][ngForOf]', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.IterableDiffers + }], { + ngForOf: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngForTrackBy: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngForTemplate: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); +function applyViewChange(view, record) { + view.context.$implicit = record.item; +} +function getTypeName(type) { + return type['name'] || typeof type; +} + +/** + * A structural directive that conditionally includes a template based on the value of + * an expression coerced to Boolean. + * When the expression evaluates to true, Angular renders the template + * provided in a `then` clause, and when false or null, + * Angular renders the template provided in an optional `else` clause. The default + * template for the `else` clause is blank. + * + * A [shorthand form](guide/structural-directives#asterisk) of the directive, + * `*ngIf="condition"`, is generally used, provided + * as an attribute of the anchor element for the inserted template. + * Angular expands this into a more explicit version, in which the anchor element + * is contained in an `` element. + * + * Simple form with shorthand syntax: + * + * ``` + *
    Content to render when condition is true.
    + * ``` + * + * Simple form with expanded syntax: + * + * ``` + *
    Content to render when condition is + * true.
    + * ``` + * + * Form with an "else" block: + * + * ``` + *
    Content to render when condition is true.
    + * Content to render when condition is false. + * ``` + * + * Shorthand form with "then" and "else" blocks: + * + * ``` + *
    + * Content to render when condition is true. + * Content to render when condition is false. + * ``` + * + * Form with storing the value locally: + * + * ``` + *
    {{value}}
    + * Content to render when value is null. + * ``` + * + * @usageNotes + * + * The `*ngIf` directive is most commonly used to conditionally show an inline template, + * as seen in the following example. + * The default `else` template is blank. + * + * {@example common/ngIf/ts/module.ts region='NgIfSimple'} + * + * ### Showing an alternative template using `else` + * + * To display a template when `expression` evaluates to false, use an `else` template + * binding as shown in the following example. + * The `else` binding points to an `` element labeled `#elseBlock`. + * The template can be defined anywhere in the component view, but is typically placed right after + * `ngIf` for readability. + * + * {@example common/ngIf/ts/module.ts region='NgIfElse'} + * + * ### Using an external `then` template + * + * In the previous example, the then-clause template is specified inline, as the content of the + * tag that contains the `ngIf` directive. You can also specify a template that is defined + * externally, by referencing a labeled `` element. When you do this, you can + * change which template to use at runtime, as shown in the following example. + * + * {@example common/ngIf/ts/module.ts region='NgIfThenElse'} + * + * ### Storing a conditional result in a variable + * + * You might want to show a set of properties from the same object. If you are waiting + * for asynchronous data, the object can be undefined. + * In this case, you can use `ngIf` and store the result of the condition in a local + * variable as shown in the following example. + * + * {@example common/ngIf/ts/module.ts region='NgIfAs'} + * + * This code uses only one `AsyncPipe`, so only one subscription is created. + * The conditional statement stores the result of `userStream|async` in the local variable `user`. + * You can then bind the local `user` repeatedly. + * + * The conditional displays the data only if `userStream` returns a value, + * so you don't need to use the + * safe-navigation-operator (`?.`) + * to guard against null values when accessing properties. + * You can display an alternative template while waiting for the data. + * + * ### Shorthand syntax + * + * The shorthand syntax `*ngIf` expands into two separate template specifications + * for the "then" and "else" clauses. For example, consider the following shorthand statement, + * that is meant to show a loading page while waiting for data to be loaded. + * + * ``` + *
    + * ... + *
    + * + * + *
    Loading...
    + *
    + * ``` + * + * You can see that the "else" clause references the `` + * with the `#loading` label, and the template for the "then" clause + * is provided as the content of the anchor element. + * + * However, when Angular expands the shorthand syntax, it creates + * another `` tag, with `ngIf` and `ngIfElse` directives. + * The anchor element containing the template for the "then" clause becomes + * the content of this unlabeled `` tag. + * + * ``` + * + *
    + * ... + *
    + *
    + * + * + *
    Loading...
    + *
    + * ``` + * + * The presence of the implicit template object has implications for the nesting of + * structural directives. For more on this subject, see + * [Structural Directives](guide/structural-directives#one-per-element). + * + * @ngModule CommonModule + * @publicApi + */ +class NgIf { + constructor(_viewContainer, templateRef) { + this._viewContainer = _viewContainer; + this._context = new NgIfContext(); + this._thenTemplateRef = null; + this._elseTemplateRef = null; + this._thenViewRef = null; + this._elseViewRef = null; + this._thenTemplateRef = templateRef; + } + /** + * The Boolean expression to evaluate as the condition for showing a template. + */ + set ngIf(condition) { + this._context.$implicit = this._context.ngIf = condition; + this._updateView(); + } + /** + * A template to show if the condition expression evaluates to true. + */ + set ngIfThen(templateRef) { + assertTemplate('ngIfThen', templateRef); + this._thenTemplateRef = templateRef; + this._thenViewRef = null; // clear previous view if any. + this._updateView(); + } + /** + * A template to show if the condition expression evaluates to false. + */ + set ngIfElse(templateRef) { + assertTemplate('ngIfElse', templateRef); + this._elseTemplateRef = templateRef; + this._elseViewRef = null; // clear previous view if any. + this._updateView(); + } + _updateView() { + if (this._context.$implicit) { + if (!this._thenViewRef) { + this._viewContainer.clear(); + this._elseViewRef = null; + if (this._thenTemplateRef) { + this._thenViewRef = this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context); + } + } + } else { + if (!this._elseViewRef) { + this._viewContainer.clear(); + this._thenViewRef = null; + if (this._elseTemplateRef) { + this._elseViewRef = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context); + } + } + } + } + /** + * Asserts the correct type of the context for the template that `NgIf` will render. + * + * The presence of this method is a signal to the Ivy template type-check compiler that the + * `NgIf` structural directive renders its template with a specific context type. + */ + static ngTemplateContextGuard(dir, ctx) { + return true; + } + static #_ = this.ɵfac = function NgIf_Factory(t) { + return new (t || NgIf)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgIf, + selectors: [["", "ngIf", ""]], + inputs: { + ngIf: "ngIf", + ngIfThen: "ngIfThen", + ngIfElse: "ngIfElse" + }, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgIf, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngIf]', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef + }], { + ngIf: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngIfThen: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngIfElse: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); +/** + * @publicApi + */ +class NgIfContext { + constructor() { + this.$implicit = null; + this.ngIf = null; + } +} +function assertTemplate(property, templateRef) { + const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView); + if (!isTemplateRefOrNull) { + throw new Error(`${property} must be a TemplateRef, but received '${(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(templateRef)}'.`); + } +} + +/** + * A constant indicating a type of comparison that NgSwitch uses to match cases. Extracted to a + * separate file to facilitate G3 patches. + */ +const NG_SWITCH_USE_STRICT_EQUALS = true; +class SwitchView { + constructor(_viewContainerRef, _templateRef) { + this._viewContainerRef = _viewContainerRef; + this._templateRef = _templateRef; + this._created = false; + } + create() { + this._created = true; + this._viewContainerRef.createEmbeddedView(this._templateRef); + } + destroy() { + this._created = false; + this._viewContainerRef.clear(); + } + enforceState(created) { + if (created && !this._created) { + this.create(); + } else if (!created && this._created) { + this.destroy(); + } + } +} +/** + * @ngModule CommonModule + * + * @description + * The `[ngSwitch]` directive on a container specifies an expression to match against. + * The expressions to match are provided by `ngSwitchCase` directives on views within the container. + * - Every view that matches is rendered. + * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered. + * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase` + * or `ngSwitchDefault` directive are preserved at the location. + * + * @usageNotes + * Define a container element for the directive, and specify the switch expression + * to match against as an attribute: + * + * ``` + * + * ``` + * + * Within the container, `*ngSwitchCase` statements specify the match expressions + * as attributes. Include `*ngSwitchDefault` as the final case. + * + * ``` + * + * ... + * ... + * ... + * + * ``` + * + * ### Usage Examples + * + * The following example shows how to use more than one case to display the same view: + * + * ``` + * + * + * ... + * ... + * ... + * + * ... + * + * ``` + * + * The following example shows how cases can be nested: + * ``` + * + * ... + * ... + * ... + * + * + * + * + * + * ... + * + * ``` + * + * @publicApi + * @see {@link NgSwitchCase} + * @see {@link NgSwitchDefault} + * @see [Structural Directives](guide/structural-directives) + * + */ +class NgSwitch { + constructor() { + this._defaultViews = []; + this._defaultUsed = false; + this._caseCount = 0; + this._lastCaseCheckIndex = 0; + this._lastCasesMatched = false; + } + set ngSwitch(newValue) { + this._ngSwitch = newValue; + if (this._caseCount === 0) { + this._updateDefaultCases(true); + } + } + /** @internal */ + _addCase() { + return this._caseCount++; + } + /** @internal */ + _addDefault(view) { + this._defaultViews.push(view); + } + /** @internal */ + _matchCase(value) { + const matched = NG_SWITCH_USE_STRICT_EQUALS ? value === this._ngSwitch : value == this._ngSwitch; + if ((typeof ngDevMode === 'undefined' || ngDevMode) && matched !== (value == this._ngSwitch)) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2001 /* RuntimeErrorCode.EQUALITY_NG_SWITCH_DIFFERENCE */, 'As of Angular v17 the NgSwitch directive uses strict equality comparison === instead of == to match different cases. ' + `Previously the case value "${stringifyValue(value)}" matched switch expression value "${stringifyValue(this._ngSwitch)}", but this is no longer the case with the stricter equality check. ` + 'Your comparison results return different results using === vs. == and you should adjust your ngSwitch expression and / or values to conform with the strict equality requirements.')); + } + this._lastCasesMatched ||= matched; + this._lastCaseCheckIndex++; + if (this._lastCaseCheckIndex === this._caseCount) { + this._updateDefaultCases(!this._lastCasesMatched); + this._lastCaseCheckIndex = 0; + this._lastCasesMatched = false; + } + return matched; + } + _updateDefaultCases(useDefault) { + if (this._defaultViews.length > 0 && useDefault !== this._defaultUsed) { + this._defaultUsed = useDefault; + for (const defaultView of this._defaultViews) { + defaultView.enforceState(useDefault); + } + } + } + static #_ = this.ɵfac = function NgSwitch_Factory(t) { + return new (t || NgSwitch)(); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgSwitch, + selectors: [["", "ngSwitch", ""]], + inputs: { + ngSwitch: "ngSwitch" + }, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitch, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngSwitch]', + standalone: true + }] + }], null, { + ngSwitch: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); +/** + * @ngModule CommonModule + * + * @description + * Provides a switch case expression to match against an enclosing `ngSwitch` expression. + * When the expressions match, the given `NgSwitchCase` template is rendered. + * If multiple match expressions match the switch expression value, all of them are displayed. + * + * @usageNotes + * + * Within a switch container, `*ngSwitchCase` statements specify the match expressions + * as attributes. Include `*ngSwitchDefault` as the final case. + * + * ``` + * + * ... + * ... + * ... + * + * ``` + * + * Each switch-case statement contains an in-line HTML template or template reference + * that defines the subtree to be selected if the value of the match expression + * matches the value of the switch expression. + * + * As of Angular v17 the NgSwitch directive uses strict equality comparison (`===`) instead of + * loose equality (`==`) to match different cases. + * + * @publicApi + * @see {@link NgSwitch} + * @see {@link NgSwitchDefault} + * + */ +class NgSwitchCase { + constructor(viewContainer, templateRef, ngSwitch) { + this.ngSwitch = ngSwitch; + if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) { + throwNgSwitchProviderNotFoundError('ngSwitchCase', 'NgSwitchCase'); + } + ngSwitch._addCase(); + this._view = new SwitchView(viewContainer, templateRef); + } + /** + * Performs case matching. For internal use only. + * @nodoc + */ + ngDoCheck() { + this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase)); + } + static #_ = this.ɵfac = function NgSwitchCase_Factory(t) { + return new (t || NgSwitchCase)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSwitch, 9)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgSwitchCase, + selectors: [["", "ngSwitchCase", ""]], + inputs: { + ngSwitchCase: "ngSwitchCase" + }, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitchCase, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngSwitchCase]', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef + }, { + type: NgSwitch, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Host + }] + }], { + ngSwitchCase: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); +/** + * @ngModule CommonModule + * + * @description + * + * Creates a view that is rendered when no `NgSwitchCase` expressions + * match the `NgSwitch` expression. + * This statement should be the final case in an `NgSwitch`. + * + * @publicApi + * @see {@link NgSwitch} + * @see {@link NgSwitchCase} + * + */ +class NgSwitchDefault { + constructor(viewContainer, templateRef, ngSwitch) { + if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) { + throwNgSwitchProviderNotFoundError('ngSwitchDefault', 'NgSwitchDefault'); + } + ngSwitch._addDefault(new SwitchView(viewContainer, templateRef)); + } + static #_ = this.ɵfac = function NgSwitchDefault_Factory(t) { + return new (t || NgSwitchDefault)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgSwitch, 9)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgSwitchDefault, + selectors: [["", "ngSwitchDefault", ""]], + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgSwitchDefault, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngSwitchDefault]', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef + }, { + type: NgSwitch, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Host + }] + }], null); +})(); +function throwNgSwitchProviderNotFoundError(attrName, directiveName) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2000 /* RuntimeErrorCode.PARENT_NG_SWITCH_NOT_FOUND */, `An element with the "${attrName}" attribute ` + `(matching the "${directiveName}" directive) must be located inside an element with the "ngSwitch" attribute ` + `(matching "NgSwitch" directive)`); +} +function stringifyValue(value) { + return typeof value === 'string' ? `'${value}'` : String(value); +} + +/** + * @ngModule CommonModule + * + * @usageNotes + * ``` + * + * there is nothing + * there is one + * there are a few + * + * ``` + * + * @description + * + * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization. + * + * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees + * that match the switch expression's pluralization category. + * + * To use this directive you must provide a container element that sets the `[ngPlural]` attribute + * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their + * expression: + * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value + * matches the switch expression exactly, + * - otherwise, the view will be treated as a "category match", and will only display if exact + * value matches aren't found and the value maps to its category for the defined locale. + * + * See http://cldr.unicode.org/index/cldr-spec/plural-rules + * + * @publicApi + */ +class NgPlural { + constructor(_localization) { + this._localization = _localization; + this._caseViews = {}; + } + set ngPlural(value) { + this._updateView(value); + } + addCase(value, switchView) { + this._caseViews[value] = switchView; + } + _updateView(switchValue) { + this._clearViews(); + const cases = Object.keys(this._caseViews); + const key = getPluralCategory(switchValue, cases, this._localization); + this._activateView(this._caseViews[key]); + } + _clearViews() { + if (this._activeView) this._activeView.destroy(); + } + _activateView(view) { + if (view) { + this._activeView = view; + this._activeView.create(); + } + } + static #_ = this.ɵfac = function NgPlural_Factory(t) { + return new (t || NgPlural)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgLocalization)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgPlural, + selectors: [["", "ngPlural", ""]], + inputs: { + ngPlural: "ngPlural" + }, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgPlural, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngPlural]', + standalone: true + }] + }], () => [{ + type: NgLocalization + }], { + ngPlural: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); +/** + * @ngModule CommonModule + * + * @description + * + * Creates a view that will be added/removed from the parent {@link NgPlural} when the + * given expression matches the plural expression according to CLDR rules. + * + * @usageNotes + * ``` + * + * ... + * ... + * + *``` + * + * See {@link NgPlural} for more details and example. + * + * @publicApi + */ +class NgPluralCase { + constructor(value, template, viewContainer, ngPlural) { + this.value = value; + const isANumber = !isNaN(Number(value)); + ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template)); + } + static #_ = this.ɵfac = function NgPluralCase_Factory(t) { + return new (t || NgPluralCase)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinjectAttribute"]('ngPluralCase'), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgPlural, 1)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgPluralCase, + selectors: [["", "ngPluralCase", ""]], + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgPluralCase, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngPluralCase]', + standalone: true + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Attribute, + args: ['ngPluralCase'] + }] + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.TemplateRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef + }, { + type: NgPlural, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Host + }] + }], null); +})(); + +/** + * @ngModule CommonModule + * + * @usageNotes + * + * Set the font of the containing element to the result of an expression. + * + * ``` + * ... + * ``` + * + * Set the width of the containing element to a pixel value returned by an expression. + * + * ``` + * ... + * ``` + * + * Set a collection of style values using an expression that returns key-value pairs. + * + * ``` + * ... + * ``` + * + * @description + * + * An attribute directive that updates styles for the containing HTML element. + * Sets one or more style properties, specified as colon-separated key-value pairs. + * The key is a style name, with an optional `.` suffix + * (such as 'top.px', 'font-style.em'). + * The value is an expression to be evaluated. + * The resulting non-null value, expressed in the given unit, + * is assigned to the given style property. + * If the result of evaluation is null, the corresponding style is removed. + * + * @publicApi + */ +class NgStyle { + constructor(_ngEl, _differs, _renderer) { + this._ngEl = _ngEl; + this._differs = _differs; + this._renderer = _renderer; + this._ngStyle = null; + this._differ = null; + } + set ngStyle(values) { + this._ngStyle = values; + if (!this._differ && values) { + this._differ = this._differs.find(values).create(); + } + } + ngDoCheck() { + if (this._differ) { + const changes = this._differ.diff(this._ngStyle); + if (changes) { + this._applyChanges(changes); + } + } + } + _setStyle(nameAndUnit, value) { + const [name, unit] = nameAndUnit.split('.'); + const flags = name.indexOf('-') === -1 ? undefined : _angular_core__WEBPACK_IMPORTED_MODULE_0__.RendererStyleFlags2.DashCase; + if (value != null) { + this._renderer.setStyle(this._ngEl.nativeElement, name, unit ? `${value}${unit}` : value, flags); + } else { + this._renderer.removeStyle(this._ngEl.nativeElement, name, flags); + } + } + _applyChanges(changes) { + changes.forEachRemovedItem(record => this._setStyle(record.key, null)); + changes.forEachAddedItem(record => this._setStyle(record.key, record.currentValue)); + changes.forEachChangedItem(record => this._setStyle(record.key, record.currentValue)); + } + static #_ = this.ɵfac = function NgStyle_Factory(t) { + return new (t || NgStyle)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.KeyValueDiffers), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgStyle, + selectors: [["", "ngStyle", ""]], + inputs: { + ngStyle: "ngStyle" + }, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgStyle, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngStyle]', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.KeyValueDiffers + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2 + }], { + ngStyle: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: ['ngStyle'] + }] + }); +})(); + +/** + * @ngModule CommonModule + * + * @description + * + * Inserts an embedded view from a prepared `TemplateRef`. + * + * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`. + * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding + * by the local template `let` declarations. + * + * @usageNotes + * ``` + * + * ``` + * + * Using the key `$implicit` in the context object will set its value as default. + * + * ### Example + * + * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'} + * + * @publicApi + */ +class NgTemplateOutlet { + constructor(_viewContainerRef) { + this._viewContainerRef = _viewContainerRef; + this._viewRef = null; + /** + * A context object to attach to the {@link EmbeddedViewRef}. This should be an + * object, the object's keys will be available for binding by the local template `let` + * declarations. + * Using the key `$implicit` in the context object will set its value as default. + */ + this.ngTemplateOutletContext = null; + /** + * A string defining the template reference and optionally the context object for the template. + */ + this.ngTemplateOutlet = null; + /** Injector to be used within the embedded view. */ + this.ngTemplateOutletInjector = null; + } + ngOnChanges(changes) { + if (this._shouldRecreateView(changes)) { + const viewContainerRef = this._viewContainerRef; + if (this._viewRef) { + viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef)); + } + // If there is no outlet, clear the destroyed view ref. + if (!this.ngTemplateOutlet) { + this._viewRef = null; + return; + } + // Create a context forward `Proxy` that will always bind to the user-specified context, + // without having to destroy and re-create views whenever the context changes. + const viewContext = this._createContextForwardProxy(); + this._viewRef = viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, viewContext, { + injector: this.ngTemplateOutletInjector ?? undefined + }); + } + } + /** + * We need to re-create existing embedded view if either is true: + * - the outlet changed. + * - the injector changed. + */ + _shouldRecreateView(changes) { + return !!changes['ngTemplateOutlet'] || !!changes['ngTemplateOutletInjector']; + } + /** + * For a given outlet instance, we create a proxy object that delegates + * to the user-specified context. This allows changing, or swapping out + * the context object completely without having to destroy/re-create the view. + */ + _createContextForwardProxy() { + return new Proxy({}, { + set: (_target, prop, newValue) => { + if (!this.ngTemplateOutletContext) { + return false; + } + return Reflect.set(this.ngTemplateOutletContext, prop, newValue); + }, + get: (_target, prop, receiver) => { + if (!this.ngTemplateOutletContext) { + return undefined; + } + return Reflect.get(this.ngTemplateOutletContext, prop, receiver); + } + }); + } + static #_ = this.ɵfac = function NgTemplateOutlet_Factory(t) { + return new (t || NgTemplateOutlet)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef)); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgTemplateOutlet, + selectors: [["", "ngTemplateOutlet", ""]], + inputs: { + ngTemplateOutletContext: "ngTemplateOutletContext", + ngTemplateOutlet: "ngTemplateOutlet", + ngTemplateOutletInjector: "ngTemplateOutletInjector" + }, + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgTemplateOutlet, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + selector: '[ngTemplateOutlet]', + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ViewContainerRef + }], { + ngTemplateOutletContext: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngTemplateOutlet: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + ngTemplateOutletInjector: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); + +/** + * A collection of Angular directives that are likely to be used in each and every Angular + * application. + */ +const COMMON_DIRECTIVES = [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase]; +function invalidPipeArgumentError(type, value) { + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2100 /* RuntimeErrorCode.INVALID_PIPE_ARGUMENT */, ngDevMode && `InvalidPipeArgument: '${value}' for pipe '${(0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵstringify"])(type)}'`); +} +class SubscribableStrategy { + createSubscription(async, updateLatestValue) { + // Subscription can be side-effectful, and we don't want any signal reads which happen in the + // side effect of the subscription to be tracked by a component's template when that + // subscription is triggered via the async pipe. So we wrap the subscription in `untracked` to + // decouple from the current reactive context. + // + // `untracked` also prevents signal _writes_ which happen in the subscription side effect from + // being treated as signal writes during the template evaluation (which throws errors). + return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.untracked)(() => async.subscribe({ + next: updateLatestValue, + error: e => { + throw e; + } + })); + } + dispose(subscription) { + // See the comment in `createSubscription` above on the use of `untracked`. + (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.untracked)(() => subscription.unsubscribe()); + } +} +class PromiseStrategy { + createSubscription(async, updateLatestValue) { + return async.then(updateLatestValue, e => { + throw e; + }); + } + dispose(subscription) {} +} +const _promiseStrategy = new PromiseStrategy(); +const _subscribableStrategy = new SubscribableStrategy(); +/** + * @ngModule CommonModule + * @description + * + * Unwraps a value from an asynchronous primitive. + * + * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has + * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for + * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid + * potential memory leaks. When the reference of the expression changes, the `async` pipe + * automatically unsubscribes from the old `Observable` or `Promise` and subscribes to the new one. + * + * @usageNotes + * + * ### Examples + * + * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the + * promise. + * + * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'} + * + * It's also possible to use `async` with Observables. The example below binds the `time` Observable + * to the view. The Observable continuously updates the view with the current time. + * + * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'} + * + * @publicApi + */ +class AsyncPipe { + constructor(ref) { + this._latestValue = null; + this.markForCheckOnValueUpdate = true; + this._subscription = null; + this._obj = null; + this._strategy = null; + // Assign `ref` into `this._ref` manually instead of declaring `_ref` in the constructor + // parameter list, as the type of `this._ref` includes `null` unlike the type of `ref`. + this._ref = ref; + } + ngOnDestroy() { + if (this._subscription) { + this._dispose(); + } + // Clear the `ChangeDetectorRef` and its association with the view data, to mitigate + // potential memory leaks in Observables that could otherwise cause the view data to + // be retained. + // https://github.com/angular/angular/issues/17624 + this._ref = null; + } + transform(obj) { + if (!this._obj) { + if (obj) { + try { + // Only call `markForCheck` if the value is updated asynchronously. + // Synchronous updates _during_ subscription should not wastefully mark for check - + // this value is already going to be returned from the transform function. + this.markForCheckOnValueUpdate = false; + this._subscribe(obj); + } finally { + this.markForCheckOnValueUpdate = true; + } + } + return this._latestValue; + } + if (obj !== this._obj) { + this._dispose(); + return this.transform(obj); + } + return this._latestValue; + } + _subscribe(obj) { + this._obj = obj; + this._strategy = this._selectStrategy(obj); + this._subscription = this._strategy.createSubscription(obj, value => this._updateLatestValue(obj, value)); + } + _selectStrategy(obj) { + if ((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisPromise"])(obj)) { + return _promiseStrategy; + } + if ((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵisSubscribable"])(obj)) { + return _subscribableStrategy; + } + throw invalidPipeArgumentError(AsyncPipe, obj); + } + _dispose() { + // Note: `dispose` is only called if a subscription has been initialized before, indicating + // that `this._strategy` is also available. + this._strategy.dispose(this._subscription); + this._latestValue = null; + this._subscription = null; + this._obj = null; + } + _updateLatestValue(async, value) { + if (async === this._obj) { + this._latestValue = value; + if (this.markForCheckOnValueUpdate) { + this._ref?.markForCheck(); + } + } + } + static #_ = this.ɵfac = function AsyncPipe_Factory(t) { + return new (t || AsyncPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef, 16)); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "async", + type: AsyncPipe, + pure: false, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](AsyncPipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'async', + pure: false, + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef + }], null); +})(); + +/** + * Transforms text to all lower case. + * + * @see {@link UpperCasePipe} + * @see {@link TitleCasePipe} + * @usageNotes + * + * The following example defines a view that allows the user to enter + * text, and then uses the pipe to convert the input text to all lower case. + * + * + * + * @ngModule CommonModule + * @publicApi + */ +class LowerCasePipe { + transform(value) { + if (value == null) return null; + if (typeof value !== 'string') { + throw invalidPipeArgumentError(LowerCasePipe, value); + } + return value.toLowerCase(); + } + static #_ = this.ɵfac = function LowerCasePipe_Factory(t) { + return new (t || LowerCasePipe)(); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "lowercase", + type: LowerCasePipe, + pure: true, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LowerCasePipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'lowercase', + standalone: true + }] + }], null, null); +})(); +// +// Regex below matches any Unicode word and number compatible with ES5. In ES2018 the same result +// can be achieved by using /[0-9\p{L}]\S*/gu and also known as Unicode Property Escapes +// (https://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no +// transpilation of this functionality down to ES5 without external tool, the only solution is +// to use already transpiled form. Example can be found here - +// https://mothereff.in/regexpu#input=var+regex+%3D+%2F%5B0-9%5Cp%7BL%7D%5D%5CS*%2Fgu%3B%0A%0A&unicodePropertyEscape=1 +// +const unicodeWordMatch = /(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71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D8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g; +/** + * Transforms text to title case. + * Capitalizes the first letter of each word and transforms the + * rest of the word to lower case. + * Words are delimited by any whitespace character, such as a space, tab, or line-feed character. + * + * @see {@link LowerCasePipe} + * @see {@link UpperCasePipe} + * + * @usageNotes + * The following example shows the result of transforming various strings into title case. + * + * + * + * @ngModule CommonModule + * @publicApi + */ +class TitleCasePipe { + transform(value) { + if (value == null) return null; + if (typeof value !== 'string') { + throw invalidPipeArgumentError(TitleCasePipe, value); + } + return value.replace(unicodeWordMatch, txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase()); + } + static #_ = this.ɵfac = function TitleCasePipe_Factory(t) { + return new (t || TitleCasePipe)(); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "titlecase", + type: TitleCasePipe, + pure: true, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](TitleCasePipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'titlecase', + standalone: true + }] + }], null, null); +})(); +/** + * Transforms text to all upper case. + * @see {@link LowerCasePipe} + * @see {@link TitleCasePipe} + * + * @ngModule CommonModule + * @publicApi + */ +class UpperCasePipe { + transform(value) { + if (value == null) return null; + if (typeof value !== 'string') { + throw invalidPipeArgumentError(UpperCasePipe, value); + } + return value.toUpperCase(); + } + static #_ = this.ɵfac = function UpperCasePipe_Factory(t) { + return new (t || UpperCasePipe)(); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "uppercase", + type: UpperCasePipe, + pure: true, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](UpperCasePipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'uppercase', + standalone: true + }] + }], null, null); +})(); + +/** + * The default date format of Angular date pipe, which corresponds to the following format: + * `'MMM d,y'` (e.g. `Jun 15, 2015`) + */ +const DEFAULT_DATE_FORMAT = 'mediumDate'; + +/** + * Optionally-provided default timezone to use for all instances of `DatePipe` (such as `'+0430'`). + * If the value isn't provided, the `DatePipe` will use the end-user's local system timezone. + * + * @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe + */ +const DATE_PIPE_DEFAULT_TIMEZONE = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken(ngDevMode ? 'DATE_PIPE_DEFAULT_TIMEZONE' : ''); +/** + * DI token that allows to provide default configuration for the `DatePipe` instances in an + * application. The value is an object which can include the following fields: + * - `dateFormat`: configures the default date format. If not provided, the `DatePipe` + * will use the 'mediumDate' as a value. + * - `timezone`: configures the default timezone. If not provided, the `DatePipe` will + * use the end-user's local system timezone. + * + * @see {@link DatePipeConfig} + * + * @usageNotes + * + * Various date pipe default values can be overwritten by providing this token with + * the value that has this interface. + * + * For example: + * + * Override the default date format by providing a value using the token: + * ```typescript + * providers: [ + * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {dateFormat: 'shortDate'}} + * ] + * ``` + * + * Override the default timezone by providing a value using the token: + * ```typescript + * providers: [ + * {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {timezone: '-1200'}} + * ] + * ``` + */ +const DATE_PIPE_DEFAULT_OPTIONS = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken(ngDevMode ? 'DATE_PIPE_DEFAULT_OPTIONS' : ''); +// clang-format off +/** + * @ngModule CommonModule + * @description + * + * Formats a date value according to locale rules. + * + * `DatePipe` is executed only when it detects a pure change to the input value. + * A pure change is either a change to a primitive input value + * (such as `String`, `Number`, `Boolean`, or `Symbol`), + * or a changed object reference (such as `Date`, `Array`, `Function`, or `Object`). + * + * Note that mutating a `Date` object does not cause the pipe to be rendered again. + * To ensure that the pipe is executed, you must create a new `Date` object. + * + * Only the `en-US` locale data comes with Angular. To localize dates + * in another language, you must import the corresponding locale data. + * See the [I18n guide](guide/i18n-common-format-data-locale) for more information. + * + * The time zone of the formatted value can be specified either by passing it in as the second + * parameter of the pipe, or by setting the default through the `DATE_PIPE_DEFAULT_OPTIONS` + * injection token. The value that is passed in as the second parameter takes precedence over + * the one defined using the injection token. + * + * @see {@link formatDate} + * + * + * @usageNotes + * + * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to + * reformat the date on every change-detection cycle, treat the date as an immutable object + * and change the reference when the pipe needs to run again. + * + * ### Pre-defined format options + * + * | Option | Equivalent to | Examples (given in `en-US` locale) | + * |---------------|-------------------------------------|-------------------------------------------------| + * | `'short'` | `'M/d/yy, h:mm a'` | `6/15/15, 9:03 AM` | + * | `'medium'` | `'MMM d, y, h:mm:ss a'` | `Jun 15, 2015, 9:03:01 AM` | + * | `'long'` | `'MMMM d, y, h:mm:ss a z'` | `June 15, 2015 at 9:03:01 AM GMT+1` | + * | `'full'` | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` | + * | `'shortDate'` | `'M/d/yy'` | `6/15/15` | + * | `'mediumDate'`| `'MMM d, y'` | `Jun 15, 2015` | + * | `'longDate'` | `'MMMM d, y'` | `June 15, 2015` | + * | `'fullDate'` | `'EEEE, MMMM d, y'` | `Monday, June 15, 2015` | + * | `'shortTime'` | `'h:mm a'` | `9:03 AM` | + * | `'mediumTime'`| `'h:mm:ss a'` | `9:03:01 AM` | + * | `'longTime'` | `'h:mm:ss a z'` | `9:03:01 AM GMT+1` | + * | `'fullTime'` | `'h:mm:ss a zzzz'` | `9:03:01 AM GMT+01:00` | + * + * ### Custom format options + * + * You can construct a format string using symbols to specify the components + * of a date-time value, as described in the following table. + * Format details depend on the locale. + * Fields marked with (*) are only available in the extra data set for the given locale. + * + * | Field type | Format | Description | Example Value | + * |-------------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------| + * | Era | G, GG & GGG | Abbreviated | AD | + * | | GGGG | Wide | Anno Domini | + * | | GGGGG | Narrow | A | + * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 | + * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 | + * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 | + * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 | + * | ISO Week-numbering year | Y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 | + * | | YY | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 | + * | | YYY | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 | + * | | YYYY | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 | + * | Month | M | Numeric: 1 digit | 9, 12 | + * | | MM | Numeric: 2 digits + zero padded | 09, 12 | + * | | MMM | Abbreviated | Sep | + * | | MMMM | Wide | September | + * | | MMMMM | Narrow | S | + * | Month standalone | L | Numeric: 1 digit | 9, 12 | + * | | LL | Numeric: 2 digits + zero padded | 09, 12 | + * | | LLL | Abbreviated | Sep | + * | | LLLL | Wide | September | + * | | LLLLL | Narrow | S | + * | ISO Week of year | w | Numeric: minimum digits | 1... 53 | + * | | ww | Numeric: 2 digits + zero padded | 01... 53 | + * | Week of month | W | Numeric: 1 digit | 1... 5 | + * | Day of month | d | Numeric: minimum digits | 1 | + * | | dd | Numeric: 2 digits + zero padded | 01 | + * | Week day | E, EE & EEE | Abbreviated | Tue | + * | | EEEE | Wide | Tuesday | + * | | EEEEE | Narrow | T | + * | | EEEEEE | Short | Tu | + * | Week day standalone | c, cc | Numeric: 1 digit | 2 | + * | | ccc | Abbreviated | Tue | + * | | cccc | Wide | Tuesday | + * | | ccccc | Narrow | T | + * | | cccccc | Short | Tu | + * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM | + * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem | + * | | aaaaa | Narrow | a/p | + * | Period* | B, BB & BBB | Abbreviated | mid. | + * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night | + * | | BBBBB | Narrow | md | + * | Period standalone* | b, bb & bbb | Abbreviated | mid. | + * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night | + * | | bbbbb | Narrow | md | + * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 | + * | | hh | Numeric: 2 digits + zero padded | 01, 12 | + * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 | + * | | HH | Numeric: 2 digits + zero padded | 00, 23 | + * | Minute | m | Numeric: minimum digits | 8, 59 | + * | | mm | Numeric: 2 digits + zero padded | 08, 59 | + * | Second | s | Numeric: minimum digits | 0... 59 | + * | | ss | Numeric: 2 digits + zero padded | 00... 59 | + * | Fractional seconds | S | Numeric: 1 digit | 0... 9 | + * | | SS | Numeric: 2 digits + zero padded | 00... 99 | + * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 | + * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 | + * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 | + * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 | + * | | ZZZZ | Long localized GMT format | GMT-8:00 | + * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 | + * | | O, OO & OOO | Short localized GMT format | GMT-8 | + * | | OOOO | Long localized GMT format | GMT-08:00 | + * + * + * ### Format examples + * + * These examples transform a date into various formats, + * assuming that `dateObj` is a JavaScript `Date` object for + * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11, + * given in the local time for the `en-US` locale. + * + * ``` + * {{ dateObj | date }} // output is 'Jun 15, 2015' + * {{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM' + * {{ dateObj | date:'shortTime' }} // output is '9:43 PM' + * {{ dateObj | date:'mm:ss' }} // output is '43:11' + * {{ dateObj | date:"MMM dd, yyyy 'at' hh:mm a" }} // output is 'Jun 15, 2015 at 09:43 PM' + * ``` + * + * ### Usage example + * + * The following component uses a date pipe to display the current date in different formats. + * + * ``` + * @Component({ + * selector: 'date-pipe', + * template: `
    + *

    Today is {{today | date}}

    + *

    Or if you prefer, {{today | date:'fullDate'}}

    + *

    The time is {{today | date:'h:mm a z'}}

    + *
    ` + * }) + * // Get the current date and time as a date-time value. + * export class DatePipeComponent { + * today: number = Date.now(); + * } + * ``` + * + * @publicApi + */ +// clang-format on +class DatePipe { + constructor(locale, defaultTimezone, defaultOptions) { + this.locale = locale; + this.defaultTimezone = defaultTimezone; + this.defaultOptions = defaultOptions; + } + transform(value, format, timezone, locale) { + if (value == null || value === '' || value !== value) return null; + try { + const _format = format ?? this.defaultOptions?.dateFormat ?? DEFAULT_DATE_FORMAT; + const _timezone = timezone ?? this.defaultOptions?.timezone ?? this.defaultTimezone ?? undefined; + return formatDate(value, _format, locale || this.locale, _timezone); + } catch (error) { + throw invalidPipeArgumentError(DatePipe, error.message); + } + } + static #_ = this.ɵfac = function DatePipe_Factory(t) { + return new (t || DatePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID, 16), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](DATE_PIPE_DEFAULT_TIMEZONE, 24), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](DATE_PIPE_DEFAULT_OPTIONS, 24)); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "date", + type: DatePipe, + pure: true, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DatePipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'date', + standalone: true + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID] + }] + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [DATE_PIPE_DEFAULT_TIMEZONE] + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }] + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [DATE_PIPE_DEFAULT_OPTIONS] + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Optional + }] + }], null); +})(); +const _INTERPOLATION_REGEXP = /#/g; +/** + * @ngModule CommonModule + * @description + * + * Maps a value to a string that pluralizes the value according to locale rules. + * + * @usageNotes + * + * ### Example + * + * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'} + * + * @publicApi + */ +class I18nPluralPipe { + constructor(_localization) { + this._localization = _localization; + } + /** + * @param value the number to be formatted + * @param pluralMap an object that mimics the ICU format, see + * https://unicode-org.github.io/icu/userguide/format_parse/messages/. + * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by + * default). + */ + transform(value, pluralMap, locale) { + if (value == null) return ''; + if (typeof pluralMap !== 'object' || pluralMap === null) { + throw invalidPipeArgumentError(I18nPluralPipe, pluralMap); + } + const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale); + return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString()); + } + static #_ = this.ɵfac = function I18nPluralPipe_Factory(t) { + return new (t || I18nPluralPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](NgLocalization, 16)); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "i18nPlural", + type: I18nPluralPipe, + pure: true, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](I18nPluralPipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'i18nPlural', + standalone: true + }] + }], () => [{ + type: NgLocalization + }], null); +})(); + +/** + * @ngModule CommonModule + * @description + * + * Generic selector that displays the string that matches the current value. + * + * If none of the keys of the `mapping` match the `value`, then the content + * of the `other` key is returned when present, otherwise an empty string is returned. + * + * @usageNotes + * + * ### Example + * + * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'} + * + * @publicApi + */ +class I18nSelectPipe { + /** + * @param value a string to be internationalized. + * @param mapping an object that indicates the text that should be displayed + * for different values of the provided `value`. + */ + transform(value, mapping) { + if (value == null) return ''; + if (typeof mapping !== 'object' || typeof value !== 'string') { + throw invalidPipeArgumentError(I18nSelectPipe, mapping); + } + if (mapping.hasOwnProperty(value)) { + return mapping[value]; + } + if (mapping.hasOwnProperty('other')) { + return mapping['other']; + } + return ''; + } + static #_ = this.ɵfac = function I18nSelectPipe_Factory(t) { + return new (t || I18nSelectPipe)(); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "i18nSelect", + type: I18nSelectPipe, + pure: true, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](I18nSelectPipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'i18nSelect', + standalone: true + }] + }], null, null); +})(); + +/** + * @ngModule CommonModule + * @description + * + * Converts a value into its JSON-format representation. Useful for debugging. + * + * @usageNotes + * + * The following component uses a JSON pipe to convert an object + * to JSON format, and displays the string in both formats for comparison. + * + * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'} + * + * @publicApi + */ +class JsonPipe { + /** + * @param value A value of any type to convert into a JSON-format string. + */ + transform(value) { + return JSON.stringify(value, null, 2); + } + static #_ = this.ɵfac = function JsonPipe_Factory(t) { + return new (t || JsonPipe)(); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "json", + type: JsonPipe, + pure: false, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](JsonPipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'json', + pure: false, + standalone: true + }] + }], null, null); +})(); +function makeKeyValuePair(key, value) { + return { + key: key, + value: value + }; +} +/** + * @ngModule CommonModule + * @description + * + * Transforms Object or Map into an array of key value pairs. + * + * The output array will be ordered by keys. + * By default the comparator will be by Unicode point value. + * You can optionally pass a compareFn if your keys are complex types. + * + * @usageNotes + * ### Examples + * + * This examples show how an Object or a Map can be iterated by ngFor with the use of this + * keyvalue pipe. + * + * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'} + * + * @publicApi + */ +class KeyValuePipe { + constructor(differs) { + this.differs = differs; + this.keyValues = []; + this.compareFn = defaultComparator; + } + transform(input, compareFn = defaultComparator) { + if (!input || !(input instanceof Map) && typeof input !== 'object') { + return null; + } + // make a differ for whatever type we've been passed in + this.differ ??= this.differs.find(input).create(); + const differChanges = this.differ.diff(input); + const compareFnChanged = compareFn !== this.compareFn; + if (differChanges) { + this.keyValues = []; + differChanges.forEachItem(r => { + this.keyValues.push(makeKeyValuePair(r.key, r.currentValue)); + }); + } + if (differChanges || compareFnChanged) { + this.keyValues.sort(compareFn); + this.compareFn = compareFn; + } + return this.keyValues; + } + static #_ = this.ɵfac = function KeyValuePipe_Factory(t) { + return new (t || KeyValuePipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.KeyValueDiffers, 16)); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "keyvalue", + type: KeyValuePipe, + pure: false, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](KeyValuePipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'keyvalue', + pure: false, + standalone: true + }] + }], () => [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.KeyValueDiffers + }], null); +})(); +function defaultComparator(keyValueA, keyValueB) { + const a = keyValueA.key; + const b = keyValueB.key; + // if same exit with 0; + if (a === b) return 0; + // make sure that undefined are at the end of the sort. + if (a === undefined) return 1; + if (b === undefined) return -1; + // make sure that nulls are at the end of the sort. + if (a === null) return 1; + if (b === null) return -1; + if (typeof a == 'string' && typeof b == 'string') { + return a < b ? -1 : 1; + } + if (typeof a == 'number' && typeof b == 'number') { + return a - b; + } + if (typeof a == 'boolean' && typeof b == 'boolean') { + return a < b ? -1 : 1; + } + // `a` and `b` are of different types. Compare their string values. + const aString = String(a); + const bString = String(b); + return aString == bString ? 0 : aString < bString ? -1 : 1; +} + +/** + * @ngModule CommonModule + * @description + * + * Formats a value according to digit options and locale rules. + * Locale determines group sizing and separator, + * decimal point character, and other locale-specific configurations. + * + * @see {@link formatNumber} + * + * @usageNotes + * + * ### digitsInfo + * + * The value's decimal representation is specified by the `digitsInfo` + * parameter, written in the following format:
    + * + * ``` + * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits} + * ``` + * + * - `minIntegerDigits`: + * The minimum number of integer digits before the decimal point. + * Default is 1. + * + * - `minFractionDigits`: + * The minimum number of digits after the decimal point. + * Default is 0. + * + * - `maxFractionDigits`: + * The maximum number of digits after the decimal point. + * Default is 3. + * + * If the formatted value is truncated it will be rounded using the "to-nearest" method: + * + * ``` + * {{3.6 | number: '1.0-0'}} + * + * + * {{-3.6 | number:'1.0-0'}} + * + * ``` + * + * ### locale + * + * `locale` will format a value according to locale rules. + * Locale determines group sizing and separator, + * decimal point character, and other locale-specific configurations. + * + * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default. + * + * See [Setting your app locale](guide/i18n-common-locale-id). + * + * ### Example + * + * The following code shows how the pipe transforms values + * according to various format specifications, + * where the caller's default locale is `en-US`. + * + * + * + * @publicApi + */ +class DecimalPipe { + constructor(_locale) { + this._locale = _locale; + } + /** + * @param value The value to be formatted. + * @param digitsInfo Sets digit and decimal representation. + * [See more](#digitsinfo). + * @param locale Specifies what locale format rules to use. + * [See more](#locale). + */ + transform(value, digitsInfo, locale) { + if (!isValue(value)) return null; + locale ||= this._locale; + try { + const num = strToNumber(value); + return formatNumber(num, locale, digitsInfo); + } catch (error) { + throw invalidPipeArgumentError(DecimalPipe, error.message); + } + } + static #_ = this.ɵfac = function DecimalPipe_Factory(t) { + return new (t || DecimalPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID, 16)); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "number", + type: DecimalPipe, + pure: true, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](DecimalPipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'number', + standalone: true + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID] + }] + }], null); +})(); +/** + * @ngModule CommonModule + * @description + * + * Transforms a number to a percentage + * string, formatted according to locale rules that determine group sizing and + * separator, decimal-point character, and other locale-specific + * configurations. + * + * @see {@link formatPercent} + * + * @usageNotes + * The following code shows how the pipe transforms numbers + * into text strings, according to various format specifications, + * where the caller's default locale is `en-US`. + * + * + * + * @publicApi + */ +class PercentPipe { + constructor(_locale) { + this._locale = _locale; + } + /** + * + * @param value The number to be formatted as a percentage. + * @param digitsInfo Decimal representation options, specified by a string + * in the following format:
    + * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}. + * - `minIntegerDigits`: The minimum number of integer digits before the decimal point. + * Default is `1`. + * - `minFractionDigits`: The minimum number of digits after the decimal point. + * Default is `0`. + * - `maxFractionDigits`: The maximum number of digits after the decimal point. + * Default is `0`. + * @param locale A locale code for the locale format rules to use. + * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default. + * See [Setting your app locale](guide/i18n-common-locale-id). + */ + transform(value, digitsInfo, locale) { + if (!isValue(value)) return null; + locale ||= this._locale; + try { + const num = strToNumber(value); + return formatPercent(num, locale, digitsInfo); + } catch (error) { + throw invalidPipeArgumentError(PercentPipe, error.message); + } + } + static #_ = this.ɵfac = function PercentPipe_Factory(t) { + return new (t || PercentPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID, 16)); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "percent", + type: PercentPipe, + pure: true, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PercentPipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'percent', + standalone: true + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID] + }] + }], null); +})(); +/** + * @ngModule CommonModule + * @description + * + * Transforms a number to a currency string, formatted according to locale rules + * that determine group sizing and separator, decimal-point character, + * and other locale-specific configurations. + * + * + * @see {@link getCurrencySymbol} + * @see {@link formatCurrency} + * + * @usageNotes + * The following code shows how the pipe transforms numbers + * into text strings, according to various format specifications, + * where the caller's default locale is `en-US`. + * + * + * + * @publicApi + */ +class CurrencyPipe { + constructor(_locale, _defaultCurrencyCode = 'USD') { + this._locale = _locale; + this._defaultCurrencyCode = _defaultCurrencyCode; + } + /** + * + * @param value The number to be formatted as currency. + * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, + * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be + * configured using the `DEFAULT_CURRENCY_CODE` injection token. + * @param display The format for the currency indicator. One of the following: + * - `code`: Show the code (such as `USD`). + * - `symbol`(default): Show the symbol (such as `$`). + * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their + * currency. + * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the + * locale has no narrow symbol, uses the standard symbol for the locale. + * - String: Use the given string value instead of a code or a symbol. + * For example, an empty string will suppress the currency & symbol. + * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`. + * + * @param digitsInfo Decimal representation options, specified by a string + * in the following format:
    + * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}. + * - `minIntegerDigits`: The minimum number of integer digits before the decimal point. + * Default is `1`. + * - `minFractionDigits`: The minimum number of digits after the decimal point. + * Default is `2`. + * - `maxFractionDigits`: The maximum number of digits after the decimal point. + * Default is `2`. + * If not provided, the number will be formatted with the proper amount of digits, + * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies. + * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none. + * @param locale A locale code for the locale format rules to use. + * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default. + * See [Setting your app locale](guide/i18n-common-locale-id). + */ + transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) { + if (!isValue(value)) return null; + locale ||= this._locale; + if (typeof display === 'boolean') { + if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) { + console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".`); + } + display = display ? 'symbol' : 'code'; + } + let currency = currencyCode || this._defaultCurrencyCode; + if (display !== 'code') { + if (display === 'symbol' || display === 'symbol-narrow') { + currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale); + } else { + currency = display; + } + } + try { + const num = strToNumber(value); + return formatCurrency(num, locale, currency, currencyCode, digitsInfo); + } catch (error) { + throw invalidPipeArgumentError(CurrencyPipe, error.message); + } + } + static #_ = this.ɵfac = function CurrencyPipe_Factory(t) { + return new (t || CurrencyPipe)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID, 16), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_CURRENCY_CODE, 16)); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "currency", + type: CurrencyPipe, + pure: true, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CurrencyPipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'currency', + standalone: true + }] + }], () => [{ + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.LOCALE_ID] + }] + }, { + type: undefined, + decorators: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Inject, + args: [_angular_core__WEBPACK_IMPORTED_MODULE_0__.DEFAULT_CURRENCY_CODE] + }] + }], null); +})(); +function isValue(value) { + return !(value == null || value === '' || value !== value); +} +/** + * Transforms a string into a number (if needed). + */ +function strToNumber(value) { + // Convert strings to numbers + if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) { + return Number(value); + } + if (typeof value !== 'number') { + throw new Error(`${value} is not a number`); + } + return value; +} + +/** + * @ngModule CommonModule + * @description + * + * Creates a new `Array` or `String` containing a subset (slice) of the elements. + * + * @usageNotes + * + * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()` + * and `String.prototype.slice()`. + * + * When operating on an `Array`, the returned `Array` is always a copy even when all + * the elements are being returned. + * + * When operating on a blank value, the pipe returns the blank value. + * + * ### List Example + * + * This `ngFor` example: + * + * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'} + * + * produces the following: + * + * ```html + *
  • b
  • + *
  • c
  • + * ``` + * + * ### String Examples + * + * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'} + * + * @publicApi + */ +class SlicePipe { + transform(value, start, end) { + if (value == null) return null; + if (!this.supports(value)) { + throw invalidPipeArgumentError(SlicePipe, value); + } + return value.slice(start, end); + } + supports(obj) { + return typeof obj === 'string' || Array.isArray(obj); + } + static #_ = this.ɵfac = function SlicePipe_Factory(t) { + return new (t || SlicePipe)(); + }; + static #_2 = this.ɵpipe = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({ + name: "slice", + type: SlicePipe, + pure: false, + standalone: true + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](SlicePipe, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Pipe, + args: [{ + name: 'slice', + pure: false, + standalone: true + }] + }], null, null); +})(); + +/** + * @module + * @description + * This module provides a set of common Pipes. + */ +/** + * A collection of Angular pipes that are likely to be used in each and every application. + */ +const COMMON_PIPES = [AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe]; + +// Note: This does not contain the location providers, +// as they need some platform specific implementations to work. +/** + * Exports all the basic Angular directives and pipes, + * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on. + * Re-exported by `BrowserModule`, which is included automatically in the root + * `AppModule` when you create a new app with the CLI `new` command. + * + * @publicApi + */ +class CommonModule { + static #_ = this.ɵfac = function CommonModule_Factory(t) { + return new (t || CommonModule)(); + }; + static #_2 = this.ɵmod = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ + type: CommonModule + }); + static #_3 = this.ɵinj = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({}); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](CommonModule, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.NgModule, + args: [{ + imports: [COMMON_DIRECTIVES, COMMON_PIPES], + exports: [COMMON_DIRECTIVES, COMMON_PIPES] + }] + }], null, null); +})(); +const PLATFORM_BROWSER_ID = 'browser'; +const PLATFORM_SERVER_ID = 'server'; +const PLATFORM_WORKER_APP_ID = 'browserWorkerApp'; +const PLATFORM_WORKER_UI_ID = 'browserWorkerUi'; +/** + * Returns whether a platform id represents a browser platform. + * @publicApi + */ +function isPlatformBrowser(platformId) { + return platformId === PLATFORM_BROWSER_ID; +} +/** + * Returns whether a platform id represents a server platform. + * @publicApi + */ +function isPlatformServer(platformId) { + return platformId === PLATFORM_SERVER_ID; +} +/** + * Returns whether a platform id represents a web worker app platform. + * @publicApi + * @deprecated This function serves no purpose since the removal of the Webworker platform. It will + * always return `false`. + */ +function isPlatformWorkerApp(platformId) { + return platformId === PLATFORM_WORKER_APP_ID; +} +/** + * Returns whether a platform id represents a web worker UI platform. + * @publicApi + * @deprecated This function serves no purpose since the removal of the Webworker platform. It will + * always return `false`. + */ +function isPlatformWorkerUi(platformId) { + return platformId === PLATFORM_WORKER_UI_ID; +} + +/** + * @module + * @description + * Entry point for all public APIs of the common package. + */ +/** + * @publicApi + */ +const VERSION = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.Version('17.3.3'); + +/** + * Defines a scroll position manager. Implemented by `BrowserViewportScroller`. + * + * @publicApi + */ +class ViewportScroller { + // De-sugared tree-shakable injection + // See #23917 + /** @nocollapse */ + static #_ = this.ɵprov = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"])({ + token: ViewportScroller, + providedIn: 'root', + factory: () => isPlatformBrowser((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.PLATFORM_ID)) ? new BrowserViewportScroller((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(DOCUMENT), window) : new NullViewportScroller() + }); +} +/** + * Manages the scroll position for a browser window. + */ +class BrowserViewportScroller { + constructor(document, window) { + this.document = document; + this.window = window; + this.offset = () => [0, 0]; + } + /** + * Configures the top offset used when scrolling to an anchor. + * @param offset A position in screen coordinates (a tuple with x and y values) + * or a function that returns the top offset position. + * + */ + setOffset(offset) { + if (Array.isArray(offset)) { + this.offset = () => offset; + } else { + this.offset = offset; + } + } + /** + * Retrieves the current scroll position. + * @returns The position in screen coordinates. + */ + getScrollPosition() { + return [this.window.scrollX, this.window.scrollY]; + } + /** + * Sets the scroll position. + * @param position The new position in screen coordinates. + */ + scrollToPosition(position) { + this.window.scrollTo(position[0], position[1]); + } + /** + * Scrolls to an element and attempts to focus the element. + * + * Note that the function name here is misleading in that the target string may be an ID for a + * non-anchor element. + * + * @param target The ID of an element or name of the anchor. + * + * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document + * @see https://html.spec.whatwg.org/#scroll-to-fragid + */ + scrollToAnchor(target) { + const elSelected = findAnchorFromDocument(this.document, target); + if (elSelected) { + this.scrollToElement(elSelected); + // After scrolling to the element, the spec dictates that we follow the focus steps for the + // target. Rather than following the robust steps, simply attempt focus. + // + // @see https://html.spec.whatwg.org/#get-the-focusable-area + // @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus + // @see https://html.spec.whatwg.org/#focusable-area + elSelected.focus(); + } + } + /** + * Disables automatic scroll restoration provided by the browser. + */ + setHistoryScrollRestoration(scrollRestoration) { + this.window.history.scrollRestoration = scrollRestoration; + } + /** + * Scrolls to an element using the native offset and the specified offset set on this scroller. + * + * The offset can be used when we know that there is a floating header and scrolling naively to an + * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header. + */ + scrollToElement(el) { + const rect = el.getBoundingClientRect(); + const left = rect.left + this.window.pageXOffset; + const top = rect.top + this.window.pageYOffset; + const offset = this.offset(); + this.window.scrollTo(left - offset[0], top - offset[1]); + } +} +function findAnchorFromDocument(document, target) { + const documentResult = document.getElementById(target) || document.getElementsByName(target)[0]; + if (documentResult) { + return documentResult; + } + // `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we + // have to traverse the DOM manually and do the lookup through the shadow roots. + if (typeof document.createTreeWalker === 'function' && document.body && typeof document.body.attachShadow === 'function') { + const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT); + let currentNode = treeWalker.currentNode; + while (currentNode) { + const shadowRoot = currentNode.shadowRoot; + if (shadowRoot) { + // Note that `ShadowRoot` doesn't support `getElementsByName` + // so we have to fall back to `querySelector`. + const result = shadowRoot.getElementById(target) || shadowRoot.querySelector(`[name="${target}"]`); + if (result) { + return result; + } + } + currentNode = treeWalker.nextNode(); + } + } + return null; +} +/** + * Provides an empty implementation of the viewport scroller. + */ +class NullViewportScroller { + /** + * Empty implementation + */ + setOffset(offset) {} + /** + * Empty implementation + */ + getScrollPosition() { + return [0, 0]; + } + /** + * Empty implementation + */ + scrollToPosition(position) {} + /** + * Empty implementation + */ + scrollToAnchor(anchor) {} + /** + * Empty implementation + */ + setHistoryScrollRestoration(scrollRestoration) {} +} + +/** + * A wrapper around the `XMLHttpRequest` constructor. + * + * @publicApi + */ +class XhrFactory {} + +/** + * Value (out of 100) of the requested quality for placeholder images. + */ +const PLACEHOLDER_QUALITY = '20'; + +// Converts a string that represents a URL into a URL class instance. +function getUrl(src, win) { + // Don't use a base URL is the URL is absolute. + return isAbsoluteUrl(src) ? new URL(src) : new URL(src, win.location.href); +} +// Checks whether a URL is absolute (i.e. starts with `http://` or `https://`). +function isAbsoluteUrl(src) { + return /^https?:\/\//.test(src); +} +// Given a URL, extract the hostname part. +// If a URL is a relative one - the URL is returned as is. +function extractHostname(url) { + return isAbsoluteUrl(url) ? new URL(url).hostname : url; +} +function isValidPath(path) { + const isString = typeof path === 'string'; + if (!isString || path.trim() === '') { + return false; + } + // Calling new URL() will throw if the path string is malformed + try { + const url = new URL(path); + return true; + } catch { + return false; + } +} +function normalizePath(path) { + return path.endsWith('/') ? path.slice(0, -1) : path; +} +function normalizeSrc(src) { + return src.startsWith('/') ? src.slice(1) : src; +} + +/** + * Noop image loader that does no transformation to the original src and just returns it as is. + * This loader is used as a default one if more specific logic is not provided in an app config. + * + * @see {@link ImageLoader} + * @see {@link NgOptimizedImage} + */ +const noopImageLoader = config => config.src; +/** + * Injection token that configures the image loader function. + * + * @see {@link ImageLoader} + * @see {@link NgOptimizedImage} + * @publicApi + */ +const IMAGE_LOADER = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken(ngDevMode ? 'ImageLoader' : '', { + providedIn: 'root', + factory: () => noopImageLoader +}); +/** + * Internal helper function that makes it easier to introduce custom image loaders for the + * `NgOptimizedImage` directive. It is enough to specify a URL builder function to obtain full DI + * configuration for a given loader: a DI token corresponding to the actual loader function, plus DI + * tokens managing preconnect check functionality. + * @param buildUrlFn a function returning a full URL based on loader's configuration + * @param exampleUrls example of full URLs for a given loader (used in error messages) + * @returns a set of DI providers corresponding to the configured image loader + */ +function createImageLoader(buildUrlFn, exampleUrls) { + return function provideImageLoader(path) { + if (!isValidPath(path)) { + throwInvalidPathError(path, exampleUrls || []); + } + // The trailing / is stripped (if provided) to make URL construction (concatenation) easier in + // the individual loader functions. + path = normalizePath(path); + const loaderFn = config => { + if (isAbsoluteUrl(config.src)) { + // Image loader functions expect an image file name (e.g. `my-image.png`) + // or a relative path + a file name (e.g. `/a/b/c/my-image.png`) as an input, + // so the final absolute URL can be constructed. + // When an absolute URL is provided instead - the loader can not + // build a final URL, thus the error is thrown to indicate that. + throwUnexpectedAbsoluteUrlError(path, config.src); + } + return buildUrlFn(path, { + ...config, + src: normalizeSrc(config.src) + }); + }; + const providers = [{ + provide: IMAGE_LOADER, + useValue: loaderFn + }]; + return providers; + }; +} +function throwInvalidPathError(path, exampleUrls) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode && `Image loader has detected an invalid path (\`${path}\`). ` + `To fix this, supply a path using one of the following formats: ${exampleUrls.join(' or ')}`); +} +function throwUnexpectedAbsoluteUrlError(path, url) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode && `Image loader has detected a \`\` tag with an invalid \`ngSrc\` attribute: ${url}. ` + `This image loader expects \`ngSrc\` to be a relative URL - ` + `however the provided value is an absolute URL. ` + `To fix this, provide \`ngSrc\` as a path relative to the base URL ` + `configured for this loader (\`${path}\`).`); +} + +/** + * Function that generates an ImageLoader for [Cloudflare Image + * Resizing](https://developers.cloudflare.com/images/image-resizing/) and turns it into an Angular + * provider. Note: Cloudflare has multiple image products - this provider is specifically for + * Cloudflare Image Resizing; it will not work with Cloudflare Images or Cloudflare Polish. + * + * @param path Your domain name, e.g. https://mysite.com + * @returns Provider that provides an ImageLoader function + * + * @publicApi + */ +const provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ['https:///cdn-cgi/image//'] : undefined); +function createCloudflareUrl(path, config) { + let params = `format=auto`; + if (config.width) { + params += `,width=${config.width}`; + } + // When requesting a placeholder image we ask for a low quality image to reduce the load time. + if (config.isPlaceholder) { + params += `,quality=${PLACEHOLDER_QUALITY}`; + } + // Cloudflare image URLs format: + // https://developers.cloudflare.com/images/image-resizing/url-format/ + return `${path}/cdn-cgi/image/${params}/${config.src}`; +} + +/** + * Name and URL tester for Cloudinary. + */ +const cloudinaryLoaderInfo = { + name: 'Cloudinary', + testUrl: isCloudinaryUrl +}; +const CLOUDINARY_LOADER_REGEX = /https?\:\/\/[^\/]+\.cloudinary\.com\/.+/; +/** + * Tests whether a URL is from Cloudinary CDN. + */ +function isCloudinaryUrl(url) { + return CLOUDINARY_LOADER_REGEX.test(url); +} +/** + * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider. + * + * @param path Base URL of your Cloudinary images + * This URL should match one of the following formats: + * https://res.cloudinary.com/mysite + * https://mysite.cloudinary.com + * https://subdomain.mysite.com + * @returns Set of providers to configure the Cloudinary loader. + * + * @publicApi + */ +const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ? ['https://res.cloudinary.com/mysite', 'https://mysite.cloudinary.com', 'https://subdomain.mysite.com'] : undefined); +function createCloudinaryUrl(path, config) { + // Cloudinary image URLformat: + // https://cloudinary.com/documentation/image_transformations#transformation_url_structure + // Example of a Cloudinary image URL: + // https://res.cloudinary.com/mysite/image/upload/c_scale,f_auto,q_auto,w_600/marketing/tile-topics-m.png + // For a placeholder image, we use the lowest image setting available to reduce the load time + // else we use the auto size + const quality = config.isPlaceholder ? 'q_auto:low' : 'q_auto'; + let params = `f_auto,${quality}`; + if (config.width) { + params += `,w_${config.width}`; + } + return `${path}/image/upload/${params}/${config.src}`; +} + +/** + * Name and URL tester for ImageKit. + */ +const imageKitLoaderInfo = { + name: 'ImageKit', + testUrl: isImageKitUrl +}; +const IMAGE_KIT_LOADER_REGEX = /https?\:\/\/[^\/]+\.imagekit\.io\/.+/; +/** + * Tests whether a URL is from ImageKit CDN. + */ +function isImageKitUrl(url) { + return IMAGE_KIT_LOADER_REGEX.test(url); +} +/** + * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider. + * + * @param path Base URL of your ImageKit images + * This URL should match one of the following formats: + * https://ik.imagekit.io/myaccount + * https://subdomain.mysite.com + * @returns Set of providers to configure the ImageKit loader. + * + * @publicApi + */ +const provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined); +function createImagekitUrl(path, config) { + // Example of an ImageKit image URL: + // https://ik.imagekit.io/demo/tr:w-300,h-300/medium_cafe_B1iTdD0C.jpg + const { + src, + width + } = config; + let urlSegments; + if (width) { + const params = `tr:w-${width}`; + urlSegments = [path, params, src]; + } else { + urlSegments = [path, src]; + } + const url = new URL(urlSegments.join('/')); + // When requesting a placeholder image we ask for a low quality image to reduce the load time. + if (config.isPlaceholder) { + url.searchParams.set('q', PLACEHOLDER_QUALITY); + } + return url.href; +} + +/** + * Name and URL tester for Imgix. + */ +const imgixLoaderInfo = { + name: 'Imgix', + testUrl: isImgixUrl +}; +const IMGIX_LOADER_REGEX = /https?\:\/\/[^\/]+\.imgix\.net\/.+/; +/** + * Tests whether a URL is from Imgix CDN. + */ +function isImgixUrl(url) { + return IMGIX_LOADER_REGEX.test(url); +} +/** + * Function that generates an ImageLoader for Imgix and turns it into an Angular provider. + * + * @param path path to the desired Imgix origin, + * e.g. https://somepath.imgix.net or https://images.mysite.com + * @returns Set of providers to configure the Imgix loader. + * + * @publicApi + */ +const provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined); +function createImgixUrl(path, config) { + const url = new URL(`${path}/${config.src}`); + // This setting ensures the smallest allowable format is set. + url.searchParams.set('auto', 'format'); + if (config.width) { + url.searchParams.set('w', config.width.toString()); + } + // When requesting a placeholder image we ask a low quality image to reduce the load time. + if (config.isPlaceholder) { + url.searchParams.set('q', PLACEHOLDER_QUALITY); + } + return url.href; +} + +/** + * Name and URL tester for Netlify. + */ +const netlifyLoaderInfo = { + name: 'Netlify', + testUrl: isNetlifyUrl +}; +const NETLIFY_LOADER_REGEX = /https?\:\/\/[^\/]+\.netlify\.app\/.+/; +/** + * Tests whether a URL is from a Netlify site. This won't catch sites with a custom domain, + * but it's a good start for sites in development. This is only used to warn users who haven't + * configured an image loader. + */ +function isNetlifyUrl(url) { + return NETLIFY_LOADER_REGEX.test(url); +} +/** + * Function that generates an ImageLoader for Netlify and turns it into an Angular provider. + * + * @param path optional URL of the desired Netlify site. Defaults to the current site. + * @returns Set of providers to configure the Netlify loader. + * + * @publicApi + */ +function provideNetlifyLoader(path) { + if (path && !isValidPath(path)) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode && `Image loader has detected an invalid path (\`${path}\`). ` + `To fix this, supply either the full URL to the Netlify site, or leave it empty to use the current site.`); + } + if (path) { + const url = new URL(path); + path = url.origin; + } + const loaderFn = config => { + return createNetlifyUrl(config, path); + }; + const providers = [{ + provide: IMAGE_LOADER, + useValue: loaderFn + }]; + return providers; +} +const validParams = new Map([['height', 'h'], ['fit', 'fit'], ['quality', 'q'], ['q', 'q'], ['position', 'position']]); +function createNetlifyUrl(config, path) { + // Note: `path` can be undefined, in which case we use a fake one to construct a `URL` instance. + const url = new URL(path ?? 'https://a/'); + url.pathname = '/.netlify/images'; + if (!isAbsoluteUrl(config.src) && !config.src.startsWith('/')) { + config.src = '/' + config.src; + } + url.searchParams.set('url', config.src); + if (config.width) { + url.searchParams.set('w', config.width.toString()); + } + // When requesting a placeholder image we ask for a low quality image to reduce the load time. + // If the quality is specified in the loader config - always use provided value. + const configQuality = config.loaderParams?.['quality'] ?? config.loaderParams?.['q']; + if (config.isPlaceholder && !configQuality) { + url.searchParams.set('q', PLACEHOLDER_QUALITY); + } + for (const [param, value] of Object.entries(config.loaderParams ?? {})) { + if (validParams.has(param)) { + url.searchParams.set(validParams.get(param), value.toString()); + } else { + if (ngDevMode) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, `The Netlify image loader has detected an \`\` tag with the unsupported attribute "\`${param}\`".`)); + } + } + } + // The "a" hostname is used for relative URLs, so we can remove it from the final URL. + return url.hostname === 'a' ? url.href.replace(url.origin, '') : url.href; +} + +// Assembles directive details string, useful for error messages. +function imgDirectiveDetails(ngSrc, includeNgSrc = true) { + const ngSrcInfo = includeNgSrc ? `(activated on an element with the \`ngSrc="${ngSrc}"\`) ` : ''; + return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`; +} + +/** + * Asserts that the application is in development mode. Throws an error if the application is in + * production mode. This assert can be used to make sure that there is no dev-mode code invoked in + * the prod mode accidentally. + */ +function assertDevMode(checkName) { + if (!ngDevMode) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2958 /* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` + `Please make sure that the prod mode is enabled for production builds.`); + } +} + +/** + * Observer that detects whether an image with `NgOptimizedImage` + * is treated as a Largest Contentful Paint (LCP) element. If so, + * asserts that the image has the `priority` attribute. + * + * Note: this is a dev-mode only class and it does not appear in prod bundles, + * thus there is no `ngDevMode` use in the code. + * + * Based on https://web.dev/lcp/#measure-lcp-in-javascript. + */ +class LCPImageObserver { + constructor() { + // Map of full image URLs -> original `ngSrc` values. + this.images = new Map(); + this.window = null; + this.observer = null; + assertDevMode('LCP checker'); + const win = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(DOCUMENT).defaultView; + if (typeof win !== 'undefined' && typeof PerformanceObserver !== 'undefined') { + this.window = win; + this.observer = this.initPerformanceObserver(); + } + } + /** + * Inits PerformanceObserver and subscribes to LCP events. + * Based on https://web.dev/lcp/#measure-lcp-in-javascript + */ + initPerformanceObserver() { + const observer = new PerformanceObserver(entryList => { + const entries = entryList.getEntries(); + if (entries.length === 0) return; + // We use the latest entry produced by the `PerformanceObserver` as the best + // signal on which element is actually an LCP one. As an example, the first image to load on + // a page, by virtue of being the only thing on the page so far, is often a LCP candidate + // and gets reported by PerformanceObserver, but isn't necessarily the LCP element. + const lcpElement = entries[entries.length - 1]; + // Cast to `any` due to missing `element` on the `LargestContentfulPaint` type of entry. + // See https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint + const imgSrc = lcpElement.element?.src ?? ''; + // Exclude `data:` and `blob:` URLs, since they are not supported by the directive. + if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:')) return; + const img = this.images.get(imgSrc); + if (!img) return; + if (!img.priority && !img.alreadyWarnedPriority) { + img.alreadyWarnedPriority = true; + logMissingPriorityError(imgSrc); + } + if (img.modified && !img.alreadyWarnedModified) { + img.alreadyWarnedModified = true; + logModifiedWarning(imgSrc); + } + }); + observer.observe({ + type: 'largest-contentful-paint', + buffered: true + }); + return observer; + } + registerImage(rewrittenSrc, originalNgSrc, isPriority) { + if (!this.observer) return; + const newObservedImageState = { + priority: isPriority, + modified: false, + alreadyWarnedModified: false, + alreadyWarnedPriority: false + }; + this.images.set(getUrl(rewrittenSrc, this.window).href, newObservedImageState); + } + unregisterImage(rewrittenSrc) { + if (!this.observer) return; + this.images.delete(getUrl(rewrittenSrc, this.window).href); + } + updateImage(originalSrc, newSrc) { + const originalUrl = getUrl(originalSrc, this.window).href; + const img = this.images.get(originalUrl); + if (img) { + img.modified = true; + this.images.set(getUrl(newSrc, this.window).href, img); + this.images.delete(originalUrl); + } + } + ngOnDestroy() { + if (!this.observer) return; + this.observer.disconnect(); + this.images.clear(); + } + static #_ = this.ɵfac = function LCPImageObserver_Factory(t) { + return new (t || LCPImageObserver)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: LCPImageObserver, + factory: LCPImageObserver.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](LCPImageObserver, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [], null); +})(); +function logMissingPriorityError(ngSrc) { + const directiveDetails = imgDirectiveDetails(ngSrc); + console.error((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2955 /* RuntimeErrorCode.LCP_IMG_MISSING_PRIORITY */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` + `element but was not marked "priority". This image should be marked ` + `"priority" in order to prioritize its loading. ` + `To fix this, add the "priority" attribute.`)); +} +function logModifiedWarning(ngSrc) { + const directiveDetails = imgDirectiveDetails(ngSrc); + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2964 /* RuntimeErrorCode.LCP_IMG_NGSRC_MODIFIED */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` + `element and has had its "ngSrc" attribute modified. This can cause ` + `slower loading performance. It is recommended not to modify the "ngSrc" ` + `property on any image which could be the LCP element.`)); +} + +// Set of origins that are always excluded from the preconnect checks. +const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '0.0.0.0']); +/** + * Injection token to configure which origins should be excluded + * from the preconnect checks. It can either be a single string or an array of strings + * to represent a group of origins, for example: + * + * ```typescript + * {provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'} + * ``` + * + * or: + * + * ```typescript + * {provide: PRECONNECT_CHECK_BLOCKLIST, + * useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']} + * ``` + * + * @publicApi + */ +const PRECONNECT_CHECK_BLOCKLIST = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken(ngDevMode ? 'PRECONNECT_CHECK_BLOCKLIST' : ''); +/** + * Contains the logic to detect whether an image, marked with the "priority" attribute + * has a corresponding `` tag in the `document.head`. + * + * Note: this is a dev-mode only class, which should not appear in prod bundles, + * thus there is no `ngDevMode` use in the code. + */ +class PreconnectLinkChecker { + constructor() { + this.document = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(DOCUMENT); + /** + * Set of tags found on this page. + * The `null` value indicates that there was no DOM query operation performed. + */ + this.preconnectLinks = null; + /* + * Keep track of all already seen origin URLs to avoid repeating the same check. + */ + this.alreadySeen = new Set(); + this.window = null; + this.blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST); + assertDevMode('preconnect link checker'); + const win = this.document.defaultView; + if (typeof win !== 'undefined') { + this.window = win; + } + const blocklist = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(PRECONNECT_CHECK_BLOCKLIST, { + optional: true + }); + if (blocklist) { + this.populateBlocklist(blocklist); + } + } + populateBlocklist(origins) { + if (Array.isArray(origins)) { + deepForEach(origins, origin => { + this.blocklist.add(extractHostname(origin)); + }); + } else { + this.blocklist.add(extractHostname(origins)); + } + } + /** + * Checks that a preconnect resource hint exists in the head for the + * given src. + * + * @param rewrittenSrc src formatted with loader + * @param originalNgSrc ngSrc value + */ + assertPreconnect(rewrittenSrc, originalNgSrc) { + if (!this.window) return; + const imgUrl = getUrl(rewrittenSrc, this.window); + if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin)) return; + // Register this origin as seen, so we don't check it again later. + this.alreadySeen.add(imgUrl.origin); + // Note: we query for preconnect links only *once* and cache the results + // for the entire lifespan of an application, since it's unlikely that the + // list would change frequently. This allows to make sure there are no + // performance implications of making extra DOM lookups for each image. + this.preconnectLinks ??= this.queryPreconnectLinks(); + if (!this.preconnectLinks.has(imgUrl.origin)) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` + `image. Preconnecting to the origin(s) that serve priority images ensures that these ` + `images are delivered as soon as possible. To fix this, please add the following ` + `element into the of the document:\n` + ` `)); + } + } + queryPreconnectLinks() { + const preconnectUrls = new Set(); + const selector = 'link[rel=preconnect]'; + const links = Array.from(this.document.querySelectorAll(selector)); + for (let link of links) { + const url = getUrl(link.href, this.window); + preconnectUrls.add(url.origin); + } + return preconnectUrls; + } + ngOnDestroy() { + this.preconnectLinks?.clear(); + this.alreadySeen.clear(); + } + static #_ = this.ɵfac = function PreconnectLinkChecker_Factory(t) { + return new (t || PreconnectLinkChecker)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: PreconnectLinkChecker, + factory: PreconnectLinkChecker.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PreconnectLinkChecker, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], () => [], null); +})(); +/** + * Invokes a callback for each element in the array. Also invokes a callback + * recursively for each nested array. + */ +function deepForEach(input, fn) { + for (let value of input) { + Array.isArray(value) ? deepForEach(value, fn) : fn(value); + } +} + +/** + * In SSR scenarios, a preload `` element is generated for priority images. + * Having a large number of preload tags may negatively affect the performance, + * so we warn developers (by throwing an error) if the number of preloaded images + * is above a certain threshold. This const specifies this threshold. + */ +const DEFAULT_PRELOADED_IMAGES_LIMIT = 5; +/** + * Helps to keep track of priority images that already have a corresponding + * preload tag (to avoid generating multiple preload tags with the same URL). + * + * This Set tracks the original src passed into the `ngSrc` input not the src after it has been + * run through the specified `IMAGE_LOADER`. + */ +const PRELOADED_IMAGES = new _angular_core__WEBPACK_IMPORTED_MODULE_0__.InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', { + providedIn: 'root', + factory: () => new Set() +}); + +/** + * @description Contains the logic needed to track and add preload link tags to the `` tag. It + * will also track what images have already had preload link tags added so as to not duplicate link + * tags. + * + * In dev mode this service will validate that the number of preloaded images does not exceed the + * configured default preloaded images limit: {@link DEFAULT_PRELOADED_IMAGES_LIMIT}. + */ +class PreloadLinkCreator { + constructor() { + this.preloadedImages = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(PRELOADED_IMAGES); + this.document = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(DOCUMENT); + } + /** + * @description Add a preload `` to the `` of the `index.html` that is served from the + * server while using Angular Universal and SSR to kick off image loads for high priority images. + * + * The `sizes` (passed in from the user) and `srcset` (parsed and formatted from `ngSrcset`) + * properties used to set the corresponding attributes, `imagesizes` and `imagesrcset` + * respectively, on the preload `` tag so that the correctly sized image is preloaded from + * the CDN. + * + * {@link https://web.dev/preload-responsive-images/#imagesrcset-and-imagesizes} + * + * @param renderer The `Renderer2` passed in from the directive + * @param src The original src of the image that is set on the `ngSrc` input. + * @param srcset The parsed and formatted srcset created from the `ngSrcset` input + * @param sizes The value of the `sizes` attribute passed in to the `` tag + */ + createPreloadLinkTag(renderer, src, srcset, sizes) { + if (ngDevMode) { + if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode && `The \`NgOptimizedImage\` directive has detected that more than ` + `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` + `This might negatively affect an overall performance of the page. ` + `To fix this, remove the "priority" attribute from images with less priority.`); + } + } + if (this.preloadedImages.has(src)) { + return; + } + this.preloadedImages.add(src); + const preload = renderer.createElement('link'); + renderer.setAttribute(preload, 'as', 'image'); + renderer.setAttribute(preload, 'href', src); + renderer.setAttribute(preload, 'rel', 'preload'); + renderer.setAttribute(preload, 'fetchpriority', 'high'); + if (sizes) { + renderer.setAttribute(preload, 'imageSizes', sizes); + } + if (srcset) { + renderer.setAttribute(preload, 'imageSrcset', srcset); + } + renderer.appendChild(this.document.head, preload); + } + static #_ = this.ɵfac = function PreloadLinkCreator_Factory(t) { + return new (t || PreloadLinkCreator)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ + token: PreloadLinkCreator, + factory: PreloadLinkCreator.ɵfac, + providedIn: 'root' + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](PreloadLinkCreator, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Injectable, + args: [{ + providedIn: 'root' + }] + }], null, null); +})(); + +/** + * When a Base64-encoded image is passed as an input to the `NgOptimizedImage` directive, + * an error is thrown. The image content (as a string) might be very long, thus making + * it hard to read an error message if the entire string is included. This const defines + * the number of characters that should be included into the error message. The rest + * of the content is truncated. + */ +const BASE64_IMG_MAX_LENGTH_IN_ERROR = 50; +/** + * RegExpr to determine whether a src in a srcset is using width descriptors. + * Should match something like: "100w, 200w". + */ +const VALID_WIDTH_DESCRIPTOR_SRCSET = /^((\s*\d+w\s*(,|$)){1,})$/; +/** + * RegExpr to determine whether a src in a srcset is using density descriptors. + * Should match something like: "1x, 2x, 50x". Also supports decimals like "1.5x, 1.50x". + */ +const VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\s*\d+(\.\d+)?x\s*(,|$)){1,})$/; +/** + * Srcset values with a density descriptor higher than this value will actively + * throw an error. Such densities are not permitted as they cause image sizes + * to be unreasonably large and slow down LCP. + */ +const ABSOLUTE_SRCSET_DENSITY_CAP = 3; +/** + * Used only in error message text to communicate best practices, as we will + * only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP. + */ +const RECOMMENDED_SRCSET_DENSITY_CAP = 2; +/** + * Used in generating automatic density-based srcsets + */ +const DENSITY_SRCSET_MULTIPLIERS = [1, 2]; +/** + * Used to determine which breakpoints to use on full-width images + */ +const VIEWPORT_BREAKPOINT_CUTOFF = 640; +/** + * Used to determine whether two aspect ratios are similar in value. + */ +const ASPECT_RATIO_TOLERANCE = 0.1; +/** + * Used to determine whether the image has been requested at an overly + * large size compared to the actual rendered image size (after taking + * into account a typical device pixel ratio). In pixels. + */ +const OVERSIZED_IMAGE_TOLERANCE = 1000; +/** + * Used to limit automatic srcset generation of very large sources for + * fixed-size images. In pixels. + */ +const FIXED_SRCSET_WIDTH_LIMIT = 1920; +const FIXED_SRCSET_HEIGHT_LIMIT = 1080; +/** + * Default blur radius of the CSS filter used on placeholder images, in pixels + */ +const PLACEHOLDER_BLUR_AMOUNT = 15; +/** + * Used to warn or error when the user provides an overly large dataURL for the placeholder + * attribute. + * Character count of Base64 images is 1 character per byte, and base64 encoding is approximately + * 33% larger than base images, so 4000 characters is around 3KB on disk and 10000 characters is + * around 7.7KB. Experimentally, 4000 characters is about 20x20px in PNG or medium-quality JPEG + * format, and 10,000 is around 50x50px, but there's quite a bit of variation depending on how the + * image is saved. + */ +const DATA_URL_WARN_LIMIT = 4000; +const DATA_URL_ERROR_LIMIT = 10000; +/** Info about built-in loaders we can test for. */ +const BUILT_IN_LOADERS = [imgixLoaderInfo, imageKitLoaderInfo, cloudinaryLoaderInfo, netlifyLoaderInfo]; +/** + * Directive that improves image loading performance by enforcing best practices. + * + * `NgOptimizedImage` ensures that the loading of the Largest Contentful Paint (LCP) image is + * prioritized by: + * - Automatically setting the `fetchpriority` attribute on the `` tag + * - Lazy loading non-priority images by default + * - Automatically generating a preconnect link tag in the document head + * + * In addition, the directive: + * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided + * - Automatically generates a srcset + * - Requires that `width` and `height` are set + * - Warns if `width` or `height` have been set incorrectly + * - Warns if the image will be visually distorted when rendered + * + * @usageNotes + * The `NgOptimizedImage` directive is marked as [standalone](guide/standalone-components) and can + * be imported directly. + * + * Follow the steps below to enable and use the directive: + * 1. Import it into the necessary NgModule or a standalone Component. + * 2. Optionally provide an `ImageLoader` if you use an image hosting service. + * 3. Update the necessary `` tags in templates and replace `src` attributes with `ngSrc`. + * Using a `ngSrc` allows the directive to control when the `src` gets set, which triggers an image + * download. + * + * Step 1: import the `NgOptimizedImage` directive. + * + * ```typescript + * import { NgOptimizedImage } from '@angular/common'; + * + * // Include it into the necessary NgModule + * @NgModule({ + * imports: [NgOptimizedImage], + * }) + * class AppModule {} + * + * // ... or a standalone Component + * @Component({ + * standalone: true + * imports: [NgOptimizedImage], + * }) + * class MyStandaloneComponent {} + * ``` + * + * Step 2: configure a loader. + * + * To use the **default loader**: no additional code changes are necessary. The URL returned by the + * generic loader will always match the value of "src". In other words, this loader applies no + * transformations to the resource URL and the value of the `ngSrc` attribute will be used as is. + * + * To use an existing loader for a **third-party image service**: add the provider factory for your + * chosen service to the `providers` array. In the example below, the Imgix loader is used: + * + * ```typescript + * import {provideImgixLoader} from '@angular/common'; + * + * // Call the function and add the result to the `providers` array: + * providers: [ + * provideImgixLoader("https://my.base.url/"), + * ], + * ``` + * + * The `NgOptimizedImage` directive provides the following functions: + * - `provideCloudflareLoader` + * - `provideCloudinaryLoader` + * - `provideImageKitLoader` + * - `provideImgixLoader` + * + * If you use a different image provider, you can create a custom loader function as described + * below. + * + * To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI + * token. + * + * ```typescript + * import {IMAGE_LOADER, ImageLoaderConfig} from '@angular/common'; + * + * // Configure the loader using the `IMAGE_LOADER` token. + * providers: [ + * { + * provide: IMAGE_LOADER, + * useValue: (config: ImageLoaderConfig) => { + * return `https://example.com/${config.src}-${config.width}.jpg}`; + * } + * }, + * ], + * ``` + * + * Step 3: update `` tags in templates to use `ngSrc` instead of `src`. + * + * ``` + * + * ``` + * + * @publicApi + */ +class NgOptimizedImage { + constructor() { + this.imageLoader = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(IMAGE_LOADER); + this.config = processConfig((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵIMAGE_CONFIG"])); + this.renderer = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.Renderer2); + this.imgElement = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.ElementRef).nativeElement; + this.injector = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.Injector); + this.isServer = isPlatformServer((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_0__.PLATFORM_ID)); + this.preloadLinkCreator = (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.inject)(PreloadLinkCreator); + // a LCP image observer - should be injected only in the dev mode + this.lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null; + /** + * Calculate the rewritten `src` once and store it. + * This is needed to avoid repetitive calculations and make sure the directive cleanup in the + * `ngOnDestroy` does not rely on the `IMAGE_LOADER` logic (which in turn can rely on some other + * instance that might be already destroyed). + */ + this._renderedSrc = null; + /** + * Indicates whether this image should have a high priority. + */ + this.priority = false; + /** + * Disables automatic srcset generation for this image. + */ + this.disableOptimizedSrcset = false; + /** + * Sets the image to "fill mode", which eliminates the height/width requirement and adds + * styles such that the image fills its containing element. + */ + this.fill = false; + } + /** @nodoc */ + ngOnInit() { + (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵperformanceMarkFeature"])('NgOptimizedImage'); + if (ngDevMode) { + const ngZone = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone); + assertNonEmptyInput(this, 'ngSrc', this.ngSrc); + assertValidNgSrcset(this, this.ngSrcset); + assertNoConflictingSrc(this); + if (this.ngSrcset) { + assertNoConflictingSrcset(this); + } + assertNotBase64Image(this); + assertNotBlobUrl(this); + if (this.fill) { + assertEmptyWidthAndHeight(this); + // This leaves the Angular zone to avoid triggering unnecessary change detection cycles when + // `load` tasks are invoked on images. + ngZone.runOutsideAngular(() => assertNonZeroRenderedHeight(this, this.imgElement, this.renderer)); + } else { + assertNonEmptyWidthAndHeight(this); + if (this.height !== undefined) { + assertGreaterThanZero(this, this.height, 'height'); + } + if (this.width !== undefined) { + assertGreaterThanZero(this, this.width, 'width'); + } + // Only check for distorted images when not in fill mode, where + // images may be intentionally stretched, cropped or letterboxed. + ngZone.runOutsideAngular(() => assertNoImageDistortion(this, this.imgElement, this.renderer)); + } + assertValidLoadingInput(this); + if (!this.ngSrcset) { + assertNoComplexSizes(this); + } + assertValidPlaceholder(this, this.imageLoader); + assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader); + assertNoNgSrcsetWithoutLoader(this, this.imageLoader); + assertNoLoaderParamsWithoutLoader(this, this.imageLoader); + if (this.lcpObserver !== null) { + const ngZone = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone); + ngZone.runOutsideAngular(() => { + this.lcpObserver.registerImage(this.getRewrittenSrc(), this.ngSrc, this.priority); + }); + } + if (this.priority) { + const checker = this.injector.get(PreconnectLinkChecker); + checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc); + } + } + if (this.placeholder) { + this.removePlaceholderOnLoad(this.imgElement); + } + this.setHostAttributes(); + } + setHostAttributes() { + // Must set width/height explicitly in case they are bound (in which case they will + // only be reflected and not found by the browser) + if (this.fill) { + this.sizes ||= '100vw'; + } else { + this.setHostAttribute('width', this.width.toString()); + this.setHostAttribute('height', this.height.toString()); + } + this.setHostAttribute('loading', this.getLoadingBehavior()); + this.setHostAttribute('fetchpriority', this.getFetchPriority()); + // The `data-ng-img` attribute flags an image as using the directive, to allow + // for analysis of the directive's performance. + this.setHostAttribute('ng-img', 'true'); + // The `src` and `srcset` attributes should be set last since other attributes + // could affect the image's loading behavior. + const rewrittenSrcset = this.updateSrcAndSrcset(); + if (this.sizes) { + this.setHostAttribute('sizes', this.sizes); + } + if (this.isServer && this.priority) { + this.preloadLinkCreator.createPreloadLinkTag(this.renderer, this.getRewrittenSrc(), rewrittenSrcset, this.sizes); + } + } + /** @nodoc */ + ngOnChanges(changes) { + if (ngDevMode) { + assertNoPostInitInputChange(this, changes, ['ngSrcset', 'width', 'height', 'priority', 'fill', 'loading', 'sizes', 'loaderParams', 'disableOptimizedSrcset']); + } + if (changes['ngSrc'] && !changes['ngSrc'].isFirstChange()) { + const oldSrc = this._renderedSrc; + this.updateSrcAndSrcset(true); + const newSrc = this._renderedSrc; + if (this.lcpObserver !== null && oldSrc && newSrc && oldSrc !== newSrc) { + const ngZone = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__.NgZone); + ngZone.runOutsideAngular(() => { + this.lcpObserver?.updateImage(oldSrc, newSrc); + }); + } + } + } + callImageLoader(configWithoutCustomParams) { + let augmentedConfig = configWithoutCustomParams; + if (this.loaderParams) { + augmentedConfig.loaderParams = this.loaderParams; + } + return this.imageLoader(augmentedConfig); + } + getLoadingBehavior() { + if (!this.priority && this.loading !== undefined) { + return this.loading; + } + return this.priority ? 'eager' : 'lazy'; + } + getFetchPriority() { + return this.priority ? 'high' : 'auto'; + } + getRewrittenSrc() { + // ImageLoaderConfig supports setting a width property. However, we're not setting width here + // because if the developer uses rendered width instead of intrinsic width in the HTML width + // attribute, the image requested may be too small for 2x+ screens. + if (!this._renderedSrc) { + const imgConfig = { + src: this.ngSrc + }; + // Cache calculated image src to reuse it later in the code. + this._renderedSrc = this.callImageLoader(imgConfig); + } + return this._renderedSrc; + } + getRewrittenSrcset() { + const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset); + const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => { + srcStr = srcStr.trim(); + const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width; + return `${this.callImageLoader({ + src: this.ngSrc, + width + })} ${srcStr}`; + }); + return finalSrcs.join(', '); + } + getAutomaticSrcset() { + if (this.sizes) { + return this.getResponsiveSrcset(); + } else { + return this.getFixedSrcset(); + } + } + getResponsiveSrcset() { + const { + breakpoints + } = this.config; + let filteredBreakpoints = breakpoints; + if (this.sizes?.trim() === '100vw') { + // Since this is a full-screen-width image, our srcset only needs to include + // breakpoints with full viewport widths. + filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF); + } + const finalSrcs = filteredBreakpoints.map(bp => `${this.callImageLoader({ + src: this.ngSrc, + width: bp + })} ${bp}w`); + return finalSrcs.join(', '); + } + updateSrcAndSrcset(forceSrcRecalc = false) { + if (forceSrcRecalc) { + // Reset cached value, so that the followup `getRewrittenSrc()` call + // will recalculate it and update the cache. + this._renderedSrc = null; + } + const rewrittenSrc = this.getRewrittenSrc(); + this.setHostAttribute('src', rewrittenSrc); + let rewrittenSrcset = undefined; + if (this.ngSrcset) { + rewrittenSrcset = this.getRewrittenSrcset(); + } else if (this.shouldGenerateAutomaticSrcset()) { + rewrittenSrcset = this.getAutomaticSrcset(); + } + if (rewrittenSrcset) { + this.setHostAttribute('srcset', rewrittenSrcset); + } + return rewrittenSrcset; + } + getFixedSrcset() { + const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => `${this.callImageLoader({ + src: this.ngSrc, + width: this.width * multiplier + })} ${multiplier}x`); + return finalSrcs.join(', '); + } + shouldGenerateAutomaticSrcset() { + let oversizedImage = false; + if (!this.sizes) { + oversizedImage = this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT; + } + return !this.disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader && !oversizedImage; + } + /** + * Returns an image url formatted for use with the CSS background-image property. Expects one of: + * * A base64 encoded image, which is wrapped and passed through. + * * A boolean. If true, calls the image loader to generate a small placeholder url. + */ + generatePlaceholder(placeholderInput) { + const { + placeholderResolution + } = this.config; + if (placeholderInput === true) { + return `url(${this.callImageLoader({ + src: this.ngSrc, + width: placeholderResolution, + isPlaceholder: true + })})`; + } else if (typeof placeholderInput === 'string' && placeholderInput.startsWith('data:')) { + return `url(${placeholderInput})`; + } + return null; + } + /** + * Determines if blur should be applied, based on an optional boolean + * property `blur` within the optional configuration object `placeholderConfig`. + */ + shouldBlurPlaceholder(placeholderConfig) { + if (!placeholderConfig || !placeholderConfig.hasOwnProperty('blur')) { + return true; + } + return Boolean(placeholderConfig.blur); + } + removePlaceholderOnLoad(img) { + const callback = () => { + const changeDetectorRef = this.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_0__.ChangeDetectorRef); + removeLoadListenerFn(); + removeErrorListenerFn(); + this.placeholder = false; + changeDetectorRef.markForCheck(); + }; + const removeLoadListenerFn = this.renderer.listen(img, 'load', callback); + const removeErrorListenerFn = this.renderer.listen(img, 'error', callback); + } + /** @nodoc */ + ngOnDestroy() { + if (ngDevMode) { + if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) { + this.lcpObserver.unregisterImage(this._renderedSrc); + } + } + } + setHostAttribute(name, value) { + this.renderer.setAttribute(this.imgElement, name, value); + } + static #_ = this.ɵfac = function NgOptimizedImage_Factory(t) { + return new (t || NgOptimizedImage)(); + }; + static #_2 = this.ɵdir = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineDirective"]({ + type: NgOptimizedImage, + selectors: [["img", "ngSrc", ""]], + hostVars: 18, + hostBindings: function NgOptimizedImage_HostBindings(rf, ctx) { + if (rf & 2) { + _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstyleProp"]("position", ctx.fill ? "absolute" : null)("width", ctx.fill ? "100%" : null)("height", ctx.fill ? "100%" : null)("inset", ctx.fill ? "0" : null)("background-size", ctx.placeholder ? "cover" : null)("background-position", ctx.placeholder ? "50% 50%" : null)("background-repeat", ctx.placeholder ? "no-repeat" : null)("background-image", ctx.placeholder ? ctx.generatePlaceholder(ctx.placeholder) : null)("filter", ctx.placeholder && ctx.shouldBlurPlaceholder(ctx.placeholderConfig) ? "blur(15px)" : null); + } + }, + inputs: { + ngSrc: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "ngSrc", "ngSrc", unwrapSafeUrl], + ngSrcset: "ngSrcset", + sizes: "sizes", + width: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "width", "width", _angular_core__WEBPACK_IMPORTED_MODULE_0__.numberAttribute], + height: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "height", "height", _angular_core__WEBPACK_IMPORTED_MODULE_0__.numberAttribute], + loading: "loading", + priority: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "priority", "priority", _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute], + loaderParams: "loaderParams", + disableOptimizedSrcset: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "disableOptimizedSrcset", "disableOptimizedSrcset", _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute], + fill: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "fill", "fill", _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute], + placeholder: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputFlags"].HasDecoratorInputTransform, "placeholder", "placeholder", booleanOrDataUrlAttribute], + placeholderConfig: "placeholderConfig", + src: "src", + srcset: "srcset" + }, + standalone: true, + features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInputTransformsFeature"], _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵNgOnChangesFeature"]] + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](NgOptimizedImage, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Directive, + args: [{ + standalone: true, + selector: 'img[ngSrc]', + host: { + '[style.position]': 'fill ? "absolute" : null', + '[style.width]': 'fill ? "100%" : null', + '[style.height]': 'fill ? "100%" : null', + '[style.inset]': 'fill ? "0" : null', + '[style.background-size]': 'placeholder ? "cover" : null', + '[style.background-position]': 'placeholder ? "50% 50%" : null', + '[style.background-repeat]': 'placeholder ? "no-repeat" : null', + '[style.background-image]': 'placeholder ? generatePlaceholder(placeholder) : null', + '[style.filter]': `placeholder && shouldBlurPlaceholder(placeholderConfig) ? "blur(${PLACEHOLDER_BLUR_AMOUNT}px)" : null` + } + }] + }], null, { + ngSrc: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + required: true, + transform: unwrapSafeUrl + }] + }], + ngSrcset: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + sizes: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + width: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.numberAttribute + }] + }], + height: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.numberAttribute + }] + }], + loading: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + priority: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute + }] + }], + loaderParams: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + disableOptimizedSrcset: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute + }] + }], + fill: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + transform: _angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute + }] + }], + placeholder: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input, + args: [{ + transform: booleanOrDataUrlAttribute + }] + }], + placeholderConfig: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + src: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }], + srcset: [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_0__.Input + }] + }); +})(); +/***** Helpers *****/ +/** + * Sorts provided config breakpoints and uses defaults. + */ +function processConfig(config) { + let sortedBreakpoints = {}; + if (config.breakpoints) { + sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b); + } + return Object.assign({}, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵIMAGE_CONFIG_DEFAULTS"], config, sortedBreakpoints); +} +/***** Assert functions *****/ +/** + * Verifies that there is no `src` set on a host element. + */ +function assertNoConflictingSrc(dir) { + if (dir.src) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \`src\` and \`ngSrc\` have been set. ` + `Supplying both of these attributes breaks lazy loading. ` + `The NgOptimizedImage directive sets \`src\` itself based on the value of \`ngSrc\`. ` + `To fix this, please remove the \`src\` attribute.`); + } +} +/** + * Verifies that there is no `srcset` set on a host element. + */ +function assertNoConflictingSrcset(dir) { + if (dir.srcset) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \`srcset\` and \`ngSrcset\` have been set. ` + `Supplying both of these attributes breaks lazy loading. ` + `The NgOptimizedImage directive sets \`srcset\` itself based on the value of ` + `\`ngSrcset\`. To fix this, please remove the \`srcset\` attribute.`); + } +} +/** + * Verifies that the `ngSrc` is not a Base64-encoded image. + */ +function assertNotBase64Image(dir) { + let ngSrc = dir.ngSrc.trim(); + if (ngSrc.startsWith('data:')) { + if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) { + ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...'; + } + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`ngSrc\` is a Base64-encoded string ` + `(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` + `To fix this, disable the NgOptimizedImage directive for this element ` + `by removing \`ngSrc\` and using a standard \`src\` attribute instead.`); + } +} +/** + * Verifies that the 'sizes' only includes responsive values. + */ +function assertNoComplexSizes(dir) { + let sizes = dir.sizes; + if (sizes?.match(/((\)|,)\s|^)\d+px/)) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`sizes\` was set to a string including ` + `pixel values. For automatic \`srcset\` generation, \`sizes\` must only include responsive ` + `values, such as \`sizes="50vw"\` or \`sizes="(min-width: 768px) 50vw, 100vw"\`. ` + `To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`); + } +} +function assertValidPlaceholder(dir, imageLoader) { + assertNoPlaceholderConfigWithoutPlaceholder(dir); + assertNoRelativePlaceholderWithoutLoader(dir, imageLoader); + assertNoOversizedDataUrl(dir); +} +/** + * Verifies that placeholderConfig isn't being used without placeholder + */ +function assertNoPlaceholderConfigWithoutPlaceholder(dir) { + if (dir.placeholderConfig && !dir.placeholder) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`placeholderConfig\` options were provided for an ` + `image that does not use the \`placeholder\` attribute, and will have no effect.`); + } +} +/** + * Warns if a relative URL placeholder is specified, but no loader is present to provide the small + * image. + */ +function assertNoRelativePlaceholderWithoutLoader(dir, imageLoader) { + if (dir.placeholder === true && imageLoader === noopImageLoader) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to true but ` + `no image loader is configured (i.e. the default one is being used), ` + `which would result in the same image being used for the primary image and its placeholder. ` + `To fix this, provide a loader or remove the \`placeholder\` attribute from the image.`); + } +} +/** + * Warns or throws an error if an oversized dataURL placeholder is provided. + */ +function assertNoOversizedDataUrl(dir) { + if (dir.placeholder && typeof dir.placeholder === 'string' && dir.placeholder.startsWith('data:')) { + if (dir.placeholder.length > DATA_URL_ERROR_LIMIT) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2965 /* RuntimeErrorCode.OVERSIZED_PLACEHOLDER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer ` + `than ${DATA_URL_ERROR_LIMIT} characters. This is strongly discouraged, as large inline placeholders ` + `directly increase the bundle size of Angular and hurt page load performance. To fix this, generate ` + `a smaller data URL placeholder.`); + } + if (dir.placeholder.length > DATA_URL_WARN_LIMIT) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2965 /* RuntimeErrorCode.OVERSIZED_PLACEHOLDER */, `${imgDirectiveDetails(dir.ngSrc)} the \`placeholder\` attribute is set to a data URL which is longer ` + `than ${DATA_URL_WARN_LIMIT} characters. This is discouraged, as large inline placeholders ` + `directly increase the bundle size of Angular and hurt page load performance. For better loading performance, ` + `generate a smaller data URL placeholder.`)); + } + } +} +/** + * Verifies that the `ngSrc` is not a Blob URL. + */ +function assertNotBlobUrl(dir) { + const ngSrc = dir.ngSrc.trim(); + if (ngSrc.startsWith('blob:')) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrc\` was set to a blob URL (${ngSrc}). ` + `Blob URLs are not supported by the NgOptimizedImage directive. ` + `To fix this, disable the NgOptimizedImage directive for this element ` + `by removing \`ngSrc\` and using a regular \`src\` attribute instead.`); + } +} +/** + * Verifies that the input is set to a non-empty string. + */ +function assertNonEmptyInput(dir, name, value) { + const isString = typeof value === 'string'; + const isEmptyString = isString && value.trim() === ''; + if (!isString || isEmptyString) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`${name}\` has an invalid value ` + `(\`${value}\`). To fix this, change the value to a non-empty string.`); + } +} +/** + * Verifies that the `ngSrcset` is in a valid format, e.g. "100w, 200w" or "1x, 2x". + */ +function assertValidNgSrcset(dir, value) { + if (value == null) return; + assertNonEmptyInput(dir, 'ngSrcset', value); + const stringVal = value; + const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal); + const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal); + if (isValidDensityDescriptor) { + assertUnderDensityCap(dir, stringVal); + } + const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor; + if (!isValidSrcset) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrcset\` has an invalid value (\`${value}\`). ` + `To fix this, supply \`ngSrcset\` using a comma-separated list of one or more width ` + `descriptors (e.g. "100w, 200w") or density descriptors (e.g. "1x, 2x").`); + } +} +function assertUnderDensityCap(dir, value) { + const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP); + if (!underDensityCap) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` contains an unsupported image density:` + `\`${value}\`. NgOptimizedImage generally recommends a max image density of ` + `${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` + `${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` + `greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` + `most use cases. Images that will be pinch-zoomed are typically the primary use case for ` + `${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`); + } +} +/** + * Creates a `RuntimeError` instance to represent a situation when an input is set after + * the directive has initialized. + */ +function postInitInputChangeError(dir, inputName) { + let reason; + if (inputName === 'width' || inputName === 'height') { + reason = `Changing \`${inputName}\` may result in different attribute value ` + `applied to the underlying image element and cause layout shifts on a page.`; + } else { + reason = `Changing the \`${inputName}\` would have no effect on the underlying ` + `image element, because the resource loading has already occurred.`; + } + return new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` + `The NgOptimizedImage directive will not react to this input change. ${reason} ` + `To fix this, either switch \`${inputName}\` to a static value ` + `or wrap the image element in an *ngIf that is gated on the necessary value.`); +} +/** + * Verify that none of the listed inputs has changed. + */ +function assertNoPostInitInputChange(dir, changes, inputs) { + inputs.forEach(input => { + const isUpdated = changes.hasOwnProperty(input); + if (isUpdated && !changes[input].isFirstChange()) { + if (input === 'ngSrc') { + // When the `ngSrc` input changes, we detect that only in the + // `ngOnChanges` hook, thus the `ngSrc` is already set. We use + // `ngSrc` in the error message, so we use a previous value, but + // not the updated one in it. + dir = { + ngSrc: changes[input].previousValue + }; + } + throw postInitInputChangeError(dir, input); + } + }); +} +/** + * Verifies that a specified input is a number greater than 0. + */ +function assertGreaterThanZero(dir, inputValue, inputName) { + const validNumber = typeof inputValue === 'number' && inputValue > 0; + const validString = typeof inputValue === 'string' && /^\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0; + if (!validNumber && !validString) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` has an invalid value. ` + `To fix this, provide \`${inputName}\` as a number greater than 0.`); + } +} +/** + * Verifies that the rendered image is not visually distorted. Effectively this is checking: + * - Whether the "width" and "height" attributes reflect the actual dimensions of the image. + * - Whether image styling is "correct" (see below for a longer explanation). + */ +function assertNoImageDistortion(dir, img, renderer) { + const removeLoadListenerFn = renderer.listen(img, 'load', () => { + removeLoadListenerFn(); + removeErrorListenerFn(); + const computedStyle = window.getComputedStyle(img); + let renderedWidth = parseFloat(computedStyle.getPropertyValue('width')); + let renderedHeight = parseFloat(computedStyle.getPropertyValue('height')); + const boxSizing = computedStyle.getPropertyValue('box-sizing'); + if (boxSizing === 'border-box') { + const paddingTop = computedStyle.getPropertyValue('padding-top'); + const paddingRight = computedStyle.getPropertyValue('padding-right'); + const paddingBottom = computedStyle.getPropertyValue('padding-bottom'); + const paddingLeft = computedStyle.getPropertyValue('padding-left'); + renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft); + renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom); + } + const renderedAspectRatio = renderedWidth / renderedHeight; + const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0; + const intrinsicWidth = img.naturalWidth; + const intrinsicHeight = img.naturalHeight; + const intrinsicAspectRatio = intrinsicWidth / intrinsicHeight; + const suppliedWidth = dir.width; + const suppliedHeight = dir.height; + const suppliedAspectRatio = suppliedWidth / suppliedHeight; + // Tolerance is used to account for the impact of subpixel rendering. + // Due to subpixel rendering, the rendered, intrinsic, and supplied + // aspect ratios of a correctly configured image may not exactly match. + // For example, a `width=4030 height=3020` image might have a rendered + // size of "1062w, 796.48h". (An aspect ratio of 1.334... vs. 1.333...) + const inaccurateDimensions = Math.abs(suppliedAspectRatio - intrinsicAspectRatio) > ASPECT_RATIO_TOLERANCE; + const stylingDistortion = nonZeroRenderedDimensions && Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE; + if (inaccurateDimensions) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match ` + `the aspect ratio indicated by the width and height attributes. ` + `\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` + `(aspect-ratio: ${round(intrinsicAspectRatio)}). \nSupplied width and height attributes: ` + `${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${round(suppliedAspectRatio)}). ` + `\nTo fix this, update the width and height attributes.`)); + } else if (stylingDistortion) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image ` + `does not match the image's intrinsic aspect ratio. ` + `\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` + `(aspect-ratio: ${round(intrinsicAspectRatio)}). \nRendered image size: ` + `${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ` + `${round(renderedAspectRatio)}). \nThis issue can occur if "width" and "height" ` + `attributes are added to an image without updating the corresponding ` + `image styling. To fix this, adjust image styling. In most cases, ` + `adding "height: auto" or "width: auto" to the image styling will fix ` + `this issue.`)); + } else if (!dir.ngSrcset && nonZeroRenderedDimensions) { + // If `ngSrcset` hasn't been set, sanity check the intrinsic size. + const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth; + const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight; + const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE; + const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE; + if (oversizedWidth || oversizedHeight) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` + `larger than necessary. ` + `\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` + `\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` + `\nRecommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. ` + `\nNote: Recommended intrinsic image size is calculated assuming a maximum DPR of ` + `${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image ` + `or consider using the "ngSrcset" and "sizes" attributes.`)); + } + } + }); + // We only listen to the `error` event to remove the `load` event listener because it will not be + // fired if the image fails to load. This is done to prevent memory leaks in development mode + // because image elements aren't garbage-collected properly. It happens because zone.js stores the + // event listener directly on the element and closures capture `dir`. + const removeErrorListenerFn = renderer.listen(img, 'error', () => { + removeLoadListenerFn(); + removeErrorListenerFn(); + }); +} +/** + * Verifies that a specified input is set. + */ +function assertNonEmptyWidthAndHeight(dir) { + let missingAttributes = []; + if (dir.width === undefined) missingAttributes.push('width'); + if (dir.height === undefined) missingAttributes.push('height'); + if (missingAttributes.length > 0) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` + `are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` + `Including "width" and "height" attributes will prevent image-related layout shifts. ` + `To fix this, include "width" and "height" attributes on the image tag or turn on ` + `"fill" mode with the \`fill\` attribute.`); + } +} +/** + * Verifies that width and height are not set. Used in fill mode, where those attributes don't make + * sense. + */ +function assertEmptyWidthAndHeight(dir) { + if (dir.width || dir.height) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \`height\` and/or \`width\` are present ` + `along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing ` + `element, the size attributes have no effect and should be removed.`); + } +} +/** + * Verifies that the rendered image has a nonzero height. If the image is in fill mode, provides + * guidance that this can be caused by the containing element's CSS position property. + */ +function assertNonZeroRenderedHeight(dir, img, renderer) { + const removeLoadListenerFn = renderer.listen(img, 'load', () => { + removeLoadListenerFn(); + removeErrorListenerFn(); + const renderedHeight = img.clientHeight; + if (dir.fill && renderedHeight === 0) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the height of the fill-mode image is zero. ` + `This is likely because the containing element does not have the CSS 'position' ` + `property set to one of the following: "relative", "fixed", or "absolute". ` + `To fix this problem, make sure the container element has the CSS 'position' ` + `property defined and the height of the element is not zero.`)); + } + }); + // See comments in the `assertNoImageDistortion`. + const removeErrorListenerFn = renderer.listen(img, 'error', () => { + removeLoadListenerFn(); + removeErrorListenerFn(); + }); +} +/** + * Verifies that the `loading` attribute is set to a valid input & + * is not used on priority images. + */ +function assertValidLoadingInput(dir) { + if (dir.loading && dir.priority) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` + `was used on an image that was marked "priority". ` + `Setting \`loading\` on priority images is not allowed ` + `because these images will always be eagerly loaded. ` + `To fix this, remove the “loading” attribute from the priority image.`); + } + const validInputs = ['auto', 'eager', 'lazy']; + if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) { + throw new _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵRuntimeError"](2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` + `has an invalid value (\`${dir.loading}\`). ` + `To fix this, provide a valid value ("lazy", "eager", or "auto").`); + } +} +/** + * Warns if NOT using a loader (falling back to the generic loader) and + * the image appears to be hosted on one of the image CDNs for which + * we do have a built-in image loader. Suggests switching to the + * built-in loader. + * + * @param ngSrc Value of the ngSrc attribute + * @param imageLoader ImageLoader provided + */ +function assertNotMissingBuiltInLoader(ngSrc, imageLoader) { + if (imageLoader === noopImageLoader) { + let builtInLoaderName = ''; + for (const loader of BUILT_IN_LOADERS) { + if (loader.testUrl(ngSrc)) { + builtInLoaderName = loader.name; + break; + } + } + if (builtInLoaderName) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2962 /* RuntimeErrorCode.MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` + `${builtInLoaderName} CDN, but your app is not using Angular's ` + `built-in loader for that CDN. We recommend switching to use ` + `the built-in by calling \`provide${builtInLoaderName}Loader()\` ` + `in your \`providers\` and passing it your instance's base URL. ` + `If you don't want to use the built-in loader, define a custom ` + `loader function using IMAGE_LOADER to silence this warning.`)); + } + } +} +/** + * Warns if ngSrcset is present and no loader is configured (i.e. the default one is being used). + */ +function assertNoNgSrcsetWithoutLoader(dir, imageLoader) { + if (dir.ngSrcset && imageLoader === noopImageLoader) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` attribute is present but ` + `no image loader is configured (i.e. the default one is being used), ` + `which would result in the same image being used for all configured sizes. ` + `To fix this, provide a loader or remove the \`ngSrcset\` attribute from the image.`)); + } +} +/** + * Warns if loaderParams is present and no loader is configured (i.e. the default one is being + * used). + */ +function assertNoLoaderParamsWithoutLoader(dir, imageLoader) { + if (dir.loaderParams && imageLoader === noopImageLoader) { + console.warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵformatRuntimeError"])(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`loaderParams\` attribute is present but ` + `no image loader is configured (i.e. the default one is being used), ` + `which means that the loaderParams data will not be consumed and will not affect the URL. ` + `To fix this, provide a custom loader or remove the \`loaderParams\` attribute from the image.`)); + } +} +function round(input) { + return Number.isInteger(input) ? input : input.toFixed(2); +} +// Transform function to handle SafeValue input for ngSrc. This doesn't do any sanitization, +// as that is not needed for img.src and img.srcset. This transform is purely for compatibility. +function unwrapSafeUrl(value) { + if (typeof value === 'string') { + return value; + } + return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵunwrapSafeValue"])(value); +} +// Transform function to handle inputs which may be booleans, strings, or string representations +// of boolean values. Used for the placeholder attribute. +function booleanOrDataUrlAttribute(value) { + if (typeof value === 'string' && value.startsWith(`data:`)) { + return value; + } + return (0,_angular_core__WEBPACK_IMPORTED_MODULE_0__.booleanAttribute)(value); +} + +/** + * @module + * @description + * Entry point for all public APIs of the common package. + */ + +/** + * @module + * @description + * Entry point for all public APIs of this package. + */ +// This file only reexports content of the `src` folder. Keep it that way. + +// This file is not used to build this module. It is only used during editing + +/** + * Generated bundle index. Do not edit. + */ + + + +/***/ }), + +/***/ 77008: +/*!********************************************************!*\ + !*** ./node_modules/@angular/common/fesm2022/http.mjs ***! + \********************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ FetchBackend: () => (/* binding */ FetchBackend), +/* harmony export */ HTTP_INTERCEPTORS: () => (/* binding */ HTTP_INTERCEPTORS), +/* harmony export */ HttpBackend: () => (/* binding */ HttpBackend), +/* harmony export */ HttpClient: () => (/* binding */ HttpClient), +/* harmony export */ HttpClientJsonpModule: () => (/* binding */ HttpClientJsonpModule), +/* harmony export */ HttpClientModule: () => (/* binding */ HttpClientModule), +/* harmony export */ HttpClientXsrfModule: () => (/* binding */ HttpClientXsrfModule), +/* harmony export */ HttpContext: () => (/* binding */ HttpContext), +/* harmony export */ HttpContextToken: () => (/* binding */ HttpContextToken), +/* harmony export */ HttpErrorResponse: () => (/* binding */ HttpErrorResponse), +/* harmony export */ HttpEventType: () => (/* binding */ HttpEventType), +/* harmony export */ HttpFeatureKind: () => (/* binding */ HttpFeatureKind), +/* harmony export */ HttpHandler: () => (/* binding */ HttpHandler), +/* harmony export */ HttpHeaderResponse: () => (/* binding */ HttpHeaderResponse), +/* harmony export */ HttpHeaders: () => (/* binding */ HttpHeaders), +/* harmony export */ HttpParams: () => (/* binding */ HttpParams), +/* harmony export */ HttpRequest: () => (/* binding */ HttpRequest), +/* harmony export */ HttpResponse: () => (/* binding */ HttpResponse), +/* harmony export */ HttpResponseBase: () => (/* binding */ HttpResponseBase), +/* harmony export */ HttpStatusCode: () => (/* binding */ HttpStatusCode), +/* harmony export */ HttpUrlEncodingCodec: () => (/* binding */ HttpUrlEncodingCodec), +/* harmony export */ HttpXhrBackend: () => (/* binding */ HttpXhrBackend), +/* harmony export */ HttpXsrfTokenExtractor: () => (/* binding */ HttpXsrfTokenExtractor), +/* harmony export */ JsonpClientBackend: () => (/* binding */ JsonpClientBackend), +/* harmony export */ JsonpInterceptor: () => (/* binding */ JsonpInterceptor), +/* harmony export */ provideHttpClient: () => (/* binding */ provideHttpClient), +/* harmony export */ withFetch: () => (/* binding */ withFetch), +/* harmony export */ withInterceptors: () => (/* binding */ withInterceptors), +/* harmony export */ withInterceptorsFromDi: () => (/* binding */ withInterceptorsFromDi), +/* harmony export */ withJsonpSupport: () => (/* binding */ withJsonpSupport), +/* harmony export */ withNoXsrfProtection: () => (/* binding */ withNoXsrfProtection), +/* harmony export */ withRequestsMadeViaParent: () => (/* binding */ withRequestsMadeViaParent), +/* harmony export */ withXsrfConfiguration: () => (/* binding */ withXsrfConfiguration), +/* harmony export */ "ɵHTTP_ROOT_INTERCEPTOR_FNS": () => (/* binding */ HTTP_ROOT_INTERCEPTOR_FNS), +/* harmony export */ "ɵHttpInterceptingHandler": () => (/* binding */ HttpInterceptorHandler), +/* harmony export */ "ɵHttpInterceptorHandler": () => (/* binding */ HttpInterceptorHandler), +/* harmony export */ "ɵPRIMARY_HTTP_BACKEND": () => (/* binding */ PRIMARY_HTTP_BACKEND), +/* harmony export */ "ɵwithHttpTransferCache": () => (/* binding */ withHttpTransferCache) +/* harmony export */ }); +/* harmony import */ var _home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 56207); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 96623); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 13901); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ 64517); +/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rxjs */ 73496); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 75214); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ 61856); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ 24406); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rxjs/operators */ 39848); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rxjs/operators */ 21082); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! rxjs/operators */ 61969); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ 39191); + +/** + * @license Angular v17.3.3 + * (c) 2010-2022 Google LLC. https://angular.io/ + * License: MIT + */ + + + + + + + + +/** + * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a + * `HttpResponse`. + * + * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the + * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the + * `HttpBackend`. + * + * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain. + * + * @publicApi + */ +class HttpHandler {} +/** + * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend. + * + * Interceptors sit between the `HttpClient` interface and the `HttpBackend`. + * + * When injected, `HttpBackend` dispatches requests directly to the backend, without going + * through the interceptor chain. + * + * @publicApi + */ +class HttpBackend {} + +/** + * Represents the header configuration options for an HTTP request. + * Instances are immutable. Modifying methods return a cloned + * instance with the change. The original object is never changed. + * + * @publicApi + */ +class HttpHeaders { + /** Constructs a new HTTP header object with the given values.*/ + constructor(headers) { + /** + * Internal map of lowercased header names to the normalized + * form of the name (the form seen first). + */ + this.normalizedNames = new Map(); + /** + * Queued updates to be materialized the next initialization. + */ + this.lazyUpdate = null; + if (!headers) { + this.headers = new Map(); + } else if (typeof headers === 'string') { + this.lazyInit = () => { + this.headers = new Map(); + headers.split('\n').forEach(line => { + const index = line.indexOf(':'); + if (index > 0) { + const name = line.slice(0, index); + const key = name.toLowerCase(); + const value = line.slice(index + 1).trim(); + this.maybeSetNormalizedName(name, key); + if (this.headers.has(key)) { + this.headers.get(key).push(value); + } else { + this.headers.set(key, [value]); + } + } + }); + }; + } else if (typeof Headers !== 'undefined' && headers instanceof Headers) { + this.headers = new Map(); + headers.forEach((values, name) => { + this.setHeaderEntries(name, values); + }); + } else { + this.lazyInit = () => { + if (typeof ngDevMode === 'undefined' || ngDevMode) { + assertValidHeaders(headers); + } + this.headers = new Map(); + Object.entries(headers).forEach(([name, values]) => { + this.setHeaderEntries(name, values); + }); + }; + } + } + /** + * Checks for existence of a given header. + * + * @param name The header name to check for existence. + * + * @returns True if the header exists, false otherwise. + */ + has(name) { + this.init(); + return this.headers.has(name.toLowerCase()); + } + /** + * Retrieves the first value of a given header. + * + * @param name The header name. + * + * @returns The value string if the header exists, null otherwise + */ + get(name) { + this.init(); + const values = this.headers.get(name.toLowerCase()); + return values && values.length > 0 ? values[0] : null; + } + /** + * Retrieves the names of the headers. + * + * @returns A list of header names. + */ + keys() { + this.init(); + return Array.from(this.normalizedNames.values()); + } + /** + * Retrieves a list of values for a given header. + * + * @param name The header name from which to retrieve values. + * + * @returns A string of values if the header exists, null otherwise. + */ + getAll(name) { + this.init(); + return this.headers.get(name.toLowerCase()) || null; + } + /** + * Appends a new value to the existing set of values for a header + * and returns them in a clone of the original instance. + * + * @param name The header name for which to append the values. + * @param value The value to append. + * + * @returns A clone of the HTTP headers object with the value appended to the given header. + */ + append(name, value) { + return this.clone({ + name, + value, + op: 'a' + }); + } + /** + * Sets or modifies a value for a given header in a clone of the original instance. + * If the header already exists, its value is replaced with the given value + * in the returned object. + * + * @param name The header name. + * @param value The value or values to set or override for the given header. + * + * @returns A clone of the HTTP headers object with the newly set header value. + */ + set(name, value) { + return this.clone({ + name, + value, + op: 's' + }); + } + /** + * Deletes values for a given header in a clone of the original instance. + * + * @param name The header name. + * @param value The value or values to delete for the given header. + * + * @returns A clone of the HTTP headers object with the given value deleted. + */ + delete(name, value) { + return this.clone({ + name, + value, + op: 'd' + }); + } + maybeSetNormalizedName(name, lcName) { + if (!this.normalizedNames.has(lcName)) { + this.normalizedNames.set(lcName, name); + } + } + init() { + if (!!this.lazyInit) { + if (this.lazyInit instanceof HttpHeaders) { + this.copyFrom(this.lazyInit); + } else { + this.lazyInit(); + } + this.lazyInit = null; + if (!!this.lazyUpdate) { + this.lazyUpdate.forEach(update => this.applyUpdate(update)); + this.lazyUpdate = null; + } + } + } + copyFrom(other) { + other.init(); + Array.from(other.headers.keys()).forEach(key => { + this.headers.set(key, other.headers.get(key)); + this.normalizedNames.set(key, other.normalizedNames.get(key)); + }); + } + clone(update) { + const clone = new HttpHeaders(); + clone.lazyInit = !!this.lazyInit && this.lazyInit instanceof HttpHeaders ? this.lazyInit : this; + clone.lazyUpdate = (this.lazyUpdate || []).concat([update]); + return clone; + } + applyUpdate(update) { + const key = update.name.toLowerCase(); + switch (update.op) { + case 'a': + case 's': + let value = update.value; + if (typeof value === 'string') { + value = [value]; + } + if (value.length === 0) { + return; + } + this.maybeSetNormalizedName(update.name, key); + const base = (update.op === 'a' ? this.headers.get(key) : undefined) || []; + base.push(...value); + this.headers.set(key, base); + break; + case 'd': + const toDelete = update.value; + if (!toDelete) { + this.headers.delete(key); + this.normalizedNames.delete(key); + } else { + let existing = this.headers.get(key); + if (!existing) { + return; + } + existing = existing.filter(value => toDelete.indexOf(value) === -1); + if (existing.length === 0) { + this.headers.delete(key); + this.normalizedNames.delete(key); + } else { + this.headers.set(key, existing); + } + } + break; + } + } + setHeaderEntries(name, values) { + const headerValues = (Array.isArray(values) ? values : [values]).map(value => value.toString()); + const key = name.toLowerCase(); + this.headers.set(key, headerValues); + this.maybeSetNormalizedName(name, key); + } + /** + * @internal + */ + forEach(fn) { + this.init(); + Array.from(this.normalizedNames.keys()).forEach(key => fn(this.normalizedNames.get(key), this.headers.get(key))); + } +} +/** + * Verifies that the headers object has the right shape: the values + * must be either strings, numbers or arrays. Throws an error if an invalid + * header value is present. + */ +function assertValidHeaders(headers) { + for (const [key, value] of Object.entries(headers)) { + if (!(typeof value === 'string' || typeof value === 'number') && !Array.isArray(value)) { + throw new Error(`Unexpected value of the \`${key}\` header provided. ` + `Expecting either a string, a number or an array, but got: \`${value}\`.`); + } + } +} + +/** + * Provides encoding and decoding of URL parameter and query-string values. + * + * Serializes and parses URL parameter keys and values to encode and decode them. + * If you pass URL query parameters without encoding, + * the query parameters can be misinterpreted at the receiving end. + * + * + * @publicApi + */ +class HttpUrlEncodingCodec { + /** + * Encodes a key name for a URL parameter or query-string. + * @param key The key name. + * @returns The encoded key name. + */ + encodeKey(key) { + return standardEncoding(key); + } + /** + * Encodes the value of a URL parameter or query-string. + * @param value The value. + * @returns The encoded value. + */ + encodeValue(value) { + return standardEncoding(value); + } + /** + * Decodes an encoded URL parameter or query-string key. + * @param key The encoded key name. + * @returns The decoded key name. + */ + decodeKey(key) { + return decodeURIComponent(key); + } + /** + * Decodes an encoded URL parameter or query-string value. + * @param value The encoded value. + * @returns The decoded value. + */ + decodeValue(value) { + return decodeURIComponent(value); + } +} +function paramParser(rawParams, codec) { + const map = new Map(); + if (rawParams.length > 0) { + // The `window.location.search` can be used while creating an instance of the `HttpParams` class + // (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search` + // may start with the `?` char, so we strip it if it's present. + const params = rawParams.replace(/^\?/, '').split('&'); + params.forEach(param => { + const eqIdx = param.indexOf('='); + const [key, val] = eqIdx == -1 ? [codec.decodeKey(param), ''] : [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))]; + const list = map.get(key) || []; + list.push(val); + map.set(key, list); + }); + } + return map; +} +/** + * Encode input string with standard encodeURIComponent and then un-encode specific characters. + */ +const STANDARD_ENCODING_REGEX = /%(\d[a-f0-9])/gi; +const STANDARD_ENCODING_REPLACEMENTS = { + '40': '@', + '3A': ':', + '24': '$', + '2C': ',', + '3B': ';', + '3D': '=', + '3F': '?', + '2F': '/' +}; +function standardEncoding(v) { + return encodeURIComponent(v).replace(STANDARD_ENCODING_REGEX, (s, t) => STANDARD_ENCODING_REPLACEMENTS[t] ?? s); +} +function valueToString(value) { + return `${value}`; +} +/** + * An HTTP request/response body that represents serialized parameters, + * per the MIME type `application/x-www-form-urlencoded`. + * + * This class is immutable; all mutation operations return a new instance. + * + * @publicApi + */ +class HttpParams { + constructor(options = {}) { + this.updates = null; + this.cloneFrom = null; + this.encoder = options.encoder || new HttpUrlEncodingCodec(); + if (!!options.fromString) { + if (!!options.fromObject) { + throw new Error(`Cannot specify both fromString and fromObject.`); + } + this.map = paramParser(options.fromString, this.encoder); + } else if (!!options.fromObject) { + this.map = new Map(); + Object.keys(options.fromObject).forEach(key => { + const value = options.fromObject[key]; + // convert the values to strings + const values = Array.isArray(value) ? value.map(valueToString) : [valueToString(value)]; + this.map.set(key, values); + }); + } else { + this.map = null; + } + } + /** + * Reports whether the body includes one or more values for a given parameter. + * @param param The parameter name. + * @returns True if the parameter has one or more values, + * false if it has no value or is not present. + */ + has(param) { + this.init(); + return this.map.has(param); + } + /** + * Retrieves the first value for a parameter. + * @param param The parameter name. + * @returns The first value of the given parameter, + * or `null` if the parameter is not present. + */ + get(param) { + this.init(); + const res = this.map.get(param); + return !!res ? res[0] : null; + } + /** + * Retrieves all values for a parameter. + * @param param The parameter name. + * @returns All values in a string array, + * or `null` if the parameter not present. + */ + getAll(param) { + this.init(); + return this.map.get(param) || null; + } + /** + * Retrieves all the parameters for this body. + * @returns The parameter names in a string array. + */ + keys() { + this.init(); + return Array.from(this.map.keys()); + } + /** + * Appends a new value to existing values for a parameter. + * @param param The parameter name. + * @param value The new value to add. + * @return A new body with the appended value. + */ + append(param, value) { + return this.clone({ + param, + value, + op: 'a' + }); + } + /** + * Constructs a new body with appended values for the given parameter name. + * @param params parameters and values + * @return A new body with the new value. + */ + appendAll(params) { + const updates = []; + Object.keys(params).forEach(param => { + const value = params[param]; + if (Array.isArray(value)) { + value.forEach(_value => { + updates.push({ + param, + value: _value, + op: 'a' + }); + }); + } else { + updates.push({ + param, + value: value, + op: 'a' + }); + } + }); + return this.clone(updates); + } + /** + * Replaces the value for a parameter. + * @param param The parameter name. + * @param value The new value. + * @return A new body with the new value. + */ + set(param, value) { + return this.clone({ + param, + value, + op: 's' + }); + } + /** + * Removes a given value or all values from a parameter. + * @param param The parameter name. + * @param value The value to remove, if provided. + * @return A new body with the given value removed, or with all values + * removed if no value is specified. + */ + delete(param, value) { + return this.clone({ + param, + value, + op: 'd' + }); + } + /** + * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are + * separated by `&`s. + */ + toString() { + this.init(); + return this.keys().map(key => { + const eKey = this.encoder.encodeKey(key); + // `a: ['1']` produces `'a=1'` + // `b: []` produces `''` + // `c: ['1', '2']` produces `'c=1&c=2'` + return this.map.get(key).map(value => eKey + '=' + this.encoder.encodeValue(value)).join('&'); + }) + // filter out empty values because `b: []` produces `''` + // which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't + .filter(param => param !== '').join('&'); + } + clone(update) { + const clone = new HttpParams({ + encoder: this.encoder + }); + clone.cloneFrom = this.cloneFrom || this; + clone.updates = (this.updates || []).concat(update); + return clone; + } + init() { + if (this.map === null) { + this.map = new Map(); + } + if (this.cloneFrom !== null) { + this.cloneFrom.init(); + this.cloneFrom.keys().forEach(key => this.map.set(key, this.cloneFrom.map.get(key))); + this.updates.forEach(update => { + switch (update.op) { + case 'a': + case 's': + const base = (update.op === 'a' ? this.map.get(update.param) : undefined) || []; + base.push(valueToString(update.value)); + this.map.set(update.param, base); + break; + case 'd': + if (update.value !== undefined) { + let base = this.map.get(update.param) || []; + const idx = base.indexOf(valueToString(update.value)); + if (idx !== -1) { + base.splice(idx, 1); + } + if (base.length > 0) { + this.map.set(update.param, base); + } else { + this.map.delete(update.param); + } + } else { + this.map.delete(update.param); + break; + } + } + }); + this.cloneFrom = this.updates = null; + } + } +} + +/** + * A token used to manipulate and access values stored in `HttpContext`. + * + * @publicApi + */ +class HttpContextToken { + constructor(defaultValue) { + this.defaultValue = defaultValue; + } +} +/** + * Http context stores arbitrary user defined values and ensures type safety without + * actually knowing the types. It is backed by a `Map` and guarantees that keys do not clash. + * + * This context is mutable and is shared between cloned requests unless explicitly specified. + * + * @usageNotes + * + * ### Usage Example + * + * ```typescript + * // inside cache.interceptors.ts + * export const IS_CACHE_ENABLED = new HttpContextToken(() => false); + * + * export class CacheInterceptor implements HttpInterceptor { + * + * intercept(req: HttpRequest, delegate: HttpHandler): Observable> { + * if (req.context.get(IS_CACHE_ENABLED) === true) { + * return ...; + * } + * return delegate.handle(req); + * } + * } + * + * // inside a service + * + * this.httpClient.get('/api/weather', { + * context: new HttpContext().set(IS_CACHE_ENABLED, true) + * }).subscribe(...); + * ``` + * + * @publicApi + */ +class HttpContext { + constructor() { + this.map = new Map(); + } + /** + * Store a value in the context. If a value is already present it will be overwritten. + * + * @param token The reference to an instance of `HttpContextToken`. + * @param value The value to store. + * + * @returns A reference to itself for easy chaining. + */ + set(token, value) { + this.map.set(token, value); + return this; + } + /** + * Retrieve the value associated with the given token. + * + * @param token The reference to an instance of `HttpContextToken`. + * + * @returns The stored value or default if one is defined. + */ + get(token) { + if (!this.map.has(token)) { + this.map.set(token, token.defaultValue()); + } + return this.map.get(token); + } + /** + * Delete the value associated with the given token. + * + * @param token The reference to an instance of `HttpContextToken`. + * + * @returns A reference to itself for easy chaining. + */ + delete(token) { + this.map.delete(token); + return this; + } + /** + * Checks for existence of a given token. + * + * @param token The reference to an instance of `HttpContextToken`. + * + * @returns True if the token exists, false otherwise. + */ + has(token) { + return this.map.has(token); + } + /** + * @returns a list of tokens currently stored in the context. + */ + keys() { + return this.map.keys(); + } +} + +/** + * Determine whether the given HTTP method may include a body. + */ +function mightHaveBody(method) { + switch (method) { + case 'DELETE': + case 'GET': + case 'HEAD': + case 'OPTIONS': + case 'JSONP': + return false; + default: + return true; + } +} +/** + * Safely assert whether the given value is an ArrayBuffer. + * + * In some execution environments ArrayBuffer is not defined. + */ +function isArrayBuffer(value) { + return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer; +} +/** + * Safely assert whether the given value is a Blob. + * + * In some execution environments Blob is not defined. + */ +function isBlob(value) { + return typeof Blob !== 'undefined' && value instanceof Blob; +} +/** + * Safely assert whether the given value is a FormData instance. + * + * In some execution environments FormData is not defined. + */ +function isFormData(value) { + return typeof FormData !== 'undefined' && value instanceof FormData; +} +/** + * Safely assert whether the given value is a URLSearchParams instance. + * + * In some execution environments URLSearchParams is not defined. + */ +function isUrlSearchParams(value) { + return typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams; +} +/** + * An outgoing HTTP request with an optional typed body. + * + * `HttpRequest` represents an outgoing request, including URL, method, + * headers, body, and other request configuration options. Instances should be + * assumed to be immutable. To modify a `HttpRequest`, the `clone` + * method should be used. + * + * @publicApi + */ +class HttpRequest { + constructor(method, url, third, fourth) { + this.url = url; + /** + * The request body, or `null` if one isn't set. + * + * Bodies are not enforced to be immutable, as they can include a reference to any + * user-defined data type. However, interceptors should take care to preserve + * idempotence by treating them as such. + */ + this.body = null; + /** + * Whether this request should be made in a way that exposes progress events. + * + * Progress events are expensive (change detection runs on each event) and so + * they should only be requested if the consumer intends to monitor them. + * + * Note: The `FetchBackend` doesn't support progress report on uploads. + */ + this.reportProgress = false; + /** + * Whether this request should be sent with outgoing credentials (cookies). + */ + this.withCredentials = false; + /** + * The expected response type of the server. + * + * This is used to parse the response appropriately before returning it to + * the requestee. + */ + this.responseType = 'json'; + this.method = method.toUpperCase(); + // Next, need to figure out which argument holds the HttpRequestInit + // options, if any. + let options; + // Check whether a body argument is expected. The only valid way to omit + // the body argument is to use a known no-body method like GET. + if (mightHaveBody(this.method) || !!fourth) { + // Body is the third argument, options are the fourth. + this.body = third !== undefined ? third : null; + options = fourth; + } else { + // No body required, options are the third argument. The body stays null. + options = third; + } + // If options have been passed, interpret them. + if (options) { + // Normalize reportProgress and withCredentials. + this.reportProgress = !!options.reportProgress; + this.withCredentials = !!options.withCredentials; + // Override default response type of 'json' if one is provided. + if (!!options.responseType) { + this.responseType = options.responseType; + } + // Override headers if they're provided. + if (!!options.headers) { + this.headers = options.headers; + } + if (!!options.context) { + this.context = options.context; + } + if (!!options.params) { + this.params = options.params; + } + // We do want to assign transferCache even if it's falsy (false is valid value) + this.transferCache = options.transferCache; + } + // If no headers have been passed in, construct a new HttpHeaders instance. + this.headers ??= new HttpHeaders(); + // If no context have been passed in, construct a new HttpContext instance. + this.context ??= new HttpContext(); + // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance. + if (!this.params) { + this.params = new HttpParams(); + this.urlWithParams = url; + } else { + // Encode the parameters to a string in preparation for inclusion in the URL. + const params = this.params.toString(); + if (params.length === 0) { + // No parameters, the visible URL is just the URL given at creation time. + this.urlWithParams = url; + } else { + // Does the URL already have query parameters? Look for '?'. + const qIdx = url.indexOf('?'); + // There are 3 cases to handle: + // 1) No existing parameters -> append '?' followed by params. + // 2) '?' exists and is followed by existing query string -> + // append '&' followed by params. + // 3) '?' exists at the end of the url -> append params directly. + // This basically amounts to determining the character, if any, with + // which to join the URL and parameters. + const sep = qIdx === -1 ? '?' : qIdx < url.length - 1 ? '&' : ''; + this.urlWithParams = url + sep + params; + } + } + } + /** + * Transform the free-form body into a serialized format suitable for + * transmission to the server. + */ + serializeBody() { + // If no body is present, no need to serialize it. + if (this.body === null) { + return null; + } + // Check whether the body is already in a serialized form. If so, + // it can just be returned directly. + if (typeof this.body === 'string' || isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) || isUrlSearchParams(this.body)) { + return this.body; + } + // Check whether the body is an instance of HttpUrlEncodedParams. + if (this.body instanceof HttpParams) { + return this.body.toString(); + } + // Check whether the body is an object or array, and serialize with JSON if so. + if (typeof this.body === 'object' || typeof this.body === 'boolean' || Array.isArray(this.body)) { + return JSON.stringify(this.body); + } + // Fall back on toString() for everything else. + return this.body.toString(); + } + /** + * Examine the body and attempt to infer an appropriate MIME type + * for it. + * + * If no such type can be inferred, this method will return `null`. + */ + detectContentTypeHeader() { + // An empty body has no content type. + if (this.body === null) { + return null; + } + // FormData bodies rely on the browser's content type assignment. + if (isFormData(this.body)) { + return null; + } + // Blobs usually have their own content type. If it doesn't, then + // no type can be inferred. + if (isBlob(this.body)) { + return this.body.type || null; + } + // Array buffers have unknown contents and thus no type can be inferred. + if (isArrayBuffer(this.body)) { + return null; + } + // Technically, strings could be a form of JSON data, but it's safe enough + // to assume they're plain strings. + if (typeof this.body === 'string') { + return 'text/plain'; + } + // `HttpUrlEncodedParams` has its own content-type. + if (this.body instanceof HttpParams) { + return 'application/x-www-form-urlencoded;charset=UTF-8'; + } + // Arrays, objects, boolean and numbers will be encoded as JSON. + if (typeof this.body === 'object' || typeof this.body === 'number' || typeof this.body === 'boolean') { + return 'application/json'; + } + // No type could be inferred. + return null; + } + clone(update = {}) { + // For method, url, and responseType, take the current value unless + // it is overridden in the update hash. + const method = update.method || this.method; + const url = update.url || this.url; + const responseType = update.responseType || this.responseType; + // Carefully handle the transferCache to differentiate between + // `false` and `undefined` in the update args. + const transferCache = update.transferCache ?? this.transferCache; + // The body is somewhat special - a `null` value in update.body means + // whatever current body is present is being overridden with an empty + // body, whereas an `undefined` value in update.body implies no + // override. + const body = update.body !== undefined ? update.body : this.body; + // Carefully handle the boolean options to differentiate between + // `false` and `undefined` in the update args. + const withCredentials = update.withCredentials ?? this.withCredentials; + const reportProgress = update.reportProgress ?? this.reportProgress; + // Headers and params may be appended to if `setHeaders` or + // `setParams` are used. + let headers = update.headers || this.headers; + let params = update.params || this.params; + // Pass on context if needed + const context = update.context ?? this.context; + // Check whether the caller has asked to add headers. + if (update.setHeaders !== undefined) { + // Set every requested header. + headers = Object.keys(update.setHeaders).reduce((headers, name) => headers.set(name, update.setHeaders[name]), headers); + } + // Check whether the caller has asked to set params. + if (update.setParams) { + // Set every requested param. + params = Object.keys(update.setParams).reduce((params, param) => params.set(param, update.setParams[param]), params); + } + // Finally, construct the new HttpRequest using the pieces from above. + return new HttpRequest(method, url, body, { + params, + headers, + context, + reportProgress, + responseType, + withCredentials, + transferCache + }); + } +} + +/** + * Type enumeration for the different kinds of `HttpEvent`. + * + * @publicApi + */ +var HttpEventType; +(function (HttpEventType) { + /** + * The request was sent out over the wire. + */ + HttpEventType[HttpEventType["Sent"] = 0] = "Sent"; + /** + * An upload progress event was received. + * + * Note: The `FetchBackend` doesn't support progress report on uploads. + */ + HttpEventType[HttpEventType["UploadProgress"] = 1] = "UploadProgress"; + /** + * The response status code and headers were received. + */ + HttpEventType[HttpEventType["ResponseHeader"] = 2] = "ResponseHeader"; + /** + * A download progress event was received. + */ + HttpEventType[HttpEventType["DownloadProgress"] = 3] = "DownloadProgress"; + /** + * The full response including the body was received. + */ + HttpEventType[HttpEventType["Response"] = 4] = "Response"; + /** + * A custom event from an interceptor or a backend. + */ + HttpEventType[HttpEventType["User"] = 5] = "User"; +})(HttpEventType || (HttpEventType = {})); +/** + * Base class for both `HttpResponse` and `HttpHeaderResponse`. + * + * @publicApi + */ +class HttpResponseBase { + /** + * Super-constructor for all responses. + * + * The single parameter accepted is an initialization hash. Any properties + * of the response passed there will override the default values. + */ + constructor(init, defaultStatus = HttpStatusCode.Ok, defaultStatusText = 'OK') { + // If the hash has values passed, use them to initialize the response. + // Otherwise use the default values. + this.headers = init.headers || new HttpHeaders(); + this.status = init.status !== undefined ? init.status : defaultStatus; + this.statusText = init.statusText || defaultStatusText; + this.url = init.url || null; + // Cache the ok value to avoid defining a getter. + this.ok = this.status >= 200 && this.status < 300; + } +} +/** + * A partial HTTP response which only includes the status and header data, + * but no response body. + * + * `HttpHeaderResponse` is a `HttpEvent` available on the response + * event stream, only when progress events are requested. + * + * @publicApi + */ +class HttpHeaderResponse extends HttpResponseBase { + /** + * Create a new `HttpHeaderResponse` with the given parameters. + */ + constructor(init = {}) { + super(init); + this.type = HttpEventType.ResponseHeader; + } + /** + * Copy this `HttpHeaderResponse`, overriding its contents with the + * given parameter hash. + */ + clone(update = {}) { + // Perform a straightforward initialization of the new HttpHeaderResponse, + // overriding the current parameters with new ones if given. + return new HttpHeaderResponse({ + headers: update.headers || this.headers, + status: update.status !== undefined ? update.status : this.status, + statusText: update.statusText || this.statusText, + url: update.url || this.url || undefined + }); + } +} +/** + * A full HTTP response, including a typed response body (which may be `null` + * if one was not returned). + * + * `HttpResponse` is a `HttpEvent` available on the response event + * stream. + * + * @publicApi + */ +class HttpResponse extends HttpResponseBase { + /** + * Construct a new `HttpResponse`. + */ + constructor(init = {}) { + super(init); + this.type = HttpEventType.Response; + this.body = init.body !== undefined ? init.body : null; + } + clone(update = {}) { + return new HttpResponse({ + body: update.body !== undefined ? update.body : this.body, + headers: update.headers || this.headers, + status: update.status !== undefined ? update.status : this.status, + statusText: update.statusText || this.statusText, + url: update.url || this.url || undefined + }); + } +} +/** + * A response that represents an error or failure, either from a + * non-successful HTTP status, an error while executing the request, + * or some other failure which occurred during the parsing of the response. + * + * Any error returned on the `Observable` response stream will be + * wrapped in an `HttpErrorResponse` to provide additional context about + * the state of the HTTP layer when the error occurred. The error property + * will contain either a wrapped Error object or the error response returned + * from the server. + * + * @publicApi + */ +class HttpErrorResponse extends HttpResponseBase { + constructor(init) { + // Initialize with a default status of 0 / Unknown Error. + super(init, 0, 'Unknown Error'); + this.name = 'HttpErrorResponse'; + /** + * Errors are never okay, even when the status code is in the 2xx success range. + */ + this.ok = false; + // If the response was successful, then this was a parse error. Otherwise, it was + // a protocol-level failure of some sort. Either the request failed in transit + // or the server returned an unsuccessful status code. + if (this.status >= 200 && this.status < 300) { + this.message = `Http failure during parsing for ${init.url || '(unknown url)'}`; + } else { + this.message = `Http failure response for ${init.url || '(unknown url)'}: ${init.status} ${init.statusText}`; + } + this.error = init.error || null; + } +} +/** + * Http status codes. + * As per https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml + * @publicApi + */ +var HttpStatusCode; +(function (HttpStatusCode) { + HttpStatusCode[HttpStatusCode["Continue"] = 100] = "Continue"; + HttpStatusCode[HttpStatusCode["SwitchingProtocols"] = 101] = "SwitchingProtocols"; + HttpStatusCode[HttpStatusCode["Processing"] = 102] = "Processing"; + HttpStatusCode[HttpStatusCode["EarlyHints"] = 103] = "EarlyHints"; + HttpStatusCode[HttpStatusCode["Ok"] = 200] = "Ok"; + HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created"; + HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted"; + HttpStatusCode[HttpStatusCode["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation"; + HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent"; + HttpStatusCode[HttpStatusCode["ResetContent"] = 205] = "ResetContent"; + HttpStatusCode[HttpStatusCode["PartialContent"] = 206] = "PartialContent"; + HttpStatusCode[HttpStatusCode["MultiStatus"] = 207] = "MultiStatus"; + HttpStatusCode[HttpStatusCode["AlreadyReported"] = 208] = "AlreadyReported"; + HttpStatusCode[HttpStatusCode["ImUsed"] = 226] = "ImUsed"; + HttpStatusCode[HttpStatusCode["MultipleChoices"] = 300] = "MultipleChoices"; + HttpStatusCode[HttpStatusCode["MovedPermanently"] = 301] = "MovedPermanently"; + HttpStatusCode[HttpStatusCode["Found"] = 302] = "Found"; + HttpStatusCode[HttpStatusCode["SeeOther"] = 303] = "SeeOther"; + HttpStatusCode[HttpStatusCode["NotModified"] = 304] = "NotModified"; + HttpStatusCode[HttpStatusCode["UseProxy"] = 305] = "UseProxy"; + HttpStatusCode[HttpStatusCode["Unused"] = 306] = "Unused"; + HttpStatusCode[HttpStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpStatusCode[HttpStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpStatusCode[HttpStatusCode["BadRequest"] = 400] = "BadRequest"; + HttpStatusCode[HttpStatusCode["Unauthorized"] = 401] = "Unauthorized"; + HttpStatusCode[HttpStatusCode["PaymentRequired"] = 402] = "PaymentRequired"; + HttpStatusCode[HttpStatusCode["Forbidden"] = 403] = "Forbidden"; + HttpStatusCode[HttpStatusCode["NotFound"] = 404] = "NotFound"; + HttpStatusCode[HttpStatusCode["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpStatusCode[HttpStatusCode["NotAcceptable"] = 406] = "NotAcceptable"; + HttpStatusCode[HttpStatusCode["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpStatusCode[HttpStatusCode["RequestTimeout"] = 408] = "RequestTimeout"; + HttpStatusCode[HttpStatusCode["Conflict"] = 409] = "Conflict"; + HttpStatusCode[HttpStatusCode["Gone"] = 410] = "Gone"; + HttpStatusCode[HttpStatusCode["LengthRequired"] = 411] = "LengthRequired"; + HttpStatusCode[HttpStatusCode["PreconditionFailed"] = 412] = "PreconditionFailed"; + HttpStatusCode[HttpStatusCode["PayloadTooLarge"] = 413] = "PayloadTooLarge"; + HttpStatusCode[HttpStatusCode["UriTooLong"] = 414] = "UriTooLong"; + HttpStatusCode[HttpStatusCode["UnsupportedMediaType"] = 415] = "UnsupportedMediaType"; + HttpStatusCode[HttpStatusCode["RangeNotSatisfiable"] = 416] = "RangeNotSatisfiable"; + HttpStatusCode[HttpStatusCode["ExpectationFailed"] = 417] = "ExpectationFailed"; + HttpStatusCode[HttpStatusCode["ImATeapot"] = 418] = "ImATeapot"; + HttpStatusCode[HttpStatusCode["MisdirectedRequest"] = 421] = "MisdirectedRequest"; + HttpStatusCode[HttpStatusCode["UnprocessableEntity"] = 422] = "UnprocessableEntity"; + HttpStatusCode[HttpStatusCode["Locked"] = 423] = "Locked"; + HttpStatusCode[HttpStatusCode["FailedDependency"] = 424] = "FailedDependency"; + HttpStatusCode[HttpStatusCode["TooEarly"] = 425] = "TooEarly"; + HttpStatusCode[HttpStatusCode["UpgradeRequired"] = 426] = "UpgradeRequired"; + HttpStatusCode[HttpStatusCode["PreconditionRequired"] = 428] = "PreconditionRequired"; + HttpStatusCode[HttpStatusCode["TooManyRequests"] = 429] = "TooManyRequests"; + HttpStatusCode[HttpStatusCode["RequestHeaderFieldsTooLarge"] = 431] = "RequestHeaderFieldsTooLarge"; + HttpStatusCode[HttpStatusCode["UnavailableForLegalReasons"] = 451] = "UnavailableForLegalReasons"; + HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; + HttpStatusCode[HttpStatusCode["NotImplemented"] = 501] = "NotImplemented"; + HttpStatusCode[HttpStatusCode["BadGateway"] = 502] = "BadGateway"; + HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout"; + HttpStatusCode[HttpStatusCode["HttpVersionNotSupported"] = 505] = "HttpVersionNotSupported"; + HttpStatusCode[HttpStatusCode["VariantAlsoNegotiates"] = 506] = "VariantAlsoNegotiates"; + HttpStatusCode[HttpStatusCode["InsufficientStorage"] = 507] = "InsufficientStorage"; + HttpStatusCode[HttpStatusCode["LoopDetected"] = 508] = "LoopDetected"; + HttpStatusCode[HttpStatusCode["NotExtended"] = 510] = "NotExtended"; + HttpStatusCode[HttpStatusCode["NetworkAuthenticationRequired"] = 511] = "NetworkAuthenticationRequired"; +})(HttpStatusCode || (HttpStatusCode = {})); + +/** + * Constructs an instance of `HttpRequestOptions` from a source `HttpMethodOptions` and + * the given `body`. This function clones the object and adds the body. + * + * Note that the `responseType` *options* value is a String that identifies the + * single data type of the response. + * A single overload version of the method handles each response type. + * The value of `responseType` cannot be a union, as the combined signature could imply. + * + */ +function addBody(options, body) { + return { + body, + headers: options.headers, + context: options.context, + observe: options.observe, + params: options.params, + reportProgress: options.reportProgress, + responseType: options.responseType, + withCredentials: options.withCredentials, + transferCache: options.transferCache + }; +} +/** + * Performs HTTP requests. + * This service is available as an injectable class, with methods to perform HTTP requests. + * Each request method has multiple signatures, and the return type varies based on + * the signature that is called (mainly the values of `observe` and `responseType`). + * + * Note that the `responseType` *options* value is a String that identifies the + * single data type of the response. + * A single overload version of the method handles each response type. + * The value of `responseType` cannot be a union, as the combined signature could imply. + + * + * @usageNotes + * Sample HTTP requests for the [Tour of Heroes](/tutorial/tour-of-heroes/toh-pt0) application. + * + * ### HTTP Request Example + * + * ``` + * // GET heroes whose name contains search term + * searchHeroes(term: string): observable{ + * + * const params = new HttpParams({fromString: 'name=term'}); + * return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params}); + * } + * ``` + * + * Alternatively, the parameter string can be used without invoking HttpParams + * by directly joining to the URL. + * ``` + * this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'}); + * ``` + * + * + * ### JSONP Example + * ``` + * requestJsonp(url, callback = 'callback') { + * return this.httpClient.jsonp(this.heroesURL, callback); + * } + * ``` + * + * ### PATCH Example + * ``` + * // PATCH one of the heroes' name + * patchHero (id: number, heroName: string): Observable<{}> { + * const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42 + * return this.httpClient.patch(url, {name: heroName}, httpOptions) + * .pipe(catchError(this.handleError('patchHero'))); + * } + * ``` + * + * @see [HTTP Guide](guide/understanding-communicating-with-http) + * @see [HTTP Request](api/common/http/HttpRequest) + * + * @publicApi + */ +class HttpClient { + constructor(handler) { + this.handler = handler; + } + /** + * Constructs an observable for a generic HTTP request that, when subscribed, + * fires the request through the chain of registered interceptors and on to the + * server. + * + * You can pass an `HttpRequest` directly as the only parameter. In this case, + * the call returns an observable of the raw `HttpEvent` stream. + * + * Alternatively you can pass an HTTP method as the first parameter, + * a URL string as the second, and an options hash containing the request body as the third. + * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the + * type of returned observable. + * * The `responseType` value determines how a successful response body is parsed. + * * If `responseType` is the default `json`, you can pass a type interface for the resulting + * object as a type parameter to the call. + * + * The `observe` value determines the return type, according to what you are interested in + * observing. + * * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including + * progress events by default. + * * An `observe` value of response returns an observable of `HttpResponse`, + * where the `T` parameter depends on the `responseType` and any optionally provided type + * parameter. + * * An `observe` value of body returns an observable of `` with the same `T` body type. + * + */ + request(first, url, options = {}) { + let req; + // First, check whether the primary argument is an instance of `HttpRequest`. + if (first instanceof HttpRequest) { + // It is. The other arguments must be undefined (per the signatures) and can be + // ignored. + req = first; + } else { + // It's a string, so it represents a URL. Construct a request based on it, + // and incorporate the remaining arguments (assuming `GET` unless a method is + // provided. + // Figure out the headers. + let headers = undefined; + if (options.headers instanceof HttpHeaders) { + headers = options.headers; + } else { + headers = new HttpHeaders(options.headers); + } + // Sort out parameters. + let params = undefined; + if (!!options.params) { + if (options.params instanceof HttpParams) { + params = options.params; + } else { + params = new HttpParams({ + fromObject: options.params + }); + } + } + // Construct the request. + req = new HttpRequest(first, url, options.body !== undefined ? options.body : null, { + headers, + context: options.context, + params, + reportProgress: options.reportProgress, + // By default, JSON is assumed to be returned for all calls. + responseType: options.responseType || 'json', + withCredentials: options.withCredentials, + transferCache: options.transferCache + }); + } + // Start with an Observable.of() the initial request, and run the handler (which + // includes all interceptors) inside a concatMap(). This way, the handler runs + // inside an Observable chain, which causes interceptors to be re-run on every + // subscription (this also makes retries re-run the handler, including interceptors). + const events$ = (0,rxjs__WEBPACK_IMPORTED_MODULE_1__.of)(req).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.concatMap)(req => this.handler.handle(req))); + // If coming via the API signature which accepts a previously constructed HttpRequest, + // the only option is to get the event stream. Otherwise, return the event stream if + // that is what was requested. + if (first instanceof HttpRequest || options.observe === 'events') { + return events$; + } + // The requested stream contains either the full response or the body. In either + // case, the first step is to filter the event stream to extract a stream of + // responses(s). + const res$ = events$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.filter)(event => event instanceof HttpResponse)); + // Decide which stream to return. + switch (options.observe || 'body') { + case 'body': + // The requested stream is the body. Map the response stream to the response + // body. This could be done more simply, but a misbehaving interceptor might + // transform the response body into a different format and ignore the requested + // responseType. Guard against this by validating that the response is of the + // requested type. + switch (req.responseType) { + case 'arraybuffer': + return res$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.map)(res => { + // Validate that the body is an ArrayBuffer. + if (res.body !== null && !(res.body instanceof ArrayBuffer)) { + throw new Error('Response is not an ArrayBuffer.'); + } + return res.body; + })); + case 'blob': + return res$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.map)(res => { + // Validate that the body is a Blob. + if (res.body !== null && !(res.body instanceof Blob)) { + throw new Error('Response is not a Blob.'); + } + return res.body; + })); + case 'text': + return res$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.map)(res => { + // Validate that the body is a string. + if (res.body !== null && typeof res.body !== 'string') { + throw new Error('Response is not a string.'); + } + return res.body; + })); + case 'json': + default: + // No validation needed for JSON responses, as they can be of any type. + return res$.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_4__.map)(res => res.body)); + } + case 'response': + // The response stream was requested directly, so return it. + return res$; + default: + // Guard against new future observe types being added. + throw new Error(`Unreachable: unhandled observe type ${options.observe}}`); + } + } + /** + * Constructs an observable that, when subscribed, causes the configured + * `DELETE` request to execute on the server. See the individual overloads for + * details on the return type. + * + * @param url The endpoint URL. + * @param options The HTTP options to send with the request. + * + */ + delete(url, options = {}) { + return this.request('DELETE', url, options); + } + /** + * Constructs an observable that, when subscribed, causes the configured + * `GET` request to execute on the server. See the individual overloads for + * details on the return type. + */ + get(url, options = {}) { + return this.request('GET', url, options); + } + /** + * Constructs an observable that, when subscribed, causes the configured + * `HEAD` request to execute on the server. The `HEAD` method returns + * meta information about the resource without transferring the + * resource itself. See the individual overloads for + * details on the return type. + */ + head(url, options = {}) { + return this.request('HEAD', url, options); + } + /** + * Constructs an `Observable` that, when subscribed, causes a request with the special method + * `JSONP` to be dispatched via the interceptor pipeline. + * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain + * API endpoints that don't support newer, + * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol. + * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the + * requests even if the API endpoint is not located on the same domain (origin) as the client-side + * application making the request. + * The endpoint API must support JSONP callback for JSONP requests to work. + * The resource API returns the JSON response wrapped in a callback function. + * You can pass the callback function name as one of the query parameters. + * Note that JSONP requests can only be used with `GET` requests. + * + * @param url The resource URL. + * @param callbackParam The callback function name. + * + */ + jsonp(url, callbackParam) { + return this.request('JSONP', url, { + params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'), + observe: 'body', + responseType: 'json' + }); + } + /** + * Constructs an `Observable` that, when subscribed, causes the configured + * `OPTIONS` request to execute on the server. This method allows the client + * to determine the supported HTTP methods and other capabilities of an endpoint, + * without implying a resource action. See the individual overloads for + * details on the return type. + */ + options(url, options = {}) { + return this.request('OPTIONS', url, options); + } + /** + * Constructs an observable that, when subscribed, causes the configured + * `PATCH` request to execute on the server. See the individual overloads for + * details on the return type. + */ + patch(url, body, options = {}) { + return this.request('PATCH', url, addBody(options, body)); + } + /** + * Constructs an observable that, when subscribed, causes the configured + * `POST` request to execute on the server. The server responds with the location of + * the replaced resource. See the individual overloads for + * details on the return type. + */ + post(url, body, options = {}) { + return this.request('POST', url, addBody(options, body)); + } + /** + * Constructs an observable that, when subscribed, causes the configured + * `PUT` request to execute on the server. The `PUT` method replaces an existing resource + * with a new set of values. + * See the individual overloads for details on the return type. + */ + put(url, body, options = {}) { + return this.request('PUT', url, addBody(options, body)); + } + static #_ = this.ɵfac = function HttpClient_Factory(t) { + return new (t || HttpClient)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](HttpHandler)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineInjectable"]({ + token: HttpClient, + factory: HttpClient.ɵfac + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵsetClassMetadata"](HttpClient, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_5__.Injectable + }], () => [{ + type: HttpHandler + }], null); +})(); +const XSSI_PREFIX$1 = /^\)\]\}',?\n/; +const REQUEST_URL_HEADER = `X-Request-URL`; +/** + * Determine an appropriate URL for the response, by checking either + * response url or the X-Request-URL header. + */ +function getResponseUrl$1(response) { + if (response.url) { + return response.url; + } + // stored as lowercase in the map + const xRequestUrl = REQUEST_URL_HEADER.toLocaleLowerCase(); + return response.headers.get(xRequestUrl); +} +/** + * Uses `fetch` to send requests to a backend server. + * + * This `FetchBackend` requires the support of the + * [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) which is available on all + * supported browsers and on Node.js v18 or later. + * + * @see {@link HttpHandler} + * + * @publicApi + */ +class FetchBackend { + constructor() { + // We need to bind the native fetch to its context or it will throw an "illegal invocation" + this.fetchImpl = (0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.inject)(FetchFactory, { + optional: true + })?.fetch ?? fetch.bind(globalThis); + this.ngZone = (0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_5__.NgZone); + } + handle(request) { + return new rxjs__WEBPACK_IMPORTED_MODULE_6__.Observable(observer => { + const aborter = new AbortController(); + this.doRequest(request, aborter.signal, observer).then(noop, error => observer.error(new HttpErrorResponse({ + error + }))); + return () => aborter.abort(); + }); + } + doRequest(request, signal, observer) { + var _this = this; + return (0,_home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + const init = _this.createRequestInit(request); + let response; + try { + const fetchPromise = _this.fetchImpl(request.urlWithParams, { + signal, + ...init + }); + // Make sure Zone.js doesn't trigger false-positive unhandled promise + // error in case the Promise is rejected synchronously. See function + // description for additional information. + silenceSuperfluousUnhandledPromiseRejection(fetchPromise); + // Send the `Sent` event before awaiting the response. + observer.next({ + type: HttpEventType.Sent + }); + response = yield fetchPromise; + } catch (error) { + observer.error(new HttpErrorResponse({ + error, + status: error.status ?? 0, + statusText: error.statusText, + url: request.urlWithParams, + headers: error.headers + })); + return; + } + const headers = new HttpHeaders(response.headers); + const statusText = response.statusText; + const url = getResponseUrl$1(response) ?? request.urlWithParams; + let status = response.status; + let body = null; + if (request.reportProgress) { + observer.next(new HttpHeaderResponse({ + headers, + status, + statusText, + url + })); + } + if (response.body) { + // Read Progress + const contentLength = response.headers.get('content-length'); + const chunks = []; + const reader = response.body.getReader(); + let receivedLength = 0; + let decoder; + let partialText; + // We have to check whether the Zone is defined in the global scope because this may be called + // when the zone is nooped. + const reqZone = typeof Zone !== 'undefined' && Zone.current; + // Perform response processing outside of Angular zone to + // ensure no excessive change detection runs are executed + // Here calling the async ReadableStreamDefaultReader.read() is responsible for triggering CD + yield _this.ngZone.runOutsideAngular( /*#__PURE__*/(0,_home_runner_work_egon_io_egon_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { + while (true) { + const { + done, + value + } = yield reader.read(); + if (done) { + break; + } + chunks.push(value); + receivedLength += value.length; + if (request.reportProgress) { + partialText = request.responseType === 'text' ? (partialText ?? '') + (decoder ??= new TextDecoder()).decode(value, { + stream: true + }) : undefined; + const reportProgress = () => observer.next({ + type: HttpEventType.DownloadProgress, + total: contentLength ? +contentLength : undefined, + loaded: receivedLength, + partialText + }); + reqZone ? reqZone.run(reportProgress) : reportProgress(); + } + } + })); + // Combine all chunks. + const chunksAll = _this.concatChunks(chunks, receivedLength); + try { + const contentType = response.headers.get('Content-Type') ?? ''; + body = _this.parseBody(request, chunksAll, contentType); + } catch (error) { + // Body loading or parsing failed + observer.error(new HttpErrorResponse({ + error, + headers: new HttpHeaders(response.headers), + status: response.status, + statusText: response.statusText, + url: getResponseUrl$1(response) ?? request.urlWithParams + })); + return; + } + } + // Same behavior as the XhrBackend + if (status === 0) { + status = body ? HttpStatusCode.Ok : 0; + } + // ok determines whether the response will be transmitted on the event or + // error channel. Unsuccessful status codes (not 2xx) will always be errors, + // but a successful status code can still result in an error if the user + // asked for JSON data and the body cannot be parsed as such. + const ok = status >= 200 && status < 300; + if (ok) { + observer.next(new HttpResponse({ + body, + headers, + status, + statusText, + url + })); + // The full body has been received and delivered, no further events + // are possible. This request is complete. + observer.complete(); + } else { + observer.error(new HttpErrorResponse({ + error: body, + headers, + status, + statusText, + url + })); + } + })(); + } + parseBody(request, binContent, contentType) { + switch (request.responseType) { + case 'json': + // stripping the XSSI when present + const text = new TextDecoder().decode(binContent).replace(XSSI_PREFIX$1, ''); + return text === '' ? null : JSON.parse(text); + case 'text': + return new TextDecoder().decode(binContent); + case 'blob': + return new Blob([binContent], { + type: contentType + }); + case 'arraybuffer': + return binContent.buffer; + } + } + createRequestInit(req) { + // We could share some of this logic with the XhrBackend + const headers = {}; + const credentials = req.withCredentials ? 'include' : undefined; + // Setting all the requested headers. + req.headers.forEach((name, values) => headers[name] = values.join(',')); + // Add an Accept header if one isn't present already. + headers['Accept'] ??= 'application/json, text/plain, */*'; + // Auto-detect the Content-Type header if one isn't present already. + if (!headers['Content-Type']) { + const detectedType = req.detectContentTypeHeader(); + // Sometimes Content-Type detection fails. + if (detectedType !== null) { + headers['Content-Type'] = detectedType; + } + } + return { + body: req.serializeBody(), + method: req.method, + headers, + credentials + }; + } + concatChunks(chunks, totalLength) { + const chunksAll = new Uint8Array(totalLength); + let position = 0; + for (const chunk of chunks) { + chunksAll.set(chunk, position); + position += chunk.length; + } + return chunksAll; + } + static #_ = this.ɵfac = function FetchBackend_Factory(t) { + return new (t || FetchBackend)(); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineInjectable"]({ + token: FetchBackend, + factory: FetchBackend.ɵfac + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵsetClassMetadata"](FetchBackend, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_5__.Injectable + }], null, null); +})(); +/** + * Abstract class to provide a mocked implementation of `fetch()` + */ +class FetchFactory {} +function noop() {} +/** + * Zone.js treats a rejected promise that has not yet been awaited + * as an unhandled error. This function adds a noop `.then` to make + * sure that Zone.js doesn't throw an error if the Promise is rejected + * synchronously. + */ +function silenceSuperfluousUnhandledPromiseRejection(promise) { + promise.then(noop, noop); +} +function interceptorChainEndFn(req, finalHandlerFn) { + return finalHandlerFn(req); +} +/** + * Constructs a `ChainedInterceptorFn` which adapts a legacy `HttpInterceptor` to the + * `ChainedInterceptorFn` interface. + */ +function adaptLegacyInterceptorToChain(chainTailFn, interceptor) { + return (initialRequest, finalHandlerFn) => interceptor.intercept(initialRequest, { + handle: downstreamRequest => chainTailFn(downstreamRequest, finalHandlerFn) + }); +} +/** + * Constructs a `ChainedInterceptorFn` which wraps and invokes a functional interceptor in the given + * injector. + */ +function chainedInterceptorFn(chainTailFn, interceptorFn, injector) { + // clang-format off + return (initialRequest, finalHandlerFn) => (0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.runInInjectionContext)(injector, () => interceptorFn(initialRequest, downstreamRequest => chainTailFn(downstreamRequest, finalHandlerFn))); + // clang-format on +} +/** + * A multi-provider token that represents the array of registered + * `HttpInterceptor` objects. + * + * @publicApi + */ +const HTTP_INTERCEPTORS = new _angular_core__WEBPACK_IMPORTED_MODULE_5__.InjectionToken(ngDevMode ? 'HTTP_INTERCEPTORS' : ''); +/** + * A multi-provided token of `HttpInterceptorFn`s. + */ +const HTTP_INTERCEPTOR_FNS = new _angular_core__WEBPACK_IMPORTED_MODULE_5__.InjectionToken(ngDevMode ? 'HTTP_INTERCEPTOR_FNS' : ''); +/** + * A multi-provided token of `HttpInterceptorFn`s that are only set in root. + */ +const HTTP_ROOT_INTERCEPTOR_FNS = new _angular_core__WEBPACK_IMPORTED_MODULE_5__.InjectionToken(ngDevMode ? 'HTTP_ROOT_INTERCEPTOR_FNS' : ''); +/** + * A provider to set a global primary http backend. If set, it will override the default one + */ +const PRIMARY_HTTP_BACKEND = new _angular_core__WEBPACK_IMPORTED_MODULE_5__.InjectionToken(ngDevMode ? 'PRIMARY_HTTP_BACKEND' : ''); +/** + * Creates an `HttpInterceptorFn` which lazily initializes an interceptor chain from the legacy + * class-based interceptors and runs the request through it. + */ +function legacyInterceptorFnFactory() { + let chain = null; + return (req, handler) => { + if (chain === null) { + const interceptors = (0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.inject)(HTTP_INTERCEPTORS, { + optional: true + }) ?? []; + // Note: interceptors are wrapped right-to-left so that final execution order is + // left-to-right. That is, if `interceptors` is the array `[a, b, c]`, we want to + // produce a chain that is conceptually `c(b(a(end)))`, which we build from the inside + // out. + chain = interceptors.reduceRight(adaptLegacyInterceptorToChain, interceptorChainEndFn); + } + const pendingTasks = (0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵPendingTasks"]); + const taskId = pendingTasks.add(); + return chain(req, handler).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.finalize)(() => pendingTasks.remove(taskId))); + }; +} +let fetchBackendWarningDisplayed = false; +/** Internal function to reset the flag in tests */ +function resetFetchBackendWarningFlag() { + fetchBackendWarningDisplayed = false; +} +class HttpInterceptorHandler extends HttpHandler { + constructor(backend, injector) { + super(); + this.backend = backend; + this.injector = injector; + this.chain = null; + this.pendingTasks = (0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.inject)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵPendingTasks"]); + // Check if there is a preferred HTTP backend configured and use it if that's the case. + // This is needed to enable `FetchBackend` globally for all HttpClient's when `withFetch` + // is used. + const primaryHttpBackend = (0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.inject)(PRIMARY_HTTP_BACKEND, { + optional: true + }); + this.backend = primaryHttpBackend ?? backend; + // We strongly recommend using fetch backend for HTTP calls when SSR is used + // for an application. The logic below checks if that's the case and produces + // a warning otherwise. + if ((typeof ngDevMode === 'undefined' || ngDevMode) && !fetchBackendWarningDisplayed) { + const isServer = (0,_angular_common__WEBPACK_IMPORTED_MODULE_8__.isPlatformServer)(injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_5__.PLATFORM_ID)); + if (isServer && !(this.backend instanceof FetchBackend)) { + fetchBackendWarningDisplayed = true; + injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵConsole"]).warn((0,_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵformatRuntimeError"])(2801 /* RuntimeErrorCode.NOT_USING_FETCH_BACKEND_IN_SSR */, 'Angular detected that `HttpClient` is not configured ' + "to use `fetch` APIs. It's strongly recommended to " + 'enable `fetch` for applications that use Server-Side Rendering ' + 'for better performance and compatibility. ' + 'To enable `fetch`, add the `withFetch()` to the `provideHttpClient()` ' + 'call at the root of the application.')); + } + } + } + handle(initialRequest) { + if (this.chain === null) { + const dedupedInterceptorFns = Array.from(new Set([...this.injector.get(HTTP_INTERCEPTOR_FNS), ...this.injector.get(HTTP_ROOT_INTERCEPTOR_FNS, [])])); + // Note: interceptors are wrapped right-to-left so that final execution order is + // left-to-right. That is, if `dedupedInterceptorFns` is the array `[a, b, c]`, we want to + // produce a chain that is conceptually `c(b(a(end)))`, which we build from the inside + // out. + this.chain = dedupedInterceptorFns.reduceRight((nextSequencedFn, interceptorFn) => chainedInterceptorFn(nextSequencedFn, interceptorFn, this.injector), interceptorChainEndFn); + } + const taskId = this.pendingTasks.add(); + return this.chain(initialRequest, downstreamRequest => this.backend.handle(downstreamRequest)).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_7__.finalize)(() => this.pendingTasks.remove(taskId))); + } + static #_ = this.ɵfac = function HttpInterceptorHandler_Factory(t) { + return new (t || HttpInterceptorHandler)(_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](HttpBackend), _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_5__.EnvironmentInjector)); + }; + static #_2 = this.ɵprov = /* @__PURE__ */_angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineInjectable"]({ + token: HttpInterceptorHandler, + factory: HttpInterceptorHandler.ɵfac + }); +} +(() => { + (typeof ngDevMode === "undefined" || ngDevMode) && _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵsetClassMetadata"](HttpInterceptorHandler, [{ + type: _angular_core__WEBPACK_IMPORTED_MODULE_5__.Injectable + }], () => [{ + type: HttpBackend + }, { + type: _angular_core__WEBPACK_IMPORTED_MODULE_5__.EnvironmentInjector + }], null); +})(); + +// Every request made through JSONP needs a callback name that's unique across the +// whole page. Each request is assigned an id and the callback name is constructed +// from that. The next id to be assigned is tracked in a global variable here that +// is shared among all applications on the page. +let nextRequestId = 0; +/** + * When a pending